That also gave programmers good incentives to write decent text editors and file systems that could deal with any number of lines, to get around that historic annoying limitation of FORTH. ;)

Granted it was nice to have a dead simple file system for embedded devices, but forcing you to keep your word definitions short always seemed like a lazy excuse for not having a real text editor and file system.

Sometimes you don't, but don't blame that on trying to incentivize programmer behavior. FORTH hardly ever "forces" programmers to do anything, so that excuse never rang true to me.

The "block" approach also forced you to not write comprehensive stack comments and documentation too, which is more important than keeping your word definitions short.

Otherwise you get dense sparsely documented code like this (which came from my Apple ][ Forth 40x24 screens):

https://donhopkins.com/home/archive/forth/supdup.f

Instead of documented code with stack comments like this (in spite of the fact that the attribution in the documentation is wrong ;) ):

https://donhopkins.com/home/archive/forth/alloc.f

https://news.ycombinator.com/item?id=27484426

Here's some IBM-PC Forth for the CAM-6 cellular automata machine that was block based -- check out the unique idiosyncratic right-justified reverse-indentation style (starting with KGET), which is not standard Forth style, but sure looks cool and poetic, like E E CUMMINGS ON CAPS LOCK:

https://donhopkins.com/home/code/tomt-cam-forth-scr.txt

https://donhopkins.com/home/code/tomt-users-forth-scr.txt

Tommaso Toffoli and Norman Margolus use that style of formatting in the CAM-6 book code samples too (i.e. page 20, Game of Life):

https://donhopkins.com/home/Tommaso_Toffoli_Norman_Margolus_...

Also the code in this paper by Rudy Rucker:

https://content.wolfram.com/uploads/sites/13/2018/02/03-1-6....

I wrote lots more about FORTH and the CAM-6 before:

https://news.ycombinator.com/item?id=23058545

DonHopkins on May 3, 2020 | parent | context | favorite | on: History of Logo

FORTH is the ultimate macro-assembler!
The assembler is just written in and integrated with FORTH, so you have the full power of the FORTH language to write macros and procedural code generators!

And it makes it really easy to call back and forth ;) between FORTH and machine code, with convenient word definitions for accessing the FORTH interpreter state.

Here's part of my SUPDUP terminal emulator for the Apple ][ with some 6502 code for saving and restoring lines of text in a bank-switched memory expansion card:

https://donhopkins.com/home/archive/forth/supdup.f

Here is a great example of FORTH and 8086 assembly code for hardware control (written by Toffoli and Margolus for controlling their CAM-6 cellular automata machine hardware), starting with "CAM driver routines" and also "creates fast code words for picking out bits of variable X":

https://donhopkins.com/home/code/tomt-cam-forth-scr.txt

https://en.wikipedia.org/wiki/Cam-6

Rudy Rucker wrote about learning FORTH just to play with that hardware:

https://www.fourmilab.ch/cellab/manual/chap5.html

>Starting to write programs for the CAM-6 took a little bit of time because the language it uses is Forth. This is an offbeat computer language that uses reverse Polish notation. Once you get used to it, Forth is very clean and nice, but it makes you worry about things you shouldn't really have to worry about. But, hey, if I needed to know Forth to see cellular automata, then by God I'd know Forth. I picked it up fast and spent the next four or five months hacking the CAM-6.

>The big turning point came in October, when I was invited to Hackers 3.0, the 1987 edition of the great annual Hackers' conference held at a camp near Saratoga, CA. I got invited thanks to James Blinn, a graphics wizard who also happens to be a fan of my science fiction books. As a relative novice to computing, I felt a little diffident showing up at Hackers, but everyone there was really nice. It was like, “Come on in! The more the merrier! We're having fun, yeeeeee-haw!”

>I brought my AT along with the CAM-6 in it, and did demos all night long. People were blown away by the images, though not too many of them sounded like they were ready to a) cough up $1500, b) beg Systems Concepts for delivery, and c) learn Forth in order to use a CAM-6 themselves. A bunch of the hackers made me take the board out of my computer and let them look at it. Not knowing too much about hardware, I'd imagined all along that the CAM-6 had some special processors on it. But the hackers informed me that all it really had was a few latches and a lot of fast RAM memory chips.