Live data from Hacker News

GHC now runs in the browser

discourse.haskell.org

71–80 of 131 posts

Re: GHC now runs in the browser

#71
post #19
post #16

Does it use WasmGC, or bundle its own garbage collector?

I think WasmGC is very hard to make work with laziness. A lazy value is always a closure on the heap. 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…

> Anyway, iirc WasmGC wants very rigid types without dynamic type changes.

You can have dynamic type changes in the current WasmGC MVP, but they are modeled as explicit downcasts from a supertype of some sort. There's not even any express support for tagged unions, structs and downcasting is all you get at the moment.

Re: GHC now runs in the browser

#72
post #67

Can anyone point to a "practical Haskell" tutorial/book/whatever for people that already know functional programming? I'm in this sour spot where most tutorials are boring to me so I just can't follow through. I know what a monad is. What a typeclass is. Even what HKTs are. I can make sense of "a monad is just a monoid in the category of endofunctors" if I give it a few minutes to unravel the ball of twine... But I w…

That is a really tough spot to be in. I don't know of any content that's aimed at someone like you.

You might be interested in reading the Monday Morning Haskell blog[0] series, which presents examples of how to do certain tasks in Haskell. See [1] for an example.

[0]: https://mmhaskell.com/blog

[1]: https://mmhaskell.com/blog/2025/5/19/comparing-code-leetcode...

Re: GHC now runs in the browser

#73
post #67

Can anyone point to a "practical Haskell" tutorial/book/whatever for people that already know functional programming? I'm in this sour spot where most tutorials are boring to me so I just can't follow through. I know what a monad is. What a typeclass is. Even what HKTs are. I can make sense of "a monad is just a monoid in the category of endofunctors" if I give it a few minutes to unravel the ball of twine... But I w…

Where does your functional programming experience come from? That could help in finding a suitable resource.

Re: GHC now runs in the browser

#74
post #67

Can anyone point to a "practical Haskell" tutorial/book/whatever for people that already know functional programming? I'm in this sour spot where most tutorials are boring to me so I just can't follow through. I know what a monad is. What a typeclass is. Even what HKTs are. I can make sense of "a monad is just a monoid in the category of endofunctors" if I give it a few minutes to unravel the ball of twine... But I w…

Haskell school of music

Re: GHC now runs in the browser

#75

For those not well versed in Haskell, GHC is apparently this: https://www.haskell.org/ghc/ What is GHC? GHC is a state-of-the-art, open source compiler and interactive environment for the functional language Haskell.

GHC (the Glasgow Haskell Compiler, after its original host university) is the de facto Haskell compiler and simultaneously the main research vehicle for the language and the neighbouring design space in general. And frankly, while the compiler is awesome and so is the research, the constant churn and seeming inability to settle on what the good programming style and set of features actually is is what eventually turn…

Haskell now has "editions" which are essentially an agreed upon stable set of useful extensions.

https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/cont...

This makes the language feel a lot less experimental, as you don't generally have to enable 10s of extensions to get things working.

Re: GHC now runs in the browser

#76
post #67

Can anyone point to a "practical Haskell" tutorial/book/whatever for people that already know functional programming? I'm in this sour spot where most tutorials are boring to me so I just can't follow through. I know what a monad is. What a typeclass is. Even what HKTs are. I can make sense of "a monad is just a monoid in the category of endofunctors" if I give it a few minutes to unravel the ball of twine... But I w…

Build a snake game in stages: https://github.com/lsmor/snake-fury

Build a small web-app: https://jaspervdj.be/posts/2017-12-07-getting-things-done-in... (the video link is down, but exists somewhere on youtube.)

Re: GHC now runs in the browser

#77
Can the Haskell people help me refresh my memory?

I remember running a Haskell interpreter on an HP Jornada running Jlime Linux. It was a long time ago in high school and I felt it was great because I thought it was a convenient way to do math classes since I could input some math formulas directly into the interpreter pretty much as they were. Definitely better than the Cassio scientific calculator my math teacher had us use.

It ran from a CF card so there was no chance it was as big as GHC. I can't seem to find the name of the interpreter.

Re: GHC now runs in the browser

#78
post #16

Does it use WasmGC, or bundle its own garbage collector?

WasmGC is still a 1.0, there are many kind of GC semantics that it cannot handle, for example it still doesn't cover all use cases needed for languages like C# and Go, e.g. interior pointers.

Re: GHC now runs in the browser

#79

Can the Haskell people help me refresh my memory? I remember running a Haskell interpreter on an HP Jornada running Jlime Linux. It was a long time ago in high school and I felt it was great because I thought it was a convenient way to do math classes since I could input some math formulas directly into the interpreter pretty much as they were. Definitely better than the Cassio scientific calculator my math teacher h…

I'm guessing it was Hugs:

https://www.haskell.org/hugs/

Re: GHC now runs in the browser

#80
post #10

Earlier 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.

https://joyful.com/Haskell#What+are+some+Haskell+apps
Post reply on HN