Questions tagged [rebol]

Rebol is a modern interpreted language where code is data. It isn't object oriented, but has objects. It isn't a functional language but has first class functions. There are virtually no syntax rules or immutable keywords, making it ideal for developing domain-specific "dialects".

Rebol is a homoiconic language with heritage from , , , and . Language focus is on careful control of dependencies, and concern over the size of the interpreter and code...as well as achieving an English-like readability. The project's motto is "Rebel against software complexity".

On 12-Dec-2012, the unfinished ANSI-C sources of the Alpha release of Rebol3 was open-sourced under an Apache 2.0 License. Standalone "zero-install" binaries are available for x86 and ARM platforms--covering Linux/Windows/Mac/Android, 64-bit builds, hard-float compatibility and HaikuOS. Core builds are about half a megabyte, while GUI builds are around 1 megabyte (uncompressed).

(Note: Several forks of the code exist, with a community wiki summary at REBOL3 - what is the difference between the different branches?)

In addition to inheriting the "code is data" paradigm of Lisp, Rebol has a rich type system...natively recognizing patterns like URLs, dates, HTML tags, currency, and binary literals. Of note, Douglas Crockford (of JSON and JSLint) has credited Rebol as a source of inspiration for JSON, adding:

"Rebol's 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. But it's a much richer thing syntactically.

Rebol is a brilliant language, and it's a shame it's not more popular, because it deserves to be."

    —Douglas Crockford, founder of JSON, 2009 [link]

A modern compiled variant of Rebol which draws in several new concepts is , which is under heavy development.

696 questions
6
votes
1 answer

Why doesn't Rebol 3 honor quoted function parameters that are parenthesized?

The DO dialect uses series of category PAREN! for precedence, and will usually boil away the underlying parentheses structure prior to invoking a function. However, it used to be possible in Rebol 2 to specify in a function's definition that you…
6
votes
2 answers

Why doesn't Rebol new-line? treat the newline keyword and the newline character similarly?

I would think that the following Rebol 3 code: x: [newline 1 2] y: [ 1 2] print x print new-line? x print y print new-line? y should output: 1 2 true 1 2 true but what is output is: 1 2 false 1 2 true Both…
Adrian
  • 741
  • 4
  • 14
6
votes
4 answers

How do you write a codec for Rebol 3?

I wrote a JSON encoder/decoder for Rebol 2. I'm rewriting it for Rebol 3 and would prefer to make it available in Rebol 3 as a codec: load %data.json save %data.json object decode 'json to-binary {["some","json"]} How should I go about this? At the…
rgchris
  • 3,698
  • 19
  • 19
5
votes
1 answer

Rebol/RED parsing. Save ASCII codes from parsed string to variable?

I stumbled into RED language the other day and spend (more or less literally) the last 24h "learning" it. I exhausted my googling skills trying to find solution for a simple problem that just evades my skills and logic, so hopefully somebody here…
5
votes
1 answer

Simpler way to do repeated `back back series`

Sometimes, I tend to do next next a (repeatedly) to get at a particular element. This works well when you need 2 or less traversals. However, it gets cumbersome pretty soon. A loop is too much overhead for this simple case. Fortunately you can do at…
Geeky I
  • 751
  • 6
  • 22
5
votes
4 answers

Does Rebol really have an equivalent for javascript prototype property?

Gregogy has made a post about rebol and javascript here http://blog.revolucent.net/2009/05/javascript-rebol.html But as I'm going deeper into comparing javascript and rebol, I can't see what's the equivalent of rebol for javascript prototype.…
Rebol Tutorial
  • 2,738
  • 2
  • 25
  • 36
5
votes
2 answers

Rebol 3: reading STDIN efficiently line by line (to make awk like tool)

I am trying to make an awk like tool that uses Rebol 3 to process bigger text files with bash pipes and tools. I am having a problem reading STDIN line by line in Rebol 3? For example this shell command produces 3 lines: $ (echo "first line" ; echo…
middayc
  • 111
  • 8
5
votes
1 answer

How read file real time for chat application?

I'm trying to write a simple chat application in Rebol which is based on a single text file. What would be the best way to read that file "real time"? Right now I've got it working with this: t1: text 600x300 wrap green black font-name…
lechuck
  • 51
  • 1
5
votes
1 answer

Documenting Rebol's dialect

I can document a function like this: f: func [ "a description" arg1 [string!] "a description of an argument 1" ][ arg1 ] I can use ?/help in order to retrieve informations about the the function (a description, a usage, the…
Darek Nędza
  • 1,420
  • 1
  • 12
  • 19
5
votes
1 answer

Wrapping shared variables using Rebol 3 FFI

Atronix Rebol 3 FFI looks pretty good in wrapping external functions, but I cannot find any references about wrapping external variables using it. For example, Curses/NCurses library have the external variable stdscr defined in C as extern WINDOW…
Ivan Sukin
  • 85
  • 5
5
votes
1 answer

Rebol 3 What are the available border effects for r3gui?

I know how to adjust the size of the border within r3gui: view [ b: box 800x400 red options [ box-model: 'frame border-size: [4x2 2x4] ] ] But how can I make an ibevel border/edge effect known from R2/View with r3gui? Rebol2/View…
TGD
  • 175
  • 1
  • 5
5
votes
1 answer

Pointers returned from dll function when called from rebol

I am trying to ascertain weather I can use rebol for a few programming tasks. I have written a small program which loads an external library and calls a function which returns pointers in some of the arguments. When I run the program it crashes…
user1897830
  • 443
  • 1
  • 3
  • 10
5
votes
4 answers

How to express branch in Rebol PARSE dialect?

I have a mysql schema like below: data: { `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(10) DEFAULT '' COMMENT 'the name', `content` text COMMENT 'something', } now I want to extract some info from it: the filed name,…
Wayne Cui
  • 835
  • 7
  • 15
5
votes
2 answers

How to Convert a Red/Rebol String into a Series

I would like to know if there is a way to convert a string into a series. I'm trying to extract data using parse, and I want to break some of that captured data down into smaller fragments so that I can do IF, CASE or SWITCH statement. Below is a…
5
votes
3 answers

VID layout pane supporting multiple face creations [rebol2]

Please consider this simple rebol2 code to illustrate my problem: REBOL [] a: make face [ offset: 0x0 color: yellow size: 20x20 ] b: make face [ offset: 0x0 color: red size: 60x60 pane: reduce [ make a [offset:…
rdonatoiop
  • 1,185
  • 1
  • 14
  • 28