comp.lang.ada
 help / color / mirror / Atom feed
* Can I treat Current_Output as a file of bytes?
@ 2002-11-04 22:34 Bj�rn Persson
  2002-11-05 14:30 ` Ted Dennison
  2002-11-06  8:26 ` Pascal Obry
  0 siblings, 2 replies; 42+ messages in thread
From: Bj�rn Persson @ 2002-11-04 22:34 UTC (permalink / raw)


Hi everyone, here's another beginner having problems with Ada.Text_IO.
Please excuse me if this is a frequently asked question. I couldn't find
it in the collection at http://www.adahome.com/FAQ/comp-lang-ada.html.

I'm writing a little program that reads from standard in and writes to
standard out, but I'd need to treat them as raw files of bytes or
characters, and Text_IO's line-oriented features get in my way. When
reading I can get around it by using Get_Immediate, but I can't get rid of
the extra line break that is written to standard out when the program
terminates if the last character written wasn't a line break. Can I get
full control over standard out without doing all the output by calling C
functions?

The extra line break isn't a big deal when writing to a terminal window,
but it's worse when standard out is redirected to a file.

Bj�rn Persson



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-04 22:34 Can I treat Current_Output as a file of bytes? Bj�rn Persson
@ 2002-11-05 14:30 ` Ted Dennison
  2002-11-05 16:01   ` Bj�rn Persson
  2002-11-06  8:26 ` Pascal Obry
  1 sibling, 1 reply; 42+ messages in thread
From: Ted Dennison @ 2002-11-05 14:30 UTC (permalink / raw)


Bj rn Persson <bjorn_persson.spam-is-evil@sverige.nu> wrote in message news:<20021104233454.2042ef78.bjorn_persson.spam-is-evil@sverige.nu>...
> I'm writing a little program that reads from standard in and writes to
> standard out, but I'd need to treat them as raw files of bytes or
> characters, and Text_IO's line-oriented features get in my way. When

Supposedly, that's what Ada.Text_IO.Text_Streams is there for (see
A.12.2(6)  - http://www.adaic.org/standards/95lrm/html/RM-A-12-2.html
). I've never tried writing binary data to Standard_Output myself
though, so I can't say how/if it works.



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-05 14:30 ` Ted Dennison
@ 2002-11-05 16:01   ` Bj�rn Persson
  2002-11-05 18:13     ` Warren W. Gay VE3WWG
  2002-11-05 22:27     ` Ted Dennison
  0 siblings, 2 replies; 42+ messages in thread
From: Bj�rn Persson @ 2002-11-05 16:01 UTC (permalink / raw)


On 5 Nov 2002 06:30:59 -0800
dennison@telepath.com (Ted Dennison) wrote:

> Bj rn Persson <bjorn_persson.spam-is-evil@sverige.nu> wrote in message
>news:<20021104233454.2042ef78.bjorn_persson.spam-is-evil@sverige.nu>...
> > I'm writing a little program that reads from standard in and writes to
> > standard out, but I'd need to treat them as raw files of bytes or
> > characters, and Text_IO's line-oriented features get in my way. When
> 
> Supposedly, that's what Ada.Text_IO.Text_Streams is there for (see
> A.12.2(6)  - http://www.adaic.org/standards/95lrm/html/RM-A-12-2.html
> ). I've never tried writing binary data to Standard_Output myself
> though, so I can't say how/if it works.

Hmm, I didn't try that because I assumed that it would write through the
usual Standard_Output, and so the line break would be added anyways, but
maybe I should give it a try.

Bj�rn Persson



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-05 16:01   ` Bj�rn Persson
@ 2002-11-05 18:13     ` Warren W. Gay VE3WWG
  2002-11-05 22:14       ` Bj�rn Persson
  2002-11-05 22:48       ` Robert A Duff
  2002-11-05 22:27     ` Ted Dennison
  1 sibling, 2 replies; 42+ messages in thread
From: Warren W. Gay VE3WWG @ 2002-11-05 18:13 UTC (permalink / raw)


Bj�rn Persson wrote:
> On 5 Nov 2002 06:30:59 -0800
> dennison@telepath.com (Ted Dennison) wrote:
> 
>>Bj rn Persson <bjorn_persson.spam-is-evil@sverige.nu> wrote in message
>>news:<20021104233454.2042ef78.bjorn_persson.spam-is-evil@sverige.nu>...
>>
>>>I'm writing a little program that reads from standard in and writes to
>>>standard out, but I'd need to treat them as raw files of bytes or
>>>characters, and Text_IO's line-oriented features get in my way. When
>>
>>Supposedly, that's what Ada.Text_IO.Text_Streams is there for (see
>>A.12.2(6)  - http://www.adaic.org/standards/95lrm/html/RM-A-12-2.html
>>). I've never tried writing binary data to Standard_Output myself
>>though, so I can't say how/if it works.
> 
> 
> Hmm, I didn't try that because I assumed that it would write through the
> usual Standard_Output, and so the line break would be added anyways, but
> maybe I should give it a try.
> 
> Bj�rn Persson

You should also be aware from A.12.2.(7) that "Performing operations on
the stream associated with a text file does not affect the column,
line, or page counts."

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




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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-05 18:13     ` Warren W. Gay VE3WWG
@ 2002-11-05 22:14       ` Bj�rn Persson
  2002-11-05 22:48       ` Robert A Duff
  1 sibling, 0 replies; 42+ messages in thread
From: Bj�rn Persson @ 2002-11-05 22:14 UTC (permalink / raw)


On Tue, 05 Nov 2002 13:13:59 -0500
"Warren W. Gay VE3WWG" <ve3wwg@cogeco.ca> wrote:

> You should also be aware from A.12.2.(7) that "Performing operations on
> the stream associated with a text file does not affect the column,
> line, or page counts."

Aha! Then it should work. Thanks!

Bj�rn Persson



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-05 16:01   ` Bj�rn Persson
  2002-11-05 18:13     ` Warren W. Gay VE3WWG
@ 2002-11-05 22:27     ` Ted Dennison
  2002-11-06 23:40       ` Randy Brukardt
  2002-11-07  0:44       ` Bj�rn Persson
  1 sibling, 2 replies; 42+ messages in thread
