Levels of code in Forth programming (2002)
ultratechnology.com
Levels of code in Forth programming (2002)
1–10 of 53 posts
Re: Levels of code in Forth programming (2002)
#2Re: Levels of code in Forth programming (2002)
#3I realize the problem isn't Forth, some people (such as the writer for example) are capable of pulling amazing feats for such a primitive tool.
But as a result, the programming languages [0] I've designed since have all been part Forth and part Common Lisp.
Re: Levels of code in Forth programming (2002)
#4However, from my experience, since there is basically no syntax, all Forth programs tend to be a DSL for the problem at hand. It’s almost like having to learn a new language ok each new project. It’s like a complete opposite of what makes Go great.
Re: Levels of code in Forth programming (2002)
#5One example is a simple Forth word (macro) to convert 3 bytes into one 32 bit number integrates well into code for dealing with an adc chip.
However I wouldn’t want to write while applications in Forth as dealing with stack swaps becomes annoying. Still writing your own Forth is pretty fun too. I did mine by basing C compiler XMacros which made porting to an Itsy M4 trivial (about 3-4 of work) [1].
Still there’s a few Forth’s for Arduino’s, Itsy’s, ESP’s [2] which are really fun as they enable repl style interactive programming with hardware while still being blindingly fast!
1: https://github.com/elcritch/forthwith 2: https://github.com/zeroflag/punyforth
Re: Levels of code in Forth programming (2002)
#6Forth is pretty amazing. It really delivers on that old promise of “a language that will make you a better programmer in other languages”. However, from my experience, since there is basically no syntax, all Forth programs tend to be a DSL for the problem at hand. It’s almost like having to learn a new language ok each new project. It’s like a complete opposite of what makes Go great.
Re: Levels of code in Forth programming (2002)
#7Forth is pretty amazing. It really delivers on that old promise of “a language that will make you a better programmer in other languages”. However, from my experience, since there is basically no syntax, all Forth programs tend to be a DSL for the problem at hand. It’s almost like having to learn a new language ok each new project. It’s like a complete opposite of what makes Go great.
That is exactly what Chuck Moore wanted when inventing Forth.
Re: Levels of code in Forth programming (2002)
#8Some lessons simply did not age well.... Even in world of today's microcontrollers, which often have kilobytes of RAM and very different CPU styles, people still write mostly hardware abstracted code.
Re: Levels of code in Forth programming (2002)
#9Earlier quoted context omitted.
That is exactly what Chuck Moore wanted when inventing Forth.
I know. It’s a feature, but it makes it harder to share code (and Chuck Moore believes that sharing code is rarely worth it). Maybe he is right. His productivity is unbelievable :)
Re: Levels of code in Forth programming (2002)
#10A couple of questions:
1. Is it possible to write complex, modern applications (things like browsers, photo editors, etc. — things that would take millions of lines of Java or JS) using this style of programming?
2. What is “sourceless programming”? Where is a good place to learn more about it?