[Dream] Toward another compiler?

This would be what I’d want to focus on. A new compiler toolchain could be centered around providing the best editing experience with first-class debugging and hole-driven development. It would never beat GHC compiled code in terms of performance, but could wind up being more ergonomic than GHCi.

3 Likes

Ben Lynn’s talk has been published:

9 Likes

While we’re in hypothetical “would like to see” for Haskell compilers, I would like to see (and would even pay money for):

  • A Haskell compiler that compiles with CAS out of the box like Unison, that solves a dozen problems related to distribution, recompilation, test suite running, etc.
  • A Haskell compiler that fully embraces the Lisp image in which I can update definitions in place, avoid type erasure so that I can inspect things running live, and for bonus points provide a way to migrate programs live.
  • Haskell with an Erlang runtime i.e. no shared memory, separate GCs per process, supervisors, etc.
  • Haskell with a Lisp like macro system from the beginning.
  • Haskell as a single statically linked self contained binary, with some batteries included, like DrScheme.

I think most of these are hard to do from GHC.

I thought about using Duet to dabble with these ideas. The source code to that is not my favorite, as I lifted most of it from THIH with modifications, I understand it on a superficial level, but it’s the most faithful Haskell implementation I have. Inflex is my “best work” compiler, so its source code is a much higher standard of quality and clarity and test suite than Duet, and I built every part from the ground up, but it’s for a mini Unison-meets-PureScript language for spreadsheets. I thought that I could fairly easily re-skin it as a miniature Haskell, though, and drop the row types from it.

Overall I feel like it’d be fun to have more mini Haskells knocking about that try “Haskell but what if instead” that are hard to try in GHC. Not to say there aren’t others Haskell Implementations Archive · GitHub but they’re all quite old.

8 Likes
4 Likes

I really want this, this would make it so much better!

Ohh god, yea please!

2 Likes

“content-addressable storage” : another buzzword buzz-term for the collection, taking its place alongside “write once, run anywhere” and “orthogonal persistence”.

…and perhaps making some all-new ones:

@atravers I’m not sure where you are going with this. @chrisdone has explicitly added “like unison”. Maybe a reference to 💡 The big idea · Unison programming language helps?

I’m not sure we need to derail everything into nix.

4 Likes

It’s a matter of transitivity:

  1. A Haskell implementation supporting $STORAGE;

  2. $STORAGE is used by $SYSTEM;

  3. $SYSTEM (at that time) had no way of clearing errant content, presumably from its $STORAGE facility.

…here, $SYSTEM=Nix; $STORAGE=CAS.

But almost four decades ago, it was $SYSTEM="operating system"; $STORAGE="virtual memory system" :

(…I missed one - $STORAGE_DEVICE="disc" :-)

Apart from being distributed, has anything substantially changed in those “low-level parts” (of OSs or CASs) since then?

Could Hackett’s macro system (and the associated research) be of any use for that purpose?