Romano:
> troublesome-script: {
> ,
> REBOL [needs: [9.9.9 xxx]]
> }
> load-all-script: func [s][
> if s: script? s [
> load/all s
> ]
> ]
That's ingenious!!
Thanks a lot,
Sunanda.
--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with un
Hi Sunanda,
> troublesome-script: {
> ,
> REBOL [needs: [9.9.9 xxx]]
> }
> script? troublesome-script ;; finds a valid header : correct!
> load-header troublesome-script ;; Romano's script -- finds a valid header:
> correct!
> load troublesome-script ;; fails due to the 'need
>
Hi Brett,
> I might have missed a message on this, but is there any reason why you
> cannot use an upgraded version of REBOL?
Thanks for the reply.
My mistake.I got too many version of REBOL around, and I did all my
pre-post testing on an older version.
Load does now perform as you say,
Hi Sunanda,
> We know 'load is bad as it evaluates the header:
>
Not true - Core 2.5.2 introduced a safer LOAD. Please see:
http://www.rebol.com/docs/changes.html#section-4.2
> But this problem looks like it needs a different approach.
...
> Any ideas?
I might have missed a message on this,
More problems with load.
This may not be a bug, but I can't find a workaround.
I want to be able to safely load *any* script to check it has acceptable
syntax before allowing it into REBOL.org. But we absolutely don't want to evaluate
the header as that may execute untrusted code in server
Sunanda et al.
thanks for asking me to post an example of encompass in action. I, myself, was
looking for meaningfull examples, and its fun to have one in the context of a real
problem.
here is an example of how to patch load so that the /all refinement works as expected.
I have used the met
Max:
> damn I was about to show you a way of doing it with encompass... :-)
> That is its main purpose... fixing/improving/limiting things around...
while
> still keep the basic functionality.
I'd appreciate seeing some more examples of what encompass can do -- it's
often hard to see all t
Thanks Volker:
> If we use /core 2.5.6, then not.
> this is oold /view 1.2.1:
> >> load "rebol[print {hehe}]"
> hehe
> == [
> ]
> and this core 2.5.6:
> >> load "rebol[print {hehe}]"
> == [
> ]
>
> IIRC its mentioned somewhere in the /core change-log.
>
Yep -- RT got there fi
Am Freitag, 28. November 2003 19:50 schrieb [EMAIL PROTECTED]:
> Thanks to everyone who contributed responses.
>
> I've now updated REBOL.org to use Romano's load-header script rather than a
> direct load/all/header in all the places (lots!) we load a header to get
> values about a script.
>
> Thi
, but in the end, being
part of the problem is much more fun."
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 28, 2003 1:50 PM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] Re: [bug?] Problem with 'load
>
Thanks to everyone who contributed responses.
I've now updated REBOL.org to use Romano's load-header script rather than a
direct load/all/header in all the places (lots!) we load a header to get values
about a script.
This was a potentially damaging integrity exposure (my old-timer IBMese for
Hi Brett,
> blah blah
> [ REBOL [Title: "Sample"] print now]
> blah blahblah blah
> blah blah
>
> Strangely enough, the Script? function that Yos pointed out seems to give a
> useful result in this case - the beginning of the embedded script, but not
> when the script is not embed
Thanks Brett for explanations.
I think it is simpler for Sunanda to work with embedded script with
the script function i give you than parsing for header and content
information like script? do (script? is a native and we can't see the source).
So we add [ at start and ] at end of temp.r exampl
> I was trying to think of a way of safely doing this myself, so your script
> has given me hope that it is possibleWe just need to solve the bad
preamble
> problem,
It would be better to have it fixed, but if you need the workaround I'm
pretty sure it could be done with Parse and using a par
Thanks Yos,
> I use this on View 1.2.1 maybe could help you
Unfortunately, it fails if the preamble (stuff before the REBOL header)
contains invalid words, If you try it on the test script below, you'll see what I
mean:
===save next lines as temp.r===
A preamble: there is text before header,
I use this on View 1.2.1 maybe could help you.
REBOL []
script: get in context
[script: func
["^/"
File
/header
/content
/compress
/decompress
/local
script
]
[script: system/words/read File
script: loa
Thanks Gabriele
> Looks like a bug to me...
I'll report it to feedback.
My last email should have said:
Trouble is. my prettyprinter would seem to be only able to load scripts that
run under the same version that it does if the target script has a needs
header entryAnnoying or what?
S
Hi SunandaDH,
On Friday, November 28, 2003, 10:07:23 AM, you wrote:
Sac> We might be seeing different behaviour on different versions of REBOL -- I'm
Sac> looking at Win and Unix. It looks to me like the header is *always*
Sac> evaluated, including the needs check, despite the /all refinement.
Thanks Anton and Max
Anton:
> In my tests it looks like the needs block isn't evaluated,
> just examined.
We might be seeing different behaviour on different versions of REBOL -- I'm
looking at Win and Unix. It looks to me like the header is *always*
evaluated, including the needs check, des
Hi SunandaDH,
On Thursday, November 27, 2003, 10:49:49 PM, you wrote:
>>> load/all/header "rebol [needs: [1.2.1 ]]"
Sac> ** Script Error: This script needs or better to function correctly
Sac> ** Near: load/all/header "rebol [needs: [1.2.1 ]]"
Looks like a bug to me...
Regards,
I think words in the needs block are just compared to:
extract system/components 3
In my tests it looks like the needs block isn't evaluated,
just examined.
Anton.
> I didn't know the needs: attribute was actualy evaluated.
>
> actually, I barely even knew that was even significant...
I didn't know the needs: attribute was actualy evaluated.
actually, I barely even knew that was even significant...
I just looked at the online docs and the word is referenced 3 times, where they
explain the script header... but don't explain the dialect anywhere!
is this dialect actualy usabl
22 matches
Mail list logo