On May 27th @ 20:00 GMT+1 there will be an Elm online meetup:
https://meetdown.app/group/10561/Elm-Online-Meetup
========
The Lamdera compiler has been open sourced:
Mario has done some great work on figuring out how to extend the original Elm compiler whilst making minimal changes to the source code. He did give a presentation on this at the last Elm camp, but I didn’t fully grasp it at the time so… I am interested in learning how to build it, to explore and read some of the codebase, and understand the “extension” techniques used so that I can begin to learn how to make compiler contributions of my own.
I am starting from the point of being a novice at Haskell (15 years ago read a few chapters of a book and gave up when it started going on about monads), and having minimal knowledge of the Elm compiler code. As such, you can expect to be able to follow along from a similar starting point.
My intention is for this to be a cooperative learning session. If participants come prepared and ready to do some hands on stuff, we can go through the entire process of checking out the code, installing Haskell and any associated tooling necessary, and building it, and then running our locally built compilers on a test program.
If anyone has some spare time between now and the meetup and cares to do any investigation of the code, or have a go at hacking at something, do please bring your work along. I don’t need to be driving the entire session and we can take our time to get everyones build working or follow interesting tangents and so on.
To get you started, here is how I have begun my efforts to study the code:
mkdir -p lamdera/lamdera
git clone https://github.com/lamdera/compiler.git lamdera/lamdera/
mkdir -p elm/compiler
git clone https://github.com/elm/compiler.git elm/compiler/
kdiff3 lamdera/lamdera elm/compiler
(or use some other diff tool than kdiff3, but I quite like kdiff3 as an interactive tool for exploring a codebase diff).
Then look at the compiler/
and builder/
folders. Already I can see how the minimal injection of new code is being done, and how more extensive new work for Lamdera has been placed into the ext*
folders.
I hope to see you there!