What to look to in order to write a BEAM VM language?

190 Views Asked by At

I'm about to start a toy project, that is implementing my programming language. I'd like to make a language that runs over BEAM like Elixir. It can be simple, it's just a toy project.

I found some links about BEAM bytecode, and that stuff but nothing very clear so I am asking here for an outline about how to write a language to this VM.

1

There are 1 best solutions below

1
Yatender Singh On BEST ANSWER

It would be best to start looking at how the BEAM works internally, https://blog.stenmans.org/theBeamBook/ will give you more ideas about it. Then you can look into existing languages implementation, here is the list https://github.com/llaisdy/beam_languages#34-languages-on-the-beam Check how they convert things to AST then how AST gets converted to BEAM code etc.