Hey all!
I've recently decided to sit down and try to make a toy language. Intrigued by a 2014 Robert Virding talk, and having a working AST in yecc and leex, I thought I'd play around with trying to compile it to Core Erlang.
In order to expedite learning about Core Erlang I decided to try to make a mix compiler for it for quicker feedback cycles, so I took a look at the Mix Erlang Compiler, and boy do I have no clue what's going on there. But I went in and tweaked hardcoded references to 'erl' and passed a command line flag in to the main compiler until I got something that worked.
I've had far less luck mimicking the test suite for the the Erlang Compiler task, but I can safely say my code works 100% of the time for the 1 hello world program I've tried it on once. The changes relevant to making the Erlang Compiler handle Core Erlang instead
can be found here, and as you can see they're pretty minimal.
I'm wondering if
- We'd actually want this in core, and if so
- If the Erlang Compiler could be parameterized to handle this case as well, or
- If a new compiler might make more sense
If consensus is this rightly belongs nowhere near core, I'd always appreciate some pointers on how I can improve what I have, or just any illumination into the compiler manifest code lifecycle, since I'll probably be using my code for a fair bit of experimentation over the next several weeks.