3 ms·
I used to do a lot of REBOL programming, back in the day. I even wrote some tutorials for an old webdev site called Gelicon. Back then, there was no Django or
by chipx86 11y ago
I used to do a lot of REBOL programming, back in the day. I even wrote some tutorials for an old webdev site called Gelicon.
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.3 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.4 http://www.rebol.com/docs/core23/rebolcore-16.html#section-3...), HTML tags (http://www.rebol.com/docs/core23/rebolcore-16.html#section-2.12 http://www.rebol.com/docs/core23/rebolcore-16.html#section-2...), URLs (http://www.rebol.com/docs/core23/rebolcore-16.html#section-2.13 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.
- klibertp 11y ago> REBOL had a lot of time to grow beyond where it seems to be now. I'm following Red development, hoping for it to become a free (in both senses) modernized REBOL: http://www.red-lang.org/ http://www.red-lang.org/ It's not there yet, obviously, but it looks promising.
- chipx86 11y agoVery cool. I always wondered if someone would do that (considered it myself, once). I'll keep my eye on this. Thanks!