[Cuis] [Comment] ColorArray and Color

H. Hirzel hannes.hirzel at gmail.com
Thu Feb 7 09:46:57 CST 2013


Hello Juan

On 2/7/13, Juan Vuletich <juan at jvuletich.org> wrote:
> Hi Hannes,
>
> You're right. I'll add your comment.
>
> BTW, this is only using when hibernating a ColorForm... And it makes me
> wonder, does it make any sense to hibernate Forms with our
> multi-gigabyte RAMs?

I assume so still.

In ContentPack, I'd like to load 60...300 color pictures for an ABC book.

    https://github.com/hhzl/ContentPack

At the moment I only have 8 pictures. That is a limitation of the way
I store the instances of Form in source code; I need to do it in
compressed format with instances of ByteArray; and that is probably a
better way of efficiently storing pictures, even in the image).

And as we are talking about Unicode. Instances of the class Form use
by far the largest amount of memory in Cuis4.1 (SpaceTally). So it
pays off to do some considerations how to manage them efficiently.

BTW compared to that it seems not so important if a character uses 8
bit or 32 bit in an instance of String. There are about 17000
instances of the class String in Cuis.
For Unicode support I see several possible solutions (3...5).

Regards
Hannes Hirzel


>
> On 2/6/2013 8:29 AM, H. Hirzel wrote:
>> I am not surprised because it seems to be of use only for  ColorForm
>> internally.
>>
>> But it is a nice example of a variableWordSubclass
>>
>>        ArrayedCollection variableWordSubclass: #ColorArray
>>
>> --Hannes
>>
>> On 2/5/13, Ken Dickey<Ken.Dickey at whidbey.com>  wrote:
>>> On Tue, 5 Feb 2013 09:36:20 +0000
>>> "H. Hirzel"<hannes.hirzel at gmail.com>  wrote:
>>>
>>>
>>>>         "ColorArray stores Color instances in a compact way as 32 bit
>>>> integers (words).
>>>>          It is used by the class ColorForm."
>>>>
>>>> Ken, is this correct? I only see that the class is actually use in
>>> I do not know.  I have never used it.
>>>
>>> -KenD
>>>
>>> _______________________________________________
>>> Cuis mailing list
>>> Cuis at jvuletich.org
>>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>>
>> _______________________________________________
>> Cuis mailing list
>> Cuis at jvuletich.org
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>
>
>
> _______________________________________________
> Cuis mailing list
> Cuis at jvuletich.org
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>




More information about the Cuis mailing list