News for hackers. Stuff that matters.
Re:R3forth: A concatenative language derived from ColorForth by FarmerPotato on Wednesday February 18, 2026 @09:05PM (#47069018)
Forth user here.

Don't use AI, it writes Forth like it writes C. It has got better at following Standard, in Gforth style, but it is awful at the spirit of Forth: factoring programs into a vocabulary of tiny, reusable pieces.

I posted a Forth programming challenge. I was very disappointed to get two AI answers and one human. I think the humans sussed out the solution and described an algorithm to Opus, but, the AI strategy produced one large page-filling word.

A top-level word filling one page, doing everything there except some subroutines mimicking C Standard Library.

In Forth, that chunk ought to be many smaller words. Heck, even in C (at least it fit in a page.)

Re:R3forth: A concatenative language derived from ColorForth by shawn_w on Thursday February 19, 2026 @05:24AM (#47072252)
What was the challenge?
Re:R3forth: A concatenative language derived from ColorForth by FarmerPotato on Tuesday February 24, 2026 @06:09PM (#47144762)
Re:R3forth: A concatenative language derived from ColorForth by mycall on Thursday February 19, 2026 @09:20AM (#47074004)
Perhaps you just haven't used the correct AI yet? Perhaps none of us have in that Forth doesn't have much of a large dataset to train from?

Can you link to the programming challenge? It would be interesting to see if recursive language models that use double-blind latent space might work better.

Re:R3forth: A concatenative language derived from ColorForth by vanderZwan on Thursday February 19, 2026 @09:59AM (#47074497)
> Perhaps none of us have in that Forth doesn't have much of a large dataset to train from?

Well, being terse as heck is the point of Forth so of course the dataset isn't large /j.

More seriously, I think the bigger issue is that Forth isn't exactly uniform. It is so moldable that everyone has their own style

Re:R3forth: A concatenative language derived from ColorForth by FarmerPotato on Tuesday February 24, 2026 @06:09PM (#47144763)
Re:R3forth: A concatenative language derived from ColorForth by DHRicoF on Friday February 20, 2026 @02:19AM (#47084771)
I want to learn Forth. Do you have any good reference or know about some good code examples?

Just learned the stack operations and trying to get used to them, but I have some bigger projects in my personal backlog.

Re:R3forth: A concatenative language derived from ColorForth by FarmerPotato on Tuesday February 24, 2026 @05:59PM (#47144630)
Still good:

Lee Brodie:

1. Starting Forth. Somewhat dated (1979 FIG-Forth dialect)

2. Thinking Forth. Has software design lessons that go far beyond Forth.

These are free in pdf.

Elizabeth Rather, of Forth Inc:

3. Forth Programming Handbook. What I keep on my desk for Standard Forth.

4. Forth Application Techniques.

Dr. Ting has some good books. They're free pdfs now.

I also keep: Texas Instruments: TI Forth, by Leon Tietz, Leslie O'Hagan... and the vastly improved fbForth manual by Lee Stewart.

Re:R3forth: A concatenative language derived from ColorForth by FarmerPotato on Tuesday February 24, 2026 @06:07PM (#47144726)
Oh, also "Programming A Problem Oriented Language: Forth - how the internals work" by Charles Moore, the inventor of Forth. It conveys his design philosophy: simplicity. Time and again he makes the point "You don't need it." Where a simple solution fits 90% of use cases.

Where I think Forth falls short: it encourages you to "write your own language" or vocabulary, where that can superficially resemble "noun [adjective] verb" syntax, but doesn't have polymorphism. Then, there are N+1 versions of message-passing object-oriented Forth, where N is us.