Live data from Hacker News

Forth: The programming language that writes itself

ratfactor.com

91–100 of 174 posts

Re: Forth: The programming language that writes itself

#91
post #5

Many people glorify the simplicity of Lisp as an interpreter, but Forth is similar and underappreciated. Sadly, the only code I've written in Forth is... PostScript. Yeah, PostScript is a dialect of Forth. As a child, I really was amused by the demo of GraFORTH on Apple ][, which included 3D wireframe animations, which at the time were magical.

I had a copy of that as well - I forget whether it was a Christmas gift or if I bought it. The demos were neat, but I was lacking in ideas when I had time to play with it, and the Apple didn't go to college with me.

But if I were going to do some "from the ground up, using first principles, with nobody else's libraries" embedded work, Forth would certainly be something I'd consider.

Re: Forth: The programming language that writes itself

#92
post #40

Earlier quoted context omitted.

That argument implies that you would actually see these languages in communities with large SV style salaries which isn’t the case. It turns out that “brick layer” languages are also easier to understand not just for the next person taking over but yourself after a few months. That’s valuable even to yourself unless you value your time at 0.

Why? The less the VCs have to spend with employees the better. See the famous quote about Go's target audience, or 2000's Java being a blue colour job language. Not only do languages like Lisp, Forth, Smalltalk require a people to actually get them, a bit like the meme with burritos in Haskell, they suffered from bad decisions from companies pushing them. Lisp suffered with Xerox PARC, Symbolics and TI losing against…

Your entire post makes the claim that it’s because the vast majority of programmers get paid the same as other roles and that’s why there’s the language selection pressure there is.

High salary jobs would be the exception yet they also make pragmatic choices about languages. It’s a two sided market problem - employers want popular languages to be used so they have a talent pool to hire from and don’t end up having a hard time finding talent (which then also implies something about the salary of course but it’s a secondary effect). Employees look to learn languages that are popular and are easy to find employment in.

Not sure if you’ve spent any time with them but VCs and investors more broadly generally could give two fucks about the language a business is built in. There are exceptions but generally they just want to see the business opportunity and that you’re the team to go do it.

There’s a reason it’s difficult to find employment with Haskell or Lisp or other niche languages and it’s because they’re niche languages that “you have to get” - not easy to learn and generally not as easy to work with as “popular” languages that see significantly more man hours dedicated to building out tooling and libraries. There’s also secondary things like runtime performance which is quite poor for Haskell or Lisp if you’re a beginner and even people familiar with the language can struggle to right equivalent programs that don’t use significantly more memory or CPU. And finally the languages can just be inherently more difficult and alien (Haskell) which attracts a niche and guarantees it remains a niche language that attracts a particular kind of person.

Re: Forth: The programming language that writes itself

#93
I spent a few months playing with forth after seeing a talk on it at Boston Code Camp. I struggled to find a practical application (I do web dev), but it had a lasting effect on my style of programming. Something about the way you factor a forth program changed me. Now I mainly do functional-flavored typescript, and while forth is NOT an FP language, there is a lot that carries over.

In Forth, the language rewards you for keeping your words focused and applying the single responsibility principal. It’s very easy to write a lot of small words that do one thing and then compose your program out of them. It’s painful to not do this.

There is no state outside the stack. If you call a word it pulls values off the stack and deposits values back on the stack. Having no other mechanism for transferring data requires you to basically create data pipelines that start to look like spoken language.

Re: Forth: The programming language that writes itself

#94
post #56

FORTH has some elegance and it's so simple that it is tempting to implement it. However, no language should permit defining the value of 4 by 12, as there is no situation in which this can bring more good than harm in the long term. Another issue that affects FORTH but also Perl and other languages is that they deal with a lot of things implicitly (e.g. the stack, or arguments to functions). Most people agree that ex…

> However, no language should permit defining the value of 4 by 12, as there is no situation in which this can bring more good than harm in the long term. A Skil saw should not permit you sticking your fingers in the spinning blade, yet most people know that this is a stupid and dangerous thing to do.

Lots of saws have safety features to keep fingers from being removed. It happens all the time.

Re: Forth: The programming language that writes itself

#95
post #36

I used to be a fan of these languages like Lisp and Forth and Joy (and Factor and Haskell), but then I found that what I a really long for is just (untyped) lambda calculus (as a universal language). (Combinatory logic is just a similar representation of lambda calculus, but the differences go away quickly once you start abstracting stuff.) I think expressing semantics of all (common) programming languages in lambda…

A lot of languages(including forth) maps really poorly to LC. Read some of the Forth writing on portability at all costs: http://www.ultratechnology.com/antiansi.htm

Simple pure concatenative languages map quite well though [1].

[1] https://github.com/tromp/AIT/blob/master/ait/mlatu.lam

Re: Forth: The programming language that writes itself

