Live data from Hacker News

Levels of code in Forth programming (2002)

ultratechnology.com

41–50 of 53 posts

Re: Levels of code in Forth programming (2002)

#41

Earlier quoted context omitted.

No, not writing everything in assembler, this isn't about high or low level. It's about writing things yourself for what you actually need. Because most of the complexity comes from code (esp. libraries and drivers) trying to solve a larger problem than you actually have. That's the same reason why, when you follow that logic, you eventually write your own Forth. Not because it fun. Not because you want to learn abou…

at least we can get rid of the bloated web apps once everyone begins to do so...but would it be possible if libaries are written in a way that it's easy to just integrate just a portion into existing code?

The problem there is that most "libraries" are actually frameworks.

The difference I'm drawing being, libraries just provide a mess of utility functions. Theoretically, even if your compiler won't strip the library stuff you don't need, you'd be able to take just the bits you need by copy/pasting a relatively small volume of code. And dropping the library would be a small change, that just requires finding replacements for the functions and classes you were using.

Frameworks tend to involve some Grand Unifying Abstraction that you need to inherit from, and that gets imposed on your own code. Things tend to be so tangled together at a conceptual level that it's not really possible to use them in an a la carte manner. Migrating off of a framework tends to require more-or-less a rewrite of all the code that interacts with it.

To take some Web examples: jQuery's more on the library side of things. D3 is more of a framework. React is very much a framework.

Re: Levels of code in Forth programming (2002)

#42
post #28

Earlier quoted context omitted.

I agree with you, but I wonder what his answer to stuff like GUIs would be. There’s a tremendous amount of complexity and domain knowledge in stuff like drawing fonts, and in cryptography, and so forth — and very very few of us have the time to become competent in even one of those, let alone all of them. Then consider the amount of work necessary to have a modern browser: text parsing of not one but three languages,…

I don't know what Moore would say. Personally, I've retreated to the back end - used to be full stack, but I'm just sick to death of how overcomplicated front-end work has become. I'm inclined to say that, e.g., the modern browser is a cautionary tale that complements the Chuck Moore approach to things: By forever piling thing on top of thing in an evolutionary way, you end up with a system that ultimately feels more…

Also consider that all we know is a world that has become more global, open, and relatively peaceful post 1970s. If collaboration were to slow or decline, open-source would be harmed. And/or if Google and Facebook lose its dynamism from politics, regulation, and maturity, corporate sponsored open-source could be shaken. Google could become like AT&T and Facebook like Ericsson or something in some way.

Once unstoppable sectors, like aerospace (to mix comparisons) began to reverse and decline in the early 70s. No one really saw it coming. I can't think if one publicly known or credible person called it in 1969 shortly after the moon landing, at least on record. Oversupply of engineers in the US and the West became a thing. And engineering still suffers here because of aerospace's decline. Forth began to lose steam around then, right? Forth, hardware and Cold War (barriers) politics are inextricably linked, perhaps. And then GNU/Linux and BSD saw its high-collaboration paradigm birthed around that time. Nixon/Kissenger talks with closed China began around then too, and now relations are breaking down with a more open China today.

Look how Lua scripting came about not terribly so long ago. Some parallels. Brazilian trade barriers. Now half believe Huawei is evil. Cross-hardware story may be cracking. Many believe Google is evil. Open software may be cracking. And there are rifts between US, EU, and China on how to regulate the internet. A new Cold War may be brewing. It's a nerds nightmare.

If anyone can tie in distributed ledger and specialized AI coder productivity tools, or something to counter this argument or round it out, that would be awesome.

EDIT: I was mistaken. Forth caught on with personal computer hobbyists in the 1980s, per Wikipedia. However, as a career or industry,slow downs with NASA and Cold War spending seemed to take some wind out of Forth's sails. I've noted that lot of that type of work was what paid people to write Forth. And the open-source paradigm with C/C++ and GNU Linux was even more limiting, I believe.

Re: Levels of code in Forth programming (2002)

#43
Chuck Moore has always struck me as some kind of alien, not unlike the way stories about Von Neumann do - that this is a person who is, in his specialized field, capable of thinking in ways that I just can't, and achieving things that seem practically magical with it.

Re: Levels of code in Forth programming (2002)

#44

Earlier quoted context omitted.

at least we can get rid of the bloated web apps once everyone begins to do so...but would it be possible if libaries are written in a way that it's easy to just integrate just a portion into existing code?

