Hacker News new | ask | show | jobs
by Tloewald 3638 days ago
Code never runs in a vacuum, so arguing about the size of the elephants on the way down is pointless, which is my point.

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.

2 comments

I did a VID version of the demo, that shows a hint at how styling works in Red.

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.

Good to see that. After all, the article was close to code golfing and not using the new VID to keep it succinct.

More VID demos and the type of FRP in RED would be more enticing to me. But truth be told, I stumbled upon Red when looking at short programs translating text to morse code. The Red example (from Rebol actually) was very short, yet easy to read. I program in J, so I know what short, and unreadable means to others; I personally like J.

That's much clearer, thanks!

Folks who use Red could be referred to as communists ;-) If it takes off, you'll be Big Red.

I don't think it is pointless. But I am curious, not being a JavaScript dev, what would be the closest analogy to Red's setup. For instance, you can download Red for multiple platforms under 1MB, and without a browser, it self-compiles and you have a full coding environment.

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?