From: Ted Dennison @ 2002-11-05 22:27 UTC (permalink / raw)


Bj rn Persson <bjorn_persson.spam-is-evil@sverige.nu> wrote in message news:<20021105170130.2684e53f.bjorn_persson.spam-is-evil@sverige.nu>...
> On 5 Nov 2002 06:30:59 -0800
> dennison@telepath.com (Ted Dennison) wrote:
> > Supposedly, that's what Ada.Text_IO.Text_Streams is there for (see
> 
> Hmm, I didn't try that because I assumed that it would write through the
> usual Standard_Output, and so the line break would be added anyways, but
> maybe I should give it a try.

That's my worry too. Tell us how it works. :-)



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-05 18:13     ` Warren W. Gay VE3WWG
  2002-11-05 22:14       ` Bj�rn Persson
@ 2002-11-05 22:48       ` Robert A Duff
  2002-11-06  0:42         ` Jeffrey Creem
                           ` (3 more replies)
  1 sibling, 4 replies; 42+ messages in thread
From: Robert A Duff @ 2002-11-05 22:48 UTC (permalink / raw)


"Warren W. Gay VE3WWG" <ve3wwg@cogeco.ca> writes:

> You should also be aware from A.12.2.(7) that "Performing operations on
> the stream associated with a text file does not affect the column,
> line, or page counts."

Does anybody actually use those counts?
I've never written code that does.

...Just curious.

- Bob



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-05 22:48       ` Robert A Duff
@ 2002-11-06  0:42         ` Jeffrey Creem
  2002-11-06  7:14         ` Dale Stanbrough
                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 42+ messages in thread
From: Jeffrey Creem @ 2002-11-06  0:42 UTC (permalink / raw)


Not often...But I have used at least the line and column stuff before for
semi-real
projects.

"Robert A Duff" <bobduff@shell01.TheWorld.com> wrote in message
news:wccznsneipp.fsf@shell01.TheWorld.com...
> "Warren W. Gay VE3WWG" <ve3wwg@cogeco.ca> writes:
>
> > You should also be aware from A.12.2.(7) that "Performing operations on
> > the stream associated with a text file does not affect the column,
> > line, or page counts."
>
> Does anybody actually use those counts?
> I've never written code that does.
>
> ...Just curious.
>
> - Bob





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

* Re: Can I treat Current_Output as a file of bytes?
@ 2002-11-06  5:54 Grein, Christoph
  0 siblings, 0 replies; 42+ messages in thread
From: Grein, Christoph @ 2002-11-06  5:54 UTC (permalink / raw)


> > You should also be aware from A.12.2.(7) that "Performing operations on
> > the stream associated with a text file does not affect the column,
> > line, or page counts."
> 
> Does anybody actually use those counts?
> I've never written code that does.

Sometimes, for formatting,
I store the current Col value and for each new line call Set_Col
                    (no Put_Line needed in that case).
                    I've never used the line and page 
counts.



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-05 22:48       ` Robert A Duff
  2002-11-06  0:42         ` Jeffrey Creem
@ 2002-11-06  7:14         ` Dale Stanbrough
  2002-11-06  8:45         ` Fraser Wilson
  2002-11-08 10:03         ` Jacob Sparre Andersen
  3 siblings, 0 replies; 42+ messages in thread
From: Dale Stanbrough @ 2002-11-06  7:14 UTC (permalink / raw)


In article <wccznsneipp.fsf@shell01.TheWorld.com>,
 Robert A Duff <bobduff@shell01.TheWorld.com> wrote:

> Does anybody actually use those counts?
> I've never written code that does.

We seriously need to have Ada.NoRubbish.Text_IO or similar that
is efficient to implement.

Dale



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-04 22:34 Can I treat Current_Output as a file of bytes? Bj�rn Persson
  2002-11-05 14:30 ` Ted Dennison
@ 2002-11-06  8:26 ` Pascal Obry
  1 sibling, 0 replies; 42+ messages in thread
From: Pascal Obry @ 2002-11-06  8:26 UTC (permalink / raw)



Bj�rn Persson <bjorn_persson.spam-is-evil@sverige.nu> writes:

> terminates if the last character written wasn't a line break. Can I get
> full control over standard out without doing all the output by calling C
> functions?

By using streams.

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"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-05 22:48       ` Robert A Duff
  2002-11-06  0:42         ` Jeffrey Creem
  2002-11-06  7:14         ` Dale Stanbrough
@ 2002-11-06  8:45         ` Fraser Wilson
  2002-11-08 10:03         ` Jacob Sparre Andersen
  3 siblings, 0 replies; 42+ messages in thread
From: Fraser Wilson @ 2002-11-06  8:45 UTC (permalink / raw)


Robert A Duff <bobduff@shell01.TheWorld.com> writes:

> Does anybody actually use those counts?
> I've never written code that does.

Col and Set_Col I've find useful for source code generation and
anything that needs to be lined up in ... columns.  Line and Page?
Never.

Fraser.



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-05 22:27     ` Ted Dennison
@ 2002-11-06 23:40       ` Randy Brukardt
  2002-11-07  2:45         ` Larry Kilgallen
  2002-11-07  4:04         ` Ted Dennison
  2002-11-07  0:44       ` Bj�rn Persson
  1 sibling, 2 replies; 42+ messages in thread
From: Randy Brukardt @ 2002-11-06 23:40 UTC (permalink / raw)


Ted Dennison wrote in message
<4519e058.0211051427.48557033@posting.google.com>...
>Bj rn Persson <bjorn_persson.spam-is-evil@sverige.nu> wrote in message
news:<20021105170130.2684e53f.bjorn_persson.spam-is-evil@sverige.nu>...
>> On 5 Nov 2002 06:30:59 -0800
>> dennison@telepath.com (Ted Dennison) wrote:
>> > Supposedly, that's what Ada.Text_IO.Text_Streams is there for (see
>>
>> Hmm, I didn't try that because I assumed that it would write through
the
>> usual Standard_Output, and so the line break would be added anyways,
but
>> maybe I should give it a try.
>
>That's my worry too. Tell us how it works. :-)

I would be very surprised if a compiler implementer went out of their
way to add stuff there that OS does not add. In this case, neither
Windows nor Unix adds any line breaks to standard output, so why would
an Ada compiler? (If you're not using Windows or Unix, your mileage may
vary, but you probably don't have a standard output in the first
place...)

Of course, the ability of compiler implementers to do odd things should
never be underestimated. There is the case of the compiler that raises
Storage_Error for certain null string literals, for instance. So do test
it carefully, but I'd expect it to work.

               Randy Brukardt.





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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-05 22:27     ` Ted Dennison
  2002-11-06 23:40       ` Randy Brukardt
@ 2002-11-07  0:44       ` Bj�rn Persson
  2002-11-07 14:41         ` Ted Dennison
  2002-11-09 11:37         ` Georg Bauhaus
  1 sibling, 2 replies; 42+ messages in thread
