monte-language / monte

A dynamic language inspired by Python and E.
Other
79 stars 11 forks source link

Monte-to-WASM compiler #83

Open dckc opened 7 years ago

dckc commented 7 years ago

@erights asked me how hard it would it be to compile Monte to wasm.

I said the anf branch looks like the hard part is done, though the issue of GC (and runtime) remains.

Meanwhile, I see this discussion (I presume it's OK to publish...):

dustyweb (aka @cwebber):

WASM-GC will (when it eventually happens, which may take 2 to 3 years) have unforgeable references and all the things #erights probably rwants :) https://github.com/WebAssembly/gc/blob/master/proposals/gc/Overview.md the right thing to read if you want to read it

simpson (aka @MostAwesomeDude):

dustyweb: I may very well have written a Monte-to-WASM compiler by that point, although probably not.

dustyweb

simpson: cool! I sat in on the WASM group during TPAC btw I was... super impressed.

simpson:

"Efficient interoperability with embedder heap" ah, yes, I too would like to ensure that my GC'd high-level languages retain the ability to spray the browser's heap. Er, I meant for a ~ sarcasm mark.

dustyweb

simpson: in the WASM-GC proposal memory would be managed by the browser though so it wouldn't be "dangerous" but yes it may be a spray :)

simpson

"an untyped language (e.g., a subset of Scheme or Python or something else)" Hmm, I wonder what people are thinking of. Hopefully a member of the E family! Yeah, I know it's up to the boundary of the browser, it's just that none of the browsers are built cap-safe internally yet.

dckc commented 5 years ago

https://github.com/monte-language/spotter could be part of a solution here; the reference WASM stuff is in ocaml.