[REBOL] my view has expired
how do i get a new copy?
[REBOL] Re: Can't get two rebolscripts to message each others reliably Re:
[EMAIL PROTECTED] wrote: > Sounds reasonable but it closes for me too. I only got 45 on a win98, 41 > on win95. Curiously when I use both machines at the same time they process > 85 (roughly a sum of the two). Also I recently upgraded win98 to view b3 > and now it does 44 (84 between the two). > > Perhaps this information will be useful to you. I wonder if it is a memory > issue (either system or port related). I wish you luck in solving it. Hmhm. Well now I know it's not unique to the Amiga implementation at least, and that's a start. Tried some ideas I had but it still doesn't work. :/ Michal Kracik wrote: > I got 3949 messages on 127.0.0.1, Windows NT 4.0, REBOL/View beta. > I think there can be a problem with opening and closing sockets too > fast. That's an idea, but I inserted a one second delay and it didn't change anything (except it now takes 2 minutes to test here, and would take over an hour for you ;) -- /Johan Rönnblom, Team Amiga Laboratory experiments have shown that 100% of rats died.
[REBOL] Traversing object values Re:(2)
Thanks Allen! tim At 08:17 AM 4/18/00 +1000, you wrote: >Hi Tim, > >The function your are looking for is net-utils/export >This will return all values in the object that have a value. > >result: net-utils/export system/options/cgi > >if you want a list of 'none as well use this modified version >(I just commented out the value? test of the original net-utils/export) > >result: export2 system/options/cgi > >export2: func [ >{Export an object to something that looks like a header} >object [object!] "Object to export" >/local words values result word >][ >words: next first object >values: next second object >result: make string! (20 * length? words) >foreach word words [ > ; if found? first values [ >insert tail result reduce [word ": " first values newline] > ; ] >values: next values >] >result >] > > >And here are some other ways to play with object words and values > >> cgi-labels: ["Server Software" "Server Name"] > >cgi-label: next first system/options/cgi > >== [server-software server-name gateway-interface server-protocol >server-port request-method > path-info path-translated script-name ... > >values: next second system/options/cgi >== [none none none none none none none none none none none none none none >none none none []] > > >Cheers > >Allen K > > >- Original Message - >From: <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Tuesday, April 18, 2000 4:49 AM >Subject: [REBOL] [REBOL] Traversing object values > > >> Given an object: >> >> let's use system/options/cgi >> >> I would like to traverse the object >> and print out the values only, each preceded by >> a custom label. >> >> I know that to use print mold system/options/cgi >> will dump the object. But I want to >> just extract the values and concatenate them >> with a customized label. >> >> So that instead of >> make object! [ >> server-software: none >> server-name: none >> gateway-interface: none >> server-protocol: none >> server-port: none >> request-method: none >> path-info: none >> path-translated: none >> script-name: none >> query-string: none >> remote-host: none >> remote-addr: none >> auth-type: none >> remote-user: none >> remote-ident: none >> Content-Type: none >> content-length: none >> other-headers: [] >> ] >> I will have: >> >> Server Software: none >> Server Name: none >> ; etc.. >> >> I believe that I will also need to code a block like >> cgi-labels: ["Server Software" "Server Name"] > >cgi-label: next first system/options/cgi > >== [server-software server-name gateway-interface server-protocol >server-port request-method > path-info path-translated script-name ... > >values: next second system/options/cgi >== [none none none none none none none none none none none none none none >none none none []] > > >> >> and iterate simultaneously through the object and >> the block. >> >> Will give a nice professional looking "dump" of >> the cgi environment, and will also edify me on >> the process of interating blocks and objects. >> >> Thanks in advance >> Tim >> >> > >
[REBOL] how can i... Re:
On some servers Rebol returns an empty string if there is nothing in the query-string, however on MS based server it returns 'none. So it is a good idea to test the query-string before decoding. Some people slip the following line in before decoding prso that it behaves the same across diferent servers. if none? system/options/cgi/query-string [system/options/cgi/query-string: copy ""] But there isn't much point in decoding an empty query-string anyway... There are some good cgi examples in the www.rebol.com Howto and in the User and Libary areas, as well as on www.rebol.org. Cheers, Allen K - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 18, 2000 1:37 AM Subject: [REBOL] how can i... > > hi! everybody... i'm really new in this stuff. > > i'm trying to make rebol work with html forms, an the thing is: > > ** Script Error: decode-cgi expected args argument of type: any-string. ** > Where: cgi: make object! > decode-cgi system/options/cgi/query-string > > i cannot go futher, from this error... > > if i ask the value for: > system/options/cgi/query-string > > is equal to none (but i don't know what value i need) > > > can somebody help me! > > thank in advance. > > -- > > -= usaps jeronimo =- > > > > >
[REBOL] none Re:
> Can you Ping a server from Rebol. Ping, no. To access the ICMP socket, the REBOL interpreter would need to be installed suid root, which could be a Bad Thing (tm). > Is it possible to detect if a http server > is not responding. How about: > if error? try [read http://www.rebol.com/] [print "Server not available] Cheers, Kev Kevin McKinnon, Network Engineer [EMAIL PROTECTED] Sunshine Communications http://www.sunshinecable.com PGP Public Key: http://www.dockmaster.net/pgp.html PGP 6.0 www.pgp.com
[REBOL] Traversing object values Re:
Hi Tim, The function your are looking for is net-utils/export This will return all values in the object that have a value. result: net-utils/export system/options/cgi if you want a list of 'none as well use this modified version (I just commented out the value? test of the original net-utils/export) result: export2 system/options/cgi export2: func [ {Export an object to something that looks like a header} object [object!] "Object to export" /local words values result word ][ words: next first object values: next second object result: make string! (20 * length? words) foreach word words [ ; if found? first values [ insert tail result reduce [word ": " first values newline] ; ] values: next values ] result ] And here are some other ways to play with object words and values > cgi-labels: ["Server Software" "Server Name"] cgi-label: next first system/options/cgi == [server-software server-name gateway-interface server-protocol server-port request-method path-info path-translated script-name ... values: next second system/options/cgi == [none none none none none none none none none none none none none none none none none []] Cheers Allen K - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 18, 2000 4:49 AM Subject: [REBOL] [REBOL] Traversing object values > Given an object: > > let's use system/options/cgi > > I would like to traverse the object > and print out the values only, each preceded by > a custom label. > > I know that to use print mold system/options/cgi > will dump the object. But I want to > just extract the values and concatenate them > with a customized label. > > So that instead of > make object! [ > server-software: none > server-name: none > gateway-interface: none > server-protocol: none > server-port: none > request-method: none > path-info: none > path-translated: none > script-name: none > query-string: none > remote-host: none > remote-addr: none > auth-type: none > remote-user: none > remote-ident: none > Content-Type: none > content-length: none > other-headers: [] > ] > I will have: > > Server Software: none > Server Name: none > ; etc.. > > I believe that I will also need to code a block like > cgi-labels: ["Server Software" "Server Name"] cgi-label: next first system/options/cgi == [server-software server-name gateway-interface server-protocol server-port request-method path-info path-translated script-name ... values: next second system/options/cgi == [none none none none none none none none none none none none none none none none none []] > > and iterate simultaneously through the object and > the block. > > Will give a nice professional looking "dump" of > the cgi environment, and will also edify me on > the process of interating blocks and objects. > > Thanks in advance > Tim > >
[REBOL] none Re:
Hi, No and yes, and you can set the timeout in seconds when the server should respond: >> system/schemes/http/timeout: 1 == 1 >> if error? try [ read http://www.itv.cz/ ] [ print "server is not responding" ] connecting to: www.itv.cz server is not responding -- Michal Kracik [EMAIL PROTECTED] wrote: > > Hi > > Can you Ping a server from Rebol. Is it possible to detect if a http server > is not responding. > > Many thanks > > Aneesha
[REBOL] none
Hi Can you Ping a server from Rebol. Is it possible to detect if a http server is not responding. Many thanks Aneesha
[REBOL] Re: Parse Re:(5)
Hello [EMAIL PROTECTED]! On 17-Apr-00, you wrote: s> use s> parse/case Actually, we were talking about the comparison operators, such as >, <, >= etc. Regards, Gabriele. -- Gabriele Santilli <[EMAIL PROTECTED]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/
[REBOL] Can't get two rebolscripts to message each others reliably Re:
Hi, I got 3949 messages on 127.0.0.1, Windows NT 4.0, REBOL/View beta. I think there can be a problem with opening and closing sockets too fast. -- Michal Kracik [EMAIL PROTECTED] wrote: > > I'm making a little game in rebol (internet scrabble, currently in Swedish > but could of course easily be translated if somebody is interested :) that > requires two rebol scripts to message each others. > > Easy in theory. In practice, they close connection after a number of > messages. I have no idea why. :( > > Here's some testing code. If I run this twice and enter 127.0.0.1 > (connecting to myself) it sends a total of 121 messages, and then one of > the scripts refuse to accept a connection. I sent it to someone else, there > it made 117 messages or so. But always the same number on the same system, > it seems. I can't really explain this. What am I doing wrong? > > REBOL > [Title: "netmsgtest" > Date: 2000-04-17 > Author: "Johan Rönnblom" > Purpose: {try to get two rebolscripts to message each other}] > > connect: func [] > [either error? try [client: open to-url rejoin ["tcp://" otherurl ":8000"]] > [clienturl: to-url rejoin ["tcp://" otherurl ":8001"] > server: open tcp://:8000 > mode: "server" > running: receive] > [insert client mold "connected" > close client > clienturl: to-url rejoin ["tcp://" otherurl ":8000"] > server: open tcp://:8001 > mode: "client"]] > > transmit: func [msg] > [if error? try [client: open clienturl] > [print "Connection closed." close server quit] > insert client mold msg > close client] > > receive: func [] > [inmsg: do copy first server > if inmsg = "exit" [close server quit] > return inmsg] > > otherurl: ask "Enter remote url: " > > connect > if mode = "client" [transmit "1"] > > forever > [a: receive > print a > b: (to-integer a) + 1 > transmit b] > > -- > /Johan Rönnblom, Team Amiga > > Stop worrying so much about this. In the worst case we'll die.
[REBOL] how can i... Re:
Hi -= usaps jeronimo =-, there are two ways your CGI script can receive form input. Through the input function or through system/options/cgi/query-string. Which is used depends on whether the form submits its data using GET or POST. Only when GET is used the form's data becomes available in system/options/cgi/query-string. If PUT is used you must use input. Which request method was used can be determined by retrieving the value of system/options/cgi/request-method. There is a function available on www.rebol.org user contributed scripts that automates that automates the process. At 05:37 PM 4/17/00 +0200, you wrote: > >hi! everybody... i'm really new in this stuff. > >i'm trying to make rebol work with html forms, an the thing is: > >** Script Error: decode-cgi expected args argument of type: any-string. ** >Where: cgi: make object! >decode-cgi system/options/cgi/query-string > >i cannot go futher, from this error... > >if i ask the value for: >system/options/cgi/query-string > >is equal to none (but i don't know what value i need) > > >can somebody help me! > >thank in advance. > >-- > >-= usaps jeronimo =- > > > > > > ;- Elan >> [: - )]
[REBOL] [REBOL] Traversing object values
Given an object: let's use system/options/cgi I would like to traverse the object and print out the values only, each preceded by a custom label. I know that to use print mold system/options/cgi will dump the object. But I want to just extract the values and concatenate them with a customized label. So that instead of make object! [ server-software: none server-name: none gateway-interface: none server-protocol: none server-port: none request-method: none path-info: none path-translated: none script-name: none query-string: none remote-host: none remote-addr: none auth-type: none remote-user: none remote-ident: none Content-Type: none content-length: none other-headers: [] ] I will have: Server Software: none Server Name: none ; etc.. I believe that I will also need to code a block like cgi-labels: ["Server Software" "Server Name"] and iterate simultaneously through the object and the block. Will give a nice professional looking "dump" of the cgi environment, and will also edify me on the process of interating blocks and objects. Thanks in advance Tim
[REBOL] Can't get two rebolscripts to message each others reliably Re:
Sounds reasonable but it closes for me too. I only got 45 on a win98, 41 on win95. Curiously when I use both machines at the same time they process 85 (roughly a sum of the two). Also I recently upgraded win98 to view b3 and now it does 44 (84 between the two). Perhaps this information will be useful to you. I wonder if it is a memory issue (either system or port related). I wish you luck in solving it. Brian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, April 17, 2000 4:49 AM To: [EMAIL PROTECTED] Subject: [REBOL] Can't get two rebolscripts to message each others reliably I'm making a little game in rebol (internet scrabble, currently in Swedish but could of course easily be translated if somebody is interested :) that requires two rebol scripts to message each others. Easy in theory. In practice, they close connection after a number of messages. I have no idea why. :( Here's some testing code. If I run this twice and enter 127.0.0.1 (connecting to myself) it sends a total of 121 messages, and then one of the scripts refuse to accept a connection. I sent it to someone else, there it made 117 messages or so. But always the same number on the same system, it seems. I can't really explain this. What am I doing wrong? REBOL [Title: "netmsgtest" Date: 2000-04-17 Author: "Johan Rönnblom" Purpose: {try to get two rebolscripts to message each other}] connect: func [] [either error? try [client: open to-url rejoin ["tcp://" otherurl ":8000"]] [clienturl: to-url rejoin ["tcp://" otherurl ":8001"] server: open tcp://:8000 mode: "server" running: receive] [insert client mold "connected" close client clienturl: to-url rejoin ["tcp://" otherurl ":8000"] server: open tcp://:8001 mode: "client"]] transmit: func [msg] [if error? try [client: open clienturl] [print "Connection closed." close server quit] insert client mold msg close client] receive: func [] [inmsg: do copy first server if inmsg = "exit" [close server quit] return inmsg] otherurl: ask "Enter remote url: " connect if mode = "client" [transmit "1"] forever [a: receive print a b: (to-integer a) + 1 transmit b] -- /Johan Rönnblom, Team Amiga Stop worrying so much about this. In the worst case we'll die.
[REBOL] how can i...
hi! everybody... i'm really new in this stuff. i'm trying to make rebol work with html forms, an the thing is: ** Script Error: decode-cgi expected args argument of type: any-string. ** Where: cgi: make object! decode-cgi system/options/cgi/query-string i cannot go futher, from this error... if i ask the value for: system/options/cgi/query-string is equal to none (but i don't know what value i need) can somebody help me! thank in advance. -- -= usaps jeronimo =-
[REBOL] AW: [REBOL] Books and such Re:(3)
That did it, Thank you. Paul >From: [EMAIL PROTECTED] >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: [REBOL] AW: [REBOL] Books and such Re:(2) >Date: Fri, 14 Apr 2000 14:11:53 +0200 > >it is a direct link to the document! >please try: http://www.beosjournal.com/rebol/rebolpdf.zip > > > -Ursprüngliche Nachricht- > > Von:[EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] > > Gesendet am:Freitag, 14. April 2000 09:57 > > An: [EMAIL PROTECTED] > > Betreff:[REBOL] Books and such Re:(2) > > > > The URL you give provides an "Access Denied" error. > > > > >From: [EMAIL PROTECTED] > > >Reply-To: [EMAIL PROTECTED] > > >To: [EMAIL PROTECTED] > > >Subject: [REBOL] Books and such Re: > > >Date: Fri, 14 Apr 2000 0:16:28 + > > > > > Snip... > > >In the meantime, download the REBOL dictionary and user's guide in .pdf > > >format from The BeOS Journal at http://www.beosjournal.com/rebol/ > > >rebolpdf.zip > > > > > >Enjoy. > > > > > >-Ryan > > > > > > > > > >Are there any books or other printed material for Rebol? > > > >Something that can help someone with minimal programming experience? > > > > > > > __ > > Get Your Private, Free Email at http://www.hotmail.com > __ Get Your Private, Free Email at http://www.hotmail.com
[REBOL] Can't get two rebolscripts to message each others reliably
I'm making a little game in rebol (internet scrabble, currently in Swedish but could of course easily be translated if somebody is interested :) that requires two rebol scripts to message each others. Easy in theory. In practice, they close connection after a number of messages. I have no idea why. :( Here's some testing code. If I run this twice and enter 127.0.0.1 (connecting to myself) it sends a total of 121 messages, and then one of the scripts refuse to accept a connection. I sent it to someone else, there it made 117 messages or so. But always the same number on the same system, it seems. I can't really explain this. What am I doing wrong? REBOL [Title: "netmsgtest" Date: 2000-04-17 Author: "Johan Rönnblom" Purpose: {try to get two rebolscripts to message each other}] connect: func [] [either error? try [client: open to-url rejoin ["tcp://" otherurl ":8000"]] [clienturl: to-url rejoin ["tcp://" otherurl ":8001"] server: open tcp://:8000 mode: "server" running: receive] [insert client mold "connected" close client clienturl: to-url rejoin ["tcp://" otherurl ":8000"] server: open tcp://:8001 mode: "client"]] transmit: func [msg] [if error? try [client: open clienturl] [print "Connection closed." close server quit] insert client mold msg close client] receive: func [] [inmsg: do copy first server if inmsg = "exit" [close server quit] return inmsg] otherurl: ask "Enter remote url: " connect if mode = "client" [transmit "1"] forever [a: receive print a b: (to-integer a) + 1 transmit b] -- /Johan Rönnblom, Team Amiga Stop worrying so much about this. In the worst case we'll die.
[REBOL] Parse Re:(6)
Actually, it was just my mistake. I was comparing single character long strings. That comparison is case insensitive. Comparing charsets _is_ case sensitive. Andrew Martin Stumbling over my C/C++ experience... ICQ: 26227169 http://members.xoom.com/AndrewMartin/ -><- - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, 17 April 2000 7:23 PM Subject: [REBOL] Parse Re:(5) > Hi > > use > parse/case > > > > (BTW, if the comparison between chars is case insensitive, it > > should be enough to convert them to integers first.) > > > > AR > > -- > Sent through GMX FreeMail - http://www.gmx.net > >
[REBOL] Parse Re:(5)
Hi use parse/case > > (BTW, if the comparison between chars is case insensitive, it > should be enough to convert them to integers first.) > AR -- Sent through GMX FreeMail - http://www.gmx.net