
Base structure
Yet another load of cosmetic details here and there, so many that I don't count them anymore. But...
I also worked on the main thing. So I have a basic structure that now works correctly, and while the UI code is all wild and organic, the engine code is well structured and commented JSDoc style. Programming "correctly" is surprisingly more error prone than my natural code-fu, but I finally eradicated all those nasty little bugs.
Now, the structure is as follows. Tables are associated with spaces, and names. Names are not unique to tables. Several tables can have the same name, that's why a table is identified by a generic ID and a name is a set of IDs of tables that share that name. Same goes for spaces, since spaces contain tables. The purpose of names and spaces are different though: names are how a table references other tables in a formula, while spaces form a logical partition of data in Hup, mainly for communication with the outer world.
Spaces are either "exposed" or not. Exposed spaces are the ones that are visible outside the engine. This is where you'd plug any external devices, and where the UI is connected. Exposed means, "read/write accessible from the outside."
For now, you register callback functions to expose a space, then when the tables in that space change, the callback is called, either with a text version of the content, or with the AST. Simple.
On the FUI front, I had some sort of revelation the other day. UIs always have either light or dark modes, but perhaps it would be interesting to get past this. The content would be dark mode, but the container would be light mode, in shades of white and grey, white for unoccupied screen areas, grey for grouping contents. Lines and shapes would be diagonal where appropriate. It's worth a try.
Do not try to bend the spoon. I tried this light&dark thing and it was ugly as hell. Then I understood that my UI was meant to disappear behind the user's UI. The user-developer would setup a frontend, with Hup as the backend. Then the user-users (the users of the user-developer's app) wouldn't see Hup's UI, unless they hit F12 or something, to have a look behind the curtain. They'd see the frontend of the user-developer's app. And that spoon isn't my business.