• 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
r4wp5907
r3wp58701
total:64608

results window for this page: [start: 51401 end: 51500]

world-name: r3wp

Group: !REBOL3 Schemes ... Implementors guide [web-public]
Andreas:
10-Jan-2010
a good test :)
Graham:
11-Jan-2010
Using a timeout value, largish, I can read a 5000 file listing in 
a ftp directory.  Posted latest code.
Graham:
11-Jan-2010
Downloaded a 16Mb file using my ftp scheme ... streamed it to disk 
directly rather than saving in any buffer.
Graham:
11-Jan-2010
Changed the format of the data block a little ...

write cmd [ RETR "REMR.zip" %remr.zip]
read cmd
Graham:
11-Jan-2010
I'm not using a dialect but if the last member of the block is a 
file, it streams the data to the file, if it's a binary eg. a buffer, 
it appends to the buffer, and if it's a  function, then uses a the 
function as a callback on the data ...
Graham:
11-Jan-2010
using a function means you can pass your own directory parser to 
the incoming data to format it as you like.
Robert:
11-Jan-2010
Graham, regarding all the overlapped words. I am/was confused too. 
I created a sequence diagram and posted it via my homepage/blog. 
Maybe it helps, and if, please provide information about errors in 
it.
Robert:
11-Jan-2010
BTW: I'm going to redo the diagram using yworks yEd editor. It's 
a fantastic graph layout editor and now supports swimlane diagrams.
Graham:
11-Jan-2010
http://rebol.wik.is/Rebol3/Schemes/Ftp

Updated so that you can supply a callback to commands

eg: 

[ LIST (:print) ]

or 

[RETR "hugefile" %downloads/hugefile.mov ]
Graham:
11-Jan-2010
or supply a file to stream a download.
Graham:
11-Jan-2010
there's a bug in that I don't return to console so I must be stuck 
in the awake handler somewhere.
Graham:
11-Jan-2010
better than a napkin style!
Graham:
11-Jan-2010
Got this on a file download ..

==TCP-event on dataport: read
?read: 15008
** Access error: cannot open: %wubi.exe reason: -3

** Where: write switch switch applier wake-up loop applier wait while 
either eit
her either read catch either either applier do
** Near: write/append port/spec/method port/data clear port/data
Graham:
11-Jan-2010
Might be a permissions issue ...
Andreas:
11-Jan-2010
should be a complete walkthrough of what happens
Graham:
11-Jan-2010
Currently streaming a ftp download of the ubuntu server iso image 
... will see how that longs before I get an error.
Andreas:
11-Jan-2010
best consumed on a huge screen side-by-side with the code :)
Andreas:
11-Jan-2010
if the client is expected to send a request before receiving anything 
from the server, things will look different
Andreas:
11-Jan-2010
i think the lookup should most of the time wrapped silently, and 
not asyncly exposed to a scheme's user, even if the scheme is supposed 
to be async
Graham:
11-Jan-2010
so what do we need ?  a thread that controls the awake handler?
Graham:
11-Jan-2010
So, does mine .. . but I have to kick it off with a wait
Graham:
11-Jan-2010
that's what my read does, it does a wait on the tcp port
Andreas:
11-Jan-2010
i'll have to experiment a bit more
Andreas:
11-Jan-2010
if you want to download while in the console, that could be a console 
background worker thread
Andreas:
11-Jan-2010
if you want to download within a GUI app, that could be the GUI's 
main event loop
Graham:
11-Jan-2010
well, generally inside a gui .. so that's okay I guess.
Graham:
11-Jan-2010
so we add a gui event to the thing .. and we work inside of that
Graham:
11-Jan-2010
One good thing .. on r2 I doubt I could download a 500Mb file using 
ftp .. but I'm nearly there now and the windows task manager is only 
showing 12Mb of ram usage with 0-1 % cpu
Andreas:
11-Jan-2010
wrap a `while [not tail? ftp] [....]` around this
Andreas:
11-Jan-2010
i think a COPY actor will be there, but i guess tail? won't
Graham:
11-Jan-2010
but these things should be defined in a common network kit
Andreas:
11-Jan-2010
a module
Graham:
11-Jan-2010
Uploaded my latest version which by default downloads ubi.exe which 
is a 1.5mb file ( ubuntu windows installer. )
You can uncomment the 650 mb download if you want to try :)
Andreas:
11-Jan-2010
i guess i'll try a local ubuntu mirror
Graham:
11-Jan-2010
but using a timeout for some reason means that it defaults to the 
timeout value ?
Andreas:
11-Jan-2010
i have a huge wait after SYST
Graham:
11-Jan-2010
I guess that's a no no ...
Andreas:
11-Jan-2010
but changing the WAIT inside the awake to a READ doesn't change things 
:)
Graham:
11-Jan-2010
a system read?
Graham:
11-Jan-2010
and my read actor does a wait
Andreas:
11-Jan-2010
because a WRITE on the tcp port from within the tcp port's awake 
handler automatically re-schedules the tcp port for event handling
Andreas:
11-Jan-2010
ok, the flow should be, imho:
- read WAITs on the cmdport

