« first day (3707 days earlier)      last day (73 days later) » 

6:03 AM
posted on December 24, 2020 by rgchris

Since I'm having a spitballing vibe, here's another proposal for a NODE! datatype. In developing my Markup Parser, I settled on a method of tree-building in which I used linked lists with nodes having five relationships: parent, previous/next sibling and first/last child. For this, I used blocks with bi-directional links for each relationship. Preamble <html> <head>

 
 
1 hour later…
7:11 AM
@rgchris Though I haven't messed with it recently, take a look at this: Dialected JS-EVAL and JS-DO for embedding Rebol Values
>> x: 1000
>> js-eval [{20 +} unbox @x]
== 1020
 
 
2 hours later…
9:12 AM
It may be that getting API handles is the rare case and that unboxing is more common. Maybe @[expression] should be "get the API handle" and @x, @(expression), @x/y should be "get whatever the JS object is", e.g. extracting JS DOM objects from a wrapper, or extracting a JS string value.
 
 
9 hours later…
6:10 PM
@HostileForksaysdonttrustSE I have a thought—I'd like to explore the challenges in having JS traverse a more complex Rebol data structure, like a tree of blocks/objects.
If you, say, had such a structure that represented a UI (could even reuse FACE!) and had a JS veneer that acted as a conduit between that structure and the DOM.
There'd have to be two-way signaling for events and structural changes.
But JavaScript's role would be finite, Rebol would be in charge
Might not be performant enough to drive animation, per se, but much of that can be handled by CSS/HTML/SVG anyways. It'd be enough though to build and manage some complex application layouts/logic
In Rebol 2's UI, changes to the UI data structure were only propagated to the display when you used the SHOW function. Such a mechanism could be tied to the JavaScript display driver so as only to update the relevant parts. It wouldn't be instantly gratifying, but it's workable.
 
 
5 hours later…
11:58 PM
I'm a bit late this time around but have a happy this time of year ye rebol-ers of yore!
2
 

« first day (3707 days earlier)      last day (73 days later) »