[REBOL] Re: issue-to-tuple

2002-04-22 Thread rebol-list

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 100 [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 100 [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 100 [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 100 [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


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.




[REBOL] Re: issue-to-tuple

2002-04-16 Thread X


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?
 
 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

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.

---
Príchozí zpráva neobsahuje viry.
Zkontrolováno antivirovým systémem AVG (http://www.grisoft.cz).
Verze: 6.0.231 / Virová báze: 112 - datum vydání: 12.2.2001

---
Odchozí zpráva neobsahuje viry.
Zkontrolováno antivirovým systémem AVG (http://www.grisoft.cz).
Verze: 6.0.231 / Virová báze: 112 - datum vydání: 12.2.2001


--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the
subject, without the quotes.




[REBOL] Re: issue-to-tuple

2002-04-15 Thread Gregg Irwin

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

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.




[REBOL] Re: issue-to-tuple

2002-04-15 Thread Anton

How about

to-tuple form issue

Anton.

  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

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.




[REBOL] Re: issue-to-tuple

2002-04-15 Thread Gregg Irwin

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. #FF), but I could be wrong. Yours
is better if they're in tuple-normal form.

--Gregg

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.