- if the cmdport needs to open a dataport, cmdport WAITS on dataport
Andreas:
11-Jan-2010
client/spec/ready seems to be a good flag to use as return value 
for the awake handler
Graham:
11-Jan-2010
hmm... my 0.0.5 added a return true
Graham:
11-Jan-2010
on a successful download
Andreas:
11-Jan-2010
here's a diff of my changes: http://gist.github.com/274796
Andreas:
11-Jan-2010
that's a diff against the 0.0.5 from wik.is
Graham:
11-Jan-2010
150 is just a mark ... comment
Andreas:
11-Jan-2010
it takes two to takedown a TCP connection
Graham:
11-Jan-2010
Clients closing connections


The client can simply close the connection without sending QUIT. 
This saves time and memory for both the client and the server.

There are a few broken TCP implementations, such as MacTCP 2.0.6, 
that fail to acknowledge TCP FINs after a local close. If the client 
is running on such a host, it shouldn't close the connection until 
after it sends QUIT and sees the server close the connection; otherwise 
the server will waste time repeatedly transmitting the FIN until 
it times out.
Andreas:
11-Jan-2010
there's also a lovely gem contained in that code, btw
Andreas:
11-Jan-2010
as there's a WAIT on the ftp scheme port already, simply OPENing 
the dataport suffices to have it scheduled and receiving events
Graham:
11-Jan-2010
I don't know if the ftp server will take a full path but the client 
can
Andreas:
11-Jan-2010
could i have a minimal FTP thingie with just USER/PASS/PASV/RETR?
Graham:
11-Jan-2010
I don't know if the server will accept a path ...
Andreas:
11-Jan-2010
wow, there is a tail? actor
Andreas:
11-Jan-2010
someone had a link the other day which mentioned that the series 
protocol should be available completely
Graham:
11-Jan-2010
I should start work on a hylafax scheme
Graham:
11-Jan-2010
oops .. need to do a STOR
Graham:
11-Jan-2010
again, STOR should stream a file from local storage ... and write 
a binary type
Andreas:
11-Jan-2010
a minimal ftp login skeleton, no error handling: http://bolka.at/share/prot-ftpget.r
[temporary url]
Andreas:
11-Jan-2010
i think that'll be a rather typical skeleton for request/response 
protocols
Graham:
11-Jan-2010
Mines a bit long ...
Graham:
12-Jan-2010
Just wondering .. if we want a graphic file transfer progress meter, 
we need a way to tap into the event handler to catch the number of 
bytes being written/read ...
Graham:
12-Jan-2010
Also need a way to stop a file transfer that is in progress ...
Steeve:
12-Jan-2010
Small optimization:


Graham, if you try to connect to a host with an ip as a string, then 
a DNS lookup is performed even if it's useless.

On the other side, if you provide an ip as a tuple, no lookup is 
performed and it's a straight connection.


So as an example, when you enter in PASV mode (ftp proto) try this 
instead.

