March 08, 2005
It's worth noting that the ICU libraries have pretty extensive support (tools also) for externalizing locale-specific resources and so on. This is supported in D via the mango.icu package at dsource.org



Anders F Björklund wrote:
> Andrew Fedoniouk wrote:
> 
>> Anders, again, I am not speaking about OS resources.
>>
>> I am speaking about simple static initializers.
>> I would like to be able to say:
>>
>> static byte[] FFTable = import(....my.binary.module.name....);
>> instead of writing it as constants in-line.
> 
> 
> Ah, OK, now I understand. I put those in modules,
> and then I import those modules from the D code.
> 
> Like:
> 
>> private import iso88591;
>> private import macroman;
>>
>>         wchar[256] mapping = iso88591.mapping;
>> //      wchar[256] mapping = macroman.mapping;
> 
> 
> Just that: a) those are pretty rare, compared to
> regular resources b) modern CPUs hates lookups...
> 
> 
> Other "real" resources, like any images and localized
> strings and GUI layout components and icons and so on
> should not be mixed the code - except for maybe a final
> packaging step, like you say : dragging just one icon is
> easier than running an installer and getting 100 files.
> I'll consider this issue settled, and not really for D.
> 
> BTW; I just use Perl to dump any such binaries into code,
>      if I do need to include them in D for any reason...
>      (i.e. preprocessing, instead of the import pragma)
>      Sorta like the XPM image format, if you know that ?
> 
> --anders
March 08, 2005
> Just that: a) those are pretty rare, compared to
> regular resources b) modern CPUs hates lookups...
>
> Other "real" resources, like any images and localized strings and GUI layout components and icons and so on should not be mixed the code - except for maybe a final packaging step, like you say : dragging just one icon is easier than running an installer and getting 100 files. I'll consider this issue settled, and not really for D.

"icons and so on should not be mixed the code"

"Icons and so" are integral parts of GUI application.
GUI application just does not work without them.

Consider themed UI app. Default theme implementation must be always available.

"b) modern CPUs hates lookups"

I didn't get this, what do you mean?

>
> BTW; I just use Perl to dump any such binaries into code,
>      if I do need to include them in D for any reason...
>      (i.e. preprocessing, instead of the import pragma)
>      Sorta like the XPM image format, if you know that ?

I am using my C-SMILE for that. Other guy is using
Python, etc.
Do you want to see something like this
"To build this D project you need a Perl/whatever runtime"....

Do you know why .NET is winning? Because of
good development tools.
In D situation community should try to simplify dev process
and probably re-think some standard approaches.



March 08, 2005
Andrew Fedoniouk wrote:

> "icons and so on should not be mixed the code"
> 
> "Icons and so" are integral parts of GUI application.
> GUI application just does not work without them.

Yes, but they are easier to edit with a GUI editor ?

They should go with the ready application, of course,
but I'm not sure about including them in the source code ?

> "b) modern CPUs hates lookups"
> 
> I didn't get this, what do you mean?

I meant lookup tables for things like multiplication or
sine or other things that one used to put in such tables...

These days one tries to calculate as much as possible,
since accessing the memory is slower than doing the math.

--anders
1 2 3 4
Next ›   Last »