• 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
r4wp443
r3wp4402
total:4845

results window for this page: [start: 3001 end: 3100]

world-name: r3wp

Group: Core ... Discuss core issues [web-public]
Anton:
27-Oct-2006
Hmm.. can't be a simple as that. I think READ determines the file's 
host platform somehow and translates accordingly.
Gabriele:
3-Nov-2006
in principle, there should be little difference. since write always 
creates a new file, and immediately closes the file port, they should 
basically be the same. I also assume that /append implies /direct 
in some way.
Maxim:
9-Nov-2006
yeah... like .h file loading ;-)  we can always dream  ;-)
Maxim:
9-Nov-2006
humm no I just want to read it.  so that install can be setup by 
IT dept.  instead of obsure and inconsistent user.r file
Anton:
25-Nov-2006
Joe, I can't get it to work either. It looks like LAUNCH always just 
converts its VALUE argument to a file and then tries to do it.
Jerry:
27-Nov-2006
I was processing a Chinese text file using REBOL. The text file was 
in the Big5 Encoding, which is the de facto encoding we use in Taiwan. 
A Big5 character needs two bytes, so I used strings whose length 
is 2 to present Big5 characters. 


Something weird happened. After a while, I realized that REBOL treated 
two different characters as they were the same character.


Chinese-char1: to-string #{A4 68} ; Big5 Char for "Educated Person"
Chinese-char2: to-string #{A4 48} ; Big5 Char for "Human"

if Chinese-char1 = Chinese-char2 [
    print "This cannot not be happening..."
]
How would I fix my REBOL scrip? Thank you.
Rebolek:
28-Nov-2006
Can somebody explain to me, how does FIND work in file! ?

>> path: %/disk/drawer/
== %/disk/drawer/
>> file: %/disk/drawer/file
== %/disk/drawer/file
>> find/match file path
== %file
>> find/match file %/disk
== %/drawer/file
>> find/match file %/disk/
== %drawer/file
>> find/match file %disk/
== none
>> find/match file %drawer
== none


It seems to work only if the searched string stars on begining of 
file!
Gregg:
28-Nov-2006
You can also use the API to get the current keyboard state, whether 
or not you trap the key yourself. And, yes, if we ever get system 
ports working under View, it will be nice; for file drops alone it 
would be great.
Rebolek:
29-Nov-2006
This needs 'foreach-file from rebol.org

>> include %foreach-file.r
>> out: copy [] ff: func [file][repend out [file modified? file]]
>> foreach-file %./ :ff

