Questions tagged [rebol3]

A cross-platform data exchange language and a multi-paradigm dynamic programming language.

A cross-platform data exchange language and a multi-paradigm dynamic programming language designed by Carl Sassenrath for network communications and distributed computing.

207 questions
5
votes
4 answers

How to retrieve a function from a series of functions and call it

I'm trying to create a dispatcher of functions in Rebol 3, so that for each string the program receives there's an associated function to be called. For example: handlers: make map! [ "foo" foo-func "bar" bar-func ] where foo-func and bar-func…
kronwiz
  • 193
  • 7
5
votes
2 answers

Comparing characters in Rebol 3

I am trying to compare characters to see if they match. I can't figure out why it doesn't work. I'm expecting true on the output, but I'm getting false. character: "a" word: "aardvark" (first word) = character ; expecting true, getting false
beeflobill
  • 317
  • 1
  • 10
5
votes
2 answers

How do I get the remote IP-Address of clients connecting to a Rebol3 based server?

I'm playing with these basic TCP test scripts and would like to know: "How to get the IP-Address of clients connecting to the server?" Any ideas? I tried to probe a client subport at the server-side, but it doesn't show the remote-ip. Can someone…
TGD
  • 175
  • 1
  • 5
5
votes
3 answers

Interleave blocks, or make object out of two blocks (field names and values)

Instead of creating objects by writing: obj: object [ name: "Fork" id: 1020 ] I'd like to write something like... obj: something-or-another [name id] ["Fork" 1020] ...and get the same result. An ideal solution would also permit: obj:…
5
votes
2 answers

Is there a function to decode encoded unicode utf-8 string like from a form?

I want to store some data with a html form and Rebol cgi. My form looks like this:
Input:
But for unicode…
Wayne Cui
  • 835
  • 7
  • 15
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 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}…
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
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
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

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
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
1 2
3
13 14