Open paf31 opened 9 years ago
Yeah, definitely. My goal is to eventually get everything that works in regular PureScript working in Pure11, so self-hosting is a good and classic way to prove it out.
Not entirely related, but as an FYI, I've also been starting to think of the other memory management options (user-configurable) I've alluded to in the readme, specifically the Boehm GC.
Just curious what the status of this is, and any pointers. Would this also apply to purescript (original JS compiler), so that one could potentially compile purescript directly in the browser? Though perhaps web assembly might be another route that, while less portable, is likely to be good enough for most people wanting to compile purescript in the browser.
@bbarker I think the purescript maintainers stopped working on it some time ago, but I might be wrong. It was indeed the main purescript compiler (ps-to-js) they were working on, nothing specifically targeting the C++/native or any other backend. Original work was here. Phil's idea in this report was to get a native exe compiler (targeting js, etc), instead of running it in node or maybe the browser.
We previously put the purescript-in-purescript self-hosted compiler project on hold even though it was functional, because the generated JS was too slow. Rewrites might be a good way to speed it up, but I think that pure11 could be another good approach. If we could get it to compile, then the C++11 target could be a good way to distribute a cross-platform self-hosted compiler.
It would require porting some FFI libraries, so it would require quite a lot of work, but I'm pretty excited at the idea.
Would you be interested in working towards this as one long term goal, once we get the multiple backends/FFI stuff out of the way, and hopefully pure11 merged into
psc
?