Table of Contents
Red
Red is a color.
It’s also a programming language and basically my language of choice for…basically everything.
Currently? Nothing much will be written here, though that may gradually change.
Actually, it’ll almost certainly change as I add my own notes on Red onto here.
Red is based on the REBOL language which, in my experience, doesn’t actually explain much to most people. Though that also means that tutorials/guides/information relevant to REBOL is usually applicable for Red.
Learning Red
If you’re vaguely interested in the language, just know that a lot of the learning material you’ll find online is usually accurate but that it’s quite out of date at this point. In some cases, the latest material is from 2018, while Red has already gone thru…quite a few updates. Though the language is easy enough to learn that this shouldn’t be too big of an issue.
This is particularly true of material for REBOL which, well, isn’t 100% compatible with Red, so some changes are needed. Though you can still get a good picture of how it may/will work in Red.
Advice
Help & DSLs
Something you’ll quickly learn is that DSLs like view or rich text is that you can’t use the built-in help tool to figure out what the individual commands do. This means you’ll have to rely on documentation.
This did end up tripping me up, so it’s best that you keep it in mind.
Parse & Code
You’ll eventually reach a point where you want to put code inside of parse rules. This can be done by placing regular Red code inside of round brackets (parentheses). But what isn’t explained anywhere, though is obvious once you realized it (like me) is that you can place these anywhere in the parse rules.
Originally, I assumed that you could only place these at the end of the rules, but realized that that wasn’t the case.
Complaints
Here I’m gathering a few minor issues I have with the Red language which you may or may not find useful.
I’ll note that these aren’t (so far) related to things like the slow development pace or lack of features available in REBOL (for example).
View's lack of Granularity
Having read this article, which isn’t related to Red directly, I came to a bit of a realization.
Basically, in view, if something isn’t explicitly available thru the dialect…you’re kinda screwed. You can’t just go down a level to add a split-button – which is something I wanted to do – because that lower level isn’t accessible to the average person.
Granted, at some point you’re going to hit Red/System, but that still isn’t really part of the point. As far as I know, it isn’t possible to draw a GUI in Red without using view or going down to Red/System.
This does require some more investigation by me – however! I’ve already looked thru a lot of the available documentation and even glanced at the source code and, so far, I haven’t found anything.
Trivilinks
-
- Introduction to Parse – At the very least, you should take a look at this…it was actually what convinced me to start learning Red.
- Dynamic Refinements and Function Application – This may be useful if you’re already learning the language. I know that I would have preferred to know about it about a week ago.
- Helpin'Red – A site that documents Red features and explains them. A bit out-of-date but still a useful resource. Especially for beginners.
- Creating Business Applications With REBOL – A document concerned with REBOL, but still somewhat relevant to Red. Not really “beginner” stuff though.