#96
I first encountered Forth on a TI-99/4A, complete with that magnificent expansion box that looked like industrial HVAC equipment. Hearing me complain about TI Extended BASIC's glacial pace, my parents saw in one of my magazines that Forth was faster and bought it hoping I would find it helpful.

It was mind-bending but fascinating. I managed a few text adventures, some vaguely Pac-Man-esque clones, and a lingering sense that I was speaking a language from another dimension.

I've since forgiven my parents. Forth resurfaces now and then, usually when I reread Leo Brodie's thought-provoking Forth books, and I feel like I'm decoding the sacred texts of a minimalist cult. I came away thinking better, even if I've never completely caught up with the language.

Re: Forth: The programming language that writes itself

#97
post #77
post #3

Why is it that languages like this don't scale? It's not the first time I see a powerful language that got forgotten. Other examples include SmallTalk and Common Lisp (tiny community). It is because some languages are "too powerful"? What does that say about our industry? That we're still not that advanced of a specie to be able to handle the full power of such languages? I say that because it seems languages that ar…

> Why is it that languages like this don't scale? Stanislav Datskovskiy addressed this rather well: https://www.loper-os.org/?p=69

I've read that a number of times, but this is the first time since the rise of vibe engineering.

> I predict that no tool of any kind which too greatly amplifies the productivity of an individual will ever be permitted to most developers.

There's a new essay in here, somewhere, about why copilot and AI coding is succeeding at bridging this gap.

Re: Forth: The programming language that writes itself

#98
post #74

Earlier quoted context omitted.

Certainly that is how I read it. It divides effort, spreads it too thinly among too many disparate projects with essentially the same goals, and as a result, they all advance much more slowly. Examples: how many successors to C are there now? Hare, Odin, Joy, Zig, Nim, Crystal, Jai, Rust, D... And probably as many again that are lower-profile or one-person efforts. For a parallel example, consider desktop environment…

> There are at least 3 rewrites of AmigaOS (AROS, MorphOS, AmigaOS 4.x) but despite so much passion nobody bothered to bring the desktop to Linux? The passion is there for the whole AmigaOS, of which the desktop metaphor, Workbench, is just a part. What fun is AmigaOS without Exec, Intuition and AmigaDOS? The passion is to see AmigaOS run, not to see Linux wearing its skin. GUIs for manipulating files a-la Workbench…

Well, you do you, and indeed, the entire community is free to do as it wishes.

What I find surprising is that there are multiple entire Amiga-themed Linux distros – for example:

https://www.commodoreos.net/CommodoreOS.aspx

I reviewed it. I was not very impressed.

https://www.theregister.com/2025/05/06/commodore_os_3/

And ones which put an Amiga emulator front and centre:

https://cubiclenate.com/pimiga/

https://wilkiecat.wordpress.com/2025/05/31/pimiga4-by-chris-...

(Which I looked at, but decided that there wasn't enough here to review.)

And new hardware like the A1200NG:

https://www.a1200.com/index.php/the-a1200-ng/

Which is an Arm board running Linux running a full-screen Amiga emulator.

And AROS Portable:

https://arosnews.github.io/aros-portable/

Which I also reviewed:

https://www.theregister.com/2025/05/22/aros_live/

Given this visible interest in running Amiga stuff on Linux and integrating AmigaOS (and AROS) I am very surprised that in ~30 years, nothing has progressed beyond a simple window manager.

Intuition isn't that big or complicated. It's already been recreated several times over, in MorphOS and in AROS.

I am so tired of seeing Linux desktops that are just another inferior recreation of Win95.

I want to see something different and this seems such an obvious candidate to me.

Re: Forth: The programming language that writes itself

#99
post #36

I used to be a fan of these languages like Lisp and Forth and Joy (and Factor and Haskell), but then I found that what I a really long for is just (untyped) lambda calculus (as a universal language). (Combinatory logic is just a similar representation of lambda calculus, but the differences go away quickly once you start abstracting stuff.) I think expressing semantics of all (common) programming languages in lambda…

Grounding programming languages in mathematics like this is essentially the goal of Strachey and Scott's denotational semantics, which has been very influential in programming language theory:

https://en.wikipedia.org/wiki/Denotational_semantics

Re: Forth: The programming language that writes itself

#100
post #46
post #3

Why is it that languages like this don't scale? It's not the first time I see a powerful language that got forgotten. Other examples include SmallTalk and Common Lisp (tiny community). It is because some languages are "too powerful"? What does that say about our industry? That we're still not that advanced of a specie to be able to handle the full power of such languages? I say that because it seems languages that ar…

One thing I note is that all of the languages you name are very far from the machine. Also Forth is not close to the modern machine. Note that it only has two integer types and the larger one can be aligned either way you make sure it is not.

There are many Forths, and an implementer can and should define words that map well to the target hardware.
Post reply on HN