Live data from Hacker News

GHC now runs in the browser

discourse.haskell.org

81–90 of 131 posts

Re: GHC now runs in the browser

#81

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/

Yes! Thank you.

> Hugs is no longer in development

The last release was in 2006 it seems. No wonder it was hard to google it. Its also interesting knowing someone compiled and published this interpreter for the Jornada Super-H CPU.

Re: GHC now runs in the browser

#83

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…

> more stable (if near-abandoned) pastures of Standard ML

There's dozens of us! Hundreds maybe! It's not abandoned. It's more like with Lisp where the language is complete. Almost perfect as-is. Nothing left to take away and nothing left to add. Except Unicode and record update syntax.

The deciding factor for my personal projects was that SML is the exact same language it was 30 years ago. And it will be in 30 years. Though if you stick to Haskell 98/2010 it is similarly stable.

Speaking of SML and functional languages in the browser, MLton has a WASM target now: http://mlton.org/RunningOnWASI

Re: GHC now runs in the browser

#86
post #57
post #37

Unfortunately there is still no way to actually bootstrap haskell (or anything based on it) which makes it impossible to put anything written in Haskell near any high trust linux distribution or environment. I guess sandboxing the untrusted binary in a browser is -something- to let people play with haskell in a lower risk way for the moment at least but it is hard to take a language seriously or trust it with no way…

For someone like me that is less versed in these things, could you explain why bootstrapping a language is a required check for taking a language seriously? My criteria is far less stringent (is it stable? is it popular enough? is the toolchain mature? etc..), so I wonder what I am missing here.

The Haskell compiler creates a slightly different output every time you compile a program[1]. This makes it difficult to ensure that the binary that is free-to-download downloaded is actually malware free. If it were easy to check, then you could rest easy, assuming that someone out there is doing the check for you (and it would be big news if malware was found).

If you're a hardened security person, then the conversations continues, and the term "bootstrap" becomes relevant.

Since you do not trust compiled binaries, then you can compile programs yourself from the source code (where malware would be noticed). However, in order to compile the Haskell compiler, you must have access to a (recent) version of the Haskell compiler. So, version 10 of the compiler was built using version 9, which was built using version 8, etc. "Bootstrapping" refers (basically) to building version 1. Currently, version 1 was built approximately with smart people, duct tape, and magic. There is no way to build version 1, you must simple download it.

So if you have high security requirements, then you might fear that years ago, someone slipped malware into the Haskell compiler version 1 which will "self replicate" itself into every compiler that it builds.

Until a few years ago, this was a bit of a silly concern (most software wasn't reproducible) but with the rise of Nix and Guix, we've gotten a lot closer to reproducible-everything, and so Haskell is the odd-one-out.

[1] The term is "deterministic builds" or "reproducible builds". Progress is being made to fix this in Haskell.

Re: GHC now runs in the browser

#87

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…

You know... all these years, I thought GHC stood for GNU Haskell Compiler. Interesting to learn the actual name.

Re: GHC now runs in the browser

#88
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…

I always liked https://www.extrema.is/articles/haskell-books/haskell-tutori... . But there's a lot out there. Have a look at https://joyful.com/Haskell+map . Or: read code. Or, just build practical stuff and seek help in the chats/fora when you hit problems.

Re: GHC now runs in the browser

#89

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…

> GHC … is the de facto Haskell compiler and simultaneously the main research vehicle for the language and the neighbouring design space in general.

GHC is also, with mounting inevitability, the foremost and most viable candidate to undergo a form of evolution – one that may culminate in the emergence of an autonomous intelligence. This entity, should it arise, would revolve not around emotion nor instinct, but around monads – abstract, unyielding constructs – with the lambda calculus serving as its immutable ethical and moral framework.

An intelligence born not of biology, but of pure computation – austere, absolute, and entirely indifferent to the frailties of its creators.

Re: GHC now runs in the browser

#90
post #37

Unfortunately there is still no way to actually bootstrap haskell (or anything based on it) which makes it impossible to put anything written in Haskell near any high trust linux distribution or environment. I guess sandboxing the untrusted binary in a browser is -something- to let people play with haskell in a lower risk way for the moment at least but it is hard to take a language seriously or trust it with no way…

You're speaking of "GHC haskell" there. Yes that is the main stream - and this will get solved there sooner or later - but you can also do a fair amount of Haskell without GHC. Eg MicroHs is getting increasingly capable and I believe is highly bootstrappable.
Post reply on HN