REBOL (Relative Expression Based Object Language) is a cross-platform data exchange and multi-paradigm dynamic programming language designed by Carl Sassenrath, for network communications and distributed computing. The language and its official implementation are developed by REBOL Technologies.
Questions tagged [rebol2]
101 questions
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
Find/replace string that spans lines in a file with REBOL
I have an HTML page, and I need to replace a couple of lines in it. However, using replace can't seem to find anything bigger than a single line.
This is what I would like to replace (there are multiple instances of it in the page):
....

James Irwin
- 1,171
- 8
- 21
4
votes
3 answers
How do I write contents of a variable to a text file in Rebol 2?
Newbie question here...
I'd like to write the output of the "what" function to a text file.
So here is what I have done:
I've created a variable called "text" and assigned the output of "what" to it
text: [what]
Now I want to write the content…

Hugo
- 135
- 1
- 1
- 7
4
votes
2 answers
How to bind local context block to global context in Rebol2?
As I understand it, you are supposed to be able to bind any block to any context. In particular you can bind a global context block to a local context:
>> a: context [
print: does [rebol/words/print "yeah!"]
f: func[b] [do bind b…

Pep
- 451
- 2
- 9
4
votes
2 answers
When I use error? and try, err need a value
Here my function that execute cmd as a Rebol instructions :
exec-cmd: func [
cmd [ block! ] "Rebol instructions"
/local err
] [
if error? err: try [
do cmd
] [ print mold disarm err ]
]
When I launch…

gwailo59
- 110
- 6
4
votes
3 answers
Why can't a built-in function be overridden in Rebol?
I have created this
cloneset: :set
set: func[word [word!] value][
if/else (type? get word) = list! [
print "list is immutable"
][
cloneset word value
protect word
]
]
protect 'cloneset
protect 'set
I have this error when defining the…
reboltutorial
3
votes
1 answer
Interesting way to catch all Rebol VID errors
I stumbled on this and just wanted to make sure this isn't a glitch in Rebol's design. I have the following code which seems to successfully catch all program errors in the VID environment.
view layout [
across
label "Rebol Command:"
…

dogeye
- 177
- 6
3
votes
2 answers
Breaking out of a recursive function
I'm walking through a set of nested blocks and want to stop the walk when I've found the value I'm looking for.
For reasons that are beyond the scope of this question, I can't use PARSE for this particular problem, nor use FOREACH as the…

rgchris
- 3,698
- 19
- 19
3
votes
1 answer
Send email via GMail SMTP in REBOL 2
I am new to REBOL. People blogging about how great REBOL is used sending an email as an example, similar to this example from the "send" documentation:
send luke@rebol.com "Testing REBOL Function Summary"
having read how easy and convenient it is…

dukereg
- 722
- 5
- 16
3
votes
1 answer
How do I join the SSDP multicast group in Rebol?
I'm trying to listen to SSDP multicast messages such as NOTIFY and SEARCH.
This is my code but I'm not seeing these messages even though wireshark sees them. So, how do I join the SSDP multicast group and receive messages?
Rebol []
attempt [close…

Graham Chiu
- 4,856
- 1
- 23
- 41
3
votes
4 answers
Rebol2: Change-dir to absolute filepath not working
I'm trying to read a filepath from a config file and then read from that directory. I can't find a way to make it work though, because for some reason change-dir never goes to an absolute filepath. Here's a transcript of me trying to make it work on…

Bo Thompson
- 359
- 1
- 12
3
votes
1 answer
Rebol Quickstart
I've been meaning to try out rebol (or red). I think it might be the perfect fit for my next project.
I've downloaded and tested out red 0.5.4, and REBOL/View 2.7(http://www.rebol.com/download-view.html)
However, there are a couple of roadblocks for…

Geeky I
- 751
- 6
- 22
3
votes
2 answers
Rebol's either condition not working correctly
I'm trying to set a condition for evaluating the values of several text-lists. This works, using a SWITCH:
options: ["" "" "" ""]
view layout [
text-list "one" "two" "three" "four" [poke options 1 value]
button "test" [switch/default…

fadelm0
- 263
- 2
- 9
3
votes
2 answers
Why does a button hide itself and another differently?
In the following Rebol 2 code, why does button a become visible 5 seconds after it's clicked, while remaining hidden 5 seconds after button b is clicked?
f: does [hide a wait 5]
view layout [
a: button "a" [f]
b: button "b" [f]
]

WiseGenius
- 226
- 2
- 9
3
votes
2 answers
Rebol 2: Using a parse rule to check input without executing code
Let's suppose you have a rule like the one below from the Rebol docs on parsing.
If you wanted to check some input against a rule just to validate it, but without having the contents of the parentheses evaluated, how can you do it?
Is there a way…

mydoghasworms
- 18,233
- 11
- 61
- 95