r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[RAMBO] The REBOL bug and enhancement database

Izkata
6-Feb-2005
[134]
inside*
Oldes
9-Feb-2005
[135x2]
#3626 - path-thru - I'm using "_query_" instead of #"?" char in the 
path and "_atport_" to recognize different port of the url
so the file may look like %localhost_atport_88/test.php_query_id=100
Romano
9-Feb-2005
[137x6]
anton: yes, seems that the crash is gone
#3623 the proposed split-path fails in some situations
for example here: %file or here: %e./
this is a different version which use parse and is > 4X  on my system
rebol[
	Author: "Romano Paolo Tenca"
	Date: 10/02/2005
]
split-path-3: func [

 "Splits a file or URL pos. Returns a block containing path and target."
    target [file! url!]
	/local dir pos
][
	parse/all target [
		[#"/" | 1 2 #"." opt #"/"] end (dir: dirize target) |
		pos: any [thru #"/" [end | pos:]] (

   all [empty? dir: copy/part target at target index? pos dir: %./]
			all [find [%. %..] pos: to file! pos insert tail pos #"/"]
		)
	]
	reduce [dir pos]
]
it also fix this split-path bug:
>> split-path %""
** Script Error: Out of range or past end
** Where: split-path
** Near: last target
>> split-path-3 %""
== [%./ %""]
Anton
10-Feb-2005
[143x5]
Oldes, good ideas. Do you think the "?" -> "%3F" is a replacement 
which is more prone to collision (than a longer string such as "_query_" 
) ?
Or perhaps you think it could cause problems of automatic decoding 
when ( if it ever happens ), the public cache path is converted back 
to a URL! ?
Anyway, I think the "?" replacement is the one that fixes the most 
common problem. I think ports are not such a common problem. Obviously 
you needed it to work for something..., but I wonder what your opinion 
on it was.  We shall need to make a total solution at some stage...
Gosh! now I think it might be better to replace the "?" with a slash 
"_query/"  (<-- note the slash), so it becomes a new directory.
eg: path-thru http://www.dom.com/cgi.r?hello
;== view-root/public/www.dom.com/cgi.r/hello
Allen
10-Feb-2005
[148]
Anton, if you do that, how do you convert it back?
Anton
10-Feb-2005
[149x6]
I guess you can't, unless you know more. I just leapt at that idea 
because I thought it would reduce the amount of repetition in path 
and filenames.
(so all the cgi.r queries would be grouped as files in the cgi.r/ 
directory)
Mmm.. similar to Oldes' method, you could replace "?" -> "_query/", 
  then directories that end with "_query/" are converted back to 
"?"
Ahha! I just re-read my previous post... :) Duh!
The example should have been:
eg: path-thru http://www.dom.com/cgi.r?hello
;== view-root/public/www.dom.com/cgi.r_query/hello
Anton
11-Feb-2005
[155x3]
I just found a strange bug:
>> read %rebol.r
== {
REBOL [
    Title: "REBOL Extended Definitions"
    Date: cvs-date "$Date: 2001/04/29 16:00:17 $"
    Rights: "Copyright (C)...
>> read %rebol.r.
== {
REBOL [
    Title: "REBOL Extended Definitions"
    Date: cvs-date "$Date: 2001/04/29 16:00:17 $"
    Rights: "Copyright (C)...
>> read %rebol.r.....
== {
REBOL [
    Title: "REBOL Extended Definitions"
    Date: cvs-date "$Date: 2001/04/29 16:00:17 $"
    Rights: "Copyright (C)...
Trust me, these files do not exist: [ %rebol.r.  %rebol.r..... ]
I'm on WInXP NTFS, can anyone try linux or another filesystem ?
Sunanda
11-Feb-2005
[158]
No such problem on Win98   -- tried it with the live and latest betas.
PeterWood
11-Feb-2005
[159x2]
I'm on Win/XP and got this with Core 2.5.6

>> print read %rebol.r
REBOL[
    Title:   "REBOL Extended Definitions"
]

feedback: func [
    "Send REBOL feedback."
][

    print "Go to http://www.rebol.com/feedback.htmlto send feedback."
]
There is a file rebol.r in the directory where rebol0301.exe
Anton
11-Feb-2005
[161x4]
Actually, this looks like a WindowsXP or NTFS problem, not a problem 
of rebol at all, because I can "Run D:\Anton\Dev\Rebol\View\rebol.r...." 
and my text editor (associated with .R files) pops up to edit rebol.r
Peter, now do this:
print read %rebol.r.......
(including all those extra period markers.....)
PeterWood
11-Feb-2005
[165x2]
When I tried the same with Rebol 2.5.8 which is just sitting on my 
desktop and got 

>> print read %rebol.r

** Access Error: Cannot open /C/Documents and Settings/Peter/Desktop/rebol.r
** Near: print read %rebol.r
Same results with the periods
Anton
11-Feb-2005
[167x3]
That's a different issue. Try the bolded code exactly as above.
Ok. So you see the bug too.
Sunanda, are you using NTFS ?
Sunanda
11-Feb-2005
[170]
No, just plain FAT
Anton
11-Feb-2005
[171]
So problem on WinXP/NTFS,  no problem on Win98/FAT. Definitely not 
a problem of rebol. I hesitate to post a RAMBO ticket.
DideC
11-Feb-2005
[172x2]
Anton: what "list-dir" give you as result ???
And "what-dir" ???
Anton
11-Feb-2005
[174x2]
Just the one file, trust me :)
The bug is shown for any file, not just rebol.r
Gabriele
11-Feb-2005
[176]
i can confirm your observation
Anton
11-Feb-2005
[177]
eg. rebol.exe....
Gabriele
11-Feb-2005
[178x2]
looks like ntfs ignores leading dots
what can you expect from ms...
Anton
11-Feb-2005
[180]
yeah... trailing you mean. :)
>> exists? %...rebol.r
== false
>> exists? %rebol.r....
== true
Pekr
11-Feb-2005
[181x3]
has anyone found out the cause for red icons in IOS?
I noticed one entry in RAMBO from Oldes or someone else, describing 
incorrect handling of timezones or something like that ...
but dunno if it is realted or not ....