data-address: to-tuple to-block form copy/part tmp 4
Steeve:
12-Jan-2010
you will receive a connect event but no lookup
Graham:
12-Jan-2010
prot-send.r is just a function and not a scheme.  But it relies on 
system objects such as email ...  I guess we can include these in 
the function until some decision is made about where they should 
go.
Graham:
12-Jan-2010
The lack of TLS and SSL is going to be a big problem since so many 
people now use secure protocols.
eFishAnt:
12-Jan-2010
I know, but a good point for heading in R3...use a common test case 
between the 2.
BrianH:
12-Jan-2010
Putty hasn't been updated in a while and never reached 1.0. Still, 
I agree that it is the best bet.
Graham:
12-Jan-2010
Hmm... sounds a serious lapse to let code no one understands be placed 
into r/command ...
Maxim:
12-Jan-2010
I looked at the putty code about a year ago... and If it had compiled 
under DevC I would have played around with it... now that I've got 
MSVC, I should be able to build the sources... maybe we could just 
repackage the executable loader as a DLL.  it should be too much 
work.
Maxim:
12-Jan-2010
the C language parser, although I haven't done a lot in more than 
a week.  with university starting up and wanting to use up my last 
days of vacation.
Maxim:
12-Jan-2010
yep.  Visual Arts, part time (although this semester I am doing a 
full time semester, since the courses I took are easy for me).
Maxim:
12-Jan-2010
funny in one of my courses I have to build a web page... hehehe a 
web 1.0 type web page... the kind that I can write using notepad 
in an hour hehe
Maxim:
12-Jan-2010
I might even offer a bit of tutoring for those who don't understand 
it.  


with all the web's ubiquity, most people (non programmers) still 
don't really know what they are doing when it comes to building sites.
Graham:
13-Jan-2010
but he needs a web master ... doing all of this by himself is not 
very efficient
BrianH:
13-Jan-2010
Whew, I was worried about you for a second - was about to call the 
psychiatrist...
BrianH:
13-Jan-2010
Right now the project is just migrating the data to the new format. 
That's a programming problem.
Graham:
13-Jan-2010
There's such a thing as a software modem .. IAXmodem ... but not 
sure if I need Asterisk as well :(
Graham:
13-Jan-2010
It's a poorly specified protocol that is a lot of work to implement 
...
Graham:
13-Jan-2010
I wonder what's required to write a torrent client ...
BrianH:
13-Jan-2010
MD5 checksums, a parser for the files (easy), and whatever they use 
for encryption.
Graham:
14-Jan-2010
looks like a holiday project vs a spare afternoon one!
Graham:
14-Jan-2010
Sometimes you want to write to the port, and then continue to write 
... so your awake handler returns false.

But sometimes for the same command, you want it to return on completion 
.. so your awake handler returns true instead.

So, .. .what is the best approach?  Pass a flag to the write?
Use a dialect for the write data block?
Graham:
14-Jan-2010
Great progress ... was able to submit a fax using my new fax:// protocol.
Andreas:
14-Jan-2010
i've finally come up with a clean (imho) low-level interface:
mbox: open pop3://
until [empty? msg: read mbox]
close mbox
Steeve:
14-Jan-2010
Andreas, normaly it's the behavior of COPY to iterate thru a port 
result
Gregg:
14-Jan-2010
So 'msg is returned as a block?
Andreas:
14-Jan-2010
read returns a binary!
Steeve:
14-Jan-2010
bu you could return a block if you wish ;-)
Gregg:
14-Jan-2010
Ah, so this is a native READ, not a wrapper in your scheme. Got it.
Andreas:
14-Jan-2010
i could return all messages in a block, yes
Gregg:
14-Jan-2010
Then we need a callback mechanism for progress, if we read all in 
one shot.
Steeve:
14-Jan-2010
not need of a callback, you can return a block and populate the same 
block further.
You see what i mean ?
Andreas:
14-Jan-2010
we can add a series protocol later on
Andreas:
14-Jan-2010
the source avail at http://bolka.at/share/prot-pop3.rcurrently still 
has a series interface
Andreas:
14-Jan-2010
length? for getting the num of messages avail, pick for reading a 
specific message
Steeve:
14-Jan-2010
Greeg, i think we could add some info in the block, like a timestamp 
at the head
51401 / 6460812345...513514[515] 516517...643644645646647