Live data from Hacker News

FORTH? Really!?

rescrv.net

11–20 of 27 posts

Re: FORTH? Really!?

#11
post #2

Looking to discuss with people about whether LLMs would do better if the language had properties similar to postfix-notation.

The claim seems extremely unlikely to me. LLM comprehension is very sophisticated by any metric, the idea that something as trivial as concatenative syntactic structure would make a significant difference is implausible.

LLMs handle deeply nested syntax just fine - parentheses and indentation are not the hard part. Linearization is not a meaningful advantage.

In fact, it’s much more likely to be a disadvantage, much as it is for humans. Stack effects are implicit, so correct composition requires global reasoning. A single missing dup breaks everything downstream. LLMs, and humans, are much more effective when constraints are named and localized, not implicit and global.

Re: FORTH? Really!?

#13
post #11
post #2

Looking to discuss with people about whether LLMs would do better if the language had properties similar to postfix-notation.

The claim seems extremely unlikely to me. LLM comprehension is very sophisticated by any metric, the idea that something as trivial as concatenative syntactic structure would make a significant difference is implausible. LLMs handle deeply nested syntax just fine - parentheses and indentation are not the hard part. Linearization is not a meaningful advantage. In fact, it’s much more likely to be a disadvantage, much…

I’m not claiming forth should be used as is. I’ve opened the benchmark so others can reproduce the result I share in the post: https://github.com/rescrv/stack-bench

Re: FORTH? Really!?

#14
post #9
post #7

From the title alone I tought it will be another FORTH interpreter implementation article, but I was happy to see someone actually using it for anything besides proving their interpreter with a Fibonacci calculation.

There's another front page article right now with someone using it in a very cool way. https://news.ycombinator.com/item?id=46918824

thanks, somehow I missed that.

Re: FORTH? Really!?

#15
post #7

From the title alone I tought it will be another FORTH interpreter implementation article, but I was happy to see someone actually using it for anything besides proving their interpreter with a Fibonacci calculation.

Yep, given that implementing Forth is so easy (easier even than implementing Lisp) pretty soon nearly every Forth programmer decides to take their turn doing it themselves.

Re: FORTH? Really!?

#16

The observation that concatenative programming languages have nearly ideal properties for efficient universal learning on silicon is very old. You can show that the resource footprint required for these algorithms to effectively learn a programming language is much lower than other common types of programming models. There is a natural mechanical sympathy with the theory around universal learning. It was my main moti…

It sounds like you’re referring a proof. Where can one find it, and what background prepares one for it?

Re: FORTH? Really!?

#17
post #8
post #2

Looking to discuss with people about whether LLMs would do better if the language had properties similar to postfix-notation.

Even though I really like postfix from an elegance standpoint, and I use an RPN calculator, IMO it's harder to reason about subexpressions with postfix. Being able to decompose an expression into independent parts is what allows us to understand it. If you just randomly scan a complex expression in infix, if you see parenthesis or a +, you know that what's outside of the parenthesis or on the other side of a + can't…

I find some calculations easier to reason about using either RPN or algebraic. Its entirely context driven.

Playing with APL has really changed the way I look at both.

Re: FORTH? Really!?

#18
post #7

From the title alone I tought it will be another FORTH interpreter implementation article, but I was happy to see someone actually using it for anything besides proving their interpreter with a Fibonacci calculation.

Yep, given that implementing Forth is so easy (easier even than implementing Lisp) pretty soon nearly every Forth programmer decides to take their turn doing it themselves.

Which reminds me that its time to dust off my old FORTH and make a proper calculator out of it.

Re: FORTH? Really!?

#20
post #7

From the title alone I tought it will be another FORTH interpreter implementation article, but I was happy to see someone actually using it for anything besides proving their interpreter with a Fibonacci calculation.

Yep, given that implementing Forth is so easy (easier even than implementing Lisp) pretty soon nearly every Forth programmer decides to take their turn doing it themselves.

I suspect, for many, that implementing a forth is more interesting than using a forth.

Once you start writing really complex programs the system gets painful and hard. But trivial things are easy, and the consistency is so appealing.

Post reply on HN