Hacker News new | past | comments | ask | show | jobs | submit login

I think "all of Ocaml compiles to JS " is a bit optimistic. AFAIK, code using Jane Street's Core stdlib doesn't work. But a lot of Ocaml code should be fine.



All of the core compiler library does compile to efficient JavaScript. For instance, see the IOCamlJS interactive notebooks that embed the entire compiler in the browser with a web UI. Just press the play button:

- http://andrewray.github.io/iocamljs/oh261.html (H.261 video decoding)

- http://www.ujamjar.com/hardcaml/ (HardCaml RTL hardware description language, similar to Chisel in Scala)

- http://gazagnaire.org/fuconf14/ (building a 2048 game implementation)


He was talking about Jane Street's replacement stdlib. I heard Core_kernel can be compiled to JS though.


This is because Core relies on OS/FFI. I think as long as it isn't using OS/FFI it can compile, although I may be wrong on that count.




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

Search: