comp.lang.ada
 help / color / mirror / Atom feed
* rename missing in Text_IO
@ 2001-05-04 11:04 Noam Kloos
  2001-05-04 13:43 ` Ted Dennison
  0 siblings, 1 reply; 25+ messages in thread
From: Noam Kloos @ 2001-05-04 11:04 UTC (permalink / raw)


Hi,

I just played with filtering some textfiles and found there is no
function to rename a file;

Noam Kloos.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-04 11:04 Noam Kloos
@ 2001-05-04 13:43 ` Ted Dennison
  2001-05-04 13:53   ` Noam Kloos
  2001-05-04 14:00   ` Noam Kloos
  0 siblings, 2 replies; 25+ messages in thread
From: Ted Dennison @ 2001-05-04 13:43 UTC (permalink / raw)


In article <3af28c5a.12778070@news.nl.uu.net>, Noam Kloos says...

>I just played with filtering some textfiles and found there is no
>function to rename a file;

That's right. There's no function to delete a file, or list a directory either.
That's all stuff that's considered part of the OS, and thus you are expected to
make the appropriate OS calls for your platform. Most of the time, your Ada
vendor will have supplied a package that has bindings to those OS calls, but
what it is depends on your vendor and platform.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-04 13:43 ` Ted Dennison
@ 2001-05-04 13:53   ` Noam Kloos
  2001-05-04 15:39     ` Ted Dennison
  2001-05-04 14:00   ` Noam Kloos
  1 sibling, 1 reply; 25+ messages in thread
From: Noam Kloos @ 2001-05-04 13:53 UTC (permalink / raw)



>That's right. There's no function to delete a file, or list a directory either.

In Ada.Text_IO on my GNAT compilers on linux and win98 there is a call
Delete(<filehandle>) and you use it instead of close(<filehandle)

Noam.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-04 13:43 ` Ted Dennison
  2001-05-04 13:53   ` Noam Kloos
@ 2001-05-04 14:00   ` Noam Kloos
  2001-05-04 21:15     ` Florian Weimer
  1 sibling, 1 reply; 25+ messages in thread
From: Noam Kloos @ 2001-05-04 14:00 UTC (permalink / raw)


On Fri, 04 May 2001 13:43:27 GMT, Ted Dennison<dennison@telepath.com>
wrote:

>In article <3af28c5a.12778070@news.nl.uu.net>, Noam Kloos says...
>
>>I just played with filtering some textfiles and found there is no
>>function to rename a file;
>
>That's right. There's no function to delete a file, or list a directory either.
>That's all stuff that's considered part of the OS, and thus you are expected to
>make the appropriate OS calls for your platform. Most of the time, your Ada
>vendor will have supplied a package that has bindings to those OS calls, but
>what it is depends on your vendor and platform.
>

I did a workaround for the rename effect.
see my zip file http://www.noam.nl/download/stripit.zip
I read  a file into a new one, then delete the sourcefile and close
the destinationfile with the different name.

Noam.




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-04 13:53   ` Noam Kloos
@ 2001-05-04 15:39     ` Ted Dennison
  0 siblings, 0 replies; 25+ messages in thread
From: Ted Dennison @ 2001-05-04 15:39 UTC (permalink / raw)


In article <3af2b3e1.22898679@news.nl.uu.net>, Noam Kloos says...
>
>
>>That's right. There's no function to delete a file, or list a directory either.
>
>In Ada.Text_IO on my GNAT compilers on linux and win98 there is a call
>Delete(<filehandle>) and you use it instead of close(<filehandle)


Dooooh! You're right. There is indeed a Delete. It was even there back in the
Ada83 days. (sigh)

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



^ permalink raw reply	[flat|nested] 25+ messages in thread

* RE: rename missing in Text_IO
@ 2001-05-04 20:50 Beard, Frank
  2001-05-04 21:08 ` Pascal Obry
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Beard, Frank @ 2001-05-04 20:50 UTC (permalink / raw)
  To: 'comp.lang.ada@ada.eu.org'

But why not be part of the standard, maybe in an Annex.  I
almost sympathize with what Ted's saying.  But by his reasoning,
Ada.Command_Line shouldn't be provided either, because the OS
has an interface to do it.  For that matter, none of the IO should
be there because we could pragma interface to all those routines.

I would love to see file handling expanded.  Renaming a file
should be there just as the Delete is there.  Why not have all
the common file operations available.  I think you should be able
to do locking, file or record, from within the language standard.
Getting a directory list should be there too.

Frank

-----Original Message-----
From: Ted Dennison [mailto:dennison@telepath.com]
Sent: Friday, May 04, 2001 9:43 AM
To: comp.lang.ada@ada.eu.org
Subject: Re: rename missing in Text_IO


In article <3af28c5a.12778070@news.nl.uu.net>, Noam Kloos says...

>I just played with filtering some textfiles and found there is no
>function to rename a file;

That's right. There's no function to delete a file, or list a directory
either.
That's all stuff that's considered part of the OS, and thus you are expected
to
make the appropriate OS calls for your platform. Most of the time, your Ada
vendor will have supplied a package that has bindings to those OS calls, but
what it is depends on your vendor and platform.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com
_______________________________________________
comp.lang.ada mailing list
comp.lang.ada@ada.eu.org
http://ada.eu.org/mailman/listinfo/comp.lang.ada




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-04 20:50 rename missing in Text_IO Beard, Frank
@ 2001-05-04 21:08 ` Pascal Obry
  2001-05-04 21:21 ` Ted Dennison
  2001-05-04 23:38 ` Larry Kilgallen
  2 siblings, 0 replies; 25+ messages in thread
From: Pascal Obry @ 2001-05-04 21:08 UTC (permalink / raw)



"Beard, Frank" <beardf@spawar.navy.mil> writes:

> I would love to see file handling expanded.  Renaming a file
> should be there just as the Delete is there.  Why not have all

Note that Delate is there but taking a File_Type as argument. Do you really
want to open the file to be able to delete it ? I would say no in the general
case and we really need a Delete/Rename with a string argument.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-04 14:00   ` Noam Kloos
@ 2001-05-04 21:15     ` Florian Weimer
  0 siblings, 0 replies; 25+ messages in thread
From: Florian Weimer @ 2001-05-04 21:15 UTC (permalink / raw)


serious@clerk.com (Noam Kloos) writes:

> I did a workaround for the rename effect.
> see my zip file http://www.noam.nl/download/stripit.zip
> I read  a file into a new one, then delete the sourcefile and close
> the destinationfile with the different name.

This works only on some platforms.  I don't think it will give the
expected result on MacOS or VMS.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: RE: rename missing in Text_IO
  2001-05-04 20:50 rename missing in Text_IO Beard, Frank
  2001-05-04 21:08 ` Pascal Obry
@ 2001-05-04 21:21 ` Ted Dennison
  2001-05-05 21:19   ` Keith Thompson
  2001-05-07  8:56   ` Noam Kloos
  2001-05-04 23:38 ` Larry Kilgallen
  2 siblings, 2 replies; 25+ messages in thread
From: Ted Dennison @ 2001-05-04 21:21 UTC (permalink / raw)


In article <mailman.989009524.30396.comp.lang.ada@ada.eu.org>, Beard, Frank
says...
>But why not be part of the standard, maybe in an Annex.  I
>almost sympathize with what Ted's saying.  But by his reasoning,
>Ada.Command_Line shouldn't be provided either, because the OS
>has an interface to do it.  For that matter, none of the IO should
>be there because we could pragma interface to all those routines.
..
>From: Ted Dennison [mailto:dennison@telepath.com]
>That's all stuff that's considered part of the OS, and thus you are expected
>to make the appropriate OS calls for your platform. Most of the time, your Ada
>vendor will have supplied a package that has bindings to those OS calls, but
>what it is depends on your vendor and platform.

Hey, I never said it was a Good Thing. I just said that this is the way it is.
For a beginner, that's the main issue.

I actually think it may well be a good thing to have some kind of Ada.C_Library
package hierarchy in an annex in some future version of the language for stuff
like that, since the C library realisticly is going to be available on most Ada
platforms. Perhaps an Ada.Directory_Operations would be a good idea too. Heck,
I'd even like to see a GUI in the standard, if its possible to agree on a good
one.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



^ permalink raw reply	[flat|nested] 25+ messages in thread

* RE: rename missing in Text_IO
@ 2001-05-04 21:48 Beard, Frank
  0 siblings, 0 replies; 25+ messages in thread
From: Beard, Frank @ 2001-05-04 21:48 UTC (permalink / raw)
  To: 'comp.lang.ada@ada.eu.org'

I totally agree!
Frank

-----Original Message-----
From: Pascal Obry [mailto:p.obry@wanadoo.fr]
Sent: Friday, May 04, 2001 5:08 PM
To: comp.lang.ada@ada.eu.org
Subject: Re: rename missing in Text_IO



"Beard, Frank" <beardf@spawar.navy.mil> writes:

> I would love to see file handling expanded.  Renaming a file
> should be there just as the Delete is there.  Why not have all

Note that Delate is there but taking a File_Type as argument. Do you really
want to open the file to be able to delete it ? I would say no in the
general
case and we really need a Delete/Rename with a string argument.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"
_______________________________________________
comp.lang.ada mailing list
comp.lang.ada@ada.eu.org
http://ada.eu.org/mailman/listinfo/comp.lang.ada




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-04 23:38 ` Larry Kilgallen
@ 2001-05-04 23:17   ` David Starner
  2001-05-08 22:03     ` Charles Hixson
  0 siblings, 1 reply; 25+ messages in thread
From: David Starner @ 2001-05-04 23:17 UTC (permalink / raw)


On 4 May 2001 18:38:04 -0500, Larry Kilgallen <Kilgallen@eisner.decus.org.nospam> wrote:
> Unlike Delete, the legality of Rename is going to vary from operating
> system to operating system.  If you rename into a different directory
> on VMS, that directory must be on the same physical disk.  With rooted
> directories, begin on the same disk is not obvious by comparing the old
> and new filespecs.

This is true on Unix too. 

-- 
David Starner - dstarner98@aasaa.ofe.org
Pointless website: http://dvdeug.dhis.org
"I don't care if Bill personally has my name and reads my email and 
laughs at me. In fact, I'd be rather honored." - Joseph_Greg



^ permalink raw reply	[flat|nested] 25+ messages in thread

* RE: rename missing in Text_IO
  2001-05-04 20:50 rename missing in Text_IO Beard, Frank
  2001-05-04 21:08 ` Pascal Obry
  2001-05-04 21:21 ` Ted Dennison
@ 2001-05-04 23:38 ` Larry Kilgallen
  2001-05-04 23:17   ` David Starner
  2 siblings, 1 reply; 25+ messages in thread
From: Larry Kilgallen @ 2001-05-04 23:38 UTC (permalink / raw)


In article <mailman.989009524.30396.comp.lang.ada@ada.eu.org>, "Beard, Frank" <beardf@spawar.navy.mil> writes:
> But why not be part of the standard, maybe in an Annex.  I
> almost sympathize with what Ted's saying.  But by his reasoning,
> Ada.Command_Line shouldn't be provided either, because the OS
> has an interface to do it.  For that matter, none of the IO should
> be there because we could pragma interface to all those routines.
> 
> I would love to see file handling expanded.  Renaming a file
> should be there just as the Delete is there.

Unlike Delete, the legality of Rename is going to vary from operating
system to operating system.  If you rename into a different directory
on VMS, that directory must be on the same physical disk.  With rooted
directories, begin on the same disk is not obvious by comparing the old
and new filespecs.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: RE: rename missing in Text_IO
  2001-05-04 21:21 ` Ted Dennison
@ 2001-05-05 21:19   ` Keith Thompson
  2001-05-07  8:56   ` Noam Kloos
  1 sibling, 0 replies; 25+ messages in thread
From: Keith Thompson @ 2001-05-05 21:19 UTC (permalink / raw)


Ted Dennison<dennison@telepath.com> writes:
[...]
> I actually think it may well be a good thing to have some kind of
> Ada.C_Library package hierarchy in an annex in some future version
> of the language for stuff like that, since the C library realisticly
> is going to be available on most Ada platforms. Perhaps an
> Ada.Directory_Operations would be a good idea too.

I think the Ada/POSIX binding covers most of that.

>                                                    Heck, I'd even
> like to see a GUI in the standard, if its possible to agree on a
> good one.

I don't think it is.  8-)}

-- 
Keith Thompson (The_Other_Keith) kst@cts.com  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center           <*>  <http://www.sdsc.edu/~kst>
Cxiuj via bazo apartenas ni.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-04 21:21 ` Ted Dennison
  2001-05-05 21:19   ` Keith Thompson
@ 2001-05-07  8:56   ` Noam Kloos
  1 sibling, 0 replies; 25+ messages in thread
From: Noam Kloos @ 2001-05-07  8:56 UTC (permalink / raw)


On Fri, 04 May 2001 21:21:35 GMT, Ted Dennison<dennison@telepath.com>
wrote:

>In article <mailman.989009524.30396.comp.lang.ada@ada.eu.org>, Beard, Frank

>I actually think it may well be a good thing to have some kind of Ada.C_Library
>package hierarchy in an annex in some future version of the language for stuff
>like that, since the C library realisticly is going to be available on most Ada
>platforms. Perhaps an Ada.Directory_Operations would be a good idea too. Heck,
>I'd even like to see a GUI in the standard, if its possible to agree on a good
>one.
>
>---
>T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
>          home email - mailto:dennison@telepath.com

There is for the gnat ada compiler the g-dirop.ads
gnat.directory_operations

Noam.




^ permalink raw reply	[flat|nested] 25+ messages in thread

* RE: rename missing in Text_IO
@ 2001-05-07 17:01 Beard, Frank
  0 siblings, 0 replies; 25+ messages in thread
From: Beard, Frank @ 2001-05-07 17:01 UTC (permalink / raw)
  To: 'comp.lang.ada@ada.eu.org'

Yes, I realize that, but you're talking about a system dependency
which is a separate issue from the logical operations.  I don't
remember that limitation on VMS, but I haven't been on that OS in
twelve years.

But, if that is the case, then the operation would simply raise 
something like USE_ERROR to indicate a problem.  The developer on that
OS would need to know the system well enough to know that limitation.

And just because it varies doesn't mean it shouldn't be done.  The
Posix binding for VMS had a rename in it.  I hate to keep going back
to the same example, but the same argument can be made, and was made,
for Ada.Command_Line.  It varies from system to system, and doesn't
even exist on some.


-----Original Message-----
From: Kilgallen@eisner.decus.org.nospam

Unlike Delete, the legality of Rename is going to vary from operating
system to operating system.  If you rename into a different directory
on VMS, that directory must be on the same physical disk.  With rooted
directories, begin on the same disk is not obvious by comparing the old
and new filespecs.

_______________________________________________
comp.lang.ada mailing list
comp.lang.ada@ada.eu.org
http://ada.eu.org/mailman/listinfo/comp.lang.ada




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-04 23:17   ` David Starner
@ 2001-05-08 22:03     ` Charles Hixson
  2001-05-08 23:51       ` David Starner
  0 siblings, 1 reply; 25+ messages in thread
From: Charles Hixson @ 2001-05-08 22:03 UTC (permalink / raw)


dvdeug@x8b4e53cd.dhcp.okstate.edu (David Starner) wrote in
<9cvdav$8q61@news.cis.okstate.edu>: 

>On 4 May 2001 18:38:04 -0500, Larry Kilgallen
><Kilgallen@eisner.decus.org.nospam> wrote: 
>> Unlike Delete, the legality of Rename is going to vary from
>> operating system to operating system.  If you rename into a
>> different directory on VMS, that directory must be on the
>> same physical disk.  With rooted directories, begin on the
>> same disk is not obvious by comparing the old and new
>> filespecs. 
>
>This is true on Unix too. 
>

I thought that the *nix rename command was mv ... if so, then it 
will move between disks, and I think it just renames within the 
same disk (it's been years since I looked into the details, but 
that's the way that I remember).  Of course, that's at the 
command level.  I suppose that there are system calls 
implemented at a lower level, but what's wrong with making a 
move/rename command available in a Ada.File.Stdoperations 
package in Annex F as a defined part of the standard.  It 
probably shouldn't be mandatory, but there's no particular 
reason not to define "the standard approach", and let those 
implement it who will.

Actually, I feel that most of the truly standard library 
functions should be defined as a part of the standard.  The 
fragmentation that Eiffel has experienced due to incompatible 
libraries between differnet versions is a large part of this 
reason.  The strengthening that C++ has received from the 
standard template library is another part.  (I don't use C++, 
but I certainly hear about it... and the STL has been receiving 
plaudits as an enabler, even from those who don't like some 
feature or other of it.)

It's not as if most of the work hasn't already been done.  There 
are lists in several forms, and red-black trees, and B-Trees, 
and... well, lots.  Most of the truely basic structures.  
Perhaps the problem is that they've all been done by different 
people, or that the Booch components seem to be all that's 
needed or ..., whatever.  

I'm not used to the Booch components, so perhaps they are all 
that's needed.  But if so then I think that they ought to be 
specified at least to the API level as a part of the standard.  
Personally, when I looked at them, I couldn't see how to get 
back an element after I had stored it in a container.  But I'm 
sure that there must be a way, and if that's the best structure 
design, then that's what it is.


-- 
Charles Hixson

Copy software legally, the GNU way!
Use GNU software, and legally make and share copies of software.
See http://www.gnu.org
    http://www.redhat.com
    http://www.linux-mandrake.com
    http://www.calderasystems.com/
    http://www.linuxapps.com/



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-08 22:03     ` Charles Hixson
@ 2001-05-08 23:51       ` David Starner
  2001-05-09 16:22         ` Charles Hixson
  0 siblings, 1 reply; 25+ messages in thread
From: David Starner @ 2001-05-08 23:51 UTC (permalink / raw)


On Tue, 08 May 2001 22:03:54 GMT, Charles Hixson <charleshixson@earthling.net> wrote:
> dvdeug@x8b4e53cd.dhcp.okstate.edu (David Starner) wrote in
><9cvdav$8q61@news.cis.okstate.edu>: 
> 
>>On 4 May 2001 18:38:04 -0500, Larry Kilgallen
>><Kilgallen@eisner.decus.org.nospam> wrote: 
>>> Unlike Delete, the legality of Rename is going to vary from
>>> operating system to operating system.  If you rename into a
>>> different directory on VMS, that directory must be on the
>>> same physical disk.  With rooted directories, begin on the
>>> same disk is not obvious by comparing the old and new
>>> filespecs. 
>>
>>This is true on Unix too. 
> 
> I thought that the *nix rename command was mv ... 
[...]
> Of course, that's at the 
> command level.  I suppose that there are system calls 
> implemented at a lower level, 

I understood him to be talking about system calls, and the unix
system call 'rename' works the same way he was describing VMS
Rename to work.

-- 
David Starner - dstarner98@aasaa.ofe.org
Pointless website: http://dvdeug.dhis.org
"I don't care if Bill personally has my name and reads my email and 
laughs at me. In fact, I'd be rather honored." - Joseph_Greg



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-08 13:16   ` Marin David Condic
@ 2001-05-09 13:10     ` Stephen Leake
  2001-05-09 14:44       ` Marin David Condic
  0 siblings, 1 reply; 25+ messages in thread
From: Stephen Leake @ 2001-05-09 13:10 UTC (permalink / raw)


"Marin David Condic" <marin.condic.auntie.spam@pacemicro.com> writes:

> Since the discussion started concerning Win32ada simply having way too many
> types and way too much C-ish feeling to the parameter lists, etc., my
> original idea was to put a relatively simple layer on top of Win32ada. Just
> enough so that when a string was called for, you used an Ada string - not
> some 2nd or 3rd layer subtype of a pointer to a char - or other equally
> unfriendly examples. I wouldn't want to consolidate multiple calls into
> single calls or significantly change anything about the interface - so far
> as it could be avoided. Just Ada-ize what one sees when one uses the
> Win32api. (Some compromises are in order - you'd want to change all the
> numeric return statuses into something more Ada-ish like enumerations.
> Again, its a question of where does one stop?)

That was the original philosophy of Windex. I may have gone beyond
that some in developing whole new controls.

> To that end, I'd think that Claw exceeds the spec. Claw is a
> perfectly fine tool and one might be quite happy to develop on top
> of it. I'd think that there would remain times when one would simply
> want to get at a single Win32api call without any other layers of
> abstraction beyond making the thing not quite so agonizing to use
> from an Ada perspective.

It would be interesting to hear which parts of Claw you think are "too
thick". My nomination for that category is its use of a hidden task to
serialize access to the GUI. On the other hand, I have not yet
succeeded in building a multi-tasking Windex app, so I can't really
complain! 

> Claw may be a better answer for overall development, but I was kind
> of thinking along the lines of something that would be freely
> available as a blanket over the Win32ada binding. Sort of a "binding
> to a binding". (Now we could start the GPL vs LGPL vs GMGPL debate
> along a whole new thread! :-)

Windex is _not_ built on top of the Win32Ada binding, and neither is
Claw. Part of the reason is licensing; the Win32Ada binding is
actually copyright by Microsoft, since it was built by automatic
translation from their C source. It is _not_ "freely distributable";
the license terms state that you must own a Microsoft development
environment to use Win32Ada. Windex is GMGPL.

The other part of the reason is that there is lots of stuff in Win32
that should not be used; either because it is superceded by other
parts of Win32, or there is a better Ada way.

I haven't worked on Windex in quite a while. I'll probably make
another release when GNAT 3.14p comes out, but I don't anticipate much
beyond that. I just don't seem to have the urge to write Win32 apps
any more; I may do something for my latest toy, a Palm handheld.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-09 13:10     ` Stephen Leake
@ 2001-05-09 14:44       ` Marin David Condic
  2001-05-10  4:39         ` tmoran
  0 siblings, 1 reply; 25+ messages in thread
From: Marin David Condic @ 2001-05-09 14:44 UTC (permalink / raw)


"Stephen Leake" <stephen.a.leake.1@gsfc.nasa.gov> wrote in message
news:uheyuzn0y.fsf@gsfc.nasa.gov...
> It would be interesting to hear which parts of Claw you think are "too
> thick". My nomination for that category is its use of a hidden task to
> serialize access to the GUI. On the other hand, I have not yet
> succeeded in building a multi-tasking Windex app, so I can't really
> complain!
>
Never said Claw was "too thick". What I said was that it didn't meet the
specification of being simply an Ada equivalent to the Win32api. I think
we'd both agree that Claw provides a bit more than what you would see from
Win32ada. It does a bit more than just wrap Ada-isms around the Win32api. I
don't object to that at all - far from it. I just don't think it is the
answer to having a slightly more than "thin" binding to the Win32api. (Also,
it isn't likely to end up distributed with all of the Ada/PC targeted
compilers.)

I wish I had a correct term for this kind of binding. "Thick" kind of
implies you've packaged something up to provide similar {rather than
identical} services, but in a more friendly way. "Thin" kind of implies that
it is just a set of hooks to the routines to provide absolutely identical
services from another language - right down to matching data types, etc.
There ought to be a word for a binding that provides identical services, but
smooths over the things that don't translate well from C to Ada. (A thin
binding with "software spackle"? :-) Arguably, that ought to be a "thick"
binding with something like Claw becoming a "subsystem" - it provides
similar and *extended* services.

> Windex is _not_ built on top of the Win32Ada binding, and neither is
> Claw. Part of the reason is licensing; the Win32Ada binding is
> actually copyright by Microsoft, since it was built by automatic
> translation from their C source. It is _not_ "freely distributable";
> the license terms state that you must own a Microsoft development
> environment to use Win32Ada. Windex is GMGPL.
>
Fair enough. My casual attitude towards precise writing may once again have
me in trouble! :-) Let me say this: The Ada compilers that I've seen
targeted to Windows/PCs have all come with the Win32ada bindings. I don't
know of any that don't - maybe you know of one? Hence (even if it isn't a
"standard") I could go off and develop a Spackle Binding (tm) that "withed"
the Win32ada stuff and pretty much be asured it would work any place I
needed it to.

One could develop a Spackle Binding (tm) that had in the package body all of
the same sorts of pragmas, etc. one finds in the Win32ada binding and sort
of reverse engineer the Win32api. That would probably not infringe on
anyone's copyright or license. But if Win32ada exists everywhere I'd want to
compile my stuff, is that really necessary?

> The other part of the reason is that there is lots of stuff in Win32
> that should not be used; either because it is superceded by other
> parts of Win32, or there is a better Ada way.
>
Yes - many aspects of Win32api are Morally Evil and should be avoided like
cigarettes, whisky & wild women. Still, if one wants to make a binding to
it, one ought to be thorough so that Joe Programmer who is familiar with
Win32api can find whatever he might be used to using. Tough call. At some
point you're no longer making a binding - but a subsystem. Its not a *bad*
thing to make a subsystem, but I'd probably do it in layers -the binding is
the binding and the simplification of services rides on top of that.

> I haven't worked on Windex in quite a while. I'll probably make
> another release when GNAT 3.14p comes out, but I don't anticipate much
> beyond that. I just don't seem to have the urge to write Win32 apps
> any more; I may do something for my latest toy, a Palm handheld.
>
Perhaps Windex fits the bill. I've not looked it over. The rest of it comes
down to how freely available it is for use. That starts moving from
technical questions to business & legal questions.

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com
Web:      http://www.mcondic.com/






^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-08 23:51       ` David Starner
@ 2001-05-09 16:22         ` Charles Hixson
  2001-05-09 22:04           ` Fraser Wilson
  0 siblings, 1 reply; 25+ messages in thread
From: Charles Hixson @ 2001-05-09 16:22 UTC (permalink / raw)


dvdeug@x8b4e53cd.dhcp.okstate.edu (David Starner) wrote in
<9da0p9$7hu2@news.cis.okstate.edu>: 

>On Tue, 08 May 2001 22:03:54 GMT, Charles Hixson
>...
>I understood him to be talking about system calls, and the
>unix system call 'rename' works the same way he was
>describing VMS Rename to work.
>

But if what we are considering is what an Ada Library Package 
should look like, then there's no reason to copy the low level 
features of an operating system.  And the semantics of the mv 
command is generally superior.  A program should not need to 
know the details of the disk layout.  In fact, I'm not sure that 
on all systems the normal user (as opposed to a superuser) is 
even able to determine those details.  So I definitely don't 
think that the standard library should assume that this can be 
determined when there is no real need.  Of course, if the source 
were on a CD, then neither approach would work, but that's what 
one would expect if the file/volume were read/only.

-- 
Charles Hixson

Copy software legally, the GNU way!
Use GNU software, and legally make and share copies of software.
See http://www.gnu.org
    http://www.redhat.com
    http://www.linux-mandrake.com
    http://www.calderasystems.com/
    http://www.linuxapps.com/



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-09 16:22         ` Charles Hixson
@ 2001-05-09 22:04           ` Fraser Wilson
  2001-05-09 22:33             ` Charles Hixson
  2001-05-10 13:16             ` Ted Dennison
  0 siblings, 2 replies; 25+ messages in thread
From: Fraser Wilson @ 2001-05-09 22:04 UTC (permalink / raw)


charleshixson@earthling.net (Charles Hixson) writes:

> But if what we are considering is what an Ada Library Package 
> should look like, then there's no reason to copy the low level 
> features of an operating system.  And the semantics of the mv 
> command is generally superior.  A program should not need to 
> know the details of the disk layout. 

The problem is that a rename or move on the same disk is significantly
cheaper than one that crosses disks.  It's also a much safer
operation.  I think the implementation detail line is quite fuzzy
here.

More generally, the destination might not even be a disk filesystem;
it could be a remote ftp site or /proc on Linux.  Does a move/rename
even make sense in those cases?

Fraser.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-09 22:04           ` Fraser Wilson
@ 2001-05-09 22:33             ` Charles Hixson
  2001-05-10 13:16             ` Ted Dennison
  1 sibling, 0 replies; 25+ messages in thread
From: Charles Hixson @ 2001-05-09 22:33 UTC (permalink / raw)


Fraser Wilson <blancolioni@blancolioni.org> wrote in
<fy73daefabm.fsf@blancolioni.org>: 

>charleshixson@earthling.net (Charles Hixson) writes:
>
>> But if what we are considering is what an Ada Library
>> Package should look like, then there's no reason to copy
>> the low level features of an operating system.  And the
>> semantics of the mv command is generally superior.  A
>> program should not need to know the details of the disk
>> layout. 
>
>The problem is that a rename or move on the same disk is
>significantly cheaper than one that crosses disks.  It's also
>a much safer operation.  I think the implementation detail
>line is quite fuzzy here.
>
>More generally, the destination might not even be a disk
>filesystem; it could be a remote ftp site or /proc on Linux. 
>Does a move/rename even make sense in those cases?
>
>Fraser.
>

