What do you gain by eschewing local variables in favor of reverse polish notation that throws values onto a stack?
Thoughts on Forth Programming
21–30 of 97 posts
Re: Thoughts on Forth Programming
#22Re: Thoughts on Forth Programming
#23Earlier quoted context omitted.
Chuck Moore wrote a VLSI tool in 500 lines of colorForth that he's used for multiple chips that he's put on production lines: (Site mirror as the original site is gone.) https://colorforth.github.io/vlsi.html John Earnest has a lot of cool things (his work is incredibly underrated), but an example of something he wrote in Forth is Mako, an entire console: https://github.com/JohnEarnest/Mako During the days of the U.S…
Do you know of any good code repositories for DSSP?
Re: Thoughts on Forth Programming
#24Earlier quoted context omitted.
Chuck Moore wrote a VLSI tool in 500 lines of colorForth that he's used for multiple chips that he's put on production lines: (Site mirror as the original site is gone.) https://colorforth.github.io/vlsi.html John Earnest has a lot of cool things (his work is incredibly underrated), but an example of something he wrote in Forth is Mako, an entire console: https://github.com/JohnEarnest/Mako During the days of the U.S…
Do you know of any good code repositories for DSSP?
I did find one short paper in English: http://www.complang.tuwien.ac.at/anton/euroforth/ef00/lyakin...
Re: Thoughts on Forth Programming
#25[deleted]
I would've agreed, but there are annoyingly arbitrary line breaks in the middle of sentences. A more minimalist approach would call for breaking only at the end of sentences, and letting the user's browser wrap in whichever way they preferred their window size + custom stylesheets + plugins to be
Re: Thoughts on Forth Programming
#26Re: Thoughts on Forth Programming
#27Earlier quoted context omitted.
Do you know of any good code repositories for DSSP?
I wondered too (first I've heard of this) but all I find is in Cyrillic: https://github.com/trinarium/DSSP-C I did find one short paper in English: http://www.complang.tuwien.ac.at/anton/euroforth/ef00/lyakin...
Re: Thoughts on Forth Programming
#28Earlier quoted context omitted.
In FORTH there is a distinction between the compiler and the interpreter. Each function in FORTH is called a "word". You define a word by giving it a name (historically only the first X characters counted -- often 8). The compiled words are stored in a "dictionary" which is essentially a key value pair with the name of a compiled word and a pointer to its compiled code. When you are compiling a word, you add a new en…
It the kernel and interpreter typically single threaded? I'm curious how it handles UARTs, IRQs and atomics.
Re: Thoughts on Forth Programming
#29Earlier quoted context omitted.
This can work, but it's incredibly tedious and not worth the trouble. Writing in Forth is like writing in pure CIL or JVM bytecode (they're both stack machines like Forth). Sure, you can do it, but if it was so rewarding, people wouldn't be using Java or C#.
That's not true at all. I know multiple people who are incredibly productive in Forth environments, though I don't use it myself. Pretending that it's like writing in JVM bytecode (despite some overlap between the two) is completely unfounded. Your claim that C# and Java won based on merits is similarly unfounded: they won because they have major corporate backing. There are countless languages before and after that…
I've met a lot more FORTH fanatics, people for whom FORTH was the answer no matter the problem; people who just would not shut up about how superior and fantastic it was, and have you seen the light, brother? Okay, most of them weren't that bad, but a few were (one guy I worked with got fired because (a) he told his boss that FORTH was all he was going to use, (b) the FORTH runtime was over half of his code budget and he had kinda been keeping that secret, and (c) none of that fantastically FORTH code was compatible with the ROM it needed to run on . . . so you can imagine that fun little tete a tete).
Whatever the languages's wins or faults, it's still a great idea to write your own FORTH at some point. It's a ton of fun, and quite instructive when you've gotten a fully functional programming environment that fits in a few tens of kilobytes.
Re: Thoughts on Forth Programming
#30I have been looking at Forth programming and one thing I would like to figure out is how to use gforth under Linux in a pipeline of shell and awk. I haven't yet found a practical use for Forth in this environment yet...
Forth's design is to give you the machine and let you compute with it rather than to act as part of a pipeline.