Live data from Hacker News

Collapse OS – Why Forth?

collapseos.org

71–80 of 172 posts

Re: Collapse OS – Why Forth?

#71
post #57

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…

Hmmm, let's see if I can make it worse: "That being said, I don't consider it unreasonable to not believe that collapse is unlikely to not happen by 2030"

[deleted]

Re: Collapse OS – Why Forth?

#72

Earlier quoted context omitted.

The rest of the storyline of this page covers what I think is the core concept that Chuck Moore started from, and defines Forth as its own environment: the core of the language that needs to be defined in order to write and execute Forth words is surprisingly small. Once you have the core words in place, you can layer on exactly the constructs you need. I won't claim to be a proficient Forth author, but I've used it…

Seems like an IR would make sense here. Perhaps a stack-based one. If you need a compact program representation, that doesn't mean you have to use FORTH as your source language.

For a more optimizing compiler for a machine with more registers, you might, to be able to store the stack in the registers. The Z80 has few enough that I can't see it being an improvement.

Re: Collapse OS – Why Forth?

#73

I think I've had my own moment of clarity that spans both Forth(s) and Lisp(s) and explains why neither is as common as other languages. In most common languages, there is a complicated base spec that covers many cases and defines a broad range of affordances, plus libraries and libraries that expand on an already fleshed out collection of tools and etc. Forths and Lisps give you the core of an environment, and let/e…

I think you can draw this ‘core of an environment’ parallel between Forth and Scheme: both are small languages and they emphasize growing the language to the problem domain [1]. Common Lisp, on the other hand, is a large language: implementations provide much more than a foundational core, and a fairly comprehensive list of libraries exists. I think RPG’s Worse Is Better highlights some of the reasons why CL isn’t as popular as other languages [2].

[1] https://youtube.com/watch?v=_ahvzDzKdB0

[2] https://www.dreamsongs.com/WIB.html

Re: Collapse OS – Why Forth?

#74

this might be a dumb question but can someone briefly explain why Forth is more suitable over C or other languages in general on post-apocalyptic OS?

https://github.com/nornagon/jonesforth/blob/master/jonesfort...

This is (the now pedagogically famous) JonesForth. It's ~2000 lines of HEAVILY commented assembly, and at then you have everything you need to start writing a fully functional Forth+standard library (which is done in jonesforth.f in a ~1800 lines of heavily commented forth). That's not even as tiny as forth can be, and it gives you a lowish level language that is as/more modifiable and extensible as any Lisp.

There is basically no faster way to get from bare metal to a comfortable humane and interactive (so you can write more stuff) computing environment than writing a forth.

Re: Collapse OS – Why Forth?

#75

Earlier quoted context omitted.

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

There has never been one Forth. In a world with N Forth programmers, one can expect roughly N implementations of Forth. Perhaps closer to 2*N. An ANS spec exists, but most Forth programmers would say it misses the point. Forth is a collection of ideas and philosophies toward programming as much as it is a language. Two stacks and a dictionary. Threaded code (direct, indirect, token, subroutine, etc...). Collapsed abs…

This is a slightly off topic question for you, do you think the attributes you named are required for having a “Forth” or are they just the most common implementation characteristics? My current pet language project certainly looks Forth-like, with different semantics and a modal dependent type system, but is not threaded nor does it have the traditional stacks and dictionary. I don’t know if I’d call it a Forth, but maybe it is?

Re: Collapse OS – Why Forth?

#77

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…

This is the perfect comment - pedantic, snarky, and more focused on the superficial features of the article than the content, mixed in with some grammatical pseudo-psychology. Check, check, check, and check! This is peak tediousness. Well done!

Re: Collapse OS – Why Forth?

#78

Earlier quoted context omitted.

> 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…

He said in the Why? article linked above somewhere that he really does believe, even if he has no evidence, that we'll be experience a collapse sometime around 2030. That's not really comprehensible to me, even though your description of a possible rationale, which makes more sense.

I mean, I can rationally say I'll probably be in an accident by 2030 with no evidence either.

Re: Collapse OS – Why Forth?

#80
Forth is Lisp, but with composition as the basic operator instead of application. The result, of course, is a wildly different language but one which inspired the same degree of fanaticism among its adherents in their search for simplicity and elegance.

A truly under appreciated language imho.

Post reply on HN