|
|
This document is available in: English Castellano Deutsch Francais Nederlands Russian Turkce |
by Georges Tarbouriech About the author: Georges is a long time Unix user (commercial and free). He is a Rebol fan from the beginning. If you can read French you might have a look at an earlier article he wrote about Rebol two years ago at http://www.amiganews.com/ANN/ no117/rebol.shtml Content: |
Abstract:
Let's say REBOL is a messaging language (it provides seamless network connectivity to HTTP, FTP, SMTP, POP, NNTP, ...), but as a matter of fact, it's
much more than this. However, it's particularly dedicated to Internet
communications.
REBOL stands for Relative Expression-Based Object Language.
Going to http://www.rebol.com allows you
to download the latest version (2.3) of Rebol/Core for about 40 platforms. Rebol is also
available from many Linux distributions but in earlier versions.
One of the news is called Rebol/View and you can download a beta version
numbered 0.9 (4.1).
This last is one of the big improvements of Rebol.
In this article, we'll try to make a short review of the many features of Rebol.
As we said before, Rebol is available for more than 40 platforms.
This concerns Rebol/Core, that is the essential program. Rebol/Core provides you
with a tool allowing to develop any type of applications, even if its favorite
field stays the Internet.
With Rebol/Core you can manage web, ftp, email
communications and cgi scripts. You can manipulate text, html... But you can
also use it to write system commands or much more sophisticated programs.
The present version is 2.3 and it's about
350/400 Kbytes (uncompressed) according to the platform. It consists of an executable
and two configuration files: rebol.r and user.r. The last one doesn't exist when
you download the archive. It will be created at first start. Accordingly,
there's nothing to say about installation, as you just have to put these files in
a directory named rebol (for instance).
Usually, you'll have to set an environment variable to locate the directory you
created.
You'll find some more files in the archive: 2 scripts and 2 html docs.
One script can be used for feedback (hence its name) and the other one called
rebdoc.r allows you to generate the doc (keywords) in html format. The 2 html
files concern setup and notes. More documentation is available from the Rebol web site.
Next, you can get Rebol/View. To make it short, let's say it's Rebol's GUI.
MUCH MORE on this later!
At the moment of this writing Rebol/View is only available for Amiga, FreeBSD,
Linux and Microsoft things. BeOS R5, Irix, HP-UX, AIX, Solaris Sparc versions are
pending and so should appear very soon.
Rebol/View is a single executable of about the same size as Rebol/Core. Let's
add it's a beta version (0.9.9 release 4.1).
Put it where you want to and at first start it will ask you for network
parameters. A documentation and a FAQ are already available from rebol site.
For information, two more products are available: Rebol/Command and
Rebol/Apache.
Rebol/Command will be released very soon and will be a commercial product intended to
access DLL, applications and databases.
Rebol/Apache will be a plug-in module for Apache.
And now, what can we do with this?
If you are new to Rebol (or not!), the best thing to do is to download the
example scripts. There are about 200 of them!
How to run a script may depend on the machine (OS). On OSes with a shell (or shell
alike ...) you type something like "rebol test.r". The suffix .r indicates a Rebol
script. To test you can also write "do %test.r".
On OSes without shell, such as MacOS (except MacOS X, obviously!) you just have
to drop the script icon on the Rebol executable icon. That's all!
This works on Microsoft things too, for instance.
Now let's go to the heart of the beast!
Here is a Rebol script from the examples called mailsend.r.
REBOL [
Title: "Email Message Sender"
]
File: %mailsend.r
Date: 10-Sep-1999
Purpose: {A very simple way to send an email.}
Note: {
The TRIM function below is used to remove the blank
}
lines from the head of the email, so that the first
line of text gets used as the subject.
Category: [email net 1]
send luke@rebol.com trim {
Hi there.
Just wanted to send you an email message from REBOL.
-Friend
}
As a matter of fact, there is ONE line of code!
From the starting REBOL
to the closing "]", it can be considered as a header,
even if it is required for every Rebol script.
The last part is the message content and between you have the Rebol code:
"send luke@rebol.com trim"
The what the command does is included in the header "note" of that script.
That's enough to send a mail as soon as your machine is properly configured.
If you know a way to make that shorter, just let us know!
Rebol scripts are interpreted and communicate through ports (a bit like Rexx
does) and since they are small in size, the result is quite fast.
Well, for people knowing Rebol from the beginning, this isn't surprising.
However, from release 2, you get more features, more functions... Enough
to have a look at the example scripts to notice the improvement.
Everything concerning ftp, web, mail communications can be done with Rebol in a
very simple way. With a few lines of code you can download files from a ftp
server, fetch a web page somewhere...
You can as well manipulate text , html... An example shows you how to convert
text to html with a 2083 bytes script!
Cgi scripts can be handled too. For instance, you can generate a cgi form and
the associated html form.
Another feature allows you to insert a Rebol script into an html page with the
script tag. Unfortunately very few browsers seem to be able to properly handle this
tag. A work around would be to use Rebol as cgi to generate dynamic content.
A breathtaking 1827 bytes example creates a webserver!!!
For those who can't live without their cellphone, there's a script allowing to
send message to a GSM phone...
It's possible to encrypt, to compress or uncompress files with Rebol. you can
even autoextract these compressed files. Check the autoextract.r and encrypt.r
scripts.
As you may have noticed, these examples are a gold mine. Check them you
won't regret your time (and it's impossible to mention them all in this article).
Let's say Rebol is great! This Rebol/Core is a very good evolution justifying to
upgrade... or to begin with.
Considering Rebol/View, we can't talk about evolution: it is a REVOLUTION! (or
why not a reBolution?)
Those among you who don't know Rebol/View should sit down and relax!
With Rebol/View you can get the same features as Rebol/Core... plus a lot more.
Only a word to summarize: INCREDIBLE!
Let's start with an example.
Here is a script called lftest.r.
REBOL [
Title: "New way to access LF languages"
]
File: %lftest.r
Date: 28-Jul-2000
Purpose: {Shows how easy to create buttons.}
Category: [view VID 1]
view layout [
title "LF the multilingual magazine"
]
across
button "English" button "Français" button "Castellano" return
button "Deutsch" button "Nederlands" button "Italiano"
Could be the new way to access LF languages...
Let's go on... A 1413 bytes script creates a graphical text editor!!! Do you believe it? Well, here is the proof:
Here it is THE script.Do you want some more? The script image-sort.r creates a tool for displaying and sorting images: it is 3443 bytes! Look at it:
This picture is brought to you by NeXTstep(TM) Until now, we just showed the small size of the code and the great features of Rebol/View.It's really a Internet connection! Test it yourselves... connecting to Reb sites with Rebol/View
First of all, we can expect version 1.0 of Rebol/View. As we already mentioned, a
few other products are in the work. But we didn't speak about the "still to
come". Rebol is working on a big, big product called Rebol/Express. It will be a
commercial product fully dedicated to communications. Let's call it an Internet
software. You can learn more on this product from http://www.rebol.com/products.html
Rebol/Express can be a competitor for Backweb or Marimba. Wait and
see!
But knowing Rebol's people efficiency we can expect another great piece of
software.
You may have noticed we didn't mention anything about licensing. Just for
information, Rebol/Core is free but it isn't under GPL.
Furthermore, people at Rebol are like their products: great!
They always take into account your feedback, they even ask for it. Hence the
feedback.r script available in the archive. They answer your questions and
provide you with documentation and FAQ. All this for FREE!
We can also trust them for constant improvement in their work.
I really believe Rebol will become one of the main actors in communications
during the next few years.
The only thing we can add is: test Rebol products and stay tuned!
We're not only living a great time, it's getting even better!
|
Webpages maintained by the LinuxFocus Editor team
© Georges Tarbouriech, FDL LinuxFocus.org Click here to report a fault or send a comment to LinuxFocus |
2001-05-27, generated by lfparser version 2.15