comp.lang.ada
 help / color / mirror / Atom feed
From: "Warren W. Gay VE3WWG" <ve3wwg@cogeco.ca>
Subject: Re: Creating tempfile takes too long: GNAT or Windows bug? (& GtkAda)
Date: Thu, 10 Oct 2002 13:29:10 -0400
Date: 2002-10-10T13:29:10-04:00	[thread overview]
Message-ID: <3DA5B8E6.3010109@cogeco.ca> (raw)
In-Reply-To: slrnaqasl9.93n.randhol+news@kiuk0152.chembio.ntnu.no

Preben Randhol wrote:
> Marin David Condic wrote:
> 
>>Probably because its quicker and easier to use OS calls with C because the
>>OS is written in C. Dipping into an Ada binding to access C stuff always
> 
> In Gnat.OS_Lib
> 
>    function File_Time_Stamp (Name : String) return OS_Time;
>    --  Given the name of a file, Name, obtains and returns the time stamp.
>    --  This function can be used for an unopend file.
> 
>    procedure Delete_File (Name : String; Success : out Boolean);
> 
> :-)
> 
>>feels like an unnatural act and invariably complicates the job. Just another
>>data point indicating it would be useful to have an Ada OS and that the
>>argument "Well, you can always bind to blah blah blah..." is seldom
>>compelling. :-)
> 
> Well if you drag the argument further you might end up with "why use Ada
> at all?".
> 
> Preben who thinks making hacks in Ada is just as fast or faster than C 

I had a feeling this sort of debate would break out if I confessed
to using C for a "solution" ;-)

Since the question was asked, I'll explain my reasons:

  - In my mind, this was a "nuisance assignment"
  - I wanted/needed a GUI front end
  - GtkAda is OK, but I find that it is still bit of a
    struggle to get things right there (some comments on
    this later)
  - I was in a hurry
  - I had MS Visual Studio available and used MFC for
    the GUI to get the job done.

There is no doubt that if I wanted to do this "right", I
would suffer through any barriers there might be for Ada
(and there wasn't/isn't that much of a barrier really). But
the bottom line was that I wanted to do other more fun
things in Ada and this flippin temp file problem needed to
be addressed ASAP.

So to summarize: I was in a hurry, and MS VC was available,
and MFC is/was easy for a simple input GUI form (it accepts
multiple wildcard pathnames, and the # of days to retain
files before deleting them).

Now a point for discussion for GtkAda:

I need to be careful here, because I don't want to criticize
volunteer's efforts in this area. I would rather encourage
them to continue with their efforts, since I think their
goals are in line with most of ours in the Ada & GUI sense.
However, I do have a few concerns about the
implementation as it stands.

Forgive me if I don't quite have the facts correct here, because
it's been a while since I last worked with GtkAda...

My main concern was with the implementation of certain aspects
of GtkAda, concerning the use of typing. It seemed to me that
there are too many places that require "data conversions" to
occur in the application source code (I am thinking of parameters
in certain callbacks where there was some sort of function to
mangle things into the right type). It seems to me that there should
be a better way to handle this correctly. Either through
generics, or through the object'Class mechanism using
inheritance. Converting from a base type to a derived type
would be acceptable IMHO, although it does have the disadvantage
that it is not properly checked until run time (generics OTOH
would catch problems at compile time).

IIRC, there was a certain amount of reliance on a GStrings
package/interface too, which annoyed me (and other seemingly
C like types).  I would have preferred a native String interface
rather than yet another strings package. The numeric types
should not at least look like C types (maybe I'm just being
picky about this one).

Finally, it seems that every time I try to compile a recent
version of GtkAda on FreeBSD, it has numerous
compile and install issues. This puts me off, as it will
any user that must go through this same process. As a result,
I give up and say "try again in a few months".

Are these fair comments? Or am I just getting cranky?

-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg




  reply	other threads:[~2002-10-10 17:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-09 11:58 Creating tempfile takes too long: GNAT or Windows bug? Mário Amado Alves
2002-10-09 14:15 ` BREHMER Philippe,
2002-10-09 16:43 ` tmoran
2002-10-09 17:14 ` Warren W. Gay VE3WWG
2002-10-09 18:40   ` Preben Randhol
2002-10-10 12:06     ` Marin David Condic
2002-10-10 12:29       ` Preben Randhol
2002-10-10 17:29         ` Warren W. Gay VE3WWG [this message]
2002-10-10 19:43           ` Creating tempfile takes too long: GNAT or Windows bug? (& GtkAda) Stephen Leake
2002-10-11 10:59             ` Preben Randhol
2002-10-11 10:46           ` Preben Randhol
2002-10-14 22:51             ` Warren W. Gay VE3WWG
2002-10-15 10:08               ` Preben Randhol
2002-10-11 12:00           ` Marin David Condic
2002-10-11 11:38         ` Creating tempfile takes too long: GNAT or Windows bug? Marin David Condic
2002-10-11 13:57           ` Preben Randhol
2002-10-12 13:14             ` Marin David Condic
2002-10-12 15:01               ` Preben Randhol
2002-10-10 19:44       ` Jeffrey Carter
2002-10-14 12:42         ` Simon Clubley
2002-10-10 14:02   ` Creating tempfile takes too long: GNAT or Windows bug? Solved Mário Amado Alves
2002-10-09 18:56 ` Creating tempfile takes too long: GNAT or Windows bug? Pascal Obry
2002-10-12  4:45 ` James Ross
replies disabled

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