News for hackers. Stuff that matters.
Re:Cmm_of_wasm: From WebAssembly to Native Code via the OCam... by leeoniya on Monday December 10, 2018 @03:41PM (#18651014)
what is it about OCaml that makes it popular as a first stage in implementing new languages and/or compilers?

also...

> and eventually we hope to hook into OCaml’s excellent garbage collector

isnt WASM gc-free? why would the output need explicit GC interaction?

Re:Cmm_of_wasm: From WebAssembly to Native Code via the OCam... by a0 on Monday December 10, 2018 @04:12PM (#18651197)
WASM currently does not have a GC but that's precisely why one is needed. Languages that target WASM need to implement their own GC but there's already a proposal to integrate a GC implementation into WASM[1].

[1]: https://github.com/WebAssembly/gc/blob/master/proposals/gc/O...

Re:Cmm_of_wasm: From WebAssembly to Native Code via the OCam... by e12e on Monday December 10, 2018 @03:55PM (#18651101)
As Wikipedia says of ml (meta language) languages in general:

"Its types and pattern matching make it well-suited and commonly used to operate on other formal languages, such as in compiler writing, automated theorem proving and formal verification."

https://en.m.wikipedia.org/wiki/ML_(programming_language)

Re:Cmm_of_wasm: From WebAssembly to Native Code via the OCam... by kryptiskt on Monday December 10, 2018 @03:53PM (#18651087)
Algebraic data structures are really nice for representing ASTs and intermediate languages. And a compiler lends itself very well to functional programming, because what you ultimately want is just a function that takes the input code and produces the output code.
Re:Cmm_of_wasm: From WebAssembly to Native Code via the OCam... by tomp on Monday December 10, 2018 @07:51PM (#18652486)
It's an extremely high-level language that compiles to extremely low-level fast code (except GC).