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

Gabriele
15-Mar-2006
[1626]
also, yes, found? is the default way to make a value into a logic! 
. not is also a nice way to do that, when you can/need to reverse 
the logic.
Robert
17-Mar-2006
[1627x2]
found? is the most elegant one so far. But the word's meaning isn't 
that good in such a case. I didn't searched anything...
Using EITHER and hence mapping the result on TRUE or FALSE is IMO 
a hack. It works (that's how I do it) but it's not logical. Maybe 
a refinment for ANY and ALL makes sense.
	ALL/logical and ANY/logical

I can see situations where it's very handy that ANY will return the 
result of some actions and not only TRUE and FALSE.
Gregg
17-Mar-2006
[1629x2]
You can use TO LOGIC! directly, or write a mezz with a better name, 
that wraps it.
Something like RESULT? maybe, and it could also handle unset values 
if that's needed.
Rebolek
17-Mar-2006
[1631]
Robert: I think, ANY and ALL are meant for little bit 'wilder' things 
than returning TRUE or FALSE. Remember they return *AT* first false 
or none, it's not that they should return FALSE - which is important

simple example
>> a: 5
== 5
>> all [a < 3 a: a + 1]
== none
>> a
== 5
>> a: 1
== 1
>> all [a < 3 a: a + 1]
== 2
>> a
== 2
Robert
17-Mar-2006
[1632]
Yes, I know. And I often use this feature as well. That's why I think 
the refinement approach is best.
ChristianE
17-Mar-2006
[1633x4]
>> true?: :found?
>> true? all [conditon-1 conditon-2 conditon-3]
>> true? any [conditon-1 conditon-2 conditon-3]
A bit surprising though is:
>> true? all []
== true
At least it conforms to it's description saying "Shortcut AND. Evaluates 
and returns at the first FALSE or NONE." There was no first none 
or false.
[unknown: 10]
20-Mar-2006
[1637x3]
double colors in 'draw dilect does crsh view... Is that known?
Without the use of line-pattern..
effect: [ draw [ 
			pen gray silver
			line-width 15
			line-join round        
			line 22x220 150x350
	 ] ]
Anton
21-Mar-2006
[1640]
I confirm on WinXP.
DideC
21-Mar-2006
[1641]
So am I.
Maxim
21-Mar-2006
[1642]
discovered it last week... I imagined it was a known bug... but I 
didn't check  ':-/
DideC
21-Mar-2006
[1643x2]
It's in RAMBO #4040 http://www.rebol.net/cgi-bin/rambo.r?id=4040&
Cyphre said it's fixed, but not release yet (if I understand correctly)
Rebolek
21-Mar-2006
[1645]
Yes, I think I reported that bug to Cyphre during work on Compo demo. 
I hope there will be upgrade to View to fix this and other bugs, 
but I'm afraid that with R3 behind the door (you now, in just couple 
of days we're going to see the roadmap ;-), bugfixes for current 
View will be late.
Pekr
21-Mar-2006
[1646x2]
:-) so we've got more couples of days, so what :-)
but look, I am not sure - Carl told us that submissions for 1.3.3 
should be submitted by us .... why Rebol 3.0 should prevent new View 
release, if bugs are already fixed? It is worth release then, even 
if no new additional functionality is released (as rich-text etc.)
Anton
25-Mar-2006
[1648]
Just noticed daylight savings ended. Windows changed the timezone 
from +11:00 to +10:00, but rebol still reports 
>> now
== 26-Mar-2006/2:09:58+11:00
Vincent
26-Mar-2006
[1649]
RAMBO #3650 "crc32 function added to checksum" - I have just contributed 
a crc32 function to the rebol library. It's quite slow, but the rebcode 
version is fast enough. CRC-32 is still used by common tools (archivers...), 
and an implementation in the 'checksum native would be useful.
Graham
26-Mar-2006
[1650]
Do all these crc functions require the whole file to be read into 
memory?
Vincent
26-Mar-2006
[1651x2]
Yes - both the native 'checksum and the published 'crc-32 works on 
a string! or a binary!, not a port! . For crc-32, the crc must be 
initialized at start, and complement'ed (bitwise 'not) at end.
- I have an internal function in crc32.r who allows working with 
big files and stream, but it isn't fully documented.
Graham
26-Mar-2006
[1653]
does it work though ?  :)
Vincent
26-Mar-2006
[1654]
well, I hope so - it's the fundamental brick ;) but it's not intuitive, 
usage exemple (depends of port access mode...): 

