Hi all – the Lamdera compiler is now open source!
Check out the announcement here: https://dashboard.lamdera.app/releases/open-source-compiler
Hi all – the Lamdera compiler is now open source!
Check out the announcement here: https://dashboard.lamdera.app/releases/open-source-compiler
Great news.
I know you did some clever things with modularising the compiler code a bit, and in such a way that additional features can be sort of plugged in without disturbing the original code. But I didn’t quite grasp all the details of that at Elm Camp, is there a summary somewhere? Having something more hackable seems like one of the big benefits of having Lamdera open sourced.
Are there any advantages to using lamdera as a drop-in replacement for elm? For example, does it give us Bytes through ports? Are there disadvantages of using it in this way? Not being open source was one disadvantage, not any more
Something else I wondered about. When you install the lamdera specific packages you do:
lamdera install lamdera/core
But those are not in the elm package repository. I am guessing the root lamdera/
must redirect the installer to read from a different location for those?
Are there any advantages to using lamdera as a drop-in replacement for elm? For example, does it give us Bytes through ports?
The Lamdera compiler indeed allows you to use bytes through ports. It also provides some extra packages. Perhaps the most useful one is lamdera/containers
which provides a Dict and Set type that don’t require comparable keys (you can read a bit more about it here).
The only disadvantage I’m aware of is that you can’t publish packages with the Lamdera compiler.
But those are not in the elm package repository. I am guessing the root
lamdera/
must redirect the installer to read from a different location for those?
Correct. The lamdera/*
packages are special-cased and loaded from elsewhere.
Is there a site somewhere that lists all the lamdera/* packages and docs? I know there is only a few, but it would be nice if they were discoverable easily.
Not yet - but we’ll add a page to the docs
For now you can check all the public repos here: lamdera · GitHub
Very cool! Any plans to update the nixpkgs expression to build lamdera
from source (and change the license)? I helped get the elm
expression working for 0.19
, so I might be able to lend a hand if needed.
Yes! @miniBill started that here based off your previous work but ran into some issues - any help would be very welcome!
Lamdera currently targets GHC 9.2 as we had some issues we couldn’t figure out & timeboxed on GHC 9.4+, so I think there may be two sets of problems:
Leo tried for (2) initially but then scaled back to (1). Assistance with either would be welcome.
Yeah, as @supermario said I’d love help on doing it. The branch has the point I’ve reached so far, but it will probably require a nontrivial amount of additional work