From: Bj�rn Persson @ 2002-11-07  0:44 UTC (permalink / raw)


On 5 Nov 2002 14:27:39 -0800
dennison@telepath.com (Ted Dennison) wrote:

> Bj rn Persson <bjorn_persson.spam-is-evil@sverige.nu> wrote in message
>news:<20021105170130.2684e53f.bjorn_persson.spam-is-evil@sverige.nu>...
> > On 5 Nov 2002 06:30:59 -0800
> > dennison@telepath.com (Ted Dennison) wrote:
> > > Supposedly, that's what Ada.Text_IO.Text_Streams is there for (see
> > 
> > Hmm, I didn't try that because I assumed that it would write through the
> > usual Standard_Output, and so the line break would be added anyways, but
> > maybe I should give it a try.
> 
> That's my worry too. Tell us how it works. :-)

It seems to work well for output, but I've run into problems with input.

I want to read as much data as is available, and then process that before
I wait for more. I thought I had solved that with Get_Immediate, but it
turns out that Get_Immediate (or rather some underlying C routine)
translates CR LF to a single LF when running in Windows, and I can't find
any other way to check if input is available. Neither can I push back what
I've read with Get_Immediate to read it again with Character'Read.

(I'm using Gnat 3.14p in Windows and 3.13p in Redhat.)

Bj�rn Persson



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-06 23:40       ` Randy Brukardt
@ 2002-11-07  2:45         ` Larry Kilgallen
  2002-11-07  4:04         ` Ted Dennison
  1 sibling, 0 replies; 42+ messages in thread
From: Larry Kilgallen @ 2002-11-07  2:45 UTC (permalink / raw)


In article <usja17cbnvhc65@corp.supernews.com>, "Randy Brukardt" <randy@rrsoftware.com> writes:

> I would be very surprised if a compiler implementer went out of their
> way to add stuff there that OS does not add. In this case, neither
> Windows nor Unix adds any line breaks to standard output, so why would
> an Ada compiler? (If you're not using Windows or Unix, your mileage may
> vary, but you probably don't have a standard output in the first
> place...)

Well VMS calls it "SYS$OUTPUT", but if it feeds to an RMS file the
line indicators correspond to the RMS record boundaries.



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-06 23:40       ` Randy Brukardt
  2002-11-07  2:45         ` Larry Kilgallen
@ 2002-11-07  4:04         ` Ted Dennison
  2002-11-07 19:01           ` Bj�rn Persson
  2002-11-07 21:04           ` Randy Brukardt
  1 sibling, 2 replies; 42+ messages in thread
From: Ted Dennison @ 2002-11-07  4:04 UTC (permalink / raw)


"Randy Brukardt" <randy@rrsoftware.com> wrote in message news:<usja17cbnvhc65@corp.supernews.com>...
> I would be very surprised if a compiler implementer went out of their
> way to add stuff there that OS does not add. In this case, neither
> Windows nor Unix adds any line breaks to standard output, so why would
> an Ada compiler? (If you're not using Windows or Unix, your mileage may

The OP seemed to think that the line break was getting added on the
"Close" call, if I was reading him correctly. Seeing as this method
would require calling the exact same "Close" routine, I think you can
perhaps see the source of my concern.

But you'd certainly know better than I what *should* be happening....



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

* Re: Can I treat Current_Output as a file of bytes?
@ 2002-11-07  6:28 Grein, Christoph
  2002-11-07 17:04 ` Bj�rn Persson
  0 siblings, 1 reply; 42+ messages in thread
From: Grein, Christoph @ 2002-11-07  6:28 UTC (permalink / raw)



> X-Trace: newsb.telia.net 1036629893 213.64.50.193 (Thu, 07 Nov 2002 01:44:53 
CET)
> Date: Thu, 07 Nov 2002 00:44:53 +0000 (GMT)
> I want to read as much data as is available, and then process that before
> I wait for more. I thought I had solved that with Get_Immediate, but it
> turns out that Get_Immediate (or rather some underlying C routine)
> translates CR LF to a single LF when running in Windows, and I can't find
> any other way to check if input is available. Neither can I push back what
> I've read with Get_Immediate to read it again with Character'Read.
> 
> (I'm using Gnat 3.14p in Windows and 3.13p in Redhat.)

There are two forms of Get_Immediate: One blocking until data is available, the other not blocking 
and returning a boolean to indicate whether data is available.

There is also a look-ahead.



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-07  0:44       ` Bj�rn Persson
@ 2002-11-07 14:41         ` Ted Dennison
  2002-11-07 17:41           ` Bj�rn Persson
  2002-11-09 11:37         ` Georg Bauhaus
  1 sibling, 1 reply; 42+ messages in thread
From: Ted Dennison @ 2002-11-07 14:41 UTC (permalink / raw)


Bj rn Persson <bjorn_persson.spam-is-evil@sverige.nu> wrote in message news:<20021107014453.6774d605.bjorn_persson.spam-is-evil@sverige.nu>...
> It seems to work well for output,
Cool!

> but I've run into problems with input.
Drat. :-)

> turns out that Get_Immediate (or rather some underlying C routine)
> translates CR LF to a single LF when running in Windows, and I can't find
> any other way to check if input is available. Neither can I push back what

I know Cygwin does that. Gnat doesn't use Cygwin though, it uses
MinGW. Perhaps MinGW does it too. If so, there's no way you are
getting those CR's back without calling out to Win32.

I'm a little shaky on what your problem with this is, though.



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-07  6:28 Grein, Christoph
@ 2002-11-07 17:04 ` Bj�rn Persson
  0 siblings, 0 replies; 42+ messages in thread
From: Bj�rn Persson @ 2002-11-07 17:04 UTC (permalink / raw)


On Thu, 7 Nov 2002 07:28:46 +0100 (MET)
"Grein, Christoph" <christoph.grein@eurocopter.com> wrote:

> There are two forms of Get_Immediate: One blocking until data is available, the other not blocking 
> and returning a boolean to indicate whether data is available.

Yes, I know. I use both. What I want is either a non-blocking Read that 
doesn't lie about what it reads, or an Input_Is_Available that just 
checks if there is data waiting or not.

> There is also a look-ahead.

But that's blocking too, isn't it?

Bj�rn Persson



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-07 14:41         ` Ted Dennison
@ 2002-11-07 17:41           ` Bj�rn Persson
  0 siblings, 0 replies; 42+ messages in thread
From: Bj�rn Persson @ 2002-11-07 17:41 UTC (permalink / raw)


On 7 Nov 2002 06:41:13 -0800
dennison@telepath.com (Ted Dennison) wrote:

> I'm a little shaky on what your problem with this is, though.

You mean why it's a problem that linebreaks get translated? Because 
the data might not always be text. I thought I could treat all sorts 
of data the same, regardless of whether it comes from standard in or 
from a disk file, but it's starting to look like only text can be 
read from standard in except in Unix-like OSes. I think I'll have to 
write two separate input routines.

Bj�rn Persson



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-07  4:04         ` Ted Dennison
@ 2002-11-07 19:01           ` Bj�rn Persson
  2002-11-07 21:04           ` Randy Brukardt
  1 sibling, 0 replies; 42+ messages in thread
From: Bj�rn Persson @ 2002-11-07 19:01 UTC (permalink / raw)


On 6 Nov 2002 20:04:25 -0800
dennison@telepath.com (Ted Dennison) wrote:

> "Randy Brukardt" <randy@rrsoftware.com> wrote in message news:<usja17cbnvhc65@corp.supernews.com>...
> > I would be very surprised if a compiler implementer went out of their
> > way to add stuff there that OS does not add. In this case, neither
> > Windows nor Unix adds any line breaks to standard output, so why would
> > an Ada compiler? (If you're not using Windows or Unix, your mileage may
> 
> The OP seemed to think that the line break was getting added on the
> "Close" call, if I was reading him correctly. Seeing as this method
> would require calling the exact same "Close" routine, I think you can
> perhaps see the source of my concern.

Gnat's Ada.Text_IO does it in a procedure called Terminate_Line that 
gets called when closing or resetting a text file:

   procedure Terminate_Line (File : File_Type) is
   begin
      FIO.Check_File_Open (AP (File));

      --  For file other than In_File, test for needing to terminate last line

      if Mode (File) /= In_File then

         --  If not at start of line definition need new line

         if File.Col /= 1 then
            New_Line (File);

         --  For files other than standard error and standard output, we
         --  make sure that an empty file has a single line feed, so that
         --  it is properly formatted. We avoid this for the standard files
         --  because it is too much of a nuisance to have these odd line
         --  feeds when nothing has been written to the file.

         elsif (File /= Standard_Err and then File /= Standard_Out)
           and then (File.Line = 1 and then File.Page = 1)
         then
            New_Line (File);
         end if;
      end if;
   end Terminate_Line;

As you can see, standard out and standard error are excepted if the 
page, line and column numbers are all 1, and since stream operations 
don't affect these numbers, I get rid of the line break if I write 
everything through the stream. For disk files the line break is always 
added, but for those I can use Sequential_IO, which will hopefully 
only write what I tell it to write.

Bj�rn Persson



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

* Re: Can I treat Current_Output as a file of bytes?
@ 2002-11-07 19:05 Kees de LezenneCoulander
  0 siblings, 0 replies; 42+ messages in thread
From: Kees de LezenneCoulander @ 2002-11-07 19:05 UTC (permalink / raw)


Robert A Duff <bobduff@shell01.TheWorld.com> wrote:

>Does anybody actually use those counts?
>I've never written code that does.

   Sure. We have technical calculation programs that read input
from fairly large and complicated ASCII files. I find it quite
a nice touch that I can quote page, line and column number when
an error occurs.
                          Kees de Lezenne Coulander
-- 
  C.M. de Lezenne Coulander
  Aircraft Development and Systems Engineering B.V.
  Hoofddorp, The Netherlands

  



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-07  4:04         ` Ted Dennison
  2002-11-07 19:01           ` Bj�rn Persson
@ 2002-11-07 21:04           ` Randy Brukardt
  2002-11-08  0:03             ` Bj�rn Persson
  1 sibling, 1 reply; 42+ messages in thread
From: Randy Brukardt @ 2002-11-07 21:04 UTC (permalink / raw)


Ted Dennison wrote in message
<4519e058.0211062004.4a55ab0e@posting.google.com>...
>The OP seemed to think that the line break was getting added on the
>"Close" call, if I was reading him correctly. Seeing as this method
>would require calling the exact same "Close" routine, I think you can
>perhaps see the source of my concern.
>
>But you'd certainly know better than I what *should* be happening....

Well, Ada does require that a file be terminated by a line terminator.
Some implementations do actually write this character out if it is
missing. Indeed, the first (Ada 83) version of Text_IO for Janus/Ada
worked this way.

However, users were unhappy with that. Especially so with the page
terminator. You never want to write a page terminator unless it is
explicitly asked for.

Luckily, you don't have to have an explicit page terminator to have the
semantics work right. You just have to "assume" one at the end of a
file. Doing the same for line terminators isn't much additional work,
and doing so eliminates weird behavior at the end of files that don't
have explicit terminators. A lot of the code in Text_IO is there to
handle these cases properly.

IMHO, Text_IO should never write anything on 'Close', and this
discussion (again) shows why. But it is true that some implementations
do. I'd suggest complaining to the vendor if this is a problem.

          Randy Brukardt








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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-07 21:04           ` Randy Brukardt
@ 2002-11-08  0:03             ` Bj�rn Persson
  2002-11-08  1:36               ` Larry Kilgallen
  2002-11-08 15:10               ` Ted Dennison
  0 siblings, 2 replies; 42+ messages in thread
From: Bj�rn Persson @ 2002-11-08  0:03 UTC (permalink / raw)


On Thu, 7 Nov 2002 15:04:35 -0600
"Randy Brukardt" <randy@rrsoftware.com> wrote:

> Well, Ada does require that a file be terminated by a line terminator.
> Some implementations do actually write this character out if it is
> missing. Indeed, the first (Ada 83) version of Text_IO for Janus/Ada
> worked this way.
> 
> However, users were unhappy with that. Especially so with the page
> terminator. You never want to write a page terminator unless it is
> explicitly asked for.
> 
> Luckily, you don't have to have an explicit page terminator to have the
> semantics work right. You just have to "assume" one at the end of a
> file. Doing the same for line terminators isn't much additional work,
> and doing so eliminates weird behavior at the end of files that don't
> have explicit terminators. A lot of the code in Text_IO is there to
> handle these cases properly.
> 
> IMHO, Text_IO should never write anything on 'Close', and this
> discussion (again) shows why. But it is true that some implementations
> do. I'd suggest complaining to the vendor if this is a problem.

I don't think Text_IO's design is a problem in itself. It can be 
quite useful when working with text files. The problem is that the 
standard input and output streams are defined to be text files. The 
programmer should be allowed to decide whether Text_IO or 
Sequential_IO is most appropriate.

Bj�rn Persson



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-08  0:03             ` Bj�rn Persson
@ 2002-11-08  1:36               ` Larry Kilgallen
  2002-11-08 14:53                 ` Stephen Leake
                                   ` (3 more replies)
  2002-11-08 15:10               ` Ted Dennison
  1 sibling, 4 replies; 42+ messages in thread
From: Larry Kilgallen @ 2002-11-08  1:36 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

In article <20021108010337.395c1a90.bjorn_persson.spam-is-evil@sverige.nu>, Bj�rn Persson <bjorn_persson.spam-is-evil@sverige.nu> writes:

> I don't think Text_IO's design is a problem in itself. It can be 
> quite useful when working with text files. The problem is that the 
> standard input and output streams are defined to be text files. The 
> programmer should be allowed to decide whether Text_IO or 
> Sequential_IO is most appropriate.

On VMS you would just open a Sequential_IO file for output saying the
name is SYS$OUTPUT.  Isn't the same thing available on other operating
systmes ?



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-05 22:48       ` Robert A Duff
                           ` (2 preceding siblings ...)
  2002-11-06  8:45         ` Fraser Wilson
@ 2002-11-08 10:03         ` Jacob Sparre Andersen
  3 siblings, 0 replies; 42+ messages in thread
From: Jacob Sparre Andersen @ 2002-11-08 10:03 UTC (permalink / raw)


Robert A Duff asked:

> "Warren W. Gay VE3WWG" <ve3wwg@cogeco.ca> writes:
> 
>>You should also be aware from A.12.2.(7) that "Performing operations on
>>the stream associated with a text file does not affect the column,
>>line, or page counts."
> 
> Does anybody actually use those counts?

Yes.  I might even say that it is seldom that I write a 
program that doesn't use the line count function.  (it is 
not quite true, but it is very useful for reporting which 
line in a file caused an error)
Jacob
-- 
"Those who will not reason, are bigots,
  those who cannot, are fools, and
  those who dare not, are slaves."




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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-08  1:36               ` Larry Kilgallen
@ 2002-11-08 14:53                 ` Stephen Leake
  2002-11-09 14:33                   ` Marin David Condic
  2002-11-08 16:40                 ` Bj�rn Persson
                                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 42+ messages in thread
From: Stephen Leake @ 2002-11-08 14:53 UTC (permalink / raw)


Kilgallen@SpamCop.net (Larry Kilgallen) writes:

> On VMS you would just open a Sequential_IO file for output saying the
> name is SYS$OUTPUT.  Isn't the same thing available on other operating
> systmes ?

Ah, the One True Operating System :).

