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

World: r3wp

[!REBOL3 Schemes] Implementors guide

Andreas
14-Jan-2010
[1510]
real events would be even better :)
Graham
14-Jan-2010
[1511]
I guess the first thing is to try and get them to the level of the 
r2 schemes in terms of user use
Rebolek
14-Jan-2010
[1512]
If anybody wants to start torrent protocol, here's simple *.torrent 
parser: http://box.lebeda.ws/~rebolek/rebol/torrent.r
Graham
14-Jan-2010
[1513]
:)
Maxim
14-Jan-2010
[1514x3]
that would be awesome  :-)
write read torrent://file.torrent  %file.avi
url is wrong, obviously... but just the idea of it being this simple 
 ;-)
BrianH
14-Jan-2010
[1517x2]
I could use the .torrent file parser now, even before we start writing 
the protocol, to do file management utilities.
Maxim, wouldn't it be open instead of read?
Maxim
14-Jan-2010
[1519]
OPEN would assume rebol knows how to decode the binary data downloaded 
by the protocol.. 

can OPEN handle an avi file as we speak?  I don't think so.
BrianH
14-Jan-2010
[1520x2]
You are opening the port, not the file. Torrents are both clients 
and servers. You would probably open a port spec, which would open 
as many sub-ports as needed. Closing the torrent port would close 
the whole torrent session. There would be a flag in the torrent port 
that would indicate whether the file had completed downloading.
Maxim, OPEN works on ports. LOAD is what would require a decoder 
- OPEN doesn't decode anything.
Graham
14-Jan-2010
[1522]
Is someone going to write a torrent:// protocol ...or is this torrent 
noise ?  :)
BrianH
14-Jan-2010
[1523]
It's on my list, if someone else doesn't get to it first.
Graham
14-Jan-2010
[1524x2]
On testing a ftp server behind NAT ( well, it's a home system ), 
the ftp server responds to a PASV command with its local non addressable 
network address.
So, need to ignore the IP address and use the remote-ip address obtained 
on the initial lookup
Rebolek
14-Jan-2010
[1526]
I don't think my r3protocol-fu is high enough to continue much further 
than this parser :) But I may look at it tommorow bit more, to see, 
what it requires to write a protocol.
Graham
14-Jan-2010
[1527x2]
well, you don't need to write a scheme ... if you can write it as 
tcp, then it can be turned into a scheme and protocol
a scheme is just a wrapper
Rebolek
14-Jan-2010
[1529]
Hm, I still haven't experimented with schemes/protocols/anything 
networking in R3 yet, so I don't know where to start.
Graham
14-Jan-2010
[1530x2]
go on to the wiki, and read everything under ports
starting with a torrent protocol is probably not the first thing 
one should tackle!
Rebolek
14-Jan-2010
[1532]
Yes, I just did  the parser that may be useful to someone who actually 
know what he's doing :)
Graham
14-Jan-2010
[1533]
What's the parser for ?? Parsing a .torrent file?
Rebolek
14-Jan-2010
[1534]
Exactly. It returns block!
Graham
14-Jan-2010
[1535x2]
Probably the idea is to open up a project on codeplex and plan the 
functions needed to support the scheme
Unless Brian really wants to write it all himself ...
Rebolek
14-Jan-2010
[1537]
:)
Graham
14-Jan-2010
[1538x3]
Meanwhile my little fix for the ftp server behind NAT has allowed 
me to finally open up a data connection to my fax server
Need a little function

non-addressable: func [ ip-address ][ returns true or false ]
syntax perhaps some like this 


send fax://userid:[password-:-faxipaddress] [ dial: number! retries: 
integer! resolution: word! notify: email! file: file! when: time! 
]
Maxim
14-Jan-2010
[1541x3]
brian: sorry... you're right (open vs load), but if a protocol/scheme 
exists for torrent, read and write should work on it, just like for 
any other scheme, its part of the point of having this whole architecture... 
no?
this could make a nice protocol  ;-)

http://suicidemachine.org/
facebook actually sent them a cease and desist court order!
Graham
14-Jan-2010
[1544]
Is this what we are supposed to be doing?
http://rebol.wik.is/Rebol3/Modules/Mod-network
Andreas
15-Jan-2010
[1545]
Graham: Yes. I'd call it mod-net-util, though, in remembrance of 
R2
Graham
15-Jan-2010
[1546x9]
Ok.... everyone ... please !
I read this last night http://www.tcpipguide.com/free/t_TCPIPInternetMessageAccessProtocolIMAPIMAP4.htm
Seems that there are 3 states in IMAP4, not-authenticated, authenticated 
and selected state.
well, client states
the FSM diagram is here http://www.tcpipguide.com/free/t_IMAP4GeneralOperationClientServerCommunicationandS-2.htm
And so all you have to do is track what tags you are using with your 
commands....
and be able to parse responses
The existing IMAP protocol for R2 should have the parsers written 
already
Regarding .... mod-net-util ... I guess it only needs importing once 
...

unless value? 'net-log [
	import mod-net-log	
]
Maxim
15-Jan-2010
[1555x2]
you don't need.. if the module has a name in its header, the import 
will only be performed once, even if its called several times.
the modules are cached once they are loaded (again, only if named).
Graham
15-Jan-2010
[1557x2]
New scheme ..  fax://
http://rebol.wik.is/Rebol3/Schemes/Fax
Do we need a telnet:// scheme?
Henrik
15-Jan-2010
[1559]
that would be nice for some routers