Hacker News new | ask | show | jobs
by stevekemp 35 days ago
I enjoy working on toy-languages, and I've spent the past ten days or so writing a compiler to convert a simple language into (static) linux/amd64 assembly.

It supports strings, integers, and floating-point operations, and is complete enough that I could implement a brainfuck interpreter in it. But otherwise it is very definitely a toy.

https://github.com/skx/s-lang/

It was fun writing out the assembly, e.g. writing the "standard library" functions to implement "getenv", etc.

1 comments

It sounds a great language! i did star the repo :]