[REBOL] Re: read ftp:// error
From: gjones05:mail:orion at: 1-Jun-2001 7:20
Hi, Thorsten, Sterling, Volker, Brett,
This volleyball game now spans the globe. Brett, you are really going
to have to hit the ball hard from "Down Under"
BH> I just want to comment on the patching process.
BH> I recognise that you made the decision to leave
BH> out the check which I respect. ...
Brett, thank you for being so diplomatic. My decision for this final
beta
was based more on fatique than anything else. I've not messed
with version checking before, so when I started setting up the different
product and version checks, I realized that it was going to get
involved. I wanted to get the script-patch posted so that Thorsten
could give it a test drive in his morning.
BH> But I think it should be highlighted for people that
BH> are maybe new to this concept that patches
BH> introduce risk of unexpected/unpredictable
BH> behaviour if the right set of remote circumstances
BH> arise - which is generally considered by
BH> pessimists/realists guaranteed to happen :-)
I absolutely agree that before this is submitted to some "patch library"
(is there such a beast?), the product-version checking is a better idea.
You've set up a nice framework in the patches.r file. I'm trying to
grok
the content (like using 'use); lot's to learn, but Thorsten's
theorem and Brett's bric-a-brac and Volker's volleys and Sterling's
stuff are giving me lots of good material. Thanks. (I was struggling
with the rhymes, as is probably obvious.)
VN> Sorry. I thought you used full source for better patching.
VN> it was Thorsten who asked for a shorter version.
Yes, we were hacking on the full source; it is easier for lead-poisoned
people like me to see what I am doing. Originally I envisoned leaving
the hacked scheme as a separate file, like I did with the ESMTP version
of SMTP. But I realized that since "all the code is just data", that
there's got to be a way to poke the part need into the code. I highly
suspected that someone had done this before, but I couldn't remember
seeing it on the list nor on all the sites that I have viewed. Again,
fatique kept me from doing another search, so I started kacking and came
up with my one liner.
VN> Of course i should wait for you to tell,
VN> but there was the ball, quick coming, iam
VN> standing ready.. ;-)
Yes, those "spiked balls" come fast.
VN> Playing with the parts of my swiss-knife, for the nice part:
VN>
VN> p: second get in system/schemes/ftp/handler 'parse-files
VN> p: first find/tail p [add-date: func[]]
VN> insert next p [convert-month]
VN> ? p
Your version (and Brett's) is infinitely easier to read (OK, maybe not
inifinitely; just more like 1/0.0000000001; I'm prone to exageration
sometimes ;-). There is no doubt about it, I've got to get me a Swiss
knife just like yours!!!
SJ> My surgical insertion tool is admittedly fragile in that it is
SJ> not checking for versions. I started out putting in a version
SJ> checker, but left it out in the end. If this "blowout" will be
SJ> fixed in the next release, then the user would have to
SJ> specifically remember to remove this patch from the user.r
SJ> file or risk corrupting the code.
VN> The saw and the screwdriver and the - ah here:
VN> v: system/version
VN> v/4: v/5: 0
VN> if 1.2.0 <> v [request/confirm "BANG?"]
VN> ;write/append %hidden-patches-log "i patched ftp-scheme!!"
Got to get me one of those knives! Here was the framework that I put
together:
if either system/view [
equal? rejoin [system/version/1 "." system/version/2] "1.2"][
equal? rejoin [system/version/1 "." system/version/2] "2.5"][
;do stuff here
]
While it seemed to work, I started thinking about /Command and /Express
(nee Link), and started thinking that I was in over my head for how
tired I was feeling. Hence, leaving the product-version stuff out.
Combining the if and either works but suffers from readability (I've
never quite figured out how to indent this type of construct for maximum
understandability).
TM> the only thing i can say is WELL DONE, works great.
TM> Just inserted your script into my user.r and off we go,
TM> without any problems.
Thanks.
TM> I kept my self informed that i am using a patched
TM> version of REBOL with adding...
I am not sure that it is attention-grabbing enough. Just joking!
:-)
TM> after your script. It is enough for me cause i am
TM> mainly working on the console. For apps running
TM> in quiet mode this won't be enough.
With a slight alteration, it can be made to work with /Core or /View
ftp-patch-alert: {++++++++++++++++++++++++++++++++++++++++++++
ATTENTION - ATTENTION - ATTENTION +
Your ftp-scheme has been patched to suit international abbreviations.
+
Please remove this patch from your user.r if you upgrade to a higher
+
Version in which the problem is fixed by REBOL-Technologies!!
+
ATTENTION - ATTENTION - ATTENTION +
++++++++++++++++++++++++++++++++++++++++++++}
either system/view [
request/ok ftp-patch-alert
][
print ftp-patch-alert
]
TM> Disabling the patching by Version verification could be
TM> a problem as we don't know the next Version numbers
TM> and if the Problem will be fixed in this Release. So, the
TM> earliest date we can make the patching related to Versions
TM> is when these Versions are out and we could be sure that
TM> the problem is fixed.
Excellent points!
TM> Do you have any other suggestions?
No, I really don't. I've truly not had enough experience in this sort
of thing. All I would know to do would be to make the patch as specific
as possible to products-versions, so that it wouldn't accidentally trash
incompatible versions. I would think it would be easier to patch the
patch if needed, than have someone spend countless hours tracking down
something that was only due to a patch. I will gladly defer to anyone
else in this area. Sterling, Volker, Brett?
I take on these types of challenges because it helps me to improve my
skills and it contributes to the community. Like the ESMTP scheme, I
suspect that few will actually need this patch, but I don't know. I do
know that for every person who speaks up, there are probably ten others
with the same problem who don't speak up. So we never know how many
people give up on REBOL just because their first FTP session failed just
because the server file dates were localized. This may sound overly
dramatic, but when a product line promotes itself as making easy things
easy, well, FTP should clearly fall into the easy category. Yes?
I am glad that the patch worked. I enjoyed working with you on this
mini-task. And thanks to all for the nifty things you taught me!
--Scott Jones