The problem there is that most "libraries" are actually frameworks. The difference I'm drawing being, libraries just provide a mess of utility functions. Theoretically, even if your compiler won't strip the library stuff you don't need, you'd be able to take just the bits you need by copy/pasting a relatively small volume of code. And dropping the library would be a small change, that just requires finding replacemen…

Wow that go me thinking. What if specialized AI code recommenders could sniff out solutions. Get away from libraries with objects or structs with methods that mutate. As more people realize composing functions (Forth has concept of composing words, correct?) with fewer side effects is a good thing, I wonder if it's possible. There is some amount of my workflow where I'm looking at StackOverflow, my git project history or others, examples even on blogs (at least when I was new), or my little code snippet journal for stuff already solved. Automate getting idiomatic solutions from a StackOverflow or Github commits of sorts, or something. I know we are no were near, but FB's Aroma and others have the first gen AI recommenders in the pipeline that at a high level do this. That way we are just dealing with code snippets. I've only read Forth code and introductions to it, but it seem all about composition. However this is hard to conceive with today's coding forums and repos because most are gluing mutating library APIs (turtles all the way down) together. So a code recommender paradigm of this sort is chicken vs egg.

Re: Levels of code in Forth programming (2002)

#45

Earlier quoted context omitted.

at least we can get rid of the bloated web apps once everyone begins to do so...but would it be possible if libaries are written in a way that it's easy to just integrate just a portion into existing code?

The problem there is that most "libraries" are actually frameworks. The difference I'm drawing being, libraries just provide a mess of utility functions. Theoretically, even if your compiler won't strip the library stuff you don't need, you'd be able to take just the bits you need by copy/pasting a relatively small volume of code. And dropping the library would be a small change, that just requires finding replacemen…

[deleted]

Re: Levels of code in Forth programming (2002)

#46
post #28

Earlier quoted context omitted.

The more time I spend dealing with blowback from excess complexity being imported in the form of 3rd-party libraries that offer complicated solutions to simple problems, the more I think that Chuck Moore was very, very right on that point.

I agree with you, but I wonder what his answer to stuff like GUIs would be. There’s a tremendous amount of complexity and domain knowledge in stuff like drawing fonts, and in cryptography, and so forth — and very very few of us have the time to become competent in even one of those, let alone all of them. Then consider the amount of work necessary to have a modern browser: text parsing of not one but three languages,…

“I agree with you, but I wonder what his answer to stuff like GUIs would be.”

Couldn’t say exactly, but it’d probably look something like this:

https://en.wikipedia.org/wiki/Display_PostScript

:)

Re: Levels of code in Forth programming (2002)

#47
post #30
post #15

Earlier quoted context omitted.

Thanks for the reply! > but it won't resemble what most people in computing expect from a browser or photo editor. In the sense that an end user would interact with some low level API primitives, rather than a full GUI? I’d love more examples or metaphors, or maybe a link where I could learn more.

Chuck Moore’s software is somewhat famous for reducing the complexity of both the software itself as well as the requirements. In developing a web browser, he would probably eliminate all of JavaScript, the user interface, and most of CSS, and leave it to run only on a chip he designed for the purpose. His ideology is super cool, but isn’t what is expected of software like this. For instance, OKAD (chip design and si…

I would welcome all of these except maybe a separate chip. E.g. having 3 separate languages built in a browser does look like a overcomplication.

Re: Levels of code in Forth programming (2002)

#48

Chuck Moore has always struck me as some kind of alien, not unlike the way stories about Von Neumann do - that this is a person who is, in his specialized field, capable of thinking in ways that I just can't, and achieving things that seem practically magical with it.

You might be right... but I have the impression that if you talked to him, he'd tell you that you'd get similar milage by following his philosophy about program design. It's just that most people just can't stomach it.

Re: Levels of code in Forth programming (2002)

#50
post #46
post #28

Earlier quoted context omitted.

I agree with you, but I wonder what his answer to stuff like GUIs would be. There’s a tremendous amount of complexity and domain knowledge in stuff like drawing fonts, and in cryptography, and so forth — and very very few of us have the time to become competent in even one of those, let alone all of them. Then consider the amount of work necessary to have a modern browser: text parsing of not one but three languages,…

“I agree with you, but I wonder what his answer to stuff like GUIs would be.” Couldn’t say exactly, but it’d probably look something like this: https://en.wikipedia.org/wiki/Display_PostScript :)

As far as I recall, Display PostScript was display only - what you really want is NeWS which used PostScript for display and for building applications:

https://en.wikipedia.org/wiki/NeWS

Post reply on HN