r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3-OLD1]

Gregg
24-Dec-2009
[20453]
Cool Robert.
Graham
24-Dec-2009
[20454]
Nice .. can this dialect be written for View ?
Steeve
25-Dec-2009
[20455]
/mode noob ON

I just realized that creating tasks works well since a while with 
R3.

And I already should have used it for some stuff, it would simplify 
my code.
What a fool !
/mode noob OFF
Jerry
25-Dec-2009
[20456]
We developed a TCP server program using R3-a96, trying to make it 
run in Linux as a daemon program (i.e. running in background), however, 
we failed. It just couldn't run in background.

We've tried the following 4 methods:

1) ./rebol my-server.r -s 8000
The process status is "T"

2) nohup ./rebol my-server.r -s 8000
The same as (1)

3) setsid ./rebol my-server.r -s 8000

This one worked, but it refused to return the session, which is not 
acceptable for us. If we do this in a shell script, anything after 
it won't be executed.

4) echo ./rebol.bin | at now

It shows "Can't open /var/run/atd.pid to signal atd. No atd running?" 
Our shell script didn't have the privilege.

Please help me. Thanks.
PeterWood
25-Dec-2009
[20457x5]
Previously, I also haven't been able to separate "launched" versions 
of Rebol from the same terminal session. However, after a bit of 
googling I've worked out a way that seems to work using Ruby:
 
Macintosh:Rebol3 peter$ irb

>> require 'pty'

=> true

>> PTY.spawn("./rebol -q pong-server.r"
)
=> [#<File:/dev/ttys005>, #<File:/dev/ttys005>, 1437]
>>


Process 1437 was running in the list of processes and control was 
returned to the console session.
Of course, I had to manually "kill" process 1437.


As there is a formatting error in the pasted code, I'll confirm the 
ruby:

require 'pty'
PTY.spawn("path-to-rebol -options path-to-script"
I tested this on OSX but believe it should work the same under Linux.
I forgot the closing ) - probably don't need the parentheses in Ruby 
anyway:

require 'pty'
PTY.spawn("path-to-rebol -options path-to-script")
It would be so much better if you could achieve this as easil  from 
within R3 though.
Pavel
25-Dec-2009
[20462x2]
to-binary [1 1 1] should do #{010101} but doesn't work for me in 
A96, is it intended? Documentation tells should work.
Isiit possible to set length of binarx datatype somehow?
Ladislav
25-Dec-2009
[20464x2]
I understand it, that this is an intended change
(there are reasons, why the conversion you mention does not look 
correct)
Pavel
25-Dec-2009
[20466x2]
Especially shorten integer to binary representation to 32 bit only
Maybe only copy/part last halve do it.
Ladislav
25-Dec-2009
[20468]
possibility to set the length of the binary datatype - aha, yes, 
copy/part can yield a shorter binary, another way is to use the Remove 
function
Pavel
25-Dec-2009
[20469]
good hint thanks
Ladislav
25-Dec-2009
[20470]
or, the Clear function, ...
Pavel
25-Dec-2009
[20471]
May Clear work partially?
Ladislav
25-Dec-2009
[20472]
example: head clear at #{01020304} 3
Pavel
25-Dec-2009
[20473]
OK original idea was to use second halve but anyway good to remember 
;)
Ladislav
25-Dec-2009
[20474]
second half is just at #{01020304} 3
Pavel
25-Dec-2009
[20475]
Why I see the more difficult solution first, THX Ladislav!
Steeve
25-Dec-2009
[20476]
yet another trick.
>> to-binary to-tuple [1 2 3]
== #{010203}
BrianH
25-Dec-2009
[20477]
Pavel, the documentation was converted from the R2.3 Core manual, 
and not all of the docs have been rewritten for R3 yet. If there 
is a discrepancy between the behavior and the online manual, and 
this discrepancy isn't already mentioned in CureCode, then assume 
the docs are wrong.
Gabriele
26-Dec-2009
[20478]
Jerry, would running inside screen be an option? as a temporary workaround 
of course.
Jerry
26-Dec-2009
[20479]
no, the screen will be closed.
Gabriele
26-Dec-2009
[20480x2]
i mean the "screen" command
you can detach and reattach at any time.
Jerry
26-Dec-2009
[20482x2]
my company has a protocol, the admin just follow the protocol and 
leave the serious issue to me. they said "REBOL is not in the list 
that they should maintain"
Ok, I will try it.
Gabriele
26-Dec-2009
[20484]
screen -d -m /path/to/rebol args
Jerry
26-Dec-2009
[20485]
thanks Grbriele
Gabriele
26-Dec-2009
[20486]
you're welcome
Jerry
26-Dec-2009
[20487]
My system is developed in R3. To be honest with you, they don't like 
it. Now with the launch issue, they have more reason to complain 
about REBOL.
Gabriele
26-Dec-2009
[20488]
well... it is daring to do anything with R3 at this point... :)
Jerry
26-Dec-2009
[20489x2]
Thanks Gabriele, your method with screen seems to work.
I know R3 is still in alpha. I just love it too much.
Gabriele
26-Dec-2009
[20491]
i can't blame you...
Jerry
26-Dec-2009
[20492x3]
Gabriele, you are a life saver. I was arguing with the admin just 
a few minitues ago, now the problem is gone with your method. Thanks 
to you. I owe you one.
Thanks to Peterwood too. Maybe REBOL should have the spawn function 
too. :-)
UDP is not supported in R3, right?
Robert
26-Dec-2009
[20495]
Poste two blogs: Some experience with R3 extensions & TCP sequence 
diagram. See:
www.robertmuench.de/blog
Pekr
26-Dec-2009
[20496x2]
Robert - post your Extensions blog article to Extensions group in 
R3 Chat, for Carl to notice. Maybe he will get some ideas for further 
enhancing/simplifying work with Extensions ...
Robert - btw - wrt port/device signalling - http://www.rebol.net/wiki/TCP_Port_Details
PeterWood
26-Dec-2009
[20498]
Nobody has written a UDP scheme for Rebol3 yet. I believe at the 
moment the only comms scheme is http.
Steeve
26-Dec-2009
[20499x2]
We can't, it has to be coded by Carl or someone with the source because 
of the API calls.
or via an extension
BrianH
26-Dec-2009
[20501]
Via the host code, actually. We can't do device extensions yet, but 
we can ad device types to the host code.
Paul
27-Dec-2009
[20502]
How good is the current networking implementation in R3?  Any notable 
bugs?  I'm looking to build a OPC Server in R3.