News for hackers. Stuff that matters.
Re:Bootstrapping a Forth in 40 lines of Lua code (2008) by tzs on Monday September 14, 2020 @11:25AM (#24471259)
Here's a comment from a few years ago where I go over how do make a FORTH-like language starting from a simple basic RPN calculator in C [1] and then adding programmability (mostly implemented in the language itself with only a little bit of C support), and finishing with some ways you could optimize it to actually get decent performance.

This would be reasonable afternoon project (except for the optimization stuff).

None of the C code is complex or tricky or big. You could easily do it in assembly instead. That's why these kind of languages are great for a lot of embedded applications. You only need to write a small assembly core to support your language, plus assembly function to support your hardware, and then you can do everything else in your higher level FORTH-like language.

[1] https://news.ycombinator.com/item?id=13082825

Re:Bootstrapping a Forth in 40 lines of Lua code (2008) by stevekemp on Monday September 14, 2020 @01:32PM (#24472764)
I hacked up a quick implementation of your writeup in go just now, as I said at the time your summary was wonderfully direct and "obvious".

https://github.com/skx/foth

Thanks again, four years later!

I'll get the compilation phase done tomorrow, barring surprises.