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

World: r3wp

[!REBOL3 Schemes] Implementors guide

BrianH
13-Aug-2010
[2239]
OK, cool. That is shorter :)
Andreas
13-Aug-2010
[2240]
Yeah. And more approriate :)
Graham
13-Aug-2010
[2241]
Wasn't this group orginally named "Graham's foray into scheme arcana" 
 or something similar??
Steeve
13-Aug-2010
[2242]
scheme on you
BrianH
13-Aug-2010
[2243]
Pavel, you were right the first time in trying to implement GET/PUT 
actors, but you got the names wrong. Try again with PICK and POKE.
Graham
13-Aug-2010
[2244]
get: :pick
put: :poke
BrianH
13-Aug-2010
[2245]
Metaphorically, yes. Literally, that will break REBOL :)
Graham
13-Aug-2010
[2246]
basic: :rebol
Anton
14-Aug-2010
[2247]
I think the group name should be tweaked a bit more to remove the 
"Scheme" inside the bracketed part. I don't see the need to have 
it mentioned twice.
Gregg
14-Aug-2010
[2248]
Done.
Steeve
28-Aug-2010
[2249x2]
Any example how to process inputs from the console's port while processing 
other ports using WAIT ?

I looked at the source of the input function, but it doesn't help....
I tried to launch a task! to wait for other port inputs and to keep 
the console safe.
But WAIT seems not working inside a task!
NickA
4-Sep-2010
[2251x2]
Is this helpful?:

print ""
q: open/binary/no-wait [scheme: 'console]
count: 0
forever [
    count: count + 1
    if not none? wait/all [q :00:00.01] [
        wait q
        qq: to string! copy q
        probe qq

        print ["^/loop count incremented to" count "while waiting^/"]

        insert s: open sound:// load %/c/windows/media/tada.wav wait s close 
        s
    ]
]
Oops - sorry, didn't see that this was R3 Schemes group.
Pavel
20-Dec-2010
[2253]
How to pass a received data from awake handler to actor level? I 
can do Print port/data it works, but I need return a value from read 
actor
Steeve
20-Dec-2010
[2254x4]
you can't return data from the awake handler
you just can stop it
*only*
And you don't need to pass data, they both share the same context 
via the port parameter
Kaj
20-Dec-2010
[2258]
Wow, lots of documentation on the wiki. That will be very helpful
Pavel
21-Dec-2010
[2259]
There is alot of doc in wiki, but the examples is to be written yet, 
that is why I asked. BTW all the simply schemes at Graham Chiu's 
site  (il dottore :) simply doesn work for me, and yes I've upgraded 
make-scheme to sys/make-scheme for A110. Unfortunately the only scheme 
I know working is the http scheme, but it is too high class to I 
can understand the process.
GrahamC
21-Dec-2010
[2260]
daytime doesn't work??
Pavel
21-Dec-2010
[2261x2]
I've tryed to make time scheme from your daytime scheme Graham, as 
I noted when I put print at awake level as You did for debug probably 
I can see the server response, but I'm not able to get response at 
the 
read time://server.site
== somenumber
There is missing the "; make something synchronous here" part :-)
Kaj
21-Dec-2010
[2263]
I think Christian Ensel's ODBC scheme is the other current example
Pavel
23-Dec-2010
[2264]
Interresting, when I write to global variable at awake level everything 
works OK. Somebody give me a hint how to send received data from 
awake to actor level please.
Steeve
23-Dec-2010
[2265]
An awake functions deals with events.
An event has a port  property.
An actor takes a port as input parameter.
Here the link.

If the port contains locals vars, they can both (the awake and the 
actor) access the port's locals.
Pavel
23-Dec-2010
[2266]
And from subport (tcp) to scheme level port? Can low level awake 
write directly to scheme locals?
Steeve
24-Dec-2010
[2267]
Sure, they both share a cross reference in their locals, like in 
R2.
Pavel
27-Dec-2010
[2268]
Finally I've got it, so now I have a time scheme returning (RFC 868) 
integer number of seconds from 1-Jan-1900. I tried to define refinement 
/date to return well formated date!. But there is no possibility 
to define different refinement except of hadcoded one so I have to 
use /lines for that, silly.
ChristianE
27-Dec-2010
[2269]
Would you mind to show the interface/api or the actual implementation 
of your time scheme? You're probably (mis-)using the /LINES refinement 
of READ, but maybe you can instead use WRITE for that ...
Pavel
28-Dec-2010
[2270]
ChristianE the idea arises from the fact the time server send only 
response and close immediately, so I only implemented Read actor. 
The problem is that you may not create a new refinement but only 
redefine one existing. 

time scheme needs a little polishing and will be posted to script 
library.

Anyway you are right the only possibility how to controll the scheme 
in wider borders is to write a command block and wait for reply. 
Another not so generall would be write into port state context and 
use this as switch for read actor.
Pavel
7-Jan-2011
[2271]
prot-time.r was uploaded to rebol.org, now works only synchronous 
way ie: read time://your.time.server, server must be RFC 868 (port 
37).  basically it returns number of UTC seconds from 1-Jan-1900/0:00:00. 
When refinement /lines it returns well formated local time (using 
local timezone)
Pavel
11-Jan-2011
[2272]
Graham, 1. where you put the R3 schemes (if so)? wik.is is definitely 
down. 2. I have to say your daytime scheme doesn't work for me (functionality 
commented out I think). 3. you can add prot-time into your collection 
if you like to.
GrahamC
11-Jan-2011
[2273x2]
Pavel, I would not be surprised.   I have not looked at this stuff 
for over a year.   Yes, wik.is is now defunct and so my site is gone.
See https://github.com/gchiu/Rebol3/tree/master/protocols
I'll look at the schemes again when R3 goes beta.
Kaj
11-Jan-2011
[2275]
Ah, and R3 goes beta when it has enough schemes...
BrianH
11-Jan-2011
[2276x3]
R3 may go beta before any additional schemes are added - "enough" 
is a matter of opinion, and for core functionality, HTTP is enough 
(only needed for CHAT and UPGRADE). HTTP should be improved before 
beta though.
Sorry, TCP, DNS, probably UDP, and files/directories are also needed 
for beta.
If you need additional schemes for your own projects, contributions 
are welcome.
Kaj
11-Jan-2011
[2279x3]
Nevermind, I was just being sarcastic :-)
As far as I'm concerned, Core should be stamped 3.0 Release after 
another run through the bug list. It's basically only View that is 
not presentable yet
My current gripes are mostly with the documentation
BrianH
12-Jan-2011
[2282]
We have been doing beta triage on the bug list already :)
Kaj
12-Jan-2011
[2283x2]
Cool!
Hope I'm not adding new ones too fast ;-)
Pekr
12-Jan-2011
[2285x2]
Kaj - you misunderstood. What BrianH imo means is just general note, 
not any recent activity :-) Last R3 activity of Carl is almost 3 
months old imo ...
You should not forget, that we plan to come into beta for almost 
2 years :-)
Kaj
12-Jan-2011
[2287]
I know, but the bug database is being worked on right now
Oldes
12-Jan-2011
[2288]
is it?