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

World: r3wp

[!REBOL3 Schemes] Implementors guide

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?
Pekr
12-Jan-2011
[2289]
No, it isn't - we just add new tickets imo. Changelog does not show 
any changes, nor Carl's notes, etc.
Kaj
12-Jan-2011
[2290x3]
Brian is working on it, and if he says Carl is working towards a 
beta, I believe him
I also believe it because, when I first ported my CMS to R3 almost 
two years ago, it didn't fully work, so I decided not to use it; 
and now that I have ported it again I expected the same, but it has 
turned out that I'm using the R3 version now
Further, I can see that most of the important restructurings have 
been done last year, and the source publication has been sorted out, 
so I am now able to fill in missing pieces with extensions, with 
a reasonable certainty that the interface is stable
Pekr
12-Jan-2011
[2293]
That is understandable, but it does not contradict my claim, that 
"being doing beta triage" is an still ongoing process, not something 
entirely new :-)
Kaj
12-Jan-2011
[2294]
In other words, Core is usable, extensible and published now (since 
a few months)
Pekr
12-Jan-2011
[2295]
Yeah, maybe Carl should put a beta moniker on it ASAP.