by dockimbel · 10y ago · 0 comments
For the "no library", well, you have tons of libraries included in a ~100MB runtime (browser) required to run and render that demo, while Red's one runs on the OS directly (our runtime is 0.6MB uncompressed and entirely written in Red, not a single 3rd-party library). ;-)
That said, that JS demo code is very nice, and its slickness impressive.
[1] https://gist.github.com/dockimbel/b0a413342dc39568696207412a...
What I do see is that the JavaScript does all of this much more cleanly and intelligibly, and has an honest line count.
Incidentally, I also think that cleanly separating presentation from logic is an advantage of the JS / CSS divide, even is JavaScript if far from perfect and CSS is actively horrible.
https://gist.github.com/greggirwin/8d0b1c02ccdbd5520d9c77d49...
The reactive logic is all lifted from the original. Around line 40 you can see where styles are defined inline. Originally I had them just defining visual aspects, but then moved the actors into the cell style as well.
With native widgets, you don't get complete control, and they won't match across platforms. Rebol had its own GUI system, and I wouldn't be surprised to see something similar done by a clever Red...we don't have a name for folks who write Red yet. Racket got the best name, with Racketeers.
I realize browsers are ubiquitous, so in essence you just need to count the size of browser, JS engine and code. What would be the bare minimum JS setup to provide core libs, GUI, and other helper libs and a way to run it/distribute it sans relying on pre-installed browsers. Would that be Chromium or Electron? Can you choose the best engine with them, or are they attached to the browser or minimal browser?