REBOL in One Line
rebol.com
rebol.com
When I first heard of REBOL in the '90s, I assumed it's some kind of scripting-oriented COBOL variant. That's pretty much the worst association for a modern and convenient language.
Imagine if Ruby were named "NuBASIC" -- everyone involved with it would first have to spend time explaining that it has nothing to do with BASIC. That's how bad it is for REBOL, in my eyes.
REBOL had some things going for it: Small executable, interesting syntax, data types and features and the pedigree of its developer.
On the other hand, it was a proprietary contender in a field with a plethora of open source contributors, and where developers actually cared about this.
And with that comes a lack of community and packages. Not sure if REBOL even has a package system/repository, which is quite important, no matter how good your standard library is (one of the things that, well, mortally wounded Tcl).
Had it been free from the start who knows what impact it would have had.
http://video.respectech.com:8080/tutorial/r3/index.r3
This is just one example of real-world applications for Rebol 3. And if you learn Rebol 3, Red is almost exactly identical.
BTW, I'd love to hear feedback on the tutorial. :-)
I was interested in rebol back when I first started to program, but I moved to php and dhtml because I wanted to focus on web development.
In the advent of the internet of things, I am looking to pick something up again for those little embedded devices. Perhaps controlling servos or something. I've been thinking of nodejs or ruby, but perhaps I should consider r3 now.
But I guess I can't quite say that any of those is prominent.
Back then, there was no Django or Ruby on Rails, and while PHP worked, it wasn't always suitable for a lot of tasks. With REBOL, for instance, I could (and did) build a client that would read from some early web services, parse the data, and then interface with IRC servers to both stream some of the data to a channel and act as a control interface for further parsing, along with generating static webpages from the data. Implementing each part of that was a lot easier than most languages I've used (assuming you're not using third-party modules for things like IRC).
What made REBOL cool, back when it was new, was just how easy it was to work with the Internet and parse results. For instance, see the one-liner in example 42 on that link, which scrapes a page for all links:
parse read http://www.rebol.com [any [thru "A HREF=" copy link to ">" (print link)] to end]
That reads from www.rebol.com and sets up a parser for it with the given rules. Those rules state that it should skip all bytes through "A HREF=", then copy any bytes up until the ">" into a "link" variable, and then print the variable. Simple example, but it's fairly easy to write something a lot more complex.The language can be a bit wonky at first, but especially back then, once you learned it, it was fantastic and fun. Writing a parser for a protocol like IRC was just easy. You could easily output a file that was both data and a valid self-parsing REBOL program. Writing a self-modifying program to store the state for the next run was almost trivial. You could write little DSLs for whatever you wanted. Like LISP, the code was data.
Oh, and the selection of data types was pretty neat. For example, e-mail addresses were a valid datatype (http://www.rebol.com/docs/core23/rebolcore-16.html#section-2...). So was currency (http://www.rebol.com/docs/core23/rebolcore-16.html#section-3...), HTML tags (http://www.rebol.com/docs/core23/rebolcore-16.html#section-2...), URLs (http://www.rebol.com/docs/core23/rebolcore-16.html#section-2...), etc.
I think REBOL had the potential at the time to go far, but it really suffered from the restrictions the company placed on it as an attempt to monetize the language. The core of REBOL was free, and you could do a lot with that, but you could not invoke external programs or bind to any native libraries. To gain that functionality, you had to pay a decent amount (at least for me, at the time) for a full license. There may have also been restrictions on bundling the core REBOL interpreter.
I believe that's all free now, but then, the world's grown beyond Perl and PHP since then. REBOL had a lot of time to grow beyond where it seems to be now. I still think about coding something up in REBOL every so often, but I usually just reach for Python instead.
Still, fun language. Worth playing with sometime.
I'm following Red development, hoping for it to become a free (in both senses) modernized REBOL:
It's not there yet, obviously, but it looks promising.