The Red Language

Introduction

Red is a very interesting programming language that I am experimenting with. It is (intentionally) very similar to REBOL.

http://www.red-lang.org/
REBOL Tutorial

Download Red

Red is currently available for Windows, Mac, GNU/Linux.
download Red:- http://www.red-lang.org/p/download.html

There are links to instructions etc, but here I explain the Windows procedure.

Create a new folder, maybe called RedStuff, download the (tiny) Red exe, and store it in this folder. There is no install process. We are ready to go.

Red can be used interactively - just run the exe from the file manager, and you can type code after the red >> prompt.

To work with programs (scripts) stored in a file, you need to use a text editor, and it is simplest to store your programs in the same folder as the exe. Here is a simple program:

Red [
    Title: "Simple hello world script"
]
print "Hello World!"
Save it under the name, e.g: hello.red

There are several ways to run the code.

  1. You can open a command window in your Red folder, from Windows Explorer. Shift + right-click on your RedStuff folder, and choose 'Open Command Window Here'. You can then run the program by typing: red-054 hello.red You should see the Hello World! output. Note that I am using red-054.exe (version 0.5.4). You should use the name of the version you downloaded.
  2. You can right-click on hello.red and choose 'Open With...' Browse to the red exe, and select it. From now on, double-clicking on a red file will execute it in a pop-up Dos window. A drawback of this approach (due to Windows) is that the window vanishes at the end of execution. to prevent this, put an 'input' instruction at the end of the program. (The input instruction waits for you to enter some text.)
  3. The best way is to use a good text editor that can display syntax-highlighted Red scripts, and launch programs with a single click. There are several, and you need to download additional setup data to configure your editor for Red. (Below I provide a toy editor for Red).

Download REBOL

Download the appropriate Rebol-view from http://www.rebol.com/download-view.html No install - simply put the file in a suitable folder, and run it. You can ignore the 'preferences' message, and click on 'Console' to get started. There are several good REBOL tutorials on the net.

Try Ride Editor for Windows (V4)

Ride is a trivial editor for Red, based on code that I had already. NB V4 update- now has pretty-printer.

However, it comes bundled with the Red interpreter and is pre-configured to execute it - no extra downloads. You can download it here.

Unzip it into your RedStuff folder, look at the readme, then run ride.exe.

Tired - editor in Red

Tired is an even more trivial editor. Just for fun - http://www.mikeparr.info/tired.html