issue-to-tuple
[1/7] from: oliva:david:seznam:cz at: 15-Apr-2002 14:27
Hello all,
Does anybody know, if there is better way how to convert issue to
tuple then this one?
issue-to-tuple: func[clr ][
to-tuple load head insert tail insert next clr: mold clr "{" "}"
]
Thanks Oldes
[2/7] from: greggirwin:mindspring at: 15-Apr-2002 17:21
Hi Oldes,
<< Does anybody know, if there is better way how to convert issue to
tuple then this one?
issue-to-tuple: func[clr ][
to-tuple load head insert tail insert next clr: mold clr "{" "}"
]
>>
I don't know if it's better, but here's what I came up with from tinkering a
bit.
issue-to-tuple: func[clr ][
to-tuple debase/base clr 16
]
--Gregg
[3/7] from: anton::lexicon::net at: 16-Apr-2002 11:36
How about
to-tuple form issue
Anton.
[4/7] from: greggirwin:mindspring at: 15-Apr-2002 22:27
Hi Anton,
<< to-tuple form issue >>
I guess it depends on the format of his issue! values. From his original
post I deduced it was hex format (e.g. #FFFFFF), but I could be wrong. Yours
is better if they're in tuple-normal form.
--Gregg
[5/7] from: rebolek:seznam:cz at: 16-Apr-2002 7:53
>How about
>
> to-tuple form issue
>
>Anton.
If I understand it well Oldes needs that function for converting hexa
RGB values to REBOL format so this won't work.
I vote for [to-tuple debase/base clr 16] :)
rbb
> << Does anybody know, if there is better way how to convert issue to
> tuple then this one?
<<quoted lines omitted: 9>>
> ]
> --Gregg
--
To unsubscribe from this list, please send an email to
[rebol-request--rebol--com] with "unsubscribe" in the
subject, without the quotes.
---
Pr=EDchoz=ED zpr=E1va neobsahuje viry.
Zkontrolov=E1no antivirov=FDm syst=E9mem AVG (http://www.grisoft.cz).
Verze: 6.0.231 / Virov=E1 b=E1ze: 112 - datum vyd=E1n=ED: 12.2.2001
---
Odchoz=ED zpr=E1va neobsahuje viry.
Zkontrolov=E1no antivirov=FDm syst=E9mem AVG (http://www.grisoft.cz).
Verze: 6.0.231 / Virov=E1 b=E1ze: 112 - datum vyd=E1n=ED: 12.2.2001
[6/7] from: anton:lexicon at: 16-Apr-2002 17:01
Yes, I thought there must be more to it after I posted.
It always pays to think what the original problem is.
Anton.
[7/7] from: oliva:david:seznam:cz at: 22-Apr-2002 10:34
Hello all,
>>How about
>>
>> to-tuple form issue
>>
>>Anton.
X> If I understand it well Oldes needs that function for converting hexa
X> RGB values to REBOL format so this won't work.
X> I vote for [to-tuple debase/base clr 16] :)
Yes, you are right Bolek, I need it for converting hexa RGB values in my
Rebol/Flash dialect (my first reason why to use issue datatype ever:).
I've reduced the problem just just for converting issue to binary
(because there is no problem to convert binary to proper tuple) and did some
quick test:
REBOL/VIEW
>> to-binary #234311
== #{323334333131}
>> issue-to-binary: func[clr ][load head insert tail insert next mold clr "{" "}"]
>> issue-to-binary #234311
== #{234311}
>> t1: now/precise loop 1000000 [issue-to-binary #234311] t2: now/precise t2/time - t1/time
== 0:00:07.08
>> issue-to-binary: func[clr ][load head insert tail insert head form clr "#{" "}"]
>> t1: now/precise loop 1000000 [issue-to-binary #234311] t2: now/precise t2/time - t1/time
== 0:00:07.32
>> issue-to-binary: func[clr ][load rejoin ["#{" form clr "}"]]
>> t1: now/precise loop 1000000 [issue-to-binary #234311] t2: now/precise t2/time - t1/time
== 0:00:16.604
>> ;with the Brett's debase patch
>> t1: now/precise loop 1000000 [issue-to-binary #234311] t2: now/precise t2/time - t1/time
== 0:00:26.608
>> ;without the patch -> CRASH
So although my solution looks like more complicated, it's much more
faster. The problem is in the DEBASE - Debase is native but with a bug
inside so it's useless:-(
cheers Oldes
PS: latest Rebol/Flash example: http://oldes.multimedia.cz/swf/swf5-clock2.html
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted