35 points dverlaeckt80 18 hours ago 17 comments

bitwize 13 hours ago | parent

"Writing things in a programming language" now seems to have the same quirky old-internet charm as "Flash games".

pjmlp 7 hours ago | parent

Unfortunely, I forsee eventually LLMs will become good enough to deliver the 4GL initial vision, we are already seeing that take shape in iPaaS products, or code generation that is as readable as minified C code for IOCCC entries.

e12e 3 hours ago | parent

Why unfortunately - if they actually deliver?

I'm rather exited by the prospect that everyone will be a developer - and so actual users, not merely consumers, of computers.

pjmlp 3 hours ago | parent

It won't happen, a few lucky ones will press the buttons on the software factory machines, or be called into Wonka Factory (aka AI Labs), while everyone else has to find a new job.

conartist6 2 hours ago | parent

Yes, and as we all know the printing press was the dawn of a new era where nobody could read and write.

Fuckin' morons.

e12e 1 hour ago | parent

Touch aggressive, no?

conartist6 1 hour ago | parent

Yes indeedy! Unfortunately all the placation work has been taken over by models.

pjmlp 1 hour ago | parent

The printing press did nothing to literacy for those that could not attend school.

If anything, it allowed the creation of publishers as gate keepers of which books would be printed, and naturally placed the monks out of job doing beautiful renditions on the pages.

conartist6 53 minutes ago | parent

Uh huh so I'm taking that as a "no" from you on the impact of the printing press as a technology over the last 500 years

veltas 6 hours ago | parent

I think the first question I've got for JavaScript Forths is how you'd handle addresses, bytes, etc., because that's a staple of any conventional Forth, necessary to create tables, arrays, and handle strings. There are lots of ways of doing it but there are some nasty compromises required for a more standard-looking Forth.

jstanley 6 hours ago | parent

What about an array of numbers? What are the nasty compromises?

shakna 3 hours ago | parent

Some Forths work by directly writing machine code. You need to add a fair bit of machinery to be able to turn a JS number array into an executable piece of memory that can be hotpatched into other pieces.

jstanley 2 hours ago | parent

If you're making it in JavaScript then you won't be doing that anyway.

veltas 3 hours ago | parent

Well if the array of numbers are bytes then that has a pretty significant overhead, and losing a lot of performance for dealing with larger numbers or floats even. If it's not then you're complicating handling of strings and writing off most conventional forth code by not using byte addressing. Etc.

jstanley 2 hours ago | parent

A typical Forth machine has about 64k bytes of RAM, I don't think it's a big deal if you're running JavaScript anyway.

terminalcommand 1 hour ago | parent

What about writing primitives using WASM?

PaulHoule 1 hour ago | parent

A FORTH in Javascript should do what Clojure does for Java.

The object on top of the stack should be a Javascript value, numbers are all doubles, and you can use strings, arrays, objects-as-dicts and in fact ordinary objects you could write something like

   >> {"a": [1, 2], "b": "hello" }

   >> DUP

   >> "a" GET{ 0 GET[

   >> .

   1

   >> "something" "c" PUT{

   >> .

   {"a": [1, 2], "b": "hello", "c": "something" }
You could use all the metaprogramming tricks you use in other FORTHs, be able to do anything Javascript can do, I don't think it would be too hard to unpack the stack and turn a word that takes N parameters from the stack into a Javascript function the JS compiler can make fast

There is some precedent:

https://www.forth.org/svfig/kk/11-2019-O'Connor.pdf

I just realized there is exception handling in FORTH now

https://forth-standard.org/standard/exception

and wonder if that could be harmonized with JS exceptions

This strategy though competes with writing a Lisp which gives you better metaprogramming.