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
5
votes
1 answer

REBOL 3 - Where can user defined namespace words be accessed?

Lets say I define a few words: Word1: 5 Word2: "blahdiddyblah" Is there some part or block of the system that stores which words are in use? Tried something like this but it failed: S1: to-block copy system/contexts/user D: 3 S2: to-block copy…
kealist
  • 1,669
  • 12
  • 26
5
votes
2 answers

How to split a string at a particular character in Rebol

I haven't figure out how to split a string in a cleaner way. ref: copy/part (find line "#") -15 rest2: copy/part (skip (find line "#") 1) 450 -15 is for going to the beginning and 450 to go to the end. It is not nice because I put value. What is…
5
votes
2 answers

How to use Unicode codepoints above U+FFFF in Rebol 3 strings like in Rebol 2?

I know you can't use caret style escaping in strings for codepoints bigger than ^(FF) in Rebol 2, because it doesn't know anything about Unicode. So this doesn't generate anything good, it looks messed up: print {Q: What does a Zen master's {Cow}…
5
votes
4 answers

Save a value to a block instead of the word label that represents it

I am trying to save a few string values into a block so that I can save that block to a text file. I am getting these values from a form using VID. One way to do this would be to simply save strings to the file. But I would prefer being able to…
KK.
  • 783
  • 8
  • 20
5
votes
3 answers

How to use PARSE dialect to read in a line from a CSV?

I'm trying to use PARSE to turn a CSV line into a Rebol block. Easy enough to write in open code, but as with other questions I am trying to learn what the dialect can do without that. So if a line says: "Look, that's ""MR. Fork"" to you!",Hostile…
4
votes
1 answer

How to mix together string parsing and block parsing in the same rule?

It's cool that Rebol's PARSE dialect is generalized enough that it can do pattern matching and extraction on symbolic structures as well as on strings. Like this: ; match a single "a" character, followed by any number of "b" chars >> string-rule:…
4
votes
1 answer

Rebol library access

Isn't library access free in R2? I'm running 2.7.8.4.2 on Ubuntu and R2 complains when I try to load Dobeash's sqlite.r, I see this message: ** Script Error: Feature not available in this REBOL ** Where: main ** Near: version: to tuple! do make …
Rebnoob
  • 41
  • 1
4
votes
3 answers

Differences between Red's 5 function types, and why does it distinguish them?

In Red, there are functions of datatypes function!, op!, native!, routine! and action!. What are the differences between them? As far as I know function! is used for user-defined functions and op! for infix operators, and routine! for functions…
nickkoro
  • 374
  • 3
  • 15
4
votes
1 answer

What's the inverse of block: load text in rebol / red

Let's say I have some rebol / red code. If I load the source text, I get a block, but how can get back the source text from block ? I tried form block but it doesn't give back the source text. text: { Red [Title: "Red Pretty Printer"] …
user310291
  • 36,946
  • 82
  • 271
  • 487
4
votes
1 answer

Rebol: Dynamic binding of block words

In Rebol, there are words like foreach that allow "block parametrization" over a given word and a series, e.g., foreach w [1 2 3] [print w]. Since I find that syntax very convenient (as opposed to passing func blocks), I'd like to use it for my own…
ftl
  • 647
  • 3
  • 13
4
votes
1 answer

Sandbox Red function

I'm planning to write an application for managing a game-server in Red. It should be extendable by using interpreted Red scripts. Now, I want to set restrictions for this scripts (I want to "sandbox" them) and remove specific functionality like I/O,…
nickkoro
  • 374
  • 3
  • 15
4
votes
3 answers

Parse string to find first duplicate character - functional vs. prodecural coding style

I want to parse a string to find the first N duplicate characters found in a (character, n) set. For example, for "ozzllluu" and sets ("u" => 2), ("d" => 2), ("l" => 3), and ("r" => 3)... I would want to find "lll", because it is 3 characters and…
OneArb
  • 453
  • 2
  • 14
4
votes
2 answers

What is the difference between `context` and `object`?

In Rebol 3, there are the functions object and context. What's the purpose of the difference? Note : for reference, in red, both are the same, and object doesn't exist in rebol 2 Context: no pun intended Initially, I was wondering why we had context…
Geeky I
  • 751
  • 6
  • 22
4
votes
2 answers

What's the difference between `a: [b 1]` and `a: [b: 1]`, in red?

What is the difference between a: [b 1] ; and a: [b: 1] both give the same results for > a/b 1 they differ for a/1 though. When do you use what? And the 2nd is a set, what is the 1st?
Wolfram Kriesing
  • 1,527
  • 10
  • 7
4
votes
2 answers

red/rebol: Subtracting dates returns days, how can I change that?

Playing with the date type, I was wondering, why a subtraction always returns days, how can I make it return minutes (or seconds, etc.), which could be possible in the second example >> 24-dec-2016 - now == 82 >> 24-dec-2016/0:00 - now == 82 is…
Wolfram Kriesing
  • 1,527
  • 10
  • 7