• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp4382
r3wp44224
total:48606

results window for this page: [start: 38601 end: 38700]

world-name: r3wp

Group: !REBOL3 Schemes ... Implementors guide [web-public]
Carl:
19-Jan-2010
I tossed a few up just now. Go ahead and add or edit as needed.
Graham:
19-Jan-2010
There's some optimizing of parsing the input and checking for incomplete 
data returned on a read to be done.
Graham:
20-Jan-2010
I've updated it to v 0.0.5 which hopefully checks now for incomplete 
read data, and factors out some of the parsing
Pekr:
20-Jan-2010
Back to separate buffers - just a note. I think that we eventually 
don't need them. But we should be carefull to user errors. Because 
with one shared buffer, if you write to it, before you read-out all 
incoming data, you just destroyed a data. And what if you don't need 
to act on the data yet? You will temporarily store it in some other 
storage (buffer) anyway. But I never wrote a scheme, so maybe this 
is just plain theory, and in fact having one buffer will not cause 
any problems to anyone ...
Graham:
20-Jan-2010
well, I think you normally read the data and then decide what to 
do with it.  So, you have saved it somewhere ...
Graham:
20-Jan-2010
Anyway I haven't had any issues so far .. and users unless they are 
writing schemes won't either.
Graham:
20-Jan-2010
It would be good to get these all tested and written to a usable 
level while the code is still fresh, and while the spirit is willing 
...
Graham:
20-Jan-2010
With the latest code I got an error before the lookup event connecting 
to imap.aim.com and then it was ok.  Odd.
Graham:
20-Jan-2010
Right, that was the plan ..to get Carl to review schemes and advise 
on a "best" practice.
Maxim:
20-Jan-2010
Carl is usually responsive when you give him something to look at.


if all he has to do is direct users into improving code, his intellect 
is much more usefull than if he is occupied hammering code out and 
sifting thru tedious RFCs.
Graham:
20-Jan-2010
I've got this in my network code ..

			;find/part msg join generator " OK" 8
			join generator " OK" = copy/part msg 8


and can't figure out why the first line does not work but the second 
does ....
BrianH:
21-Jan-2010
And in the R2 parse dialect, but the meaning in both cases is different 
from the function.
BrianH:
21-Jan-2010
PARSE documentation is actually pretty extensive, but not yet organized. 
There was a lot of thorough research conducted during the parse project 
and revamp. It just hasn';t been put into the docs yet.
Steeve:
21-Jan-2010
and remote commands too
Steeve:
21-Jan-2010
OPEN, WRITE and CLOSE will be the only one usefull actors in my scheme
Steeve:
21-Jan-2010
and i will use a dialect to construct the state diagrams
Graham:
24-Jan-2010
Both Maarten and I passed the secret and access keys as parameters 
to the various functions, but I think I'd rather have a system/user 
object to store them and use them from there.
BrianH:
24-Jan-2010
system/contexts/user is user-specific, and schemes can store their 
data in their modules if they like.
Graham:
24-Jan-2010
And set-net will store the data here too?
BrianH:
24-Jan-2010
We are using modules and access functions like set-net instead of 
global options objects, for the most part.
BrianH:
24-Jan-2010
system/contexts/user is the shared "global" context for all user 
scripts (not modules), and that's why it's task-specific.
BrianH:
24-Jan-2010
It's next on my list after 2.7.8 and R3 compressed modules/scripts.
Graham:
24-Jan-2010
And if someone wants REST ... they can do it later on.
Graham:
24-Jan-2010
'read checks to see if it is a port!, and then looks up the scheme
Graham:
24-Jan-2010
Maybe the way to find out is to create a dummy scheme and implement 
as many dummy actors you can think of and then test them....
Graham:
24-Jan-2010
Managed my first request to the Amazon SDB using the http scheme 
and SOAP
Graham:
24-Jan-2010
They say HTTPS is obligatory, but i used http and it was still accepted.
Graham:
25-Jan-2010
Successfully created a couple of domains, and then listed them.
Graham:
25-Jan-2010
I haven't looked at the other services for a while now, and don't 
think I ever looked at the SOAP api for S3, and SQS .. but I suspect 
it's very similar, and just point the URL to a different service
Gregg:
25-Jan-2010
Start with simple, well-formed XML, and go from there.
Graham:
27-Jan-2010
They are using Webdav and also RESTful APIs similar to those from 
Amazon S3
Graham:
27-Jan-2010
I managed to get SQS working using SOAP ( I create the message with 
r3 and then send it using r2 as it needs to be over https ).
But keep getting server errors when trying to work with S3
Graham:
27-Jan-2010
Updated the AWS stuff so that you can now create messages for S3, 
SQS, and SDB.
http://rebol.wik.is/Rebol3/AWS
BrianH:
27-Jan-2010
You should make it a module so the local vars get stored somewhere 
other than system/contexts/user/user. The word 'user is commonly 
used in scripts, and any one of those would break your code.
BrianH:
27-Jan-2010
It is better to make your script a module, and use local vars to 
store that kind of thing.
BrianH:
27-Jan-2010
Then you would break a lot of code. If you protect/hide 'user and 
then don't use the full path to access it, just direct word access, 
then subsequent user scripts that use 'user will use a new variable 
called 'user that isn't the same as yours.
BrianH:
27-Jan-2010
system/contexts/user is not initialized except by code. And "user" 
in this case doesn't refer to a person, but to a task.
BrianH:
27-Jan-2010
If you want to save prefs and then load them, cool.
BrianH:
27-Jan-2010
I am not aware of any R3 scripts that do emailing. The details of 
the preferences infrastructure hasn't even been discussed yet, except 
for undoing the old behavior of %rebol.r and %user.r and replacing 
them with something secure. In general, "our aliases" are put in 
a module that you import if you want to.
Graham:
27-Jan-2010
I'll just do a search and replace on my scripts directory
BrianH:
27-Jan-2010
Once the protocol is installed then you just use OPEN, READ and WRITE, 
etc. directly. You only need exported helper functions for some protocols, 
but http is covered by the default actions.
BrianH:
27-Jan-2010
For instance pop or imap might need a SEND-EMAIL function exported, 
and maybe a SET-NET. That's all.
BrianH:
27-Jan-2010
Nope, not even then. Most protocol functions don't have to be accessed 
from the outside except by the port infrastructure. Functions in 
the scheme are only called by port infrastructure, and most functions 
are helper functions. The only words you export would be user-visible 
functions that users are supposed to call directly.
BrianH:
27-Jan-2010
In general you never access a word through a module path. If it needs 
to be user-accessible, export it or wrap it in a function that you 
export. System accessible is another matter, and usually involves 
installing something somewhere in the system hierarchy (like system/schemes, 
for instance).
BrianH:
27-Jan-2010
Say you wanted to create an HTTP header, and it had nothing to do 
with HTTP. Are you sure you want to create the same header? Or are 
you sure that you don't actually want to extend the existing http 
scheme? The author isn't psychic.
BrianH:
27-Jan-2010
Making code reusable takes planning. If you want to reuse code safely, 
do the planning. Or copy and paste.
Graham:
27-Jan-2010
And we arrive at a situation where you end up duplicating code everywhere
BrianH:
27-Jan-2010
Not really. You could do the planning, and refactor. Even Gabriele's 
code, since he provided the source.
BrianH:
28-Jan-2010
For that matter, the exports of the http scheme weren't planned by 
Gabriele at all. There was no module system when he wrote it, and 
system exports didn't work yet when Carl put it in a module, so there 
were no code exports. And for that matter, reuse was unnecessary 
because there was only one scheme. Assume that the code needs refactoring.
Graham:
28-Jan-2010
Actually I just tried downloading a 16Mb file and it timedout in 
R3 but downloaded okay in R2.
Graham:
28-Jan-2010
So, it seems you need to open the port instead, and then modify the 
timeout
Graham:
28-Jan-2010
Maybe what should happen instead is that if you receive other than 
xml, text, then the data should be streamed a file and a file! returned 
instead ( like Cheyenne does with html uploads ) ...
Graham:
28-Jan-2010
There are a few schemes now but they're basicall all written by me 
... so I don't think there's much variety there.  Others have commented 
that the awake handler should be as small as possible and to keep 
the state machine outside ...
eFishAnt:
29-Jan-2010
(ports, schemes, etc)... I did get my product mostely working in 
R3 (large % networking) up to about 90% and to be honest, I didn't 
put much time into the porting R2 -> R3 yet.
eFishAnt:
29-Jan-2010
I need to port it to the latest R3.  There was a point where the 
GC got changed and the real-time performance went crazy, and I want 
to blend it into the new architecture...so I don't want to put out 
something that requires an old R3 alpha...and the dialect is not 
100% clean...guess I'm being kind of a Carl here...not ready for 
prime-time yet.
Andreas:
29-Jan-2010
And where is that stub?
BrianH:
29-Jan-2010
Not assuming that yet. All you have to do is say that you are taking 
charge of R3 SSL and you will get all the help you need. I would 
suggest using the Putty SSL code as a start because it's small and 
license compatible (i.e. not a GPL derivative).
Graham:
29-Jan-2010
Hmm... Andreas already volunteered to do the Arm port ...and had 
no reply.
Andreas:
29-Jan-2010
And I posted the ready-to-be-merged changes for dll loading on Linux, 
no reply there
Andreas:
29-Jan-2010
And from all I can see, that is for now somewhere hidden in libr3.so
Cyphre:
1-Feb-2010
Andreas, yes, looks like the symbol table for devices is inside the 
.so for now.  But if you are really impatient, I think it would be 
possible to override for example 'clipboard device  and 'turn' it 
into sll port?
ChristianE:
17-Feb-2010
I'm lost in current somewhat fragmented documentation on asynchronous 
networking. Does anyone happen to know of an example somewhere on 
how to do a http request and meanwhile displaying a progress bar 
or just print some progress info to the console? I know I have to 
use a AWAKE handler, but I just don't grasp what to do therein.