I new there was a reason I liked it :).

-- 
-- Stephe



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-08  0:03             ` Bj�rn Persson
  2002-11-08  1:36               ` Larry Kilgallen
@ 2002-11-08 15:10               ` Ted Dennison
  2002-11-08 15:57                 ` Larry Kilgallen
                                   ` (3 more replies)
  1 sibling, 4 replies; 42+ messages in thread
From: Ted Dennison @ 2002-11-08 15:10 UTC (permalink / raw)


Bj rn Persson <bjorn_persson.spam-is-evil@sverige.nu> wrote in message news:<20021108010337.395c1a90.bjorn_persson.spam-is-evil@sverige.nu>...
> I don't think Text_IO's design is a problem in itself. It can be 
> quite useful when working with text files. 

Actually, I do think so. It is quite possible to create "text files"
in an editor that don't have a line terminator on the last line. I've
had problems in the past with Ada Text_IO ignoring such lines, causing
an important line in a configuration file to be ignored. I can
understand the arcania behind the rule, and tell myself to make sure I
put a line terminator on the last line whenever I'm editing. However,
users who aren't Ada developers just don't understand, and (probably
rightly) consider it a bug.



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-08 16:40                 ` Bj�rn Persson
@ 2002-11-08 15:55                   ` Larry Kilgallen
  2002-11-08 18:07                     ` Bj�rn Persson
  0 siblings, 1 reply; 42+ messages in thread
