A few weeks ago, Gearhead took a look at a cool language called Python. It seems from your comments that languages are a hot topic, particularly languages that are good for quick fixes.
Gearhead now offers up another language for your consideration: Rebol, a free interpreted scripting language from Rebol Technologies.
Rebol (pronounced "rebel") is a remarkable language: It is small (the run-time interpreter is a skinny 159K bytes under Windows), pretty fast, easy to learn, sophisticated, amazingly powerful and available on -- get this -- 17 operating systems covering 32 combinations of operating systems and hardware!
This support makes Rebol the most widely available cross-platform language, including all flavors of Windows, BSD variants, Linux, OS/400, AIX, Macintosh, Solaris and PalmOS. Fifteen more platforms are pending, but not NetWare -- all you NetWare devotees should hassle the company immediately.
Even more amazing is that Rebol Technologies claims applications are completely portable between platforms without modification. Gearhead talked with Carl Sassenrath, Rebol's creator and the company's founder and CEO, about the language and the company's plans.
Sassenrath is excited about Rebol's market and is adamant that Rebol Technologies is in it for the long haul to build a strong market and company.
Rebol is the result of Sassenrath's 20 years of language experience with the likes of Hewlett-Packard. The language is designed, he says, for "programming in the small"
-- giving programmers the ability to hack effective tools as easily as possible.
Although Sassenrath hasn't made the source of the Rebol interpreter available, he points out that every other aspect of the language is open.
This is part of the company's strategy to create an environment in which developers will share code and information and create a market buzz that popularizes the language. Indeed, the company has no immediate plans to produce a compiler that would allow developers to hide their coding.
When you download Rebol, you'll find the run-time executable and a handful of scripts and documentation in an archive. The documentation is sparse (Sassenrath admits: "The documentation is horrible and I apologize profusely . . . we're rewriting it."), but there is more than enough to get you started. And the Rebol Web site has some good tutorial material. The site also features a collection of scripts written by Rebol users and the company that will help get you going.
The company describes Rebol as "The Internet Messaging Language," which only begins to cover the scope of what it can do. There's built-in support for HTTP, FTP, SMTP, POP, NNTP, Finger and daytime protocols, and there's support for adding any TCP protocol required (although that documentation is missing at present).
There's a security model to control the level of access Rebol scripts have to the local file system and TCP sockets, and a rich set of data types, including URLs, money, times, dates, numbers, strings, words and lists.
So what is Rebol like to program with? Well, pretty amazing, as it offers simple constructs for doing complex things. For example:
This script reads the given URL and prints its contents. Want to send the URL contents to someone? Try:
send <mailto:firstname.lastname@example.org>email@example.com read
How about running a Rebol script that's on an FTP server? Voila!
Rebol can also be extended with "dialects" -- sort of like defining functions that become part of the language. This allows you to write code that is context-specific. This is another area in which documentation is sparse, but the concept is exciting.
This story, "Rebol with a context" was originally published by Network World.