== [%./!/basics_wide_desktop_computer_system.xml.ttx 21-Jun-2006/16:05+1:00 
%./!/basi
cs_wide_hard_disk_drive.xml.ttx 21-Jun-2006/8:...
>> sort/skip/compare out 2 2

== [%./ft/wavs/balloon.wav 23-Aug-2001/13:00+1:00 %./ft/wavs/down.wav 
23-Aug-2001/13:
00+1:00 %./ft/wavs/error.wav 23-Aug-2001/13:00...
Gregg:
29-Nov-2006
Hmmm, has anyone looked at my FILE-LIST script on REBOL.org? If so, 
would it make sense to add an option to sort the results, or an option 
to have extra data returned (e.g. attrs or date-time) along with 
the file names themselves?
Graham:
16-Dec-2006
How about a /native refinement to return files in 'request-file to 
return files in the native file format?
Graham:
17-Dec-2006
show-text field form any [ request-file/only/native copy "" ]
Anton:
17-Dec-2006
>> form to-local-file any [%hello %""]
== "hello"
>> form to-local-file any [#[none] %""]
== ""
Graham:
17-Dec-2006
form any [ to-local-file request-file/only/native copy "" ]
Graham:
17-Dec-2006
form any [ to-local-file request-file/only copy "" ]
Graham:
17-Dec-2006
which errors if request-file returns none
Anton:
17-Dec-2006
This doesn't:
form to-local-file any [request-file/only %""]
Geomol:
3-Jan-2007
To move a file, one solution is:
write/binary <destination> read/binary <origin>
delete <origin>

If you leave out the delete, you've got a copying file routine.
BrianH:
3-Jan-2007
If you just need to move a file within the same hard drive, there 
may be some tricks with renaming or calling external commands that 
will likely be faster. Be sure to check those out too.
Anton:
9-Jan-2007
Given some data which I might load from a file:

	data: [
	
		[code description]
	
		["CC" "Crazy Cuts"]
		["DD" "Dreadful Dingo"]
		
	]

I can process it this way:


 format: data/1 ; get the format block, which is known to be first
	
	use format [
	
		foreach blk next data [ ; skip over the format block
			
			set format blk
			
			if code = "CC" [print description]
		
		]
		
	]

with the disadvantage that I set a word ('FORMAT).
I could put that in another USE context but then I would have
yet another level of nesting in the code. (There is already
one level of nesting more than I want.)

What I would prefer to write is something like:

	USE-FOREACH (data/1) (blk) (next data) [
	
		if code = "CC" [print description]
		
	]
	
Therefore, an implementation is called for.
Any comments before I begin an implementation ?
Bo:
20-Jan-2007
I have an interesting problem with FTP.  I'm using FileZilla on my 
server and I get the following entry in the log file:
Bo:
20-Jan-2007
But it seems the FTP server is working properly according to the 
log file.  If it cannot retrieve the directory listing, it sends 
a 425 and then eventually disconnects.  In any case, Rebol should 
never hang indefinitely even if the FTP server misbehaves.
Henrik:
22-Jan-2007
is there a way to "trace" where you read or 'do'ed a file from? would 
be handy if you had a script that could tell whether it was run from 
a webserver or from a local disk
Bo:
22-Jan-2007
It could be due to unusual filenames, but it doesn't always lock 
up on the same file.
Oldes:
22-Jan-2007
If I setup my firewall to accept incomming connections, I got:
Net-log: "150 Opening data channel for directory list."
Net-log: "Closing listen port 3797"
Net-log: "Closing data port 69.12.157.73 3797 62038"
Net-log: [none ["226" "250"]]
Net-log: "226 Transfer OK"
Net-log: "Opening listen port 3798"
Net-log: [["PORT" port/locals/active-check] "200"]
Net-log: "200 Port command successful"
Net-log: ["TYPE I" "200"]
Net-log: "200 Type set to I"
Net-log: [["RETR" port/target] ["150" "125"]]
Net-log: "150 Opening data channel for file transfer."
Net-log: "Closing listen port 3798"
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: "Closing data port 69.12.157.73 3798 62039"
Net-log: [none ["226" "250"]]
Net-log: "226 Transfer OK"
Net-log: "Caching cmd-port 69.12.157.73 3796 21"
== "now 22-Jan-2007/16:11:08+1:00"
Oldes:
22-Jan-2007
what does it mean lock ups? That you cannot upload any file anymore?
Oldes:
22-Jan-2007
If you backup so many files, you should open just one connection 
and comunicate with the server. Not to open and close connections 
for every file.
Bo:
22-Jan-2007
But it doesn't seem to hang up while appending to an existing file. 
 The only time I have seen it hang up is when Filezilla returns a 
425 message.
Oldes:
22-Jan-2007
as it douesn't recognize, that the file is already uploaded and with 
same or newer date
Chris:
29-Jan-2007
The sandbox port I wrote may serve as an example, except that it 
wraps a file port and not TCP.  I hope to put together an article 
on this (before ports are changed completely in R3 :)
Maxim:
8-Feb-2007
a 10MB xml file loaded from the net and loaded with xml2rebxml  took 
about 100mb of ram.  the same file loaded in firefox  took up 600mb 
of ram.  I was pretty shocked !
Anton:
11-Feb-2007
quickly make a little example file which demonstrates the problem 
using a new console.
Henrik:
14-Feb-2007
it's a file packing function. refinements are used to determine which 
files should be skipped and which files should be processed with 
other external functions
Robert:
19-Feb-2007
Can this routine (http://www.rebol.net/article/0281.html) for copying 
large files be used to transfer a file over a network as well?
CharlesS:
19-Feb-2007
Im iterating over a lines in a file , with this line in a foreach 
body
CharlesS:
19-Feb-2007
oh hmm, im splitting by lines with this -> lines: parse (read to-file 
rejoin [ moduleName ".php" ]) "^/" , but it seems to be splitting 
by spaces ?
Robert:
25-Feb-2007
Is there a way to find out if a loaded file is encrypted with CLOAK?
Sunanda:
2-Mar-2007
Do you mean using it to generate file names that will be acceptable 
on any platform that REBOL runs on?
If so, I don't know, but I wouldn't take the risk.....

....I use checksum/secure and remove #{} part -- gets me a file name 
that is just letters (a-f) and digits.
Henrik:
3-Mar-2007
gabriele, so you can rename a file while it runs?
Gabriele:
3-Mar-2007
nren.exe downloads a new file, update.exe; it runs it; update.exe 
overwrites nren.exe with itself, then runs it; nren.exe deletes update.exe
Ladislav:
6-Apr-2007
Rebol [
	Title: "NIST clock"
	File: "nistclock.r"
	Author: "Ladislav Mecir"
	Date: 25-Mar-2007/23:43:24+2:00
]

get-nist-correction: func [/local nist-time cpu-time mjd hms] [
	nist-time: read daytime://time-a.nist.gov
	cpu-time: now

 parse/all nist-time [skip copy mjd 5 skip 2 thru " " copy hms 8 skip]
	nist-time: 18/Nov/1858 + to integer! mjd
	nist-time/time: to time! hms
	nist-correction: difference cpu-time nist-time
]
get-nist-correction

view/new layout [
	banner 140x32 rate 1 with [data: 0:0:0] feel [
		engage: func [face action event] [
			current-time: now + nist-correction
			face/text: current-time/time
			show face
		]
	]
]
do-events
Ladislav:
6-Apr-2007
Rebol [
	Title: "NIST clock"
	File: "nistclock.r"
	Author: "Ladislav Mecir"
	Date: 6-Apr-2007/8:32:57+2:00
]

get-nist-correction: func [
	{Never use this function more often than once in four seconds!}
	/local nist-time cpu-time mjd hms
] [
	nist-time: read daytime://time-a.nist.gov
	cpu-time: now

 parse/all nist-time [skip copy mjd 5 skip 2 thru " " copy hms 8 skip]
	nist-time: 18/Nov/1858 + to integer! mjd
	nist-time/time: to time! hms
	difference nist-time cpu-time
]

correction-interval: 181
seconds-to-correction: 1

view/new layout [
	banner 140x32 rate 1 with [data: 0:0:0] feel [
		engage: func [face action event] [
			seconds-to-correction: seconds-to-correction - 1
			if zero? seconds-to-correction [
				nist-correction: get-nist-correction
				seconds-to-correction: correction-interval
			]
			current-time: now + nist-correction
			face/text: current-time/time
			show face
		]
	]
]
do-events
BrianH:
6-Apr-2007
According to MS's blogs, the only way to enable Exchange's server-side 
junk mail folders is to do so through Outlook Web Access on a per-user 
basis. The only way they suggest to do so for all users is to post:

cmd=options
junkemailstate=1
cmd=savejunkemailrule


to every user, logging in as a domain administrator. They provide 
a 100+ line VBScript to do this for a list of names in a file. When 
that failed, I figured that I could do the same in 1 or 2 lines of 
REBOL, and I was correct: I get the same exact failure the VBScript 
gets in 1 line of REBOL :(
Brock:
4-May-2007
Anton, the last options seems to auto-detect if the file is created 
and appends if it created, is that true?
Terry:
12-May-2007
The rse-ids.r  file seems what Im looking for .. need to have a play.
Terry:
12-May-2007
Im tryin real hard to get my simple data into a Rebol hash table, 
or blocks.. whatever.. but it seems like traditional Relational DB 
is the way to go.. even used only as a flat file DB :(
Terry:
12-May-2007
if everytime you do a 'write' you need to sort 400mb file.. i would 
say yeah
Louis:
7-Jun-2007
Good progress, then stuck again. I can get one file transferred, 
but I don't know how to transfer the following files. This is the 
server (put it in an empty folder): 

rebol []

print ["This program RECEIVES files sent by send-files-tcp." newline]
port-num: request-text/title/default "Port Number: " "2006"
url: to-url rejoin ["tcp://:" port-num]
received-file: copy first open/binary url
write %file-names decompress received-file
files: load %file-names
foreach file files [

    received-file: copy url ;<======== HOW DO I FEED IN THE NEXT FILE?
    write/binary file received-file
    print ["Successfully received file: " file]
]

ask "The files transfer is complete. Press <Enter> to close."
Louis:
7-Jun-2007
This is the client; put it in the folder containing the files you 
want to send.

rebol []
ip: request-text/title/default "IP Address: " "localhost"
port-num: request-text/title/default "Port Number: " "2006"
url: to-url rejoin ["tcp://" ip ":" port-num]
system/options/binary-base: 64  ; best binary encoding


print ["This program SENDS all files in its folder to receive-files-tcp." 
newline]
print "NOTE: receive-files-tcp must be running on the remote"
print ["computer before starting this program." newline]

files: read %. ; Note that 'files is a block of file names.
save %file-names files
server: open url

insert server compress as-binary read/binary %file-names ;send file 
names
file-block: []
foreach file files [
    if not find file "/" [insert file-block file] ;remove folders
]
files: file-block
foreach file files [
    insert server compress as-binary read/binary file
    print ["Successfully sent file: " file]
]
close server

ask [newline "The files transfer is complete. Press <Enter> to close."]
Louis:
7-Jun-2007
Start the server first, then the client, and file transfer should 
be automatic.
Geomol:
7-Jun-2007
Louis, I think, your problem is, that you only operate with one port. 
When you define a listen port in REBOL, you receive a port from that. 
This new port can be used to receive the file. Something like:

listen-port: open/lines join tcp://: port-num
wait listen-port
talk-port: first listen-port
file: first talk-port
close talk-port
wait listen-port
...


(I haven't tested this code. It's free from a similar program, I 
made in the past.)
Geomol:
7-Jun-2007
server example:

listen-port: open/lines tcp://:8080
wait listen-port
p: first listen-port
file: load first p
close p
write/binary %file.r debase first file
close listen-port

client example:

p: open/lines tcp://127.0.0.1:8080
insert p remold [enbase read/binary %hokus-pokus.r]
close p
btiffin:
10-Jun-2007
How many rebols have written language localization routines?

I'm toggling back and forth between external heaps and in-code strings
I've got a RebGUI widget...


lang-text {en "This is the english" fr "C'est francais" it "Don't 
know any italian"}

meaning a translator will have to get dirty in code edits (or send 
to coder) or use

text (lang "SomekindaKey")

where lang is some func that having read some file, selects the string 
key by lang type...
lang-type being buried somewhere in locale*


How often is a REBOL translator a non-programmer?  I find external 
text to be a pain when
coding.  But...it lets non-coders help with translations.


In particular, I only have about 10 or so screens that could be translated. 
 Ashley's

builtin localization nicely handles all the GUI stuff.  I'm leaning 
toward in-code strings.
Gabriele:
11-Jun-2007
and the preprocessor can create a nice .catalog file for you
Oldes:
12-Jun-2007
I mean rebol-file from such a url
Oldes:
13-Jun-2007
yes... that's what I wanted.. especially to make the local file secure 
as well... (so converting url to local file does not leave the send-box:)
Gregg:
5-Jul-2007
I thought I had a list somewhere, but can't find it. You probably 
already have all these.

files:
	file-modes
	copy-modes
net ports:
	network-modes
	interfaces
ports:
	port-modes
Sunanda:
5-Jul-2007
Thanks Gregg -- I was looking for the definite list of file modes: 
world-write etc.
A bit of extra Googling got me to here:
http://www.rebol.com/docs/core25.html#sect1.1.

It would have been easier with some SEO on the .com and .net sites.
Izkata:
5-Jul-2007
Like this?
>> print mold get-modes %Fonts.r 'file-modes

[status-change-date modification-date access-date owner-name group-name 
owner-id group-id owner-read owner-write owner-execute group-read 
group-write group-execute world-read world-write world-execute set-user-id 
set-group-id full-path]
>> print mold get-modes %Fonts.r 'world-write
false
Pekr:
7-Jul-2007
guys, do you have recursive directory read function? Simply put - 
what I need for our kiosk is:

 - script running in the background, window-less
- script checks for new drive to appear periodically
- then it reads specific directory, e.g. %/e/kiosk-update

- then it reads files, and stores them to target dir, not carring 
about adding new dir/file, simply overwriting it

It is kind of one-sided sync :-)

I can't find anything usefull on rebol.org ....
Gabriele:
7-Jul-2007
foreach file read dir [do-something-with dir/:file]
Gabriele:
7-Jul-2007
>> print-dir: func [dir] [foreach file read dir [print dir/:file]]
>> print-dir %public/www.rebol.com/
public/www.rebol.com/index.r
public/www.rebol.com/docs/
public/www.rebol.com/bay.jpg
public/www.rebol.com/view/
public/www.rebol.com/downloads/
>> print-dir %/
/c/
/d/
/e/
/f/
/g/
/h/
/z/
Gregg:
7-Jul-2007
Petr, my file-list stuff should be on REBOL.org.
Gabriele:
8-Jul-2007
Petr, I'm not sure what you want. Obviously %c/ is a dir, and obviously 
it is at the root, so you have to access it as %/c/. This is called 
platform independent file paths. It's the same for all platforms.
Pekr:
10-Jul-2007
'attempt seems not to be able to catch file reading error. What am 
I doing wrong? Should I use if not error? try [] instead?
Rebolek:
10-Jul-2007
What do you mean Pekr, it seems OK to me:
>> attempt [read %no-file]
== none
Pekr:
10-Jul-2007
Rebolek - well, try to attempt [data: read/binary %some-larger-file] 
.... unplug your usb flash when file is being read ....
Louis:
10-Jul-2007
Does anyone remember the command for converting a binary file to 
a string so it can be sent by email?
Louis:
10-Jul-2007
I'm wanting to send a bunch of huge files to my son. I used this 
command awhile back to convert the files to text, then used compress 
to greatly shrink their size. Unfortunately I accidentally erased 
the source file for my script, and now can't remember the name of 
the command.
Graham:
10-Jul-2007
compress creates a binary file
Louis:
10-Jul-2007
What I want to do in convert a binary file to a string.
Graham:
10-Jul-2007
http://www.rebol.net/cookbook/recipes/0026.html


This recipe says that a binary file is being sent.  I wonder how 
this works because the content type is url encoded, but there is 
not url encode function as a mezzanine by default.
Louis:
31-Aug-2007
From section 11.12 of the Core users manual:

inp: open/binary/direct ftp://ftp.site.com/big-file.bmp
out: open/binary/new/direct %big-file.bmp
buf-size: 200000
buffer: make binary! buf-size + 2

while [not zero? size: read-io inp buffer buf-size][

    write-io out buffer size  ;<================<<< Where did size come 
    from; this is incorrect, no? 
    total: total + size
    print ["transferred:" total]
]
Louis:
31-Aug-2007
Attention whoever is in charge of documentation. Section 11.12 of 
the Core Users Manual give an example that will not work. A clear 
buffer statement is needed after the write-io line, and the ports 
need to be closed after sending each file.
james_nak:
1-Oct-2007
I was loading a file, one which contained a block of make object! 
and the other with a single make object!  I noticed that I could 
do a  "reduce" on the block and get the expected results of having 
a block of objects but I had to use "do" on the single object instead 
of reduce. What is the difference between do and reduce?
Gregg:
2-Oct-2007
DO returns the last value in the block it DOes, but both evaluate, 
so I'm not sure what the exact data looks like that you're loading, 
or how you're loading it. LOAD can behave differently, based on file 
contents; returning a block or not.
btiffin:
25-Oct-2007
Rebol.org  exif-image.r  (uses exif-core.r) and has a jpeg-size function. 
 Didn't read enough to see if it loads the whole file before it looks 
for the size fieldsm but I don't think Piotr's routines requires 
a load.
Steeve:
25-Oct-2007
it's just a proof of concept, it's not usable as-is for an open/seek 
 file mode
Steeve:
25-Oct-2007
made an async parser (not fully tested - some problems may occur 
when the parser go back in the stream )

but the concept works :  when the parser encouter a skip command, 
the data are not readed from the file but the offset is modified.
Steeve:
25-Oct-2007
REBOL []

parse-async: func [
        file rules
        /local port buffer offset getf seek meta & && result
][
        port: open/seek/binary  file
        buffer: clear #{}
        offset: 1
        getf: func [len][
                offset: offset - length? buffer
                clear buffer 
                append buffer copy/part at port offset len 
                offset: offset + len 
        ]
        seek: [(offset: offset + 1)]
        ..: func [blk] [change/part & compose/deep blk && ]
        parse rules meta: [
                some [

                        &: binary! &&: (.. [buffer: (to-paren reduce ['getf length? &/1]) 
                        (&/1)]) :& 3 skip 
                        | &: 'skip &&: (.. [seek]) :& skip
                        | &: 'get word! integer! &&:

                                (.. [buffer: (to-paren compose/deep [getf (&/3) set [(&/2)] to integer! 
                                as-binary cp buffer]) to end]) :& 4 skip

                        | &: string! &&: (.. [(as-binary &/1)]) :& 
                        | 'end 'skip 
                        | into meta
                        | skip
                ]
        ]
        result: parse/all buffer rules
        close port
        result
 ]
 
if parse-async %15.jpg [
        #{FFD8}   ; jpeg Header
        [
                 #{FFE0}                        ;JFIF header

                        get len 2               ;get data length  for the current header 
                        (2 bytes)

                         "JFIF"                 ;yeah it's a JFIF (confirmation)

                        (len: len - 6) len skip ;skip data (len) times
                        some [

                                 #{FFC0}        ;good ! i found the length properties

                                        2 skip  ; skip length of this header

                                        skip    ; filler ??? always = #{08}
                                        get height 2
                                        get width 2
                                        break   ; finished

                                | #{FF} skip    ;skip this header
                                        get len 2 
                                        (len: len - 2) len skip
                                | 

                                        [end skip]     ;error format
                        ]

                | #{FFE1}                       ;EXIF header

                        get len 2               ;get length of a header
                                                ;... to do
                        [end skip]
        ]
        to end
][
   ?? height
   ?? width
]        
halt
Steeve:
25-Oct-2007
perhaps it's not clear, but this parser do not load all the file 
in memory but  only the needed part to retrieve the width and the 
height.
Graham:
27-Oct-2007
>> c: make object! [ a: "test" ]
>> save/all c make binary! 1024

** Script Error: save expected where argument of type: file url binary
** Near: save/all c make binary! 1024
Oldes:
27-Oct-2007
get-JPG-size: func[
	"Returns size on JPG image or none on invalid files"
	jpgfile [file! url!] "File to examine"
	/local stream byte1 byte2][
	stream: open/read/binary/direct jpgfile
	;seek to jpg start
	until [
		all [
			255 = first stream
			216 = first stream
		]
	]
	while[any[byte1: first stream]] [
		if 255 = byte1 [
			either 192 = byte2: first stream [
				copy/part stream 3
				height: to-integer copy/part stream 2
				width:  to-integer copy/part stream 2
				close stream
				return as-pair width height
			][
				copy/part stream ((to integer! copy/part stream 2) - 2)
			]
		]
	]
	close stream
	none
]
Oldes:
27-Oct-2007
get-JPG-size: func[
	"Returns size of JPG image or none on invalid files"
	jpgfile [file! url!] "File to examine"
	/local stream byte
][
	stream: open/read/binary/direct jpgfile
	;seek to jpg image start
	until [
		any [
			all [
				255 = first stream
				216 = byte: first stream
			]
			none? byte
		]
	]

 unless byte [close stream return none] ;no Start Of Image marker 
 found

	while[any[byte: first stream]] [
		if 255 = byte [
			either 192 = byte: first stream [
				copy/part stream 3
				height: to-integer copy/part stream 2
				width:  to-integer copy/part stream 2
				close stream
				return as-pair width height
			][
				copy/part stream ((to integer! copy/part stream 2) - 2)
			]
		]
	]
	close stream
	none
]
Oldes:
27-Oct-2007
get-JPG-size: func[
	"Returns size of JPG image or none on invalid files"
	jpgfile [file! url!] "File to examine"
	/local stream bytes height width
][
	stream: open/read/binary/seek jpgfile
	;seek to jpg image start
	while [#{FFD8} <> copy/part stream 2][
		if tail? stream: skip stream 2 [
			;no Start Of Image marker found
			close stream return none
		]
	]
	stream: skip stream 2
	while[not tail? stream][
		bytes:  copy/part stream 2
		stream: skip stream 2
		if 255 = bytes/1 [
			either 192 = bytes/2 [
				stream: skip stream 3
				height: to-integer copy/part stream 2
				width:  to-integer copy/part skip stream 2 2
				close stream
				return as-pair width height
			][
				stream: skip stream ((to integer! copy/part stream 2) - 2)
			]
		]
	]
	close stream
	none
]
Ashley:
30-Oct-2007
delete-public: func [dir [file!]] [
	foreach file read dir [
		if #"/" = last file [
			attempt [delete-public dir/:file]
		]
		if find [%public/ %Thumbs.db] file [
			attempt [delete dir/:file]
			print dir/:file
		]
	]
]

delete-public %/c/
Graham:
10-Nov-2007
foreach f read %./ [
			if f <> %. [
				inf: info? f
				probe d: inf/date
				if all [ inf/type = 'file (difference now d) > 1:00:00 ][
					attempt [ delete f ]
				] 
			]	
		]
Gabriele:
12-Nov-2007
Robert, what you see at the console is the output of MOLD. there 
is no 'make and no 'hash! there. if you are *saving* the hash in 
a file or sending thru tcp and so on, use MOLD/ALL (or SAVE/ALL) 
so that hash! can be loaded properly afterwards.
amacleod:
29-Nov-2007
This works: call "C:\Program Files\Adobe\Acrobat 6.0\Acrobat\acrobat.exe 
C:\Program Files\PDFS\file.pdf"
amacleod:
29-Nov-2007
What would be the rebol path notation of the above. I tried variations 
of this: call "/C/Program Files/Adobe/Acrobat 6.0/Acrobat/acrobat.exe 
/C/Program Files/PDFS/file.pdf", but I can not get it to work...
amacleod:
29-Nov-2007
But I can not combine them as I did with using windows file path 
notation
Oldes:
29-Nov-2007
>> to-rebol-file "C:\Program Files\Adobe\Acrobat 6.0\Acrobat\acrobat.exe"
== %/C/Program Files/Adobe/Acrobat 6.0/Acrobat/acrobat.exe
BrianH:
29-Nov-2007
amacleod, try this:

    call [%"/C/Program Files/Adobe/Acrobat 6.0/Acrobat/acrobat.exe"  
    %"/C/Program Files/PDFS/file.pdf"]
BrianH:
29-Nov-2007
CALL will do the to-local-file translation for any REBOL files it 
is passed (even in that block above, though not in nested blocks), 
and even wrap the filenames in quotes just in case they have spaces 
in them.
Rod:
5-Dec-2007
Any binary parse wizards ever tried to tackle the on disk file format 
that postgresql uses to store row data?


I'm looking through the docs trying to get a handle on how tough 
it is.

http://www.postgresql.org/docs/8.1/static/storage.html
and

http://www.postgresql.org/docs/8.1/static/storage-page-layout.html


give a fairly detailed starting place, plus the source of course 
but my C is so rusty I think reviewing the raw data is going to be 
easier.


We are trying to recover some data that was deleted (marked for) 
by accident.  We basically need to find the serial key value and 
associate it with a text value for each row so we can rebuild the 
table and not lose the relationships that key off that serial numeric 
value in other tables.


There are some good examples of binary parsing in the rebol.org script 
library so I know rebol can help write out a text version of the 
two values if we can get a handle on the structures involved.


I'm open to suggestions or advice, this is not critical but would 
be a nice win to recover the key data.
Oldes:
6-Dec-2007
here is a basic... http://box.lebeda.ws/~hmm/rebol/pgsql-db.rthis 
reads the postrge's file per pages... but I'm not sure what to do 
with the data inside and have to do something else now
BrianH:
14-Dec-2007
system/script/path gets the directory of the script, and you can 
put the name of the script in its header with the File field.
BrianH:
14-Dec-2007
If we set b's File field to %b in its header, we can get that value 
for relaunching or whatever.
Henrik:
8-Jan-2008
anyone know of a function to calculate the relative path between 
two branches in a file system?
amacleod:
11-Jan-2008
I want to sync some files on a server. what is the usual method? 
This file will be a rebol script so I thought placing a "version:" 
in the rebol header would be logical. I tried to "load/header" but 
I get the whole script and its no evaluated so I can not just get 
the  version value.
3001 / 484512345...2930[31] 3233...4546474849