ArticleslgStudy

computer science

Rebol

Rebol is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Rebol rather than just read about it. In short: Rebol ( REB-əl; historically REBOL) is a cross-platform data exchange language and a multi-paradigm dynamic programming language designed by Carl Sassenrath for network communications and distributed computing. It introduces the concept of dialecting: small, optimized, domain-specific languages for code and data, which is also the most notable property of the language according to its designer Carl Sassenrath: Altho…

Rebol — main illustration
Rebol — illustration

Key takeaways

  • Rebol belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Rebol to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Rebol from memory before moving on to harder problems.

Reference excerpt

Rebol ( REB-əl; historically REBOL) is a cross-platform data exchange language and a multi-paradigm dynamic programming language designed by Carl Sassenrath for network communications and distributed computing. It introduces the concept of dialecting: small, optimized, domain-specific languages for code and data, which is also the most notable property of the language according to its designer Carl Sassenrath:

Although it can be used for programming, writing functions, and performing processes, its greatest strength is the ability to easily create domain-specific languages or dialects Douglas Crockford, known for his involvement in the development of JavaScript, has described Rebol as "a more modern language, but with some very similar ideas to Lisp, in that it's all built upon a representation of data which is then executable as programs" and as one of JSON's influences. Originally, the language and its official implementation were proprietary and closed source, developed by REBOL Technologies. Following discussion with Lawrence Rosen, the Rebol version 3 interpreter was released under the Apache License 2.0 on December 12, 2012. Older versions are available in binary form only, and no source code release for them is planned. Rebol has been used to program Internet applications (both client- and server-side), database applications, utilities, and multimedia applications.

Etymology Rebol was initially an acronym for Relative Expression Based Object Language written in all caps. To align with modern trends in language naming represented, e.g. by the change replacing historical name LISP by Lisp, programmers ceased the practice of writing REBOL in all caps. Sassenrath eventually put the naming question to the community debate on his blog. In subsequent writing, Sassenrath adopted the convention of writing the language name as Rebol.

History First released in 1997, Rebol was designed over a 20-year period by Carl Sassenrath, the architect and primary developer of AmigaOS, based on his study of denotational semantics and using concepts from the programming languages Lisp, Forth, Logo, and Self.

REBOL Technologies was founded in 1998. REBOL 2, the interpreter, which became the core of extended interpreter editions, was first released in 1999. REBOL/Command, which added strong encryption and ODBC access, was released in September 2000. REBOL/View was released in April 2001, adding graphical abilities on the core language. REBOL/IOS, an extensible collaboration environment built with REBOL was released in August 2001. REBOL/SDK, providing a choice of kernels to bind against, as well as a preprocessor, was released in December 2002. Rebol 3 [R3], the newest version of the interpreter, had alpha versions released by REBOL Technologies since January 2008. Since its release as an Apache 2 project in December 2012, it is being developed by the Rebol community.

Design

Ease of use One of the Rebol design principles is "to do simple things in simple ways". In the following example the Visual interface dialect is used to describe a simple Hello world program with a graphical user interface:

This is how a similar example looks in R3-GUI:

Dialects Rebol domain-specific languages, called dialects, are micro-languages optimized for a specific purpose. Dialects can be used to define business rules, graphical user interfaces or sequences of screens during the installation of a program. Users can define their own dialects, reusing any existing Rebol word and giving it a specific meaning in that dialect. Dialects are interpreted by functions processing Rebol blocks (or parsing strings) in a specific way. An example of Rebol's dialecting abilities can be seen with the word return. In the data exchange dialect return is just a word not having any specific meaning. In the do dialect, return is a global variable referring to a native function passing back a function result value. In the visual interface dialect (VID), return is a keyword causing the layout engine to simulate a carriage return, moving the "rendering pen" down to the beginning of the next line. A Rebol interpreter with graphical abilities must understand and interpret many dialects. The table below lists the most important ones in order of significance.

Syntax Rebol syntax is free-form, not requiring specific positioning. However, indentation is often used to better convey the structure of the text to human readers. Syntactic properties of different dialects may differ. The common platform for all Rebol dialects is the data exchange dialect; other dialects are usually derived from it. In addition to being the common platform for all dialects, the data exchange dialect is directly used to represent data and metadata, populate data structures, send data over Internet, and save them in data storage. In contrast to programming languages like C, the data exchange dialect does not consist of declarations, statements, expressions or keywords. A valid data exchange dialect text stream is a tree data structure consisting of blocks (the root block is implicit, subblocks are delimited by square brackets), parens (delimited by round brackets), strings (delimited by double quotes or curly brackets suitable for multi-line strings; caret notation is used for unprintable characters), URLs, e-mail addresses, files, paths or other composite values. Unlike ALGOL blocks, Rebol blocks are composite values similar to quoted s-expressions in Lisp. The fact that code is written in the form of Rebol blocks makes the language homoiconic. Blocks as well as parens may contain other composite values (a block may contain subblocks, parens, strings, ...) or scalar values like words, set-words (words suffixed by the colon), get-words (words prefixed by the colon), lit-words (words prefixed by the apostrophe), numbers, money, characters, etc., separated by whitespace. Special characters are allowed in words, so a+b is a word unlike a + b, which is a sequence of three words separated by spaces. Comments may appear following the semicolon until the end of the line. Multi-line comments or comments not ignored by the lexical parser can be written using "ordinary" datatypes like multi-line strings.

Semantics Blocks containing domain-specific language can be submitted as arguments to specific evaluator functions.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Rebol

Start with the simplest possible case. Write down what Rebol claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Rebol before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Rebol ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Rebol

In research
Rebol appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Rebol in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Rebol is common in secondary-school and first-year university syllabi. It links to neighbouring topics AmigaOS 4 software, Dynamic programming languages, Dynamically typed programming languages, so understanding it makes those chapters shorter.
In everyday life
Look for Rebol outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Rebol in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Rebol means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Rebol out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Rebol in simple terms?

Rebol ( REB-əl; historically REBOL) is a cross-platform data exchange language and a multi-paradigm dynamic programming language designed by Carl Sassenrath for network communications and distributed computing. It introduces the concept of dialecting: small, optimized, domain-specific languages for…

Why does Rebol matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Rebol?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Rebol.

Tags

  • AmigaOS 4 software
  • Dynamic programming languages
  • Dynamically typed programming languages
  • Extensible syntax programming languages
  • Formerly proprietary software
  • Functional languages
  • High-level programming languages
  • Homoiconic programming languages
  • Programming languages
  • Programming languages created in 1997
  • Prototype-based programming languages
  • Scripting languages

Keep exploring