Live data from Hacker News

Thoughts on Forth Programming

call-with-current-continuation.org

11–20 of 97 posts

Re: Thoughts on Forth Programming

#11
I feel like, from the "individualism" perspective, Forth is really a tool for hackers.

Hackers usually work alone or in very small groups, and the tools they need are usually handcrafted. They do not need corporate-level software, and long do they strive to be left alone, without being bothered.

Re: Thoughts on Forth Programming

#12
post #2

> In Forth there is only memory - word and byte-sized cells of storage in memory, and stacks. You step down on the level of assembly language which may sound daunting, yet gives you full control over every aspect of memory layout. Other than in niche or pet projects, can this even work? If you deal with any sort of multibyte data like Unicode, doesn’t this become way harder? Or do you just punt and use ascii code pag…

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#.

It's not like pure CIL or JVM bytecode when the language can be extended. The process is to make what you need and only then write the program. It's remarkable how fast you can move up language levels once you grok it.

Re: Thoughts on Forth Programming

#13
Can you please give some examples on those who are extremely productive using FORTH? I'm intrigued. I think FORTH could be very useful to someone who prefers to work alone or in small group, but I'm not sure how do they use it in daily life.

Re: Thoughts on Forth Programming

#15
post #14

[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

#16

Can you please give some examples on those who are extremely productive using FORTH? I'm intrigued. I think FORTH could be very useful to someone who prefers to work alone or in small group, but I'm not sure how do they use it in daily life.

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.S.R., the Russians independently discovered Forth in DSSP, an incredibly similar language. Multiple universities were filled with DSSP, and it worked incredibly well for them.

Most of the people I know personally who are stopped posting code publicly when Gitorious died, but they're definitely still around. It's a bit like APL, my language of choice: the communities are there, they're just...in hiding.

Re: Thoughts on Forth Programming

#19
post #4

This quote stood out as sounding quite far-fetched: "on many CPUs the interpreter consists of two or three machine instructions". Can someone point to an example?

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

#20
post #16

Can you please give some examples on those who are extremely productive using FORTH? I'm intrigued. I think FORTH could be very useful to someone who prefers to work alone or in small group, but I'm not sure how do they use it in daily life.

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?
Post reply on HN