Earlier quoted context omitted.
yeah why would anyone want to run code on a website
It would be more plausibly practical if GHC could now target wasm, but this announcement is actually about being able to run the compiler itself in the browser.
GHC now runs in the browser
11–20 of 131 posts
Re: GHC now runs in the browser
#12Earlier quoted context omitted.
I think the immediate and obvious case would be educational materials. Other than that, technical achievements need not always be practical to be cool :)
Agreed. Too many people said Haskell is only for academia, yet we’re seeing more quality software being released in Haskell over the past few years.
Re: GHC now runs in the browser
#13Earlier quoted context omitted.
yeah why would anyone want to run code on a website
It would be more plausibly practical if GHC could now target wasm, but this announcement is actually about being able to run the compiler itself in the browser.
Re: GHC now runs in the browser
#14Interesting technical achievement but what would this be used for in practical terms?
Re: GHC now runs in the browser
#15Earlier quoted context omitted.
yeah why would anyone want to run code on a website
Loading 50mb of WASM is a big tradeoff just to run code on a website.
Re: GHC now runs in the browser
#16Re: GHC now runs in the browser
#17Interesting technical achievement but what would this be used for in practical terms?
Re: GHC now runs in the browser
#18Interesting technical achievement but what would this be used for in practical terms?
It lets you have that without the pain of hosting compilers server side.
Re: GHC now runs in the browser
#19Does it use WasmGC, or bundle its own garbage collector?
If an expression might be unused, throw a closure which computes it on the heap
If the value is actually needed, invoke the closure. Optionally replace the closure with a black hole. A black hole is just a closure which pauses any thread which calls it, to be resumed once the first thread finishes with the expression
Once finished, replace with a closure which immediately returns the computation result. (Or often save the indirection because most concrete values also act as closures which immediately returns themselves using info table pointers trickery)
Anyway, iirc WasmGC wants very rigid types without dynamic type changes. Extra indirections could fix that, Oor maybe defunctionalizing thunks into a tagged union, but both sound expensive. Especially without being able to hook into the tracing step for indirection removal.
Also, Haskell supports finalizers so WasmGC would need that as well.
Re: GHC now runs in the browser
#20Earlier quoted context omitted.
Agreed. Too many people said Haskell is only for academia, yet we’re seeing more quality software being released in Haskell over the past few years.
We are? Please share.