Discovered at FTP cache: https://grumbeer.dyndns.org/ftp/www.ibiblio.org/
README.txt says Rebol 1.0.2 was released 6-October-1998
See also:
Copyright (c)1998 REBOL Technologies. All Rights Reserved.
REBOL/Core Quick Start Guide
About This Guide
This guide includes the facts you need to start using REBOL (pronounced REB-ul) quickly. It offers concise information for installing REBOL on any of numerous computer operating systems. This guide then summarizes the spirit of REBOL: what it is, how it functions, and how to put it to work for you quickly. Finally, this guide offers steps for learning more about the power of REBOL.
No prior knowledge of computer languages is needed to use REBOL. In fact, if you have used other languages, forget what you know because REBOL’s approach to computer language is refreshingly unique. It’s simple.
How to Install REBOL
Here are the procedures for installing REBOL on your computer:
-
Make a new directory for the files, typically named REBOL.
-
Uncompress the distribution file using the standard method for the operating system.
-
Move the uncompressed files to the new directory.
That’s it. The three REBOL files are rebol.exe (executable program), rebol.r (initialization file), and user.r (your definitions file). You can customize your copy of REBOL using user.r, but do not modify rebol.r. If you accidentally do modify rebol.r, reinstall it.
Also included in the release are documentation files in HTML format: quick.html, users.html, and experts.html. They can be read with a web browser program.
To uninstall REBOL, simply delete the directory and files.
The REBOL Spirit
Computers are designed to solve problems for people (though it may not always seem that way). The problems are defined using a computer language .
REBOL is an acronym for relative expression-based object language . That means it’s a language that uses clear expressions rather than cryptic codes to instruct a computer.
A programming language communicates between computers and programs. You must understand how computers function to write programs for them. For example, instructing a computer to print the phrase "REBOL World" on the screen would look like this in Java programming language:
class REBOLWorldApp {
public static void main(String[] args) {
System.out.println("REBOL World!")
}
}
Most computer languages require that you think like a computer rather than a human to communicate with it. REBOL communicates in human terms. The REBOL instruction for "REBOL World" looks like this:
print "REBOL World"
Much simpler!
Simplicity is power. REBOL can do much more than display phrases on your computer. It can do mathematical calculations, filter and respond to your email, send files to other computers, manage databases, and more. And information isn’t lost if moved to another computer. REBOL is system independent.
That’s because REBOL is a messaging language. A messaging language communicates information between applications running on other computers. Unfortunately, most computers don’t communicate well with other computers. Some data from Windows applications, for example, can’t be read on Linux or Macintosh computers, and vise versa. REBOL passes useable data and messages between otherwise incompatible computer systems.
English and other human languages are messaging languages between people. REBOL is a messaging language between computer applications. That makes REBOL easier and more natural to use than other computer languages.
Let’s get started using REBOL!
Getting Started in REBOL
You write REBOL instructions as a script . Think of a REBOL script as the first half of a conversation with REBOL. The second half is the answer that REBOL gives you, called the result .
You’ve learned from the "REBOL World" example that print requests an output and that "" encloses a string of characters. Easy enough, but not very useful yet.
What if you could give REBOL data that it works on, then gives back to you? What if it could add up your bills, sort your address book, backup computer files, or handle your email for you? Those tasks would be more useful to you.
To write simple REBOL scripts to handle these and other tasks, you need to know more of the power inside of REBOL. So let’s look at the REBOL language and define some terms.
In REBOL, any type of data is called a value . A datatype can be a
- string ("REBOL World")
- date (1-Jan-2000)
- integer (1 100 -1000)
- decimal (1.25)
- tuple (1.0.3 255.355.100)
- email address (johnny@rebol.com)
- url (http://www.rebol.com/)
- block ([11 47 26 999])
- file (%rebol.r)
- word (when)
In fact, REBOL knows and uses dozens of datatypes (defined with examples in Expert’s Guide ). Datatypes are simply types of data that REBOL already knows how to handle. For example, it sees an at sign (@) in a string (johnny@rebol.com), REBOL knows that the string is an email address.
REBOL datatypes are smart . Adding an exclamation point after the datatype (date!) tells REBOL to return the result in the standard international date format (day-month-year) — even if you type it in another format.
Smart datatypes make writing REBOL scripts easy.
Writing a REBOL Script
Now, let’s put REBOL to work!
First, you want to make a tool or function that actually does the work. Let’s call it when and define it ( like this:
when: make date! [30 9 1998]
As you can see, you make when a function that changes the given value to a standard date format (!). The block defines what value is used [30 9 1998]. So what else do you have to tell REBOL?
print when
and REBOL’s result is
30-Sept-1998
The REBOL script you wrote defined when exactly like the prototype date! using the numbers you put in the block.
A REBOL script is written in expressions. An expression is a group of values which REBOL evaluates , then returns a new value. In REBOL, to evaluate is to interpret a group of values toward a purpose or result.
For example, when: make date! [30 9 1998] is an expression that is evaluated as you tell REBOL to print when and return the result of the evaluation: 30-Sept-1998.
REBOL offers numerous built-in datatypes. One of the most powerful is word . A REBOL word is a symbol used literally or as a variable. In the above example, when was a variable that you defined. It was defined with the colon (when: make date!) then evaluated (print when) to produce a result.
Note: All REBOL words can have a different meaning depending on context, just as English words do. The English word "print," for example, can have different meanings when used in computing, fashion, and graphics. So REBOL words can be recycled. It’s a powerful feature that you can learn more about in the User’s Guide .
So what actually evaluates these expressions? Native functions are built-in REBOL functions that you can use right now. They are native to REBOL. In the above example, print and make are natives. Other REBOL natives include load, send, foreach, save, next, and two hundred others. You can get their definitions in the Expert’s Guide and see them at work in the User’s Guide .
Note: You can also get information on any function by simply typing help followed by the native ( help load*). REBOL will print a description of the function on the display screen.*
And here’s one of the powerful "secrets" of REBOL: you can use natives to design your own functions. It’s like being able to make up your own words when you speak to people and they know exactly what you mean!
The example REBOL script used the date native to make a new function called when with the expression:
when: make date! [30 9 1998]
Let’s summarize. REBOL is a messaging language that evaluates expressions and returns values. REBOL expressions include values in common datatype formats as well as user-defined words. Does that make sense? If not, please reread the above section.
Congratulations! You’re now writing REBOL scripts.
Using More REBOL Power
These simple principles for writing REBOL scripts can easily be expanded to solve problems using a computer. Many practical solutions will be described more fully in User’s Guide .
Think of writing a REBOL script as you would write anything else. You use words to build phrases (expressions ) and sentences (functions ) until you have a complete paragraph (object ). You may write more paragraphs or simply reuse some you’ve written before until you have a complete document (script ).
REBOL scripts are built in the same way. To show you how, let’s define some more REBOL terms.
First is object, just mentioned. A REBOL object has values, functions, and even other objects, grouped together within a context. For example,
headline: make object! [font: "arial" size: 24 color: black]
makes an object that defines what a document’s headline should look like.
You can then make another object called text with size: 12 type and REBOL won’t be confused by the two definitions of size.
You can also use REBOL to change the headline size to 18 with
headline/size: 18
The technique is called accessing an object variable . It makes REBOL easy to modify.
One more tip: REBOL is free form. To enhance readability, you can script the headline example like this (once black is defined):
headline: make object! [ font: "arial" size: 24 color: black ]
This is the preferred format for writing REBOL scripts.
Let’s expand on some earlier definitions so you’re more fluent in REBOL.
The data within the bracket []
is called an argument. An argument is a value that provides a value to an expression. Some natives don’t require an argument while others can handle many. Expert’s Guide will tell you the type and number of arguments that each function uses.
Providing an argument to a function is called passing the argument. For example,
print "REBOL World"
passes a "string" to the print function. From another viewpoint, you could say that you are applying the print function to the string.
Here’s a tool that makes REBOL even easier to use. You can make a new function with the native func. For example, to make a new function called sum that totals two numbers, designated as a and b:
sum: func [a b] [a + b]
This expression tells REBOL to define sum by making a new function datatype where a is the first number and b is the second number. Then add (+) the first and second number and give me the result.
To use this function, add the line:
print sum 50 100
and REBOL returns the value
150
The length of your script or conversation with REBOL can be just a few lines or a few pages — but it will be easier to write and understand than with other computer languages.
REBOL at Work
Ready for some real-world examples of what REBOL messaging language can do for you? (You’ll meet the natives used here in the User’s Guide and the Expert’s Guide .)
To grab an Internet web page and save it as a file (%):
file: read http://www.rebol.com save %rebolpage.html file
or you can write it in a single line:
save %rebolpage.html read http://www.rebol.com
To email that web page to a friend:
send friend@domain.com read http://www.rebol.com
To email all the files in a directory to your friend:
files: load %c:/rebol/* foreach file files [send friend@rebol.com read file]
To build a calendar database that holds things to do (prioritized):
todo [
; PRI TYPE DESCRIPTION
9 code "Write SAVE function"
8 fun "Bottle brew for friends"
8 docs "Write Chapter 1"
5 yard "Tend the Merlot vines"
3 code "Parametric search function"
2 web "Call Microsoft re:problems"
1 home "Tune-up tractor engine"
0 yard "Fix the fence near berries"
]
; Type Descriptions
[
code "write code"
docs "write docs"
yard "yard work"
home "house stuff"
fun "relaxation"
web "web related"
]
To send your stockbroker an important transaction message:
send broker@stockbroker.com [
Company: "Microsoft"
Symbol: MSFT
Shares: 1000
Action: sell
]
REBOL makes solutions easier!
What’s Next?
That’s all you really need to know to use the power of REBOL ! Of course, there’s much more to know about REBOL to become a power user . The remainder of these guides will add to your knowledge and enjoyment of REBOL.
User’s Guide will show you how to solve specific problems with REBOL.
Expert’s Guide is your reference manual for REBOL. It includes a description and examples of more than 200 REBOL words and word groups.
Finally, check the REBOL web site for more information and examples on how others are using REBOL messaging language. It’s at http://www.rebol.com.
Have fun, REBOL!