Live data from Hacker News

Collapse OS – Why Forth?

collapseos.org

41–50 of 172 posts

Re: Collapse OS – Why Forth?

#41

It's odd to highlight that Forth is 50 years old, considering C is 48 years old and still in very heavy use in operating systems development.

Perhaps Forth has changed less than C in that time. The C of 48 years ago can look quite different from modern C.

Not really. Function definitions look different, and we can declare variables in the middle of function bodies, but those are surface-level changes. The language itself hasn't changed appreciably.

Re: Collapse OS – Why Forth?

#43

I hate this headline but the project is very cool. People like me who were ignorant should start here instead of the Github to get a better sense of the design goals (and why they are using Forth): https://collapseos.org/forth.html

I've read that page and I'm still wondering why they're using FORTH.

C has excellent portability and performance. The article agrees with the general consensus that C is also generally a better language for the programmer. So why use FORTH? What does it matter that it can do cute things with self-hosting? What does 'compactness' matter?

If the goal is to build a portable means of writing programs for Z80 and AVR, why not develop a C-like language, or an IR, or put work into developing a serious optimising C compiler targeting the Z80? I get the impression that's a relatively unexplored area for (rather niche) compiler research.

Re: Collapse OS – Why Forth?

#44
post #35

Forth is one of the last languages on my list. Whenever I read something like this article, I want to learn it. The advice at the end of the article seems interesting. Does anyone have any resources that might help with this?

A Forth shibboleth is that you have to implement your own in order to understand it. Try reading the assembly, then forth source, for jonesforth: https://github.com/AlexandreAbreu/jonesforth

This is how I learned.

Re: Collapse OS – Why Forth?

#45
CollapseOS? Meh. What we need is ApocalypsOS. Something to play Tetris on after having hauled a bucket of wellwater (and some wood) to the 23-rd floor apartment where I try to survive.

Re: Collapse OS – Why Forth?

#46

https://collapseos.org/why.html "That being said, I don't consider it unreasonable to not believe that collapse is likely to happen by 2030, so please, don't feel attacked by my beliefs." Triple negative? Quadruple negative? (If we count the second "don't".) Compare something like: "I consider it reasonable to believe that collapse is unlikely to happen by 2030, so please, don't feel attacked by my beliefs." It is al…

There's a difference between “not unreasonable” and “reasonable”.

Can you provide more details?

Re: Collapse OS – Why Forth?

#47
If I had to put my finger on why Forth is hard for most programmers, it's like this: the structured program theorem suggests using sequence, selection, and iteration to control program logic. Assembly code on hardware architectures will assign all meaning sequence-relative, late-binding the selection and iteration. Forth doubles down on this sequence-first approach through a more versatile assignment mode(the stack) while only minimally accommodating the other two. That makes it easy to implement, while not explicitly addressing expressability.

Forth written "flat" with shallow data stack usage is assembly by another name, a wrapper for load-and-store; Forth that does everything with intricate stack manipulation is a source of endless puzzles since it quickly goes write-only.

But, like any good language with meta expression capabilities, you can work your way up towards complex constructs in Forth, and write words that enforce whatever conceptual boundaries are needed and thus check your work and use the system as a compiler. That's what breaks Forth away from being a simple macro-assembler. But you have to write it in that direction, and design the system that makes sense for the task from the very beginning. That falls into an unacceptable trade-off really easily in our current world, where the majority of developers are relatively inexperienced consumers of innumerable dependencies.

Re: Collapse OS – Why Forth?

#48
post #24

I thought this is pretty fun project and the idea is just cool right away, but then I went on reading and was surprised by the fact it seems the author is serious. I would be really curious to hear his opinion on why the supply chains should collapse before 2030. Obviously, there wouldn't be a shortage of people in the comments who can start speculating on why it might happen, and, of course, I myself also can provid…

If you had told me last year that we would have a pandemic, lockdown, massive economic recession and job loss and now riots and protests etc and all at the same time I probably wouldn't have believed it. I'm starting to think the world is a lot more fragile than we all thought.

Not “we all” thought — plenty of people have been saying this would happen for years. Specifically, epidemiologists and black people. Maybe we should listen more!

Re: Collapse OS – Why Forth?

#49

Earlier quoted context omitted.

There's a difference between “not unreasonable” and “reasonable”.

Can you provide more details?

It's the difference between "not crazy" (ie, "you don't agree with me, and that's okay") and "sane" (ie, "I'm wrong here").

Re: Collapse OS – Why Forth?

#50
post #24

I thought this is pretty fun project and the idea is just cool right away, but then I went on reading and was surprised by the fact it seems the author is serious. I would be really curious to hear his opinion on why the supply chains should collapse before 2030. Obviously, there wouldn't be a shortage of people in the comments who can start speculating on why it might happen, and, of course, I myself also can provid…

> I would be really curious to hear his opinion on why the supply chains should collapse before 2030

Think about seat belts. Do you ask the driver:

> "I'm really curious to hear why you think you'll crash the car?"

when s/he puts on the seat belt? S/he'd likely say "No I don't think that at all".

And not impossible that the Collapse OS author might have a similar reply. Still, the project can be well spent time, like, a seat belt in case of the unexpected.

Think about: 1) Likelihood-of-Global-Supply-Chain-Collapse x How-Bad. And 2) How-much-does-Collapse-OS-mitigate-the-bad-things. And compare that, with 3) time spent building C.OS.

Post reply on HN