From: Larry Kilgallen @ 2002-11-08 15:55 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1204 bytes --]

In article <20021108174023.69948170.bjorn_persson.spam-is-evil@sverige.nu>, Bj�rn Persson <bjorn_persson.spam-is-evil@sverige.nu> writes:
> On 7 Nov 2002 19:36:32 -0600
> Kilgallen@SpamCop.net (Larry Kilgallen) wrote:
> 
>> On VMS you would just open a Sequential_IO file for output saying the
>> name is SYS$OUTPUT.  Isn't the same thing available on other operating
>> systmes ?
> 
> Not that I know of. That would require a special filename meaning "the file or pipe or whatever that is currently associated with the standard output stream". Is that what SYS$OUTPUT is in VMS?

Yes, that is what SYS$OUTPUT is.  By default it is a process-permanent
file so successive programs writing to SYS$OUTPUT all write to the same
version of the file (if it is on disk) rather than each creating a new
versions.  Of course versioning is irrelevant if the output is a terminal,
although it does matter if the output is to an ANSI magtape.

> I tried using Ada.Text_IO.Name on the standard files and got "*stdi", *stdou" and "*stder" regardless of whether they were redirected or not. Open(file, Out_File, "*stder") tried to open a disk file with that name.

To what operating system do those results apply ?



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-08 15:10               ` Ted Dennison
@ 2002-11-08 15:57                 ` Larry Kilgallen
  2002-11-08 16:16                 ` Preben Randhol
                                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 42+ messages in thread
From: Larry Kilgallen @ 2002-11-08 15:57 UTC (permalink / raw)


In article <slrnasnoqd.86o.randhol+news@kiuk0152.chembio.ntnu.no>, Preben Randhol <randhol+news@pvv.org> writes:
> Ted Dennison wrote:
>> Bj rn Persson <bjorn_persson.spam-is-evil@sverige.nu> wrote in message news:<20021108010337.395c1a90.bjorn_persson.spam-is-evil@sverige.nu>...
>>> I don't think Text_IO's design is a problem in itself. It can be 
>>> quite useful when working with text files. 
>> 
>> Actually, I do think so. It is quite possible to create "text files"
>> in an editor that don't have a line terminator on the last line.
> 
> Do you mean that the last line of text does not have a line terminator
> or that there isn't an empty line only containing a line terminator?

Such a distinction would result from having a "line terminator" as an
embedded character rather than an out-of-band characteristic of the
file.  VMS does not have that problem with line breaks, but it _does_
have that problem with page breaks, as inserting an in-band character
is the only method VMS provides for indicating a page break.

Does anybody know how AS/400 or MVS handle this sort of thing ?



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-08 15:10               ` Ted Dennison
  2002-11-08 15:57                 ` Larry Kilgallen
@ 2002-11-08 16:16                 ` Preben Randhol
  2002-11-08 17:30                 ` Bj�rn Persson
  2002-11-08 20:32                 ` Randy Brukardt
  3 siblings, 0 replies; 42+ messages in thread