It makes as much sense in those cases as in other read-only 
cases (unless you have read/write access to the ftp site, in 
which case I would say, "Yes, it makes sense, but wouldn't copy 
be a better choice?")  I do think that basic characteristics of 
the file are reasonable to be able to determine, I just don't 
think that they should be mandatory.  Among these 
characteristics I would include "Is it a local file?", "How big 
is it?", "Can you write to it?",  "Can you seek within it?", 
"Can you write within it, without destroying everything that 
follows the write location?", "Who is the owner?", "When was it 
last changed?", etc.  All the standard file status questions.

The thing is, to each of these questions, "I don't know." has to 
be a valid answer.  Perhaps it would be an unusual answer, but 
it needs to be possible.  This is what would make a really 
portable package possible.  (It would be trivial to port a 
package that just answered "I don't know." whatever you asked 
it.  Not particularly useful, but trivial.)  What your program 
should do in response to "I don't know" is less clear.  Perhaps 
it should ask the user?

-- 
Charles Hixson

Copy software legally, the GNU way!
Use GNU software, and legally make and share copies of software.
See http://www.gnu.org
    http://www.redhat.com
    http://www.linux-mandrake.com
    http://www.calderasystems.com/
    http://www.linuxapps.com/



^ permalink raw reply	[flat|nested] 25+ messages in thread

* RE: rename missing in Text_IO
@ 2001-05-09 22:56 Beard, Frank
  0 siblings, 0 replies; 25+ messages in thread
From: Beard, Frank @ 2001-05-09 22:56 UTC (permalink / raw)
  To: 'comp.lang.ada@ada.eu.org'


-----Original Message-----
From: Fraser Wilson [mailto:blancolioni@blancolioni.org]

>> But if what we are considering is what an Ada Library Package 
>> should look like, then there's no reason to copy the low level 
>> features of an operating system.  And the semantics of the mv 
>> command is generally superior.  A program should not need to 
>> know the details of the disk layout. 

> The problem is that a rename or move on the same disk is significantly
> cheaper than one that crosses disks.  It's also a much safer
> operation.

So what?  If I need to move it to another disk, then I need to move
it to another disk.  I don't think the cost would be the issue in that
case.  If cost is the issue, which would be determined either by 
prototyping or performance testing, then keep it on the same disk.

> I think the implementation detail line is quite fuzzy here.

POSIX figured it out in some reasonable manner.

> More generally, the destination might not even be a disk filesystem;
> it could be a remote ftp site or /proc on Linux.  Does a move/rename
> even make sense in those cases?

You wouldn't be using the move/rename in this case anyway, would you?
Probably an RPC command, which is another Annex for discussion.

Frank




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-09 14:44       ` Marin David Condic
@ 2001-05-10  4:39         ` tmoran
  0 siblings, 0 replies; 25+ messages in thread
From: tmoran @ 2001-05-10  4:39 UTC (permalink / raw)


>... that ought to be a "thick" binding with something like Claw
>becoming a "subsystem" - it provides similar and *extended* services.
  I'm not used to using the word "subsystem" that way.  e.g, in
Orbitals (www.adapower.com) there is a child of a window type where
the additional data is 3D graphic stuff which is displayed in user
selectable mono or stereo and can be rotated by mouse movements,
quite independently of the data generating program.  I would call
that a "subsystem" since it is a system in itself, and clearly a
distinct separate part of the entire app-system.  It is an extension
of a simple "window", but not an extension of Windows.  But that
does leave me with no simple word connoting a certain thickness
layer of a binding.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rename missing in Text_IO
  2001-05-09 22:04           ` Fraser Wilson
  2001-05-09 22:33             ` Charles Hixson
@ 2001-05-10 13:16             ` Ted Dennison
  1 sibling, 0 replies; 25+ messages in thread
From: Ted Dennison @ 2001-05-10 13:16 UTC (permalink / raw)


In article <fy73daefabm.fsf@blancolioni.org>, Fraser Wilson says...
>The problem is that a rename or move on the same disk is significantly
>cheaper than one that crosses disks.  It's also a much safer
>operation.  I think the implementation detail line is quite fuzzy
>here.
>
>More generally, the destination might not even be a disk filesystem;
>it could be a remote ftp site or /proc on Linux.  Does a move/rename
>even make sense in those cases?

I think its probably OK to leave that on the user's head. After all, they're the
one who *asked* for a move to that location. We already have a similar issue
with Open. It may or may not work if another program or another task has already
opened the file (and it may depend on the mode they opened it with). All that is
OS dependant. Also, the user could try to Create a file on "/proc" as it stands
today, so "Move" would introduce no new issues there either. The fact is that
the user of file I/O operations already has to understand a fair bit about their
OS to have any hope of it working properly.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2001-05-10 13:16 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-04 20:50 rename missing in Text_IO Beard, Frank
2001-05-04 21:08 ` Pascal Obry
2001-05-04 21:21 ` Ted Dennison
2001-05-05 21:19   ` Keith Thompson
2001-05-07  8:56   ` Noam Kloos
2001-05-04 23:38 ` Larry Kilgallen
2001-05-04 23:17   ` David Starner
2001-05-08 22:03     ` Charles Hixson
2001-05-08 23:51       ` David Starner
2001-05-09 16:22         ` Charles Hixson
2001-05-09 22:04           ` Fraser Wilson
2001-05-09 22:33             ` Charles Hixson
2001-05-10 13:16             ` Ted Dennison
  -- strict thread matches above, loose matches on Subject: below --
2001-05-09 22:56 Beard, Frank
2001-05-07 19:00 Marin David Condic
2001-05-08  4:38 ` tmoran
2001-05-08 13:16   ` Marin David Condic
2001-05-09 13:10     ` Stephen Leake
2001-05-09 14:44       ` Marin David Condic
2001-05-10  4:39         ` tmoran
2001-05-07 17:01 Beard, Frank
2001-05-04 21:48 Beard, Frank
2001-05-04 11:04 Noam Kloos
2001-05-04 13:43 ` Ted Dennison
2001-05-04 13:53   ` Noam Kloos
2001-05-04 15:39     ` Ted Dennison
2001-05-04 14:00   ` Noam Kloos
2001-05-04 21:15     ` Florian Weimer

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