Hacker News new | ask | show | jobs
by japanoise 2197 days ago
A Forth shibboleth is that you have to implement your own in order to understand it. Try reading the assembly, then forth source, for jonesforth: https://github.com/AlexandreAbreu/jonesforth

This is how I learned.

1 comments

Oh wow, thanks. That is pretty much exactly what I was looking for.
For anyone stumbling over this and having trouble to build it, I had to figure out two things: 1. When building on x86_64 Debian, I had to install linux-libc-dev:i386 to get /usr/include/i386-linux-gnu/asm/unistd.h. I also had to adapt the include path to have it actually found. 2. If you see a segfault when running the executable, you likely need to remove -Wl,-Ttext,0 from the build command. At least on my system, it fixes the segfaults and now jonesforth runs as expected.