What's Cool (According to Danny)

Photos are nice. complex. but some how easy to understand most of the time without having to know the "who, what, when, where, and why." Just by looking at them, you can kinda tell what it's trying to show you. I want Rebol coding to look like that while working with any data context in its original form as possible.

**
var {whats-cool 0: Brett}
Var Rebdol: {Rebdol cool: "what's-cool"}**

The %Rebol-dom.r Var is named from the associated value strings/words, unless you *!, select-all-fetch-as strings/words. Then you can, Rebdol."cool" ->select & load "what's-cool". Wich is, whats-cool: { 0: Brett}. Then .[0], and you get Brett.

Or change the *value to Ren-C. **

whats-cool [ /rebdol.cool.&.0 = Ren-C] messy, noisy example
**

Is this musing when the origonal data context does'nt need to be changed. And if parsed into a Dialect Object Model, without changing syntax, this data can be searched, updated with DOM functions.

Creating Vars out of molded data/code with foreign syntax, is its own Sequence built notation.

struct: :Var

 struct qwerty {
                   Int #1
                   Char "hello"
                   Float 9.0
                   Char "there"
                } *! 'qwerty

*variable: "request" new[qwerty]

This data looks like and can be used to construct *New nodes that can run as code without creating defined functions but remain as sequence(molded) data that needs no bindings or loading to take place.

I hope this is musing, for others as it is for me. Rebol-dom.r Sequence/molded data, strings as *keys have context all without loading anything but the *value. It's what i found and fished out of that Deep Lake.

A full blown object model is different to what I was alluding to. That's at one end of manipulation, at the other end you have a basic text search and replace. I was talking about something in between, something that works on search and replace but has already broken up the text into tokens. It may not be useful to everyone, but it's handy for ad-hoc situations or where you just want to target a little bit of the foreign syntax.
It's a bit of a cheat to avoid having to build a full object model when you really do want to keep the foreign syntax as foreign. Just a little use-case to add colour to the post's topic.

(Moving to new thread because it doesn't clearly relate to the topic of binding in strings.)

I know that you have been looking at ways of representing JavaScript-looking things (e.g. var declarations, or using [0] to index arrays) in Rebol.

And yes--those kinds of things have been considered here.

  • let var: value is a very real thing in Ren-C for making declarations inline with the stream of code (as opposed to use [var] [var: value, ...] which breaks the stream of code and introduces a new level of indentation)

  • "PACK!" was proposed as a kin to PATH! and TUPLE!, except instead of an interstitial delimiter of a dot or a slash it would use nothing at all, to enable things like array[0] being a 2-element PACK! of a WORD! and a BLOCK!.

So far be it from me to point at anything and say "that's crazy". For any number of reasons. :crazy_face:

But we have to have some compass for what the scope of the problems being solved are (and if we're solving problems at all, or just creating them.)

A warning I would give, which may apply to you is...

:duck: Avoid Duck Imprinting

There's this thing about ducks, that they follow whatever they see when they hatch:

Why are Ducks Following Me? - Animal Kooky

And I think some people who follow Rebol, seem to follow it a bit like those ducks... outside of the context of what it's useful for or not.

I'm not sure what your goals are. And I suspect you're not well-versed in things like lex and yacc, so the low-barrier-to-entry of Rebol may have attracted you.

But while it may be non-obvious how to get started with studying abstract syntax trees... there are things like the JavaScript AST Explorer you might find there's a world of non-Rebol things that can work pretty well for what they do.

Software artifacts are defined by the boundary of what they don't do, every much as by what they can do. I'm extremely skeptical if I approach someone who can't articulate things that what they are doing would not be useful for...because it indicates to me they don't comprehend the nature of design.

Anyway, it would be informative if you showed a contrast of things you have tried to do in other languages--and why you think Rebol is particularly suited for whatever your pursuits are.