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
8
votes
2 answers

How do you define your own datatype in Rebol?

Seeing as you can limit the parameters of functions to specific datatypes, it stands to reason that you might want to define your own datatype, yet I cannot see anything in the Rebol docs that suggests this as a feature of the language (unless I…
mydoghasworms
  • 18,233
  • 11
  • 61
  • 95
8
votes
3 answers

If...else if...else in REBOL

I've noticed that REBOL doesn't have a built in if...elsif...else syntax, like this one: theVar: 60 {This won't work} if theVar > 60 [ print "Greater than 60!" ] elsif theVar == 3 [ print "It's 3!" ] elsif theVar < 3 [ print "It's less…
Anderson Green
  • 30,230
  • 67
  • 195
  • 328
8
votes
1 answer

How to write a "Hello, World" CGI with Rebol 3?

Lets start with something simple: a form with a field which gets echoed.
dt2
  • 183
  • 6
7
votes
2 answers

How to parse and translate DSL using Red or Rebol

I'm trying to see if I can use Red (or Rebol) to implement a simple DSL. I want to compile my DSL to source code for another language, perhaps Red or C# or both - rather than directly interpreting and executing it. The DSL has only a couple of…
guraaku
  • 205
  • 1
  • 7
7
votes
1 answer

Rebol 2 esmtp cannot decode AUTH parameter

Set set-net with appropriate values, but get this message when trying to send an email using esmtp.r from rebol.org. Any ideas what this means?
Bo Thompson
  • 359
  • 1
  • 12
7
votes
2 answers

REBOL layout: How to create layout words automatically - word has no context?

Using the REBOL/View 2.7.8 Core, I would like to prepare a view layout beforehand by automatically assigning words to various layout items, as in the following example. Instead of prepared-view: [across cb1: check …
jjr_
  • 73
  • 2
7
votes
1 answer

Rebol 2 Stopped working after upgrading to Ubuntu 15.10

Rebol 2 stopped working on Ubuntu after upgrading to 15.10. I am getting error- ./rebol ./rebol: error while loading shared libraries: libXaw.so.7: cannot open shared object file: No such file or directory Tried to install libXaw- sudo apt-get…
Satish
  • 133
  • 8
7
votes
2 answers

Expression precedence in Rebol and Smalltalk

Rebol and Smalltalk's expression evaluating precedences have some similarity, both of them are very simple. Rebol's evaluation order, according to clauses in http://rebol.com/r3/docs/concepts/math-precedence.html, is: Expressions are evaluated from…
Xin Wang
  • 93
  • 5
7
votes
1 answer

type of literal words

I was reading Bindology and tried this: >> type? first ['x] == lit-word! >> type? 'x == word! I expected type? 'x to return lit-word! too. Appreciate any insights.
RAbraham
  • 5,956
  • 8
  • 45
  • 80
7
votes
3 answers

Dynamically adding words to a context in REBOL

Imagine the following REBOL code: foo: context [bar: 3] I now have a context foo in which 'bar is defined. How can I dynamically inject a new word into this context? Is it possible? I've tried: set/any in foo 'baz 3 But that doesn't work because the…
Gregory Higley
  • 15,923
  • 9
  • 67
  • 96
7
votes
1 answer

Rebol Tail Call Optimization

I come from a functional programming background and think first about recursive solutions to problems rather than iterative ones. I'm starting to work with Rebol a bit (specifically R3) and have written a solution to the primefactor kata using a…
Jamie
  • 150
  • 6
7
votes
4 answers

is there an object constructor in rebol

I usually program by functions in an "instinctive" manner, but my current problem can be easily solved by objects, so I go ahead with this method. Doing so, I am trying to find a way to give an object a constructor method, the equivalent of init()…
Pierre
  • 530
  • 5
  • 13
7
votes
1 answer

How to send HTTP POST requests using only Rebol3

What is the simplest way of sending HTTP POST requests and getting response (in XML format for example) using only Rebol3? Is there an equivalent of using read/custom in Rebol2, as it is done in this question? How to send an HTTP post with a custom…
dreamyToto
  • 131
  • 2
7
votes
2 answers

Error message on match fail in Rebol Parse

PEG-based parser generators usually provide limited error reporting on invalid inputs. From what I read, the parse dialect of rebol is inspired by PEG grammars extended with regular expressions. For example, typing the following in JavaScript: d8>…
Erick
  • 305
  • 2
  • 7
6
votes
3 answers

Remove special characters from string in Red language

I want to remove all characters in a string except: - or _ or . A thru Z a thru z 0 to 9 space On linux command line, using sed I would do this: $ echo "testing-#$% yes.no" | sed 's/[^-_.a-zA-Z0-9 ]//g' Output: testing- yes.no How can I achieve…
rnso
  • 23,686
  • 25
  • 112
  • 234
1
2
3
46 47