From: Preben Randhol @ 2002-11-08 16:16 UTC (permalink / raw)


Ted Dennison wrote:
> Bj rn Persson <bjorn_persson.spam-is-evil@sverige.nu> wrote in message news:<20021108010337.395c1a90.bjorn_persson.spam-is-evil@sverige.nu>...
>> I don't think Text_IO's design is a problem in itself. It can be 
>> quite useful when working with text files. 
> 
> Actually, I do think so. It is quite possible to create "text files"
> in an editor that don't have a line terminator on the last line.

Do you mean that the last line of text does not have a line terminator
or that there isn't an empty line only containing a line terminator?


-- 
Preben Randhol ------------------------ http://www.pvv.org/~randhol/ --
�There are three things you can do to a woman. You can love her, suffer
 for her, or turn her into literature.�  - Justine, by Lawrence Durrell



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-08  1:36               ` Larry Kilgallen
  2002-11-08 14:53                 ` Stephen Leake
@ 2002-11-08 16:40                 ` Bj�rn Persson
  2002-11-08 15:55                   ` Larry Kilgallen
  2002-11-08 19:09                 ` Matthew Woodcraft
  2002-11-08 20:34                 ` Randy Brukardt
  3 siblings, 1 reply; 42+ messages in thread
From: Bj�rn Persson @ 2002-11-08 16:40 UTC (permalink / raw)


On 7 Nov 2002 19:36:32 -0600
Kilgallen@SpamCop.net (Larry Kilgallen) wrote:

> On VMS you would just open a Sequential_IO file for output saying the
> name is SYS$OUTPUT.  Isn't the same thing available on other operating
> systmes ?

Not that I know of. That would require a special filename meaning "the file or pipe or whatever that is currently associated with the standard output stream". Is that what SYS$OUTPUT is in VMS?

I tried using Ada.Text_IO.Name on the standard files and got "*stdi", *stdou" and "*stder" regardless of whether they were redirected or not. Open(file, Out_File, "*stder") tried to open a disk file with that name.

Bj�rn Persson



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-08 15:10               ` Ted Dennison
  2002-11-08 15:57                 ` Larry Kilgallen
  2002-11-08 16:16                 ` Preben Randhol
@ 2002-11-08 17:30                 ` Bj�rn Persson
  2002-11-08 20:32                 ` Randy Brukardt
  3 siblings, 0 replies; 42+ messages in thread
From: Bj�rn Persson @ 2002-11-08 17:30 UTC (permalink / raw)


On 8 Nov 2002 07:10:18 -0800
dennison@telepath.com (Ted Dennison) wrote:

> Bj rn Persson <bjorn_persson.spam-is-evil@sverige.nu> wrote in message news:<20021108010337.395c1a90.bjorn_persson.spam-is-evil@sverige.nu>...
> > I don't think Text_IO's design is a problem in itself. It can be 
> > quite useful when working with text files. 
> 
> Actually, I do think so. It is quite possible to create "text files"
> in an editor that don't have a line terminator on the last line. I've
> had problems in the past with Ada Text_IO ignoring such lines, causing

I guess the reference manual should have stated that if there isn't 
a page terminator at the end of the file, then there is an implied 
page terminator, and if there is a (real or implied) page terminator 
without a preceding line terminator, then there is an implied line 
terminator. I actually thought it did, but it must have been in Gnat's 
implementation I had seen that.

Bj�rn Persson



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-08 15:55                   ` Larry Kilgallen
@ 2002-11-08 18:07                     ` Bj�rn Persson
  0 siblings, 0 replies; 42+ messages in thread
From: Bj�rn Persson @ 2002-11-08 18:07 UTC (permalink / raw)


On 8 Nov 2002 09:55:16 -0600
Kilgallen@SpamCop.net (Larry Kilgallen) wrote:

> In article <20021108174023.69948170.bjorn_persson.spam-is-evil@sverige.nu>, Bj�rn Persson <bjorn_persson.spam-is-evil@sverige.nu> writes:
> > I tried using Ada.Text_IO.Name on the standard files and got 
> > "*stdi", *stdou" and "*stder" regardless of whether they were 
> > redirected or not. Open(file, Out_File, "*stder") tried to open 
> > a disk file with that name.
> 
> To what operating system do those results apply ?

That was in Redhat 7.2, using Gnat 3.13p.

Bj�rn Persson



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-08  1:36               ` Larry Kilgallen
  2002-11-08 14:53                 ` Stephen Leake
  2002-11-08 16:40                 ` Bj�rn Persson