Let's say I want to PRIN "." to the console (or draw something to 
the GUI) every 0.25 secs the http request is taking . Are there any 
docs out there on how to accomplish something like that?
Graham:
17-Feb-2010
You would have to modify the existing awake handler to print.

I don't think you can display a progress bar as the only way to update 
the GUI is by creating a GUI event, and that is not documented yet.
Graham:
17-Feb-2010
The http protocol lacks any net-log or debugging so could write one 
and insert it into the awake handler ...
ChristianE:
17-Feb-2010
Thanks, Graham, your answer is appreciated. I was thinking along 
the lines of repeatedly waiting on an open http port for only a short 
while and on every loop iteration updating a busy indicator just 
to show that something is going on. Sounds like that's not possible, 
so I think I'll leave it as it is for now.
Henrik:
18-Feb-2010
if you can do a read and get the number of bytes read into a callback 
then you have the possibility of creating your own progress bar.
ChristianE:
18-Feb-2010
Ok, Henrik, are you saying that theoretically it should be possible 
to adapt REQUEST-DOWNLOAD or alike to R3 with current R3/HTTP-scheme? 
If so, I'll have a go and study the source, it's just that I am not 
able to tell wether I just dont get it or if something is missing 
for now. Is it expected to be possible yet?
ChristianE:
18-Feb-2010
Thanks, Henrik, anyway. I'll take Gabriele's answer for a "yes, it's 
possible" because he has written the scheme, so he would know for 
sure ;-) I'll study his protocol and the underlying TCP stuff deeper 
after the weekend.
Gabriele:
19-Feb-2010
you need basically to respond to 'connect and do a read, use 'read 
events to report progress, and use 'done to know when all the data 
is ready.
Graham:
19-Feb-2010
Yes ... as I redefine net-log in the gui to do the updating, and 
net-log is used inside pro-fax.r
Graham:
19-Feb-2010
in prot-http.r, in http-awake function, there is a switch statement

res: switch state/state


try adding a switch/default instead

