Haskell implementation in Javascript

Now that's a really cool effort, I'm just saying : A haskell interpreter in Javascript.

Well, yes : if only for possibly inspiring other folks (and... forks ;) from there.

Bravo, Mattis and the team. :)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Javascript as assembler

It seems to be that Javascript is becoming the assembly language for the web. Whether it be simple translation layers like Coffeescript or full-blown languages like this, it seems to be that more and more are writing languages on top of Javascript and making use of the large amounts of money and technical effort being poured into Javascript runtime. It'll be interesting where this goes.

We've been following this

We've been following this angle for a long time now. Check the archives.

Not for this case - just a slow interpreter

I was intrigued by this, and it _is_ cool, but their purpose seems quite different from the "Javascript as assembly" - they are writing an interpreter to make it easier for beginners to try Haskell in the browser, according to their English abstract [1]. Since it's for beginners, they excluded performance from the requirements [2].

I guess that if they cared about performance, they'd need to generate Javascript code that is then JITted, and (I guess) eval it to produce (JITted) function objects.

Yet, there is probably enough stuff to reuse, if someone wanted to replace the AST interpreter with a JS generator. I wonder if I could offer such a thesis to students - OTOH, I need students first :-D. I can't do it myself because it's my 1st PhD year, which means I've got to work on publishable stuff first.

[1] http://github.com/johang88/haskellinjavascript/blob/master/rapport/kapitel/abstract.tex

[2] "Finally it was decided not to optimize haskelltolken but the goal was to make a working implementation. This is so that a beginner will rarely have or will write applications that need high performance."
Google-translation of
http://github.com/johang88/haskellinjavascript/blob/master/rapport/kapitel/inledning.tex

I'd agree with this

I'd agree with this, "but their purpose seems quite different from the "Javascript as assembly" - they are writing an interpreter to make it easier for beginners to try Haskell in the browser", as I had the same feeling, actually.

Nevertheless, this is pretty interesting on its own, IMHO, as it gives a nice implementation example for Haskell achieved within the bounds of another functional language's even smaller (or is it?), though powerful, semantic; hence my "possibly inspiring other folks (and... forks ;)" in opening the thread.

That'd be nice indeed to see someone leveraging this to come up with another, CIL-based implementation, for instance.

I like it

But where can I try it? Or do I need to install it locally?

Install it locally

"We decided to not add any more time on creating a user friendly website" - from the Google-translate'd version of:
http://github.com/johang88/haskellinjavascript/blob/master/rapport/kapitel/inledning.tex
And anyway, this project is just a Master Thesis, not really intended for public release. They didn't write the thesis in English, for instance.