crc: -1 while [not empty? data] [ctx-crc-32/update-crc data crc data: 
copy/part source length] crc: crc xor -1
Graham
26-Mar-2006
[1655]
so, it has minimal memory use with gigabyte size files?
Vincent
26-Mar-2006
[1656]
crc-32.r with gigabytes files: [don't do it] - it works, the memory 
used isn't size relative - but on a 1GHz PIII, the speed is < 300 
kbytes/s! 
rebcode version is a lot faster (>2Mbytes/s), but 
1) rebcode isn't part of official releases 
2) the rebcode version of 'crc-32 needs whole file in memory.

so, back to RAMBO: #3650 - I vote for 'crc32 as another 'checksum/method, 

and maybe a RAMBO ticket for a port aware version of 'checksum would 
be a good idea.
Oldes
6-Apr-2006
[1657x3]
I think this is a bug:
>> read http://www.paseka.cz/obalky%5C80-7185-652-5.jpg

** User Error: URL error: http://www.paseka.cz/obalky\80-7185-652-5.jpg
** Near: read http://www.paseka.cz/obalky\80-7185-652-5.jpg
What can I do?
I don't want to translate the url encoded chars:(
>>  http://www.paseka.cz/obalky%5C80-7185-652-5.jpg
== http://www.paseka.cz/obalky\80-7185-652-5.jpg
Anton
6-Apr-2006
[1660x2]
This works:

>> net-utils/url-parser/parse-url port: make port! [scheme: 'http] 
"http://www.paseka.cz/obalky%5C80-7185-652-5.jpg"
>> port/target
== "obalky%5C80-7185-652-5.jpg"
>> port: open port
connecting to: www.paseka.cz
>> close port
>> port: open/binary port
connecting to: www.paseka.cz
>> bin: copy port
== #{
FFD8FFE000104A46494600010100000100010000FFDB00430008060607060508
0707070909080A0C140D0C0B0B0C1912130F141D1A1F1E1D1A1C1C20242E...
>> close port
>> image: load bin
== make image! [200x280 #{
968662958665918168584B3A2A1D15281E1C241B1C1D1717211D1C211D1A
1F1E1A1F1E1A1F1D1E1F1D20211C23211C23211C202...
(Oops! Obviously you can remove the first open & close port in text 
mode. Not necessary.)
Oldes
6-Apr-2006
[1662]
I understand, thanks. Anyway, I submited it into Rambo.
Anton
6-Apr-2006
[1663]
Ahh.. of course you do! (I thought it was strange me helping Oldes.)
Gabriele
6-Apr-2006
[1664x2]
encode the % as %25
ie. use http://www.paseka.cz/obalky%255C80-7185-652-5.jpg
Cyphre
7-Apr-2006
[1666x4]
what about this?
read to-url "http://www.paseka.cz/obalky%5C80-7185-652-5.jpg"
or more correct in this case:

pic: load read/binary to-url "http://www.paseka.cz/obalky%5C80-7185-652-5.jpg"
sorry, this is correct:

 pic: load to-url "http://www.paseka.cz/obalky%5C80-7185-652-5.jpg"
Ladislav
19-Apr-2006
[1670]
I am having a serious problem:

    parse [*] ['*] ; == true

but

>> parse [/] ['/]
** Syntax Error: Invalid word-lit -- '
** Near: (line 1) parse [/] ['/]


The same problem exists for '// . Is there a way how to circumvent 
it?
Rebolek
19-Apr-2006
[1671]
I'm afraid there isn't. This is same as the "comma bug"

>> parse [.]['.]
== true
>> parse [,][',]
** Syntax Error: Invalid word -- ,
** Near: (line 1) parse [,][',]
Pekr
19-Apr-2006
[1672]
it seems 'parse needs some overhaul?
Ladislav
19-Apr-2006
[1673x3]
this is the way: parse [/] [set w word! (nx: unless w = first [/] 
[[end skip]]) nx]
the same way can be used for [.]
(but is is not very elegant, I admit)