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

R3GUI - How to set the size of an 'area'

I've tried: hgroup [label "Note" 64 AFV_Note: area 100x50] That produces the correct width but the height is still too tall. I also tried: hgroup [label "Note" 64 AFV_Note: area options [init-size: 100x50]] That results in an error;…
GordR
  • 91
  • 8
4
votes
2 answers

Rebol 2 disable console echo

I have a Rebol2 console app (Rebol Core) which I would like to disable the keyboard character echo to the console. The app is run from a minimal Linux kernel/initramfs, and is started by busybox inittab (not from terminal). It has a minimal console…
cv007
  • 51
  • 1
  • 5
4
votes
3 answers

Parsing string input for keywords followed by content

I'm trying to parse some string input but I'm struggling to see the solution. However, this must be a well-known pattern-- it's just one I don't encounter frequently. Background: I have a short list of string keywords ("HEAD", "GET", "POST", "PUT")…
Edoc
  • 339
  • 4
  • 10
4
votes
1 answer

How to run Rebol on Freya

Been trying to run rebol-view-278-4-2 on Elementary OS "Freya" (a variant of Ubuntu 14.04 LTS). I keep getting this error: error while loading shared libraries: libXaw.so.7: cannot open shared object file: No such file or directory I went ahead…
VMur
  • 103
  • 4
4
votes
2 answers

Read files from HTTP

I have written a program to download text files from National Stock Exchange. This is the downloading function: downloadNseBhav: func [Date] [ NSE_Url: to-url rejoin [ "http://nseindia.com/content/historical/EQUITIES/" …
Satish
  • 133
  • 8
4
votes
1 answer

Rebol 2 port binding to multiple IPs

I have a Windows setup with multiple IP's, and wishes my Rebol script (on Rebol/Core 2.78) to make individual bind and listen to the same port number on each of those IP's. Until very recently I thought the syntax to do this was: Port1Test:…
fsteff
  • 543
  • 5
  • 19
4
votes
1 answer

How to add addresses to the BCC field using Rebol's SEND function?

I'm trying to send an email using SEND in Rebol 2: send foo@bar.com "A Message" How do I BCC a second address? I've tried the following without success: send/header foo@bar.com "A Message" make system/standard/email [ BCC: baz@bar.com ] This…
rgchris
  • 3,698
  • 19
  • 19
4
votes
3 answers

Remove duplicate objects from series in Rebol

In R2 and R3, I can use unique to remove duplicate items from a series: >> a: [1 2 2 3] >> length? a == 4 >> length? unique a == 3 How can I perform the same operation on a series of objects? e.g., b: reduce [ make object! [a: 1] make…
James Irwin
  • 1,171
  • 8
  • 21
4
votes
4 answers

How does the VALUE? function work?

I have reduced down to a small example some code that I have, which tests for whether a variable called class-name has a value assigned to it: ask-params: function [ config-file [file!] default-class-name default-fields ] [ probe…
Rebol Tutorial
  • 2,738
  • 2
  • 25
  • 36
4
votes
1 answer

How to extend object by adding a function, and then access original object using self?

I'm defining a simple object with two fields. Later I want to extend it with a function that can read those fields. (For the moment, let's say it just wants to print one of them out.) email-service!: context [ key: "abcd" secret: "" ]…
Friendly Genius
  • 305
  • 3
  • 12
4
votes
1 answer

How to url-encode special characters in a url

I have a url which contains "!", "@", "#" and the server seems to choke, when these are not urlencoded. Now Rebol3 seems to not urlencode them itself. >> url: http://test/abc/#def/ghi == http://test/abc/#def/ghi If I do it manually, the "%" gets…
ingo
  • 521
  • 3
  • 7
4
votes
1 answer

How to open/write/read port in REBOL3?

I have this code in REBOL2: port: open/direct tcp://localhost:8080 insert port request result: copy port close port What would be equivalent in REBOL3?
Oldes
  • 937
  • 1
  • 9
  • 24
4
votes
2 answers

In Rebol, what is the idiomatic way to read a text file line by line?

For the purpose of reading a text file line by line, without loading the entire file into memory, what is the common way to do this in Rebol? I am doing the following, but I think (correct me if I'm wrong) that it loads the whole file into memory…
mydoghasworms
  • 18,233
  • 11
  • 61
  • 95
4
votes
3 answers

Is it possible to implement DO + function in pure REBOL?

When DO is followed by a function, that function is executed and the remaining values are consumed as arguments according to the arity of the given function, e.g., do :multiply 3 4 multiply 3 4 These two statements are identical in their effects.…
Gregory Higley
  • 15,923
  • 9
  • 67
  • 96
4
votes
1 answer

How to specify in Rebol3 the open/exe action for the R3 script : the R3 exe

related to this question: How do you start a Rebol3 GUI script without the console showing? As I can't quote there because of my low reputation, I opened a new more specific question. How can that be done exactly, or where can I find more details…
AndreasL
  • 41
  • 1