From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,74d953d10520ed5e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-29 13:30:38 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: rm@gunlab.com.ru (Roman V. Isaev) Newsgroups: comp.lang.ada Subject: Re: using charles library Date: 29 May 2003 13:30:38 -0700 Organization: http://groups.google.com/ Message-ID: References: NNTP-Posting-Host: 195.151.20.194 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1054240238 512 127.0.0.1 (29 May 2003 20:30:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 29 May 2003 20:30:38 GMT Xref: archiver1.google.com comp.lang.ada:38012 Date: 2003-05-29T20:30:38+00:00 List-Id: > > 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.