Hacker News new | past | comments | ask | show | jobs | submit login

Hi!

This project started with me going through "Writing An Interpreter In Go" (https://interpreterbook.com) and "Writing A Compiler In Go" (https://compilerbook.com) books by Thorsten Ball (however I've decided to implement it in C instead). Later I've decided to continue working on it with the ultimate goal of making an easy to use library out of it - something you can place in your source tree and immediately start tinkering with. I've also expanded upon the Monkey language (https://monkeylang.org) by making it more mutable and adding additional constructs such as loops and modules. A lot of time was spent on making it faster by not allocating memory where possible so it should be reasonably fast (pointers are kept in IEEE double NaN payloads so there's no need for allocating memory when doing numeric computations). It's still work in progress and I expect there to be plenty of undiscovered bugs but it should be quite useful already if you need a drop-in scripting language in your application. The language itself is also quite easy to use with it's C-like syntax and useful error messages.




This is awesome, this is also the second really interesting project I've seen that I suspect spawned from that book the first being V:

https://vlang.io/

I could be wrong about him having based his language off that book, but when he mentioned writing it first in Go I got the vibe it might be, plus he recreated Monkey in V. It amazes me how much V has grown in a short period of time, and how much your language has grown as well.

I've been wanting to buy those two books for a while, and I think I'm just going to have to based on the results. This reminds me of the CoffeeScript developer who also read a similar book years back and built CoffeeScript:

http://createyourproglang.com/


This is cool!

I can definitely second the recommendation for those two books, they really opened my eyes to the basics of what is going on under the hood of a compiler.

Recently I've been trying to target Monkeylang to Webassembly which has been a fun, if albeit frustrating exercise :)


Thank you for sharing your work. It's very inspiring and interesting. Kudos on getting the whole "standing on the shoulders of giants" ball rolling.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: