Hacker News new | ask | show | jobs
by brokenkebab2 1327 days ago
Interesting idea. Though maximally-simple claim doesn't look warranted to me. It feels more complex than most of Forth incarnations.
1 comments

Right? Its creator obviously knows Forth, but it feels like they've gone to extreme lengths to make it prefix rather than postfix, at the price of making it much more confusing than it needs to be? It's really not obvious to me that if they were both equally complete, there'd be any advantage at all to choosing this over Factor...

(That said, I did a lot of Forth programming in the old days, and while I am utterly intrigued by Factor, I've never managed to write anything useful in it...)

The advantage is that the language isn't stackful.

This is about more than just underflow, there isn't a stack at all. Missed arity is a syntax error, not a mistake in reasoning about the program state.

I'm not sold on Om's solution, I doubt the author was either since it's frozen in time. I have long wondered about a good prefixed concatenative language, without really getting anywhere. Om seems too much like inside-out Joy, although I'm not sure I could justify that impression in detail.

Stackfulness and the possibility of stack underflows are not actually constrained in any significant manner by whether or not a language uses prefix or postfix notation, and it would be more-or-less trivial to reject arity mismatches in a postfix language as well.

The one real advantage that prefix notation has is that it is familiar, since it is so widespread in mathematical notation. Though that particular advantage would optimize the experience of using a language for people new to programming or that particular language, whereas it might realistically make more sense to optimize for the experience of people already familiar with a language, since those will constitute the vast majority of development time in any serious language, and I would argue that postfix notation has an advantage there in most domains.

That happens too often with Forth. Someone gets interested, thinks it would be sooo awesome to add this and that "modern" feature, and then they end up with something that combines the disadvantages of Forth with the complications of what they've added. An oddity nobody wants to use, and yet another bit-roting carcass is some CVS.

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration [1]

I think that Forth only works with people who've started with assembly programming. Someone who started with a high level language suffered that sort of brain damage that make them unable to feel complexity even when it coils around them and give them a hard time breathing.

[1] https://www.cs.virginia.edu/~evans/cs655/readings/ewd498.htm...

> I think that Forth only works with people who've started with assembly programming. Someone who started with a high level language suffered that sort of brain damage that make them unable to feel complexity even when it coils around them and give them a hard time breathing.

What I find interesting about Forth is that it is a language that is simultaneously a high level language and a low level language. It encourages the programmer to write high level programs but if they need to write low level assembly routines for maximal performance, they can (though they may need to write their own Forth interpreter to do so).

I believe that the viral spread of c and unix is possibly the worst thing that ever happened to computing. There is a quote attributed to a physician named Vincent Felitti in the context of addiction: it's hard to get enough of something that almost works. This is the story of c. It is neither a high level language nor a low level language and is thus the worst of both worlds. We've added a staggering amount of complexity to work around the limitations of c, which have also infected most of our other supposedly high level languages, e.g. java, go, rust, etc. To your point though, because we know no other way, we can't even see that much of this complexity is largely unnecessary.

Much of this goes back to Gabriel's observations in the rise of worse is better: https://www.jwz.org/doc/worse-is-better.html. What I think Gabriel doesn't fully articulate is that worse is better is an essential feature of market capitalism. The most profitable customers are addicts. Most of the time, you can't just sell them something that is complete garbage. The best thing to sell is something that is almost good enough and that the customer is not empowered to improve themselves. Then they have to keep coming back to you for updates. Why would you sell a customer a complete program that does exactly what it is meant to do and nothing else when you could sell them something incomplete that you can keep repeatedly selling back to them?

This is the water that we swim in, and it sure seems to me that we're all having a hard time breathing.

I’ve sold many an incomplete product and made money from improving it over time.

From my perspective, exploiting addicts and capitalism never entered into it; that’s just how MVP and customer-focused development work. Making money from the MVP validates the general direction and developers are incentivized to improve utility to generate additional cash flow.

Projects that seek to deliver a complete and optimal solution day one generally fail because the creators don’t have a complete and optimal understanding of customer need. Plus it takes forever and creators need to eat while working.

We have a Factor Discord if you want some help starting out!

https://discord.gg/QxJYZx3QDf

Wow, somehow I thought Factor died. I know Slava stopped working on it several years ago.