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

François
20-Feb-2006
[1576]
Hi, i just posted a new bug on rambo: When calling 'request-file 
and clicking on Cancel, the value returned is %none instead of none 
--> makes more complicated to test the returned value. I tested under 
Windows XP
Graham
20-Feb-2006
[1577]
>> type? request-file
== none!
François
20-Feb-2006
[1578x4]
Well, you are right, from the console, it is ok, but try from a script... 
I have %none and file! as as result
My mistake!!! Sorry!
It works, indeed...
Just send a feedback to RT to ask them to disregard the rambo ticket
Gabriele
20-Feb-2006
[1582]
deleted
Volker
7-Mar-2006
[1583x5]
Interesting memory-bug
filet!: context [filet: none]
spec: [filet: 1]
fil: make filet! spec
recycle probe stats
repeat i 10000[
 fil: make make filet! spec fil
]
recycle probe stats
repeat i 10000[
 fil: make make filet! spec third fil
]
recycle probe stats
make object! object! does not release.
make object third object! does.
(thats like make object! block!
linux 1.3.2
Is this repeatable, and clear enough for rambo?
JaimeVargas
7-Mar-2006
[1588]
Do you want me to test in OSX?
Volker
7-Mar-2006
[1589]
Good idea.
JaimeVargas
7-Mar-2006
[1590]
I don't understand the error. Do you want the output I am getting?
Volker
7-Mar-2006
[1591x4]
Yes.
Its three memory-stats (after recycle).
all should be same, or similar low.
the second is a lot higher, because the objects from the first loop 
are not relased.
JaimeVargas
7-Mar-2006
[1595x2]
Well after the make I get errors.
The data is:
run1: 1716394
run2: 3396726
run3: 1717126
Volker
7-Mar-2006
[1597x2]
Thanks. That confirms the bug.
Niow i need a good description..
JaimeVargas
7-Mar-2006
[1599x2]
I think the description is precise enough. make object! object! Not 
releaseing is bad. (Dangling pointers)
Good catch.
Gabriele
8-Mar-2006
[1601]
hmm, but memory is released at the next non object-object make, no?
Volker
8-Mar-2006
[1602]
Seems so. But i had a memory-leak by this. Seems making objects is 
not that common when the gui is set up. Then extend incomming objects 
with a default one, in that case it drove me mad.
Ashley
13-Mar-2006
[1603]
Anyone had problems with 'switch and datatype! I've reduced the problem 
down to:

t: func [v] [
	select [
		#[datatype! integer!]	["A"]
		#[datatype! decimal!]	["B"]
		#[datatype! block!]	["C"]
	] type? v
]

>> t 1
== ["A"]
>> t 1.0
== ["B"]
>> t []
== decimal!

Unless there's an obvious explanation, I'll RAMBO it.
Gabriele
14-Mar-2006
[1604x3]
the explanation is this:
>> find [1 a []] block!
== [[]]
>> find [1 a []] word!
== [a []]
>> find [1 a []] integer!
== [1 a []]
so, use type?/word
Robert
14-Mar-2006
[1607x2]
Is this intended?
>> all [true true true]
== true
>> all [true true false]
== none
>> all [false false false]
== none
Why don't I get back FALSE in the 2nd and 3rd case?
Pekr
14-Mar-2006
[1609x2]
hmm, strange, it should be false imo :-)
RAMBO it, please, they will dismiss it at max, if it is not a bug, 
but I think it is ...
Robert
14-Mar-2006
[1611]
Ok, submitted.
Gabriele
14-Mar-2006
[1612]
not sure if it can be said to be a bug, but i see the reasoning about 
wanting false there, so maybe it can be changed.
Ashley
14-Mar-2006
[1613]
Thanks Gabriele, *so* obvious in hindsight (my workaround was to 
move the block! condition to the top of the list, but type?/word 
is a good refinement to remember!)
Coccinelle
15-Mar-2006
[1614x2]
If all [true true false] should return false, all [true true none] 
should return false or none ?
same question for any : any [false false false]  should return false 
or none ?
Gabriele
15-Mar-2006
[1616x2]
any is more difficult to change it that case. any "returns the first 
value that is not none or false". there is no such value in that 
block - so what should it do?
should it return the last value anyway?
Coccinelle
15-Mar-2006
[1618]
For me any and all should never return false. That's my opinion.
Robert
15-Mar-2006
[1619x3]
The problem I see is that I often use ANY and ALL as a condition 
and it it returns NONE I can't do anything with it. IMO this pattern 
should be possible:
	either ANY [...][yes][no]
DESCRIPTION:

     Shortcut AND. Evaluates and returns at the first FALSE or NONE.
     ALL is a native value.
How about returning than either FALSE or NONE which every was hit? 
That makes sense to me. So I can ensure that my app returns FALSE 
and that this value is returned. But now I return FALSE and get back 
NONE.
Rebolek
15-Mar-2006
[1622]
If you want to return FALSE instead of NONE, use FOUND?

>> found? any [true true false]
== true
>> found? all [true true false]
== false
Pekr
15-Mar-2006
[1623]
:-)
Coccinelle
15-Mar-2006
[1624]
I don't see the problem with either any [...][yes][no] :
>> either ANY [true false]["yes"]["no"]
== "yes"
>> either ANY [false false]["yes"]["no"]
== "no"
Gabriele
15-Mar-2006
[1625]
robert: either takes any value, false or none are "false", anything 
else is "true".