@manifoldslug The plan is basically to build a small binary seed and bootstrap a friendlier programming system from that. The problem is that the architecture is very weird (Casio Pocket Viewer) so if I want to make the best use of the hardware I have to do some Weird Shit, like actually make use of segmentation instead of ignoring it.
My current approach is to start from #JonesForth and port it to 16 bit DOS and just play around with the language in DOSBox. I hope I can make the use of segmentation and threading less hacky than DOS by taking a holistic approach to the compiler, runtime, and storage.
A lot of the issues I see with storage and memory management seem to come from having to consider the program to be a black box. I hope that designing all the layers to work together can alleviate some of the irritating quirks of the hardware, like segmentation, or write amplification.
The end result I want is something like a small portable and malleable knowledge base and computational playground, something like a Lisp/Smalltalk/Forth machine in your pocket, plus some database features.

Frustration: escaping a Turing tarpit with Forth.

https://gitlab.cs.washington.edu/fidelp/frustration

This tutorial walks through a virtual CPU and Forth interpreter written in about 500 lines of Rust (not counting the comments).

It uses literate programming and is formatted as a small book. If you print it out it comes to about 30 pages. You can definitely follow the logic without knowing any Rust.

The focus is on writing the smallest interactive programming environment that can extend itself. A Forth program is included to demonstrate how this extensibility works.

Frustration was heavily inspired by #jonesforth and the J1 Forth CPU, although it doesn't share any of their DNA. I made this because I wanted to get rid of jonesforth's dependence on i386 assembly language.

I would love feedback. Please tell me if pieces are inadequately explained. I want this to be understandable to anyone who wants to learn regardless of past experience.

Peter Fidelman / Frustration · GitLab

Forth in Rust

GitLab

I have now successfully escaped my Turing tarpit.

Last week I made a small instruction set and memory map. This week I got a #forth running on it. It took about 1 KB.

I did this because I wanted to make a #forth teaching tool like #jonesforth but without the x86 dependency.

It is currently very ugly, so now I'll be cleaning it up. I also will make some changes to the instruction set because it has some design flaws. But it works! That's satisfying.