I asked this question a few weeks ago about port
http://stackoverflow.com/questions/1291127/rebol-smallest-http-server-in-the-world-why-first-wait-listen-port
listen-port is an object
first listen-port is self so still don't understand why self doesn't equal listen-port that is why do we need
http-port: first wait listen-port
if wai...
This works great (thanks to Sunanda's suggestion http://stackoverflow.com/questions/1452239/rebol-how-to-parse-a-b-syntax-error/1453205#1453205):
attribute: copy []
class: copy []
definition-rule: compose/deep [some [set class word! 'is 'defined 'by
[some [copy attribute to (to-lit-word "/") thru (to-lit-word "/") ]]
copy attribute to ...
It's possible in REBOL 3 to calculate a SHA1 module checksum. When REBOL loads a module, it compares its checksum against the checksum of the loaded module, and if the two do not match, an error is generated, viz. access error: invalid checksum (tampered file).
No matter how I try, I can't seem to create a module checksum that REBOL 3 l...
I want to create a do-libs generic function to automatically load a bunch of libs listed in rebol header files. I want to make the parameter optional but in that later case it doesn't work why ?
Rebol[
libs: [
lib1/lib11.r
lib1/lib12.r
lib2/lib21.r
]
]
do-libs 'libs ; works
do-libs ; doesn't work
with:
do-libs: f...
The example in doc http://www.rebol.org/documentation.r?script=rebelxml.r to create XML works
>> clear-xml-data
== ""
>> set-xml-data/content 'test/test "test"
== "<test><test>test</test></test>"
>>
but when I want to create some variants it doesn't seem to work:
>> clear-xml-data
== ""
>> set-xml-data/content 'test "test"
** Script...
Why does clipboard and system/words/clipboard points to 2 different value ?
>> clipboard
** Script Error: clipboard has no value
** Near: clipboard
>> system/words/clipboard
>> value? 'clipboard
== false
>> value? 'system/words/clipboard
== true
>>
Then how can I use value? within a func which uses clipboard as refinement if I can't t...
Why do I have to cast typeof to string with switch to make it work ?
This doesn't work:
typeof: type? get 'optional
switch typeof [
word! [
print "word"
]
string! [
print "string"
]
]
This works:
typeof: type? get 'optional
switch to-string typeof [
"word" [
print "word"
...
If not will this be possible in R3 ?
...
>> example: make object! [
[ var1: 10
[ var2: var1 + 10
[ var3: now/time
[ set-time: does [var3: now/time]
[ calculate: func [value] [
[ var1: value
[ var2: value + 10
[ ]
[ ]
>>
>> example2: make object! third example
** Script Error: none is missing its valu...
I agree with Carl that XML is too much verbose compared to Rebol's Block but there is no equivalent of XML DOM library for Rebol's Block or am I mistaken ?
How can I iterate through a hierarchy of block ?
...
This Subversion import command works on dos command line:
"C:\Program Files\Subversion\bin\svn.exe" import c:\myproj file:///c:/svnrepo/myproj -m "test"
If I try to send the same command with Rebol Call Command with this script:
Print "This command will and your files to the repository without requiring a working copy"
repo-direc...
I'm executing multiple libraries from user.r.
I can get the path of the script from system/script/path but I can't see how I can get the name of the script. So am I obliged to hardcode the file name in header property like below (File):
REBOL [
Title: "Lib1"
File: "lib1.r"
]
script-path: ""
]
system/script/header/scri...
I show the list of spams from mysql in a listview, after delete I use show grid but it doesn't refresh, why ?
do http://reboltutorial.com/source/mysql-protocol.r
do http://www.hmkdesign.dk/rebol/list-view/list-view.r
window: layout [
grid: list-view 500x400 with [
data-columns: ["ID" "Author" "comment_author_IP"]
viewed-colum...
I tried http://www.mail-archive.com/[email protected]/msg19437.html (I just changed to www.reboltutorial.com) :
do http://www.rebol.it/giesse/async-protocol.r
handler: func [port [port!] state [word! error!] /local tmp cmd] [
if error? :state [print mold disarm state return true]
switch state [
connect [
...
How do I call my Dzone asynchronous protocol handler from Rebol and not from a browser ?
http://reboltutorial.com/blog/dzone-protocol/
...
Is there a way to circumvent this ?
...
Taken from http://www.rebol.com/docs/view-system.html#section-4:
In some cases you may want to view a
window but continue evaluating code
after the window is open. You can do
that by specifying the new refinement.
Here is an example:
print "opening window..."
view/new make face [
offset: 100x100
color: papaya
te...
I tried the example http://www.rebol.net/docs/async-examples.html but it doesn't work.
port-spec: tcp://www.rebol.net:80
http-request: {GET /
User-Agent: REBOL/Core
Connection: close
}
client: context [
data: make binary! 10000
handler: func [port action arg] [
switch action [
read [
append...
It is possible to overide rebol system words like print, make etc., so is it possible to do the same with the path operator ? Then what's the syntax ?
...
I know that the global words is limited to something like 2500 words. What if I fear to reach the limit, I would like to create and destroy words on the fly with something like unset: would that solve the risk or this is just impossible to have something scalable ?
...