Hacker Timesnew | past | comments | ask | show | jobs | submitlogin
Haskell in JavaScript (github.com/johang88)
64 points by ihodes on Oct 9, 2010 | hide | past | favorite | 12 comments


Awesome. It'd be cool to see http://tryhaskell.org/ use this.

Also, when using the REPL, it stops after about 2 seconds trying to print "[0..]", which is a very nice feature.


Excellent.

Is it just me, or does JS seem like its fast becoming the new object code?


It's about time. Because of browsers, jdk 6+ (which comes with rhino, the javascript runtime) and v8 (specially on nodejs), javascript is one of the most widely deployed languages/platforms. It is on desktops, mobile phones and servers.


If you're interested in this, you might also want to look at the JS backends for GHC and Yhc:

http://vir.mskhug.ru/

http://haskell.org/haskellwiki/Yhc/Javascript


http://github.com/sviperll/ghcjs

It's another attempt by "vir" to create haskell-to-javascript compiler. Now it uses "GHC as a library" (ghc package) and should be more amenable to hacking.


Once everything runs in JS, the browser will become the defacto write-once, run-anywhere platform...


I believe that Google agrees with you: http://code.google.com/p/chromium-os/


For something along the same lines, I'd like to shamelessly plug http://www.wescheme.org/

The heart of WeScheme is moby-scheme a self-hosting compiler http://github.com/dyoo/moby-scheme . The server runs on AppEngine.


REPL live in your browser here:

http://hiji.tinyrocket.se/


Too bad that even simple commands like "sum [1..10]" don't show output. :-(

Just "[1..10]" or a simple calculation like "1 + 1" work fine.


It looks 'sum' is not defined at all. Looks just ignoring undefined symbol.


Very nice! I've been loving Haskell, but I spend most of my time in Javascript. This is a pleasant mix of both.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: