[REBOL] Re: Interesting date formatting functions
AJM This is the interesting one/two: *Very* creative thinking Andrew! -- Gregg -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Interesting date formatting functions
Gregg Irwin wrote: AJM This is the interesting one/two: *Very* creative thinking Andrew! -- Gregg not to mention 'pad function - that one has to be added to core to stop bothering me each time I need it :-) -pekr- -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: [bug?] Problem with 'load
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 CGI mode. But here I have a very simple, three-line script that defeats the existing checks. , REBOL [print header evaluated] print body evaluated We know 'load is bad as it evaluates the header: load {,^/REBOL [print header evaluated]^/print body evaluated} header evaluated == [ print body evaluated ] So we are supposed to use 'load/all. But in this case: load/all {,^/REBOL [print header evaluated]^/print body evaluated} ** Syntax Error: Invalid word -- , ** Near: (line 1) , I can successfully and safely load the header using Romano's load-header function: http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=load-header.r But this problem looks like it needs a different approach. I could try saving it as a file and Do'ing it. The proves it is a validly-formed script. But it evaluates the header and the body. Not what I want! write %temp.r {,^/REBOL [print header evaluated]^/print body evaluated} do %temp.r header evaluated body evaluated Any ideas? Thanks, Sunanda. -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: PayLoad 1.2
Sorry, you can't use payload to build CGI application. If you want to hide your script for an web application, you must buy SDK. Olivier ;-) - Original Message - From: Sabu Francis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 5:13 PM Subject: [REBOL] Re: PayLoad 1.2 Hi: I tried Payload for a CGI application, but it is directing all the console output to the Rebol window itself. Anyway of changing that? Regards Sabu Francis -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject. -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Interesting date formatting functions
Re: Interesting date formatting functions not to mention 'pad function - that one has to be added to core to stop bothering me each time I need it :-) YES ! And so (even if I can suppose what is it) what is the code of the 'pad func ?? -pekr- -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: HTTP Headers
Thank you.. Anton - Original Message - From: Anton Rolls [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 11:44 PM Subject: [REBOL] Re: HTTP Headers select system/options/cgi/other-headers HTTP_REFERER ? Anton. Hi Folks!, I was wondering how to track where the users come from using HTTP_REFERRER.. I've try to get this environment variable.. but I didn't receive it. Am I doing something wrong? thanks in advance.. Regards, --DJ -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject. -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: [bug?] Problem with 'load
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, but is there any reason why you cannot use an upgraded version of REBOL? Regards, Brett. -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Compressing image data (bugs?)
Hi, all Sometimes image handling baffles me a bit. I want to embed a small 2-colored image in the script for use in a button. It would of course be nice to compress it to a chunk of binary data. However, I always lose the size of the image when doing something with it, which is highly impractical. If I have: img: make image! [16x14 #{ FFFF F... etc. or img: load %image.gif and: to-image decompress compress img the size is lost, but the binary information remains. So in order to keep size information, I would have to: img-data: to-binary decompress #{ 789CAD90410A003008C3FCFFA7DD6583516CD5CDDC94A688EE1CDBE4C5BF F3E8675D515ECD915BF1B1C3808A7FF6B8EBF88C8EFF7BFFC4FFB23C9B5987F2 959BDDD3A5E22F920B1DFF8003 } img2: make image! [16x14 img-data] But, img2 contains just 2 bytes set, and they are random, for each time I set img2 by the above line. The remaining bytes are zero. It looks like a bug? But: length? img2 gives the correct length though. BTW: Just found by playing around that: to-image to-binary img Crashes Rebol 1.2.10.3.1, but runs perfectly in 1.2.1.3.1 Regards, Henrik Mikael Kristensen -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: [bug?] Problem with 'load
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, so that eliminates that problem. Just leaves me this problem -- I still want to load any abritrary script to check that it is valid. 'script? alone is not enough to check that it is valid But 'load will return an error if their is a 'needs in the header that doesn't match the interpreter running: 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 ** Script Error: This script needs xxx or better to function correctly ** Near: load troublesome-script load/all troublesome-script ;; fails due to the preamble ** Syntax Error: Invalid word -- , ** Near: (line 2) , Looks like I am going to have to do a 'load and then trap and accept the 'needs error. A more elegant solution would be welcome, Thanks, Sunanda. -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Compressing image data (bugs?)
Henrik Mikael Kristensen wrote: Hi, all Sometimes image handling baffles me a bit. I want to embed a small 2-colored image in the script for use in a button. It would of course be nice to compress it to a chunk of binary data. However, I always lose the size of the image when doing something with it, which is highly impractical. If I have: img: make image! [16x14 #{ FFFF F... etc. or img: load %image.gif and: to-image decompress compress img the size is lost, but the binary information remains. So in order to keep size information, I would have to: img-data: to-binary decompress #{ 789CAD90410A003008C3FCFFA7DD6583516CD5CDDC94A688EE1CDBE4C5BF F3E8675D515ECD915BF1B1C3808A7FF6B8EBF88C8EFF7BFFC4FFB23C9B5987F2 959BDDD3A5E22F920B1DFF8003 } img2: make image! [16x14 img-data] But, img2 contains just 2 bytes set, and they are random, for each time I set img2 by the above line. The remaining bytes are zero. It looks like a bug? Sorry, that's a blunder from my side. Of course I should use: img2: make image! reduce [16x14 img-data] Then it works... Still, I'd like to know if there's an easier way to contain the image size with the data. Regards, Henrik Mikael Kristensen -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Compressing image data (bugs?)
Hi Henrik, On Thursday, December 4, 2003, 3:18:36 PM, you wrote: HMK Still, I'd like to know if there's an easier way to contain the image HMK size with the data. Just keep the image in the original format, i.e.: image-data: read/binary %img.gif Then later you can LOAD it: img: load image-data Regards, Gabriele. -- Gabriele Santilli [EMAIL PROTECTED] -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/ -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Compressing image data (bugs?)
Hi, Henrik given a Rebol image, a solution: do decompress compress mold help.gif Instead a more secure: load decompress compress mold/all help.gif fails for a load bug (Feedback Id #31r704220): load mold/all help.gif ** Syntax Error: Invalid construct -- #[ ** Near: (line 522) #[image! 48x48 #{ --- Ciao Romano -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: [bug?] Problem with 'load
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 ** Script Error: This script needs xxx or better to function correctly ** Near: load troublesome-script load/all troublesome-script ;; fails due to the preamble ** Syntax Error: Invalid word -- , ** Near: (line 2) , Looks like I am going to have to do a 'load and then trap and accept the 'needs error. A more elegant solution would be welcome, troublesome-script: { , REBOL [needs: [9.9.9 xxx]] } load-all-script: func [s][ if s: script? s [ load/all s ] ] load-all-script troublesome-script --- Ciao Romano -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Compressing image data (bugs?)
Gabriele Santilli wrote: Hi Henrik, On Thursday, December 4, 2003, 3:18:36 PM, you wrote: HMK Still, I'd like to know if there's an easier way to contain the image HMK size with the data. Just keep the image in the original format, i.e.: image-data: read/binary %img.gif Then later you can LOAD it: img: load image-data It works! Never thought of using LOAD that way. Thanks! :-) Regards, Henrik Mikael Kristensen -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Sharp Zaurus 5600
Hello, Do any of you have a Zaurus? Can Rebol be ported? Thanks, James -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: [bug?] Problem with 'load
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 unsubscribe as the subject.
[REBOL] Re: Interesting date formatting functions
Didec wrote: And so (even if I can suppose what is it) what is the code of the 'pad func ?? Here's the version I use: source pad pad: func [ {Pads a value with leading zeroes or trailing spaces or a specified fill character.} Value [any-type!] The value. Width [integer!] The desired width. /With Fill [char!] With the specified Fill character. /local Operator][ Operator: either any-string? Value [ any [Fill Fill: # ] :tail ] [ Value: form Value any [Fill Fill: #0] :head ] head insert/dup Operator Value Fill Width - length? Value ] Enjoy! Andrew J Martin Speaking in tongues and performing miracles. ICQ: 26227169 http://www.rebol.it/Valley/ http://valley.orcon.net.nz/ http://Valley.150m.com/ -- -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.