comp.lang.ada
 help / color / mirror / Atom feed
From: rm@gunlab.com.ru (Roman V. Isaev)
Subject: Re: using charles library
Date: 29 May 2003 13:30:38 -0700
Date: 2003-05-29T20:30:38+00:00	[thread overview]
Message-ID: <d3ba4d4c.0305291230.7263291e@posting.google.com> (raw)
In-Reply-To: slrnbd6fk0.31i.randhol+abuse@kiuk0152.chembio.ntnu.no

> > I would not touch Gtk stuff with a ten-foot pole. Gtk on WinXX performance
> > is a joke and even Gtk on X11 performance is lousy (I always compile freeciv
> > with Xaw3D because of that despite of Xaw3D interface strangeness). Seeing 
> > simple windows redraw themselves in times of common 1Ghz+ computers is Not
> > Right. 
> Huh? I use Gtk on my old 166Mhz and I don't these problems, not even on
> faster computers (1GHz). But I think you are refering to the lack of
> double buffering in the Gtk 1.2. As I understand this is fixed in 2.2.
> However I have not experienced this. Please explain a bit more which
> programs you see this and what happens.

   Just start GVD on WinXX and go to preferences. Every tab is so 
jerky, they redraw themselves several times and it's quite visible. 
Most funny are Source and Data tabs, when you click them widgets 
run around like cockroaches before settling on their places. May be 
it's fixed in 2.2 but all I see is only 1.3 for win available for 
download. I'm not that brave to venture into compiling 2.0 on windoze 
and I see no 2.2 at all there at http://libre.act-europe.fr/GtkAda/ :)
   Sluggish Gtk behaviour makes applications look sloppy and low-quality.
 
> Freeciv works nice with Gtk on both my old machine and the faster onces
> as far as I can see. But Gtk is not for action games if that is what you
> mean.

   Freeciv isn't an action game. I see it as normal program 
with GUI.  I mean only interface speed and snappiness (damn, don't 
know how to say). Gtk feels very laggy, no matter c++ or ada was used.

> At any rate you can have a look at how they did it with the gettext :-)

   They didn't. If you want to use gettext you have to haul 
its dll on winXX and use -lintl on unix. They simply made binding 
for C gettext library (and no ada parser so far). 
   I wrote tiny library that loads .mo files and translates text 
using table from that file as I played with Ada:

package TinyGetText is

procedure LoadMoFile(filename: string);
function GetText (E : String) return String;
function "-" (E : String) return String; -- alias for GetText

end TinyGetText;

Using it: 

LoadMoFile("make.mo");
Put(-"write jobserver"); New_Line;

If anyone interested I can publish it (although code is crappy 
by any standard and doesn't handle errors well, it's my first 
experience with ada dammit). I don't like its dependency on charles 
library, gettext package should come alone (unless ada gets 
something like perl CPAN interface and autodownload of dependent 
libraries) or depend only on standard library (not GNAT 
specific). .mo files alredy come with precomputed hash, but 
I don't know Ada well enough to make this package work with 
hash yet :)

> > Anyway, this isn't the main reason. The main reason is to learn
> > some Ada, I have to start somewhere and I'll need translation code
> > anyway. Recently I dug out some old father's Pascal code that does
> > some scientific calculations.  It needs user interface and cleanup.
> > Don't want to use Delphi. Many years ago I did an interface for it,
> > using Clarion 2.1 for DOS, but program wasn't released :) Now I
> > want to use AWS (I'm playing with it right now and it's amazing) so
> > the interface would be accessible via TCP/IP and the program would
> > be extremely portable (to run it on the openbsd server in demo
> > mode).  Scientific code produces lengthy text output, right now
> > only cyrillic, and that output has to be translated somehow. I want
> > to use gettext .mo files because I like poEdit and I want to give
> > it to my father to translate most of his messages (I don't know a
> > damn in oil field science). Didn't try to run xgettext on ada
> Oh, interesting. What was the program used for?

   Calculating oil well characteristics given certain pump, pipes,
fluid type and other 70+ parameters... but I'm afraid it might 
be faster to take all math and write anew than wade through 
fortran-like code, and I won't have enough spare time for either 
endeavour.



  reply	other threads:[~2003-05-29 20:30 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-26 13:27 using charles library Roman V. Isaev
2003-05-26 13:40 ` Preben Randhol
2003-05-26 16:44   ` Roman V. Isaev
2003-05-26 17:05     ` Preben Randhol
2003-05-26 17:10       ` Preben Randhol
2003-05-26 22:05         ` Roman V. Isaev
2003-05-26 17:16     ` Jeffrey Carter
2003-05-27 15:05       ` Matthew Heaney
2003-05-27 18:28         ` Stephen Leake
2003-05-26 17:20     ` Preben Randhol
2003-05-26 22:46       ` Roman V. Isaev
2003-05-27  4:35         ` Gautier Write-only
2003-05-29 17:29           ` Roman V. Isaev
2003-05-29 18:56             ` Gautier Write-only
2003-05-29 23:19             ` Gautier Write-only
2003-05-30  7:56               ` Roman V. Isaev
2003-05-30 13:49                 ` Gautier
2003-05-30 14:36               ` Robert C. Leif
2003-05-30 17:32                 ` Preben Randhol
2003-05-30 19:21               ` Randy Brukardt
2003-05-31 11:50                 ` Gautier Write-only
2003-05-31 14:24                   ` Bill Findlay
2003-06-01  3:42                   ` Randy Brukardt
2003-06-02 11:02                   ` Georg Bauhaus
2003-06-02 20:25                     ` Gautier Write-only
2003-05-30  8:48             ` Preben Randhol
2003-05-27 10:31         ` Preben Randhol
2003-05-29 20:30           ` Roman V. Isaev [this message]
2003-05-30  9:01             ` Preben Randhol
2003-05-30 22:02               ` Roman V. Isaev
2003-05-31 13:34                 ` Preben Randhol
2003-05-27 18:27     ` Stephen Leake
2003-05-27 20:24 ` Matthew Heaney
replies disabled

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