comp.lang.ada
 help / color / mirror / Atom feed
From: Blady <p.p11@orange.fr>
Subject: Re: GNOGA - RFC UXStrings package.
Date: Tue, 12 May 2020 10:13:46 +0200
Date: 2020-05-12T10:13:46+02:00	[thread overview]
Message-ID: <r9dlrq$1im8$1@gioia.aioe.org> (raw)
In-Reply-To: 4065382c-ef1f-47c4-a0ea-74d736536447@googlegroups.com

Le 11/05/2020 à 19:44, Jere a écrit :
> On Monday, May 11, 2020 at 4:59:33 AM UTC-4, Blady wrote:
>> Hello,
>>
>> Gnoga (https://sourceforge.net/p/gnoga) internal character strings
>> implementation is based on both Ada types String and Unbounded_String.
>> The native Ada String encoding is Latin-1 whereas transactions with the
>> Javascript part are in UTF-8 encoding.
>>
>> Some drawbacks come up, for instance, with internationalization of
>> programs (see Localize Gnoga demo
>> https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/demo/localize):
>>
>> • several conversions between String and Unbounded_String objects
>> • it isn't usable out of Latin-1 character set, characters out of
>> Latin-1 set are blanked
>> • continuous conversions between Latin-1 and UTF-8, each sent and
>> received transaction between Ada and Javascript parts
>>
>> Two ways of improvement: native dynamic length handling and Unicode support.
>>
...
>>
>> Feel free to send feedback about UXStrings
>> (https://sourceforge.net/p/gnoga/code/ci/dev_1.6/tree/deps/uxstrings/src/uxstrings.ads)
>> specification source code on the forum or on Gnoga mailing list
>> (https://sourceforge.net/p/gnoga/mailman/gnoga-list).
>>
>> Thanks, Pascal.
>> https://blady.pagesperso-orange.fr
> 
> I would be hesitant to use gnatcoll directly.  The one nice
> thing about Gnoga is that (at least previously), it tried not
> to fully rely on GNAT.  Using gnatcoll would be a step in the
> wrong direction in that respect.  From personal experience,
> I used Gnoga to create a program for a GPU module using a variant
> of linux.  If Gnoga suddenly started requiring gnatcoll, then
> that program would no longer work as I was unable to get most
> of Adacore's additional libraries to even compile in that variant
> of linux.  This included gnatcoll.
> 
> Additionally, the library Gnoga already leverages (Simple
> Components [1]) already has some UTF-8 functionality you
> might be able to leverage.  You might check that out.
> 
> One other thing, if you are interested, you might send a
> message to a fellow who goes by Entomy on github.  His
> area of expertise is text parsing, localization, etc. and
> he is experienced in Ada.  He might have some libraries
> or tools you could leverage.  You could probably catch
> him at his twitter pretty easily:
> https://twitter.com/pkell7
> 
> 
> [1]: http://www.dmitry-kazakov.de/ada/strings_edit.htm#Strings_Edit.UTF8.Maps.Unicode_Set
> 

Hello Jere, I agree that GNATColl dependency would be too heavy for 
Gnoga. At least GNATColl might be an inspiration for an implementation goal.

I've checked Simple Components, it might be completed with some parsing 
functions in order to fulfill all Gnoga needs. But I think that UTF-8 
(or UTF-16) internal representation would make too much penalties in 
term of execution time which is critical for Gnoga as server.

That's why I would like to experiment some data structure with smart 
character size (1, 2 or 4 bytes) and smart string length (either static 
or dynamic).

Thanks for the Entomy pointer.

Regards, Pascal.

  reply	other threads:[~2020-05-12  8:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11  8:59 GNOGA - RFC UXStrings package Blady
2020-05-11 17:44 ` Jere
2020-05-12  8:13   ` Blady [this message]
2020-05-12  9:35     ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox