Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: read ftp:// error

From: gjones05:mail:orion at: 2-Jun-2001 16:37

Sports Announcer's Voice: ...And the volley ball bops Scott right on the nose. Ohhhh. It looks like a nose bleed. Scott goes to the sidelines while Brett takes Scott's place .... OK, I got the errands taken care of (Mother-in-law is coming to visit ... oh, is that the "Ride of the Valkyries" I hear? Just teasing.), and I have now had a chance to look at the code. Let me start by saying that your code is far more clever than I am. After a bit of study, I finally figured out what you were doing. (It reminds of the analogy that I know the notes on a musical scale, but I can't hear the music by just reading a symphonic score like a conductor can. Oh, there's that musical theme, again. Oh, I see, the volley ball game is in a time out and the band is playing! I guess that ball hit harder than I realized.) Once, again, this is amazingly clever stuff that you have written. Bravo. So I inserted the convert-month source into the convert-date-source and braced for the Volker Auto-ftp-scheme-patch-maker. Then, then, then .... my nose started to bleed again. Rats. First, an unexpected blow to the checksum idea. I discovered that my Win98 ftp scheme checksum was 5504709 for /View and 7796860 for /Core. I guess between line terminators and (???) tabs, there seems to be different checksum for different products and platforms! It was really a good idea, too. I changed the checksum to match. Next, I was unable to get the scheme parser to find the beginning of the add-date stuff. So far I have been unable to determine what is causing a mismatch (could it be the brackets?). On a whim, I reduced it to copy through "month:", and it worked correctly. And the script completed without incident. However, placing the "convert-date-source" word in front of the scheme body causes the function definition to preceed the "make object!" Seeing stars .... So I readjust the parse scheme and changed the ordering of the body definition, placing the new function right at the start of the add-date function and success! At least, it appears to be a success, since I cannot check it against a German, etc, localized FTP server. It works on an English localized server. So, there is definite promise in this approach, and of course, I'm speaking beyond this FTP patch issue (I think we all are!?) and to more general distributed patch techniques. This is some nifty, code, Volker. I've learned yet more techniques. Thanks. I'll send the current version back for your information. Note it currently has my checksum value in it. --Scott Jones convert-date-source: { convert-month: func [month [string!] /local conv seek] [ conv: [ Ene "Gen" ["Jan"] Fév "Fev" ["Feb"] Mär ["Mar"] Avr "Abr" ["Apr"] Mag "Mai" ["May"] Giu ["Jun"] Jui "Lug" ["Jul"] Aoû "Ago" ["Aug"] Set ["Sep"] Okt "Ott" "Out" ["Oct"] ; ["Nov"] ; none needed yet Dic "Déc" "Dez" ["Dec"] ] if seek: find conv month [return first first find seek block!] month ] } ;---------------- either 5504709 <> probe checksum mold system/schemes/ftp [ request/ok "wrong rebol-version! patched ftp disabled!" ][ either not parse mold/only system/schemes/ftp [ copy begin to {month:} thru {month:} copy rest to end ][ request/ok "could not parse right. check script!" ][ body: rejoin [begin convert-date-source "month: convert-month " rest] save/header save-file: %patched-ftp.r compose/deep [ system/schemes: make system/schemes [patched-ftp: (load body)] ] [title: "patched ftp protocol"] ] ;check it do save-file probe first system/schemes ;yep, there it is! ;read patched-ftp://something ]