and use 'none for the default to see what happens
Graham:
19-Feb-2010
and probe state/state to see what value might be causing this error
Graham:
20-Feb-2010
this is true for a tcp port, but this is a http port, and Gabriele 
has two handlers there, one of which is creating custom events.
ChristianE:
20-Feb-2010
Ok, this is confusing, and it doesn't help that I have absolutely 
no expertise in that networking stuff. It doesn't help, I'll have 
to dive in anyway. So excuse me when occasionally I come here panting 
for some air before drowning ;-)
ChristianE:
20-Feb-2010
It just doesn't return when it's DONE. Even though the last state 
is that DONE state and the awake handler returns TRUE. Reading further 
...
ChristianE:
20-Feb-2010
The CUSTOM event/type is generated by the lower level TCP awake handler, 
with event/code set to zero when transfer is completed. So, TCP-awake 
calls HTTP-awake with an event with event/code:0 and event/type: 
'custom
ChristianE:
20-Feb-2010
And it makes no difference if at that point I return TRUE or FALSE, 
the wait hangs
ChristianE:
20-Feb-2010
To me, it almost looks like things aren't working "as advertised", 
which may be because docs and code aren't properly sync'ed.
ChristianE:
20-Feb-2010
Yes, that's what I'm after, Gabriele. Opening a network port and 
then waiting for network, time, or gui events.
Gabriele:
20-Feb-2010
Christian: does the example on the wiki work? If not, then something 
has been changed since then, and I can't help much without studying 
everything back again. If so, then maybe we can figure out why your 
version does not work.
Gabriele:
20-Feb-2010
Graham: mostly, the changes in R3, and trying to figure out how it 
works now. It's not like there are docs with enough details...
Gabriele:
20-Feb-2010
Ok, so it's not your fault. R3 has changed and the HTTP scheme does 
not work correctly anymore.
Graham:
20-Feb-2010
But the source was modified and not the rlp
Graham:
21-Feb-2010
Andreas and I did the same, doing a diff on the original prot-http 
and current and found no major changes.  Suggest submit a bug report.
BrianH:
21-Feb-2010
The first was written by Carl to do /View development, way back when, 
and never released (afaict). DevBase 2 was derived from that, and 
DevBase 3 was based on the lessons learned from 2.
Graham:
21-Feb-2010
Ok, we need to be more explicit and refer to DevBase3 now
BrianH:
21-Feb-2010
So we have the datastore (DevBase), the server (DevBase server), 
a client (DevBase client) and the mezzanine wrapper (CHAT).
DideC:
26-May-2010
I want to build a very very very simple web server in R3.

I just want to be able to receive an HTTP request and send the response.
But me and Rebol networking are two differents people !!


To begin, I just want to be able to display the full request in the 
response page.

So far I have wrote this by peeking code in DocBase, but it does 
not work as I want : the browser stay awaiting the answer. Can one 
point me to what's wrong ?
Graham:
28-Jun-2010
Not sure what's happening here .. but my server closes the connection, 
and termintes the thread, but R3 is not getting a close event.
Graham:
29-Jun-2010
and then clearing the client/data
Graham:
29-Jun-2010
Ok, updated the protocol to remove the waits inside the handler ... 
and it is working now.  I can now detect the close event from the 
server.
Graham:
29-Jun-2010
going to think on the syntax to get the database metadata ... as 
I should be able to get column names, and types
Pavel:
12-Aug-2010
I've looked at your shemes already, but all of the are network related. 
Some easy pedagogical example would help me :) how to ommit port 
numbers (maybe they are not neccesary) and especially how to manage 
subport in 'file. Anyway impressive bunch of schemes.
Pavel:
12-Aug-2010
Thats what I ask, may the scheme be asynchronous when low level port 
is synronous and we dont use tasks yet?
Graham:
12-Aug-2010
I'm missing what is the point?  the network schemes are written to 
try and emulate file io ...
Pavel:
12-Aug-2010
ie port looks the same open or closed and open? returns true,  more 
the port cannot be deleted/removed currious
Pavel:
13-Aug-2010
thanks steve for inspiration, may I know why you use actor* and not 
regular actor?
Steeve:
13-Aug-2010
I use copy and copy/part to real several records
Andreas:
13-Aug-2010
You can also use the /seek and /part refinements to pass arguments 
to your READ actor.
Pavel:
13-Aug-2010
OK I'll try to finish simple rif:// scheme and update rif.r in rebol.org 
thanks guys for hepl! Documentation should be improved in file schemes, 
there is almost nothink.
38601 / 4860612345...385386[387] 388389...483484485486487