the tone of everything i've read about rebol
i'm interested in learning rebol, but something that's grating on my nerves is how all the written material associated with it takes the tone of an advertisement.
i most interested in dialecting, but, because of the breathless tone of everything i've found, i'm not sure if i should be. is "dialect" just rebol's terminology for what other languages call libraries or modules? or is the idea that by having a parse function you can load your own language and parse it to rebol data?
posted by: david pasquinelli 24-Nov-2017/14:11:44-8:00
The latter for sure.
posted by: Graham 24-Nov-2017/15:31:32-8:00
I'd recommend a read of Rebol in Ten Steps: http://rebol.info/rebolsteps.html
To try and summarize, Rebol is a homoiconic language (both in notation and the in-memory values). Most commonly these values are loaded and interpreted as 'Rebol'. However, blocks of values are not evaluated unless explicitly so:
my-block: [print "Hello World!"]
if true my-block
It is therefore possible to handle them in different ways:
parse my-block ['print set value-to-print string! (print ["I am printing:" value-to-print])]
PARSE is based on BNF grammar so is quite versatile for defining relatively expressive sub-languages. Note that the rule you supply to PARSE is itself a dialect--if you were to try to evaluate it, things would not go so well:
do ['print set value-to-print string! (print ["I am printing:" value-to-print])]
An example dialect "StyleTalk": https://github.com/rgchris/StyleTalk#example
If the tone is breathless or marketing-esque, it's because it is distinguishing feature of the language, and 'dialect' is a fairly descriptive term: it is what other languages might call a 'Domain Specific Language', but while dialects share the lexical rules of Rebol, they can employ entirely different grammatical rules.
posted by: Chris 24-Nov-2017/15:35:59-8:00
Also take a look at http://vpavlu.plain.at/REBOL/tutorial/REBOL%20Essentials%2337-09-jan-2003.pdf starting at page 40
posted by: Nick 25-Nov-2017/4:39:13-8:00
Be sure to see:
Here are some more useful links about dialects and parse (you'll have to ignore the tone in the first one):
posted by: Nick 25-Nov-2017/9:16:58-8:00
Nick--note that the Rebol Forces archive is now republished on rebol.info/forces
posted by: Chris 26-Nov-2017/11:59:21-8:00
Thanks Chris, that's great to see.
posted by: Nick 26-Nov-2017/22:55:11-8:00