DEV Community

Discussion on: Most Esoteric Language You've Used

Collapse
 
ivanpierre profile image
Ivan Pierre • Edited

I liked a lot FORTH when I was an ado. You can find it in a lot of places.
A lot of bar game machines were run with a sort of FORTH specialized in sprites management.
ZX80-81 Sinclair BASIC was mainly programmed with a FORTH family interpreter launched by an interrupt. This made the ROM very tiny, and big advantage you could use this language in your machine code and so make floating-point, Trigo, etc usable in your machine code games.
Even PostScript was in fact a FORTH, and you could execute programs in sending a program to print, with the printing of the result of the calculation on the page...
And for the best, as a FORTH core weight ~1K, it was ideal to manage embedded processor for whatever you want to control: Wash-machines, robots, bootstrap to load system, even a tiny system manager.
The only problem, you weren't allowed to mess with the stack. Sometimes some more impressive crash than in writing out of bound with C pointers.
A nice bug on the BBC was:
0 base ! 3 .
So pass in base 0!!! and display 3... :)
Hopefully, 3 was a FORTH word which gives 3, else decoding a number in base 0 would already have raised a problem.
After a while, the Beeb played random music. In fact, the overflowing stack crashed memory-mapped tone generators randomly... :D
The funnier thing was decoding the interpreter. The first thing to do was a 'disassembler' of FORTH definition. That was the first time I saw TCO, every final sub-call followed by a return was changed in goto.
Well, only fun...

Collapse
 
ambroseus profile image
Eugene Samonenko • Edited

1 2 + :) Forth is amazing!