@ 2002-11-08 19:09                 ` Matthew Woodcraft
  2002-11-08 20:34                 ` Randy Brukardt
  3 siblings, 0 replies; 42+ messages in thread
From: Matthew Woodcraft @ 2002-11-08 19:09 UTC (permalink / raw)


Larry Kilgallen <Kilgallen@SpamCop.net> wrote:
>On VMS you would just open a Sequential_IO file for output saying the
>name is SYS$OUTPUT.  Isn't the same thing available on other operating
>systmes ?

On many modern unix-like systems, you can use something like
  /dev/stdout
or
  /dev/fd/1
or
  /proc/self/fd/1
. But it's not as portable as it might be.

-M-



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-08 15:10               ` Ted Dennison
                                   ` (2 preceding siblings ...)
  2002-11-08 17:30                 ` Bj�rn Persson
@ 2002-11-08 20:32                 ` Randy Brukardt
  3 siblings, 0 replies; 42+ messages in thread
From: Randy Brukardt @ 2002-11-08 20:32 UTC (permalink / raw)


Ted Dennison wrote in message
<4519e058.0211080710.72fa0289@posting.google.com>...
>Actually, I do think so. It is quite possible to create "text files"
>in an editor that don't have a line terminator on the last line. I've
>had problems in the past with Ada Text_IO ignoring such lines, causing
>an important line in a configuration file to be ignored. I can
>understand the arcania behind the rule, and tell myself to make sure I
>put a line terminator on the last line whenever I'm editing. However,
>users who aren't Ada developers just don't understand, and (probably
>rightly) consider it a bug.

That's not a problem with the design of Text_IO, but rather with the
implementation of Text_IO. That certainly doesn't happen in Janus/Ada's
Text_IO.

            Randy.






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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-08  1:36               ` Larry Kilgallen
                                   ` (2 preceding siblings ...)
  2002-11-08 19:09                 ` Matthew Woodcraft
@ 2002-11-08 20:34                 ` Randy Brukardt
  3 siblings, 0 replies; 42+ messages in thread
From: Randy Brukardt @ 2002-11-08 20:34 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]

Larry Kilgallen wrote in message
<8qGdDEJ$BoYu@eisner.encompasserve.org>...
>In article
<20021108010337.395c1a90.bjorn_persson.spam-is-evil@sverige.nu>, Bj�rn
Persson <bjorn_persson.spam-is-evil@sverige.nu> writes:
>
>> I don't think Text_IO's design is a problem in itself. It can be
>> quite useful when working with text files. The problem is that the
>> standard input and output streams are defined to be text files. The
>> programmer should be allowed to decide whether Text_IO or
>> Sequential_IO is most appropriate.
>
>On VMS you would just open a Sequential_IO file for output saying the
>name is SYS$OUTPUT.  Isn't the same thing available on other operating
>systmes ?

Not that I know of. Janus/Ada provides names for standard input and
output as part of the file management in the Ada runtime. (They're
"Stdin:" and "Stdout:" on Windows, and "/dev/stdin" and "/dev/stdout" on
Unix. Those names are never passed to the operating system.) But, of
course using those names is not portable to other Ada compilers.

             Randy.






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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-07  0:44       ` Bj�rn Persson
  2002-11-07 14:41         ` Ted Dennison
@ 2002-11-09 11:37         ` Georg Bauhaus
  1 sibling, 0 replies; 42+ messages in thread
From: Georg Bauhaus @ 2002-11-09 11:37 UTC (permalink / raw)


Bj�rn Persson <bjorn_persson.spam-is-evil@sverige.nu> wrote:
: I've read with Get_Immediate to read it again with Character'Read.
: 
: (I'm using Gnat 3.14p in Windows and 3.13p in Redhat.)
: 
The GNAT reference manual has a section for usign Text_IO with
files that "are not regular files", likes pipes, or other devices.
Have you considered reading the appropriate passages?

-- georg



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-08 14:53                 ` Stephen Leake
@ 2002-11-09 14:33                   ` Marin David Condic
  2002-11-09 15:26                     ` Preben Randhol
  0 siblings, 1 reply; 42+ messages in thread
From: Marin David Condic @ 2002-11-09 14:33 UTC (permalink / raw)


Amen. Amen. and Amen! We've heard talk around here about rewriting Linux (or
some Unix variant) in Ada and I've always thought that at best, such an
endeavor would amount to polishing a turd. (Why rewrite something thats
already been done, to begin with, but if you insist, why Unix?) If someone
wants to rewrite some OS in Ada, then VMS would make an excellent candidate!

MDC
--
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jast.mil/

Send Replies To: m c o n d i c @ a c m . o r g

    "I'd trade it all for just a little more"
        --  Charles Montgomery Burns, [4F10]
