Thinking Forth (1984)
thinking-forth.sourceforge.net
Thinking Forth (1984)
1–10 of 51 posts
Re: Thinking Forth (1984)
#2 FORTH ?KNOW IF
HONK!
ELSE
FORTH LEARN!
THENRe: Thinking Forth (1984)
#3At the time, I had no idea that it was a discrete programming language; it only registered in my mind as part of the OpenBoot/OpenFirmware environments. Then I ran into the FreeBSD bootloader and things finally clicked. "Aha," I thought, "this is an actual programming language." But what made it so popular for the early boot process, and where else was it used?
The modularity was stunning. It was easy- almost absurdly so- to build complex code up from a series of tiny individual functions. That, coupled with the minuscule interpreters and simple stack-based approach, made perfect sense for situations where developers need to perform complex tasks with minimum of storage overhead, and with portability as a first class citizen.
Re: Thinking Forth (1984)
#4Personally I never see backend development or mobile frontend job vacancies that require Forth skill, for example.
Re: Thinking Forth (1984)
#5Beside embedded system or firmware, what are Forth's popular use cases these days? Personally I never see backend development or mobile frontend job vacancies that require Forth skill, for example.
It allows you to train yourself to have a complete control and command of your code making for tighter, simpler solutions for complex problems ( In my personal experience and comments for those that have been introduced to FORTH.)
If you consider that Embedded is a highly constrained resourced environment, then FORTH is a fantastic choice. Now step back, consider that statement once more, and you could be onto something even greater, as there is lots of resource waste-gates on modern OS and Computers. Now that Power is becoming a greater constrain resource, there might be an opportunity for someone to build something great in forth.
BTW the biggest back en used case is the bitcoint smart contract which is based on FORTH.
As you can see, and in full agreement in your statement, FORTH is a not a job magnet, IMO, you get better at programing understanding FORTH.
See Bret Victors talk, https://youtu.be/PUv66718DII you most of that already @ Forth ...! :;
Try it, you'll never go back! :)
Re: Thinking Forth (1984)
#6Beside embedded system or firmware, what are Forth's popular use cases these days? Personally I never see backend development or mobile frontend job vacancies that require Forth skill, for example.
IMHO opinion Forth is hard to learn, takes more effort to bootstrap your project (more like Assembler) and more importantly it is hard to switch gears to think with Chuck Moore's methodology. However once learned it can make one very productive.
Forth was (is?) used for experimental control in the ISS quite regularly. The ability to wip up a simple DSL that talks directly to hardware and will compile or can be used as a script is a win for those custom projects.
It's running in the FEDEX handheld package scanner from what I understand. (may be dated information) Funny story that. Way back, Version I was started in C but they hit the ROM size limits on the hardware that was already finished. Forth Inc. was asked if they could help. Using their Forth RTOS they re-wrote it and it all fit with room to spare. (Indirect-threaded-code is tight)
Years later, Version II hardware was designed with waaay more memory. Re-write in C fit nicely. All good.
But... the batteries would not last for an entire shift. Forth Inc was brought in again and they own their task scheduler so they modified it to put the CPU to sleep at every chance they could. Batteries lasted.
Largest known Forth program is on Windows. https://ribccs.com/candy/ 1M+ LOC. Compiles with VFX Forth by MPE UK.
Re: Thinking Forth (1984)
#7Beside embedded system or firmware, what are Forth's popular use cases these days? Personally I never see backend development or mobile frontend job vacancies that require Forth skill, for example.
Re: Thinking Forth (1984)
#8It is a Forth book, but I think anyone could get things out of it.
Leo Brodie's cartoons are very good too. One of my favourite ones is of a machine called the "Universal Processor" with a blender on top and computer keyboard underneath and a knob on the front which has three positions "Word", "Food", "Data" illustrating the danger of building over general solutions.
Re: Thinking Forth (1984)
#9Beside embedded system or firmware, what are Forth's popular use cases these days? Personally I never see backend development or mobile frontend job vacancies that require Forth skill, for example.
Re: Thinking Forth (1984)
#10My introduction to Forth was tinkering first with Sun SPARC machines in the late 90s and then PowerMacs in the early 00s. At the time, I had no idea that it was a discrete programming language; it only registered in my mind as part of the OpenBoot/OpenFirmware environments. Then I ran into the FreeBSD bootloader and things finally clicked. "Aha," I thought, "this is an actual programming language." But what made it s…
Probably simplicity. You can get a very basic Forth system going in a few dozen assembly instructions. Then, you write some Forth "primitives", words written in assembly, to do things like basic arithmetic, branching, stack manipulation, and memory manipulation. There are endless debates about how many primitives you really need, but in general a couple of dozen primitives ought to get you started.
Then the rest of Forth is just written in Forth! You might not really have recognisable Forth source at this stage but more complex words can be written out as lists of the addresses of primitives. Think of it as like rolling your own macro assembler. The "inner interpreter" reads these lists of addresses and either jumps directly to the machine code in a primitive, or into a command that starts the inner interpreter chewing on a new word, pushing the one you've just come from onto the return stack.
It seems really really complex until at some point as you stare at it, it'll just snap into focus and you see it's actually a very simple thing that does a very clever trick.