As you may have noticed, I'm currently having a slight crush on #Forth (once more). First time I did was when I was only 14 years old and found a Forth compiler on an older issue of a magazine disk (64'er 08/1985, "Listing des Monats").
And the book you see in the photograph (Forth Gurus will recognize this instantly!) is the one I bought, back then in 1987 (look mom: no barcode on it) right after discovering said compiler for this "weird" language. There are even remnants of my former handwriting on the inside, where I put my old address in case I lost the book, some 36 years ago.
To be honest: I didn't get the hang of Forth for decades. I was either too lazy to dare try again or ventured down other roads of interest.
Until three days ago, when - for reasons too complicated to explain - I once more grabbed the book, worked my way through it and finally began to grok the concept behind Forth.
This is Rainbow. Inspired by colorForth. I've defined 4 FORTH stack manipulation operators with tests (in teal and orange) and demonstrated usage (in yellow).
They are actually all defined by the "—" operator which takes a quotation and uses the elements as labels for values that are further popped from the stack. So you can almost use standard stack effect notation to define a word! #Rainbow#FORTH#showcase
#RuinAFilm but programming language names:
Ghost in the #Haskell #Perl Is For Heros
In The Name Of The #Java
Schindler's #Lisp
Star Wars: The #FORTH Awakens
Manchester By the #C
The Truman #Go
Bringing Up #Ruby
Anyone get any other good ideas? #Puns#Joke
I know exactly what the problem is with eForth: I’m testing manually by poring over emulator execution traces; I’m not writing tests. I know the inner interpreter and some code words work, so I guess I’ll have to write a test framework out of that, and then test the effects of every other word until I’ve worked it all out. #TDD#FORTH
Today FORTH may seem like an obscure programming language, but almost every computer magazine I have from 1983/5 has articles and adverts for #FORTH products. So I would class it the most mainstream niche language.
I'm brand new here, so an #introduction is a good idea:
I'm a freelance tech writer / software developer / KM project manager based in Europe. Digitally, I was born in the 90s. So I grew up eating cyberpunk books, BBSs, home computers, hacking, then the first doses of Internet and the Web.
In the 90s and the first 00s I developed my (ahem) "philosophy": digital spaces are (can be, should be) autonomous zones where different cultures, and sub/counter-cultures, can thrive.
These are the years of the enshittification of Internet, but it can't rain forever (cit.) and I see the Fediverse as a new opportunity for some of us to recreate better and safer digital spaces.
That's the "vision". Than there's the daily life: I write code (awful, mostly), help companies in managing their knowledge bases, write technical documentation, sometimes write tech articles for (mostly unknown) business tech manazines.
In the spare time, I tinker with Linux, Risc-V boards and "old" languages like Forth, Assembly and C (but I'm a fan of Haskell too). I'm convinced that permacomputing and, maybe, collapse computing are our digital future. So, "back to basics" seems a good idea.
Pro Tip: Learn an old programming language. #Ada, #Erlang, #Pascal; #Forth or #Lisp if you’re hardcore. All of these have modern tooling. Don’t tie yourself solely to modern platform politics.
This is a call for help / verification on an alleged #Bug which I may have found in a #Forth#Programming tutorial online.
It's at beginner level, a bug in an exercise with regards to "flexible arrays".
The original code example and results are shown in the first two screenshots, but I'm dang sure this won't work as there's a 'rot' statement missing eventually resulting in a wrong return address.
When running the original example code, I get addresses with a 1 byte spacing for each array element. This can't be correct.
The last two screenshots show the fixed code with the missing 'rot' command added.
When running the second, fixed example, I get addresses that are spaced by 5 cells (5 * 2 byte). This is what I would expect.
I've grown tired of not having a good way to find & examine differences between my #forth block sets, so I'm going to write something to deal with this.
A followup. There are implementations of FORTH on RaspberryPi, including a “bare metal” one. I dont want to tie up one of my Pis, so I may opt for the more standard one, gForth.
Those of you who love #Forth, do you foresee a pathway out of obscurity for the language? In an era where memory safe languages like #Rust dominate, does forth have something to offer?
It used to be that its super power was being "just enough abstraction" atop #assembly language made it the king of flexibility. But in an era where machine language institutions are themselves just really fast macros in a tiny CPU cache, I'm not sure how helpful that is.
I think I’ll spend this afternoon working on FORTH and playing with PICO-8 a bit. I’d really like to have Picotron on a Raspberry Pi, however. Hm. Maybe I should write an OS…