Hacker Newsnew | past | comments | ask | show | jobs | submit | loscoala's commentslogin

I also came across FORTH through hacker news. I ended up developing a compiler that can translate FORTH into C.

For the interested reader:

https://github.com/loscoala/goforth

It was a great experience and I can only recommend trying to develop a programming language yourself.


I have implemented yet another forth by myself. It works a little bit different and it is not intended to be a true copy of the original idea.

Since the post says you can discover Forth, here's my part:

https://github.com/loscoala/goforth

The main difference is that in this Forth variant, the source text is completely translated into bytecode and there is no runtime in the sense of classic Forth. This makes it easy to translate the bytecode to C.

I use my own Forth to generate C code with it, which I then embed in other software.


That can be very productive and clever, but be - and stay - aware that such polyglot solutions tend to be maintenance headaches in the longer run.

There is a really nice open source project out there that allows you to train your hearing and your sightreading, but it's written in the authors own language which in turn compiles to JavaScript and the headache to set up their toolchain is such that I haven't bothered fixing any of the bugs that I'm aware of (and there are plenty).

https://sightreading.training/

https://github.com/leafo/sightreading.training

It's written in a language called 'Moonscript':

https://github.com/leafo/moonscript

Which compiles to Lua. Which compiles to JS.

Madness. Nice madness, but still, it stopped me from being a contributor.


It's a little strange to talk about moonscript as something obscure, luarocks the main package manager for lua is written in it, not to mention itch.io. It's a proven language that's at least easier to learn than lua. (well, its at least more programmer friendly)


Sorry, but it just doesn't cross my threshold for 'mainstream', whereas Lua does at least get within striking distance.


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

Search: