wait on system/port/input
[1/7] from: m::koopmans2::chello::nl at: 20-Aug-2001 9:16
Hi All,
I would like to wait on system/port/input.
Consider the following piece of code:
a: system/ports/input
txt: copy {}
forever
[
wait a
b: copy {a}
either "-" = b
[ do txt txt: copy {} ]
[append txt b]
]
which I thought would append characters to txt, and do txt when you type "-"
What happens: everything is appended to "txt", but the do is never done.
Why I want this with 'wait: console input mixing with networs serving! Aka:
the Rugby Console....
Any ideas?
--Maarten
[2/7] from: arolls::bigpond::net::au at: 20-Aug-2001 18:06
Re: wait on system/port/input - copy a
After your
b: copy {a} ; a string!
b == {a} == "a", therefore ("-" = b) will always be false.
You should probably try:
b: copy a
; press "-", enter, then escape key
b ; == ["-"]
first b ; == "-"
[3/7] from: g:santilli:tiscalinet:it at: 20-Aug-2001 19:10
Re: wait on system/port/input
Hello Maarten!
On 20-Ago-01, you wrote:
MK> What happens: everything is appended to "txt", but the do is
MK> never done.
system/ports/input is opened as /lines. To do what you want you
need to set it to normal. Anyway, I think DocKimbel has done
something like that for his memory watcher... Nenad?
Regards,
Gabriele.
--
Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/
[4/7] from: m:koopmans2:chello:nl at: 20-Aug-2001 20:42
Hi Gabriele,
Actually, Nenad uses 'ask
The thing is that I want to integrate Rugby with the console, so that you
can get mobile code as you type commands. A sort of jxta like P2P console.
I found a post by Holger saying that the console internally doesn't call
wait, which means that combining network + console + view would block out
view. So... I'll do a console emulation in View, as I already have rugby and
view integration.
I will need some time to finish it, but you can expect this in a month or
so. The Agent Reb....
Cheers,
Maarten
[5/7] from: g:santilli:tiscalinet:it at: 21-Aug-2001 19:15
Hello Maarten!
On 20-Ago-01, you wrote:
MK> I found a post by Holger saying that the console internally
MK> doesn't call wait, which means that combining network +
IIRC he also said some future version will...
MK> console + view would block out view. So... I'll do a console
MK> emulation in View, as I already have rugby and view
MK> integration.
BTW, I see you defined a rugby-view function... was that
necessary? For REBOL Chat I just added my ports to
system/ports/wait-list. Dunno if a console:// port can be added to
the wait-list, though.
Regards,
Gabriele.
--
Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/
[6/7] from: m:koopmans2:chello:nl at: 21-Aug-2001 21:34
Hi Gabriele,
rugby-view has the same effect as view/new , but I put it there to make
things more explicit. I had the feeling that it is not well known that you
can easily integrate view with network services.
You can add console:// to system/ports/wait-list as I found out today in a
posting by Jeff in the archives. Although I didn't figure out what wait-list
does / means.
This means that if you start your own console scheme before yoy start a
rugby service..... it is gonna be fun. I am quite busy now at work, but I'll
if some time in a week or so to do this. I hope to combine it with an
interface to lookup.r on reboltech. So we get a world wide console! Should
help when doing code samples etc.
Cheers,
Maarten
[7/7] from: g:santilli:tiscalinet:it at: 22-Aug-2001 19:23
Hello Maarten!
On 21-Ago-01, you wrote:
MK> You can add console:// to system/ports/wait-list as I found
MK> out today in a posting by Jeff in the archives. Although I
MK> didn't figure out what wait-list does / means.
AFAIK, ports in wait-list are always waited for when you call
WAIT; e.g. WAIT [] should be like WAIT SYSTEM/PORTS/WAIT-LIST
and so on.
Regards,
Gabriele.
--
Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/