4 ms·
A Haskell Compiler – Slides on GHC Implementation (2013)
- nickpsecurity 8y agoThat runtime system is huge. I remember it was an obstacle to high-assurance in Haskell. Is there a detailed write-up on what those 80,000loc do? Maybe someone could redo it in one of the verifying, imperative languages like SPARK or ATS to increase its assurance without full verification.
- TheAsprngHacker 8y agoFor information about GHC's internals, I recommend reading https://ghc.haskell.org/trac/ghc https://ghc.haskell.org/trac/ghc. The RTS documentation is at https://ghc.haskell.org/trac/ghc/wiki/Commentary/Rts https://ghc.haskell.org/trac/ghc/wiki/Commentary/Rts.
- nickpsecurity 8y agoThanks!
- carterschonwald 8y agoThe rts is pretty nicely written c code. And folks on the ghc irc channel on frenode and mailing lists are all pretty helpful when you have solid questions
- noncoml 8y agoDo you know does it compare to JVM, v8, BEAM, etc? How many locs are they?
- deleted 8y ago[deleted]
- lalaithion 8y agoHotSpot has ~250,000 lines of C/C++.
- carterschonwald 8y agoJoachim Breitner did a simple high assurances rts backend a year or two ago
- Tehnix 8y agoYou might find https://www.aosabook.org/en/ghc.html https://www.aosabook.org/en/ghc.html interesting, which gives an overview of GHC and the decisions they made around it. I haven't heard anything about obstacles for high assurance, but the runtime is definitely considered stable, and rarely needs any components updated AFAIK.
- snaky 8y agoThat's doubtful that high-assurance Haskell is in much demand actually. People usually prefer much more strict (in both senses) languages for that, CakeML in particular comes to mind.
- carterschonwald 8y agoI tried to figure out what subset of sml cake uses but wasn’t able to find that anywhere in their docs But yeah, it’s definitely true that high assurance / high quality tools are still in their relative infancy (there’s lots of great stuff, but nothing I’d be comfortable using with colleagues at the drop of a hat for a quick project next week)
- snaky 8y agoBy the way, there is a project to "Implement a front-end for CakeML that accepts OCaml or Haskell syntax" > An involved version of this project would be to write a new verified parser for an alternative syntax. A simpler version would be to re-target the parser in the OCaml compiler to produce CakeML abstract syntax, and treat this as an executable specification. Similarly for any Haskell compiler that is amenable to such treatment. https://cakeml.org/projects https://cakeml.org/projects
- zallarak 8y agoHow do you go to the next slide on mobile?
- TheAsprngHacker 8y agoThat's a pain point for me as well; what I did was edit the URL to make the anchor fragment #(n) where n is the index of the desired slide.
- beyonddream 8y agoClick directly on the bottom right corner pagination index to move to next slide. It worked for me.
- ekr 8y agohttp://www.scs.stanford.edu/11au-cs240h/notes/ghc.html http://www.scs.stanford.edu/11au-cs240h/notes/ghc.html
- 5900 8y agoTap the part of the slide that contains text
- cardiffspaceman 8y agoI recommend a separate tab, I couldn't use the back button to return to HN after navigating many pages, on desktop Chrome.
- carterschonwald 8y agoIt’s worth noting that while still likely largely accurate, ghc has evolved a bit since 2011