======================================================================
Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov> wrote in message
news:uvg386rk8.fsf@gsfc.nasa.gov...
>
> Ah, the One True Operating System :).
>
> I new there was a reason I liked it :).
>






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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-09 15:26                     ` Preben Randhol
@ 2002-11-09 14:36                       ` Larry Kilgallen
  2002-11-10 15:37                       ` Marin David Condic
  1 sibling, 0 replies; 42+ messages in thread
From: Larry Kilgallen @ 2002-11-09 14:36 UTC (permalink / raw)


In article <slrnasqa7u.qs.randhol+news@kiuk0152.chembio.ntnu.no>, Preben Randhol <randhol+news@pvv.org> writes:
> Marin David Condic wrote:
>> already been done, to begin with, but if you insist, why Unix?) If someone
>> wants to rewrite some OS in Ada, then VMS would make an excellent candidate!
> 
> http://www.openvms.org/ ?
> 
> I don't want a rewrite of Linux in Ada. I would want something better.
> It would be nice *if* the OS is intended for desktop, to be able to run
> the applications of Linux. If it is a server OS, then it would be better
> if it was made to run forever and withstand cracking attempts. Not that
> the two are mutually exclusive.

Although I am one of the world's biggest VMS fans, let me point out
that there were many problems when they rewrote the VMSmail program
from Bliss to C.  The bulk of the problems were not caused by the
nature of the C programming language, but rather by the underspecification
of VMSmail.  There were many desireable features of VMSmail in heavy
use by customers that were not apparent from the documentation or the
comments.  They did not work in the initial C implementation, and
much to the shock of those who had done it there were many complaints.

Blanket recoding into another language can be quite harmful.

But I would like to see HP's VMS Development group use _more_ Ada
as they come upon occasions where they need to reimplement anyway.



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-09 14:33                   ` Marin David Condic
@ 2002-11-09 15:26                     ` Preben Randhol
  2002-11-09 14:36                       ` Larry Kilgallen
  2002-11-10 15:37                       ` Marin David Condic
  0 siblings, 2 replies; 42+ messages in thread
From: Preben Randhol @ 2002-11-09 15:26 UTC (permalink / raw)


Marin David Condic wrote:
> already been done, to begin with, but if you insist, why Unix?) If someone
> wants to rewrite some OS in Ada, then VMS would make an excellent candidate!

http://www.openvms.org/ ?

I don't want a rewrite of Linux in Ada. I would want something better.
It would be nice *if* the OS is intended for desktop, to be able to run
the applications of Linux. If it is a server OS, then it would be better
if it was made to run forever and withstand cracking attempts. Not that
the two are mutually exclusive.

Preben
-- 
Preben Randhol ------------------------ http://www.pvv.org/~randhol/ --
�There are three things you can do to a woman. You can love her, suffer
 for her, or turn her into literature.�  - Justine, by Lawrence Durrell



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

* Re: Can I treat Current_Output as a file of bytes?
  2002-11-09 15:26                     ` Preben Randhol
  2002-11-09 14:36                       ` Larry Kilgallen
@ 2002-11-10 15:37                       ` Marin David Condic
  1 sibling, 0 replies; 42+ messages in thread
From: Marin David Condic @ 2002-11-10 15:37 UTC (permalink / raw)


A simple duplication of VMS would really be as pointless as a simple
duplication of Linux. Any proposed Ada OS ought to endeavor to be something
"New" and incorporate some fresh ideas or it doesn't have any sort of
product distinction. I just think that if someone is going to go duplicate
something, at least pick something really worth emulating.

It would probably be fairly easy to maintain some sort of basic
compilable-level compatibility with Linux. You'd just need to make sure that
the OS supported some set of primitives that would make it possible to
translate a Linux program into one that would work on the new OS. (If you
don't have Posix calls at least make it possible to create a thick binding
that would provide Posix calls.) I'd imagine that some kind of GUI-level
compatibility would not be hard to achieve so long as it had a unique "Look
& Feel" to it. Probably setting a goal of "Easy to port" would be
reasonable. Binary compatibility is probably a waste of time as you'd just
end up with a work-alike system and that's not providing something "New"

MDC
--
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jast.mil/

Send Replies To: m c o n d i c @ a c m . o r g

    "I'd trade it all for just a little more"
        --  Charles Montgomery Burns, [4F10]
======================================================================

Preben Randhol <randhol+news@pvv.org> wrote in message
news:slrnasqa7u.qs.randhol+news@kiuk0152.chembio.ntnu.no...
>
> http://www.openvms.org/ ?
>
> I don't want a rewrite of Linux in Ada. I would want something better.
> It would be nice *if* the OS is intended for desktop, to be able to run
> the applications of Linux. If it is a server OS, then it would be better
> if it was made to run forever and withstand cracking attempts. Not that
> the two are mutually exclusive.
>






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

end of thread, other threads:[~2002-11-10 15:37 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-04 22:34 Can I treat Current_Output as a file of bytes? Bj�rn Persson
2002-11-05 14:30 ` Ted Dennison
2002-11-05 16:01   ` Bj�rn Persson
2002-11-05 18:13     ` Warren W. Gay VE3WWG
2002-11-05 22:14       ` Bj�rn Persson
2002-11-05 22:48       ` Robert A Duff
2002-11-06  0:42         ` Jeffrey Creem
2002-11-06  7:14         ` Dale Stanbrough
2002-11-06  8:45         ` Fraser Wilson
2002-11-08 10:03         ` Jacob Sparre Andersen
2002-11-05 22:27     ` Ted Dennison
2002-11-06 23:40       ` Randy Brukardt
2002-11-07  2:45         ` Larry Kilgallen
2002-11-07  4:04         ` Ted Dennison
2002-11-07 19:01           ` Bj�rn Persson
2002-11-07 21:04           ` Randy Brukardt
2002-11-08  0:03             ` Bj�rn Persson
2002-11-08  1:36               ` Larry Kilgallen
2002-11-08 14:53                 ` Stephen Leake
2002-11-09 14:33                   ` Marin David Condic
2002-11-09 15:26                     ` Preben Randhol
2002-11-09 14:36                       ` Larry Kilgallen
2002-11-10 15:37                       ` Marin David Condic
2002-11-08 16:40                 ` Bj�rn Persson
2002-11-08 15:55                   ` Larry Kilgallen
2002-11-08 18:07                     ` Bj�rn Persson
2002-11-08 19:09                 ` Matthew Woodcraft
2002-11-08 20:34                 ` Randy Brukardt
2002-11-08 15:10               ` Ted Dennison
2002-11-08 15:57                 ` Larry Kilgallen
2002-11-08 16:16                 ` Preben Randhol
2002-11-08 17:30                 ` Bj�rn Persson
2002-11-08 20:32                 ` Randy Brukardt
2002-11-07  0:44       ` Bj�rn Persson
2002-11-07 14:41         ` Ted Dennison
2002-11-07 17:41           ` Bj�rn Persson
2002-11-09 11:37         ` Georg Bauhaus
2002-11-06  8:26 ` Pascal Obry
  -- strict thread matches above, loose matches on Subject: below --
2002-11-06  5:54 Grein, Christoph
2002-11-07  6:28 Grein, Christoph
2002-11-07 17:04 ` Bj�rn Persson
2002-11-07 19:05 Kees de LezenneCoulander

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