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

Anton
22-Feb-2005
[219x2]
DIR?  -  This function, useful as it is, is confusing, because it 
is not obvious that it goes to the filesystem or network to check. 
Perhaps it should be called EXISTS-DIR?

I also feel the lack of a function just to see if a file or url ends 
with a slash. If you work with the filesystem at all you quickly 
find yourself checking for final slashes all the time. Here is my 
latest way of detecting that:
#"/" = pick tail file -1

That sure is ugly to put into code all the time, and I keep wishing 
this is what DIR? would do.

I understand that there is probably a huge body of code that would 
be adversely affected by this renaming, so I am looking for a nice 
short name. So far I thought of DIR-SPEC?  (ie. "does this file have 
the specification of a dir ?") but....
.. it doesn't seem short enough.
Romano
22-Feb-2005
[221]
Anton, that are the results of standard split-path that i replicated.The 
only difference is in %"" which gives an error on split-path and 
that result on split-path-3. I have some problems on how path are 
splitted by split-path in some cases, but to change them is a problematic 
thing, because all handlers knows how split-path works and get their 
decisions on it. I am not sure that the better result is [%./ none] 
in the %"" example, because the starting path (%"") is a file of 
name "" like in the %"a" example, where the starting path is a file 
of name "a". In the other 2 examples (%/ %.) the starting path is 
a DIR not a file (and the file is "exactly" none).
Volker
22-Feb-2005
[222]
#"/" = last file ; somehat shorter.
Romano
22-Feb-2005
[223]
Volker: it fails on %""
Volker
22-Feb-2005
[224]
ah. did not read enough.. is that a practical problem? maybe %"" 
should be turned to %"./" automatically on parsing?
Anton
22-Feb-2005
[225]
Romano, you are right. You are fixing rather than changing behaviour.
Romano
22-Feb-2005
[226]
Anon it is hard to say what the result should be in these cases:
	split-path http:// 
	split-path http:/ 

but usually (i think) split-path is not called directly on url, before 
they are splitted with parse-url or with decode-url.
Anton
22-Feb-2005
[227]
Yeah, I wouldn't worry about it. This is a minor minor issue for 
me.
Ammon
22-Feb-2005
[228x3]
Is there anyway to browse tickets in RAMBO?
Being able to browse by Product, Class, Type, etc. would be really 
nice!
Someone posted this to the ML...

I can Encap: [ title 
program 1.0" ]
I gives an error of memory management. is this a bug ?"


I know I ran into this as well but I don't remember what the work 
around is and I can't seem to find it.  This bug doesn't appear to 
be in RAMBO...
eFishAnt
22-Feb-2005
[231]
I was helping him, but didn't see the same trouble.
Gabriele
23-Feb-2005
[232]
that problem should be fixed in the latest sdk betas.
Anton
24-Feb-2005
[233x3]
In #3639, Oldes asks for a request-dir, same as request-file. I've 
always wanted these to be implemented in rebol. So I created my own, 
based on scroll-table.
do http://www.lexicon.net/antonr/rebol/util/demo-request-dir.r
(Tested most recently on View 1.2.57.3.1e)
DideC
25-Feb-2005
[236x2]
>> do http://www.lexicon.net/antonr/rebol/util/demo-request-dir.r
connecting to: www.lexicon.net
Script: "Demo request-dir" (28-Dec-2003)
Script: "scroll-table style" (7-Mar-2004)
Script: "List Sort Button" (10-Dec-2003)
Script: "header-group" (7-Feb-2004)
connecting to: www.lexicon.net

Include: Couldn't load-thru http://www.lexicon.net/anton/rebol/util/request-dir.r
** Script Error: request-dir has no value
** Near: request-dir/initial %./
The url in the "Include" line is wrong : there is "anton" and upper, 
there is "antonR"
Gabriele
25-Feb-2005
[238x2]
I think Carl posted a REQEUST-DIR to the ml long ago too, didn't 
he?
*REQUEST-DIR
DideC
25-Feb-2005
[240x2]
And I have modified it and put back in the library.
http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=request-dir.r
Anton
25-Feb-2005
[242x2]
DideC, I moved site. You must update. Do this, then try again:

load-thru/update http://www.reboltech.com/index.r[folder "Anton"]

(and sorry about that - one day soon, all this will not be necessary)
(err. [foler "Anton"] is not necessary in the above line, but it 
will still work)
DideC
26-Feb-2005
[244]
Yes ok, it works now, thanks.
There is not only folders in your request-dir ?!!
Anton
26-Feb-2005
[245x2]
eh? what do you mean ? Oh do you mean you can also see files at the 
bottom of the list ? Yes, that is by design. But the directories 
are the only items that are selectable. It always annoyed me not 
to be able to see all the contents of a directory in other directory 
selectors.
About incompatibility between versions of Rebol;  I think Rebol could 
benefit, as I have gleaned from other projects out there, from a 
strict cycle of 1/ feature additions,  2/ bug fixes,  and maybe 3/ 
a final category for "difficult" additions or changes (causing incompatibility 
with prior versions).
Anton
27-Feb-2005
[247x3]
>> site
== http://www.lexicon.net/antonr/rebol/
>> site/1.s3m
** Syntax Error: Invalid decimal -- 1.s3m
** Near: (line 1) site/1.s3m
paths too strict again ? (did I bring this up before  ?)
Hard to fix though, because I think a LOAD is done on each path element.
Izkata
27-Feb-2005
[250]
>> site:  http://www.lexicon.net/antonr/rebol/
== http://www.lexicon.net/antonr/rebol/
>> site: join site {1.s3m}
== http://www.lexicon.net/antonr/rebol/1.s3m

Why does everyone try it that way, Anton?
Romano
27-Feb-2005
[251x2]
Anton: good point, i think that the path loader could be more relaxed 
on 2nd to last slot.
Also if i always thought that this file/url paths are a little strange.
Anton
28-Feb-2005
[253]
I'll make a RAMBO ticket then. Any objections?
Izkata
28-Feb-2005
[254]
None from me, but no one answered why peeps use site/whatever instead 
of join site {whatever}
Anton
2-Mar-2005
[255]
Your question was ambiguous (ie. which way were you referring to 
- the first or second way?). Anyway, the answer is: "Less typing".
Izkata
2-Mar-2005
[256]
ah.. sorry lol
Anton
3-Mar-2005
[257]
Posted the ticket.
Anton
9-Mar-2005
[258]
I don't like this behaviour:
>> 2147483648
== 2147483648.0
I would prefer an integer!
Henrik
9-Mar-2005
[259]
me too. I wanted it for the EAN13 barcode generator
Romano
9-Mar-2005
[260]
that can't be a signed integer
Izkata
9-Mar-2005
[261]
Apparently decimals have more precision or something:
>> 1234567890123
== 1234567890123.0
>> to-integer 1234567890123
** Math Error: Math or number overflow
** Where: to-integer
** Near: to integer! :value
Volker
10-Mar-2005
[262]
more precision, and they remember the decimal point. and throw away 
the littlest digits.
Anton
10-Mar-2005
[263]
Sorry Romano, I meant it to be negative. -2147483648 becomes a decimal! 
too. This is a problem for code that deals with flags etc. I have 
some code for FMOD and one of the flags uses the highest bit, but 
it gets loaded to a decimal! :-/  I do not wish to make a special 
test for that case. I wonder if this behaviour is really necessary, 
so I would like to make a wish report.
Gabriele
10-Mar-2005
[264]
anton: i think that bug is on rambo already, posted by romano.
JaimeVargas
10-Mar-2005
[265]
Anton you can use bitsets and to-binary bitset! to handle flags it 
should make your life easier.
Romano
10-Mar-2005
[266]
it is not a wish it is a bug :-)
Gabriele
10-Mar-2005
[267]
romano, which one?
Romano
10-Mar-2005
[268]
- 2147483648