News for hackers. Stuff that matters.
Re:Scheme in Scheme on WASM in the Browser by giancarlostoro on Friday December 15, 2023 @09:19PM (#38661155)
I love this, I had this idea back in 2020, a lisp that compiles to WASM, and then can compile itself to WASM at run-time in the browser, or any WASM run-time, dogfeed itself. I'm not a compiler guru by any means, so its just one of many things on my bucket list.
Re:Scheme in Scheme on WASM in the Browser by lamerose on Saturday December 16, 2023 @12:26AM (#38661975)
The article is presenting a Scheme interpreter running in Scheme, compiled to WASM, not a Scheme compiler, but your idea is also cool. The WASM API apparently doesn't need a pre-made file as its input: you can pass raw bytes generated during runtime into the Module constructor, so it would be totally feasible.
Re:Scheme in Scheme on WASM in the Browser by davexunit on Saturday December 16, 2023 @07:15AM (#38663691)
When we have the compiler running in Wasm we'll post about that, too. That's the dream.
Re:Scheme in Scheme on WASM in the Browser by pankajdoharey on Saturday December 16, 2023 @01:23AM (#38662193)
Someone actually wrote a scheme back in 2017 https://github.com/google/schism so this isnt new. Infact the whole idea of WASM is not new, 20 yrs back Sun had the same idea, embed compiled bytecode inside browser called applets, developed in JAVA. Even flash was a similar idea, though flash VM was riddled with security flaws. This failed to gain wider acceptance, now 20 yrs later we have a embedded bytecode compiler in the browser, but it may work this time.
Re:Scheme in Scheme on WASM in the Browser by pankajdoharey on Saturday December 16, 2023 @06:27AM (#38663468)
Explain why you downvoted this? Self hosting scheme compilers on WASM is not new. HN a compliance Ghetto?
Re:Scheme in Scheme on WASM in the Browser by tmtvl on Saturday December 16, 2023 @06:47AM (#38663572)
I don't know why you've been downvoted, I've given you an upvote for linking to an interesting project (even if it's linked in some way to Google). I'd also like to link to the updated GH link: <https://github.com/schism-lang/schism>.
Re:Scheme in Scheme on WASM in the Browser by pankajdoharey on Saturday December 16, 2023 @07:04AM (#38663644)
Thanks.
Re:Scheme in Scheme on WASM in the Browser by pankajdoharey on Sunday December 17, 2023 @03:30AM (#38671281)
This is what a Ghetto Looks like. If i had a way to delete my account i would be happy.