comp.lang.ada
 help / color / mirror / Atom feed
* Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-24 12:46   ` soft-eng
@ 2003-04-24 13:04     ` Jacob Sparre Andersen
  2003-04-24 17:50       ` soft-eng
  0 siblings, 1 reply; 186+ messages in thread
From: Jacob Sparre Andersen @ 2003-04-24 13:04 UTC (permalink / raw)


[ FUT comp.lang.ada ]

soft-eng wrote:

> But if you
> had to develop device drivers for a living, and if
> the language was truly your choice, would you chose Ada as
> the language?

Yes.

> I think the only "yes" answers would be from
> people who only know Ada and/or have never
> written a device driver.

Who would ever choose a language they didn't know for professional work?

Jacob
-- 
"Banning open source would have immediate, broad, and
  strongly negative impacts on the ability of many sensitive
  and security-focused DOD groups to protect themselves
  against cyberattacks"                        -- Mitre Corp.




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-24 13:04     ` Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died) Jacob Sparre Andersen
@ 2003-04-24 17:50       ` soft-eng
  2003-04-24 18:37         ` tmoran
                           ` (5 more replies)
  0 siblings, 6 replies; 186+ messages in thread
From: soft-eng @ 2003-04-24 17:50 UTC (permalink / raw)


Jacob Sparre Andersen <sparre@crs4.it> wrote in message news:<3EA7E0E3.8020407@crs4.it>...
> [ FUT comp.lang.ada ]
> 
> soft-eng wrote:
> 
> > But if you
> > had to develop device drivers for a living, and if
> > the language was truly your choice, would you chose Ada as
> > the language?
> 
> Yes.
> 

Hmmm.  Very interesting.

But I am sure you folks couldn't come up with some similar
pronouncements for AI as well.  How many people out there who have
years and years of Artificial Intelligence experience and
who really think Ada is the best language for this purpose?

Any at all?



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-24 17:50       ` soft-eng
@ 2003-04-24 18:37         ` tmoran
  2003-04-24 19:11         ` Robert Spooner
                           ` (4 subsequent siblings)
  5 siblings, 0 replies; 186+ messages in thread
From: tmoran @ 2003-04-24 18:37 UTC (permalink / raw)


>But I am sure you folks couldn't come up with some similar
>pronouncements for AI as well.  How many people out there who have
>years and years of Artificial Intelligence experience and
>who really think Ada is the best language for this purpose?
>
>Any at all?
  I recall seeing a book with a title like "Artificial Intelligence with
Ada" in Computer Literacy Bookstore some time ago.  Not being an AI person
(having spent my time with things like device drivers in multiple
languages and on multiple machines) I don't know if Ada is the best
language for AI, but clearly someone thought it a good enough idea to
write an entire book on the subject.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-24 17:50       ` soft-eng
  2003-04-24 18:37         ` tmoran
@ 2003-04-24 19:11         ` Robert Spooner
  2003-04-25 13:01           ` soft-eng
  2003-04-24 20:10         ` Larry Kilgallen
                           ` (3 subsequent siblings)
  5 siblings, 1 reply; 186+ messages in thread
From: Robert Spooner @ 2003-04-24 19:11 UTC (permalink / raw)


soft-eng wrote:
> Jacob Sparre Andersen <sparre@crs4.it> wrote in message news:<3EA7E0E3.8020407@crs4.it>...
> 
>>[ FUT comp.lang.ada ]
>>
>>soft-eng wrote:
>>
>>
>>>But if you
>>>had to develop device drivers for a living, and if
>>>the language was truly your choice, would you chose Ada as
>>>the language?
>>
>>Yes.
>>
> 
> 
> Hmmm.  Very interesting.
> 
> But I am sure you folks couldn't come up with some similar
> pronouncements for AI as well.  How many people out there who have
> years and years of Artificial Intelligence experience and
> who really think Ada is the best language for this purpose?
> 
> Any at all?

Yes. It's 10X the speed of lisp for our application.

-- 
                             Robert L. Spooner
                      Registered Professional Engineer
                        Associate Research Engineer
                   Intelligent Control Systems Department

          Applied Research Laboratory        Phone: (814) 863-4120
          The Pennsylvania State University  FAX:   (814) 863-7841
          P. O. Box 30
          State College, PA 16804-0030       rls19@psu.edu




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-24 17:50       ` soft-eng
  2003-04-24 18:37         ` tmoran
  2003-04-24 19:11         ` Robert Spooner
@ 2003-04-24 20:10         ` Larry Kilgallen
  2003-04-25 17:22           ` soft-eng
  2003-04-24 23:30         ` Kaz Kylheku
                           ` (2 subsequent siblings)
  5 siblings, 1 reply; 186+ messages in thread
From: Larry Kilgallen @ 2003-04-24 20:10 UTC (permalink / raw)


In article <9fa75d42.0304240950.45114a39@posting.google.com>, softeng3456@netscape.net (soft-eng) writes:
> Jacob Sparre Andersen <sparre@crs4.it> wrote in message news:<3EA7E0E3.8020407@crs4.it>...
>> [ FUT comp.lang.ada ]
>> 
>> soft-eng wrote:
>> 
>> > But if you
>> > had to develop device drivers for a living, and if
>> > the language was truly your choice, would you chose Ada as
>> > the language?
>> 
>> Yes.
>> 
> 
> Hmmm.  Very interesting.
> 
> But I am sure you folks couldn't come up with some similar
> pronouncements for AI as well.  How many people out there who have
> years and years of Artificial Intelligence experience and
> who really think Ada is the best language for this purpose?

Hopefully there is nobody who thinks that Ada is automatically the
best language for _everything_.  But to find people doing AI in Ada
(if any) please post directly to comp.lang.ada, without the crossposts.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-24 17:50       ` soft-eng
                           ` (2 preceding siblings ...)
  2003-04-24 20:10         ` Larry Kilgallen
@ 2003-04-24 23:30         ` Kaz Kylheku
  2003-04-27  1:53           ` Frank J. Lhota
  2003-04-25  7:46         ` Dmitry A. Kazakov
  2003-04-30  3:09         ` Will
  5 siblings, 1 reply; 186+ messages in thread
From: Kaz Kylheku @ 2003-04-24 23:30 UTC (permalink / raw)


softeng3456@netscape.net (soft-eng) wrote in message news:<9fa75d42.0304240950.45114a39@posting.google.com>...
> Jacob Sparre Andersen <sparre@crs4.it> wrote in message news:<3EA7E0E3.8020407@crs4.it>...
> > [ FUT comp.lang.ada ]
> > 
> > soft-eng wrote:
> > 
> > > But if you
> > > had to develop device drivers for a living, and if
> > > the language was truly your choice, would you chose Ada as
> > > the language?
> > 
> > Yes.
> > 
> 
> Hmmm.  Very interesting.
> 
> But I am sure you folks couldn't come up with some similar
> pronouncements for AI as well.  How many people out there who have
> years and years of Artificial Intelligence experience and
> who really think Ada is the best language for this purpose?
> 
> Any at all?


Ada is a high level assembly language like C, Pascal, Modula, PL/I and
so on. It's suitable only for stone age systems programming. It
doesn't matter at all which of these types of languages you use for
this kind of programming; the choice is purely pragmatic based on the
non-technical factors that make some languages more preferred than
other languages for programming some platforms.

All of these languages are really shades of the same language; they
are syntactic sugars for manipulating objects which are concrete
pieces of memory with explicit addresses, and have static types that
closely correspond to bitwise representations. With these languages,
you tell the machine what tiny word-sized quantities to funnel through
its processor and in what order, to get the job done.

Although Ada may be wonderful for device drivers in principle, in some
platforms you will only find the hooks, toolchain support and run-time
support for writing your driver in C. Boo hoo; you may have to trade
one idiotic language for another, what a loss!

Likewise, in some other platform, Ada may be the tool of choice,
because the whole kernel is already written in it, and the support
from that kernel that you need to use in your driver is already
expressed in terms of Ada. If you wanted to write in C, you would have
to do a bunch of work just to bootstrap yourself into being able to
write a "hello, world" driver, which could have been spent writing
half of the actual production driver in Ada.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-24 17:50       ` soft-eng
                           ` (3 preceding siblings ...)
  2003-04-24 23:30         ` Kaz Kylheku
@ 2003-04-25  7:46         ` Dmitry A. Kazakov
  2003-04-30  3:09         ` Will
  5 siblings, 0 replies; 186+ messages in thread
From: Dmitry A. Kazakov @ 2003-04-25  7:46 UTC (permalink / raw)


soft-eng wrote:

> But I am sure you folks couldn't come up with some similar
> pronouncements for AI as well.  How many people out there who have
> years and years of Artificial Intelligence experience and
> who really think Ada is the best language for this purpose?
> 
> Any at all?

Me.

My PhD thesis work on fuzzy machine learning was in Ada 83, 10 years ago, 
but I still can run my code on practically any modern system. I also used 
Ada 95 for image pattern recognition, that's from production quality 
control systems to rain detection sensors.

The only reason I ever used a language other than Ada is when a customer 
required so.

-- 
Regards,
Dmitry A. Kazakov
www.dmitry-kazakov.de



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-24 19:11         ` Robert Spooner
@ 2003-04-25 13:01           ` soft-eng
  2003-04-25 14:02             ` Larry Kilgallen
  0 siblings, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-04-25 13:01 UTC (permalink / raw)


Robert Spooner <rls19@psu.edu> wrote in message news:<3EA836D4.1020004@psu.edu>...
> soft-eng wrote:
> > Jacob Sparre Andersen <sparre@crs4.it> wrote in message news:<3EA7E0E3.8020407@crs4.it>...
> > 
> >>[ FUT comp.lang.ada ]
> >>
> >>soft-eng wrote:
> >>
> >>
> >>>But if you
> >>>had to develop device drivers for a living, and if
> >>>the language was truly your choice, would you chose Ada as
> >>>the language?
> >>
> >>Yes.
> >>
> > 
> > 
> > Hmmm.  Very interesting.
> > 
> > But I am sure you folks couldn't come up with some similar
> > pronouncements for AI as well.  How many people out there who have
> > years and years of Artificial Intelligence experience and
> > who really think Ada is the best language for this purpose?
> > 
> > Any at all?
> 
> Yes. It's 10X the speed of lisp for our application.
> 

All right!!  And now, can we have someone come up to
claim Ada is the best for rule-based applications?

How about it being the best teaching language?



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-25 13:01           ` soft-eng
@ 2003-04-25 14:02             ` Larry Kilgallen
  0 siblings, 0 replies; 186+ messages in thread
From: Larry Kilgallen @ 2003-04-25 14:02 UTC (permalink / raw)


In article <9fa75d42.0304250501.2053ba4c@posting.google.com>, softeng3456@netscape.net (soft-eng) writes:

> All right!!  And now, can we have someone come up to
> claim Ada is the best for rule-based applications?
> 
> How about it being the best teaching language?

If you are pursuing a course of baiting Ada supporters, please
restrict your posts to comp.lang.ada.



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

* RE: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
@ 2003-04-25 14:26 Lionel.DRAGHI
  0 siblings, 0 replies; 186+ messages in thread
From: Lionel.DRAGHI @ 2003-04-25 14:26 UTC (permalink / raw)
  To: comp.lang.ada



| -----Message d'origine-----
| De: Kilgallen@SpamCop.net [mailto:Kilgallen@SpamCop.net]
..
| > All right!!  And now, can we have someone come up to
| > claim Ada is the best for rule-based applications?
| > 
| > How about it being the best teaching language?
| 
| If you are pursuing a course of baiting Ada supporters, please
| restrict your posts to comp.lang.ada.

Or better, just stop this troll.

Lionel Draghi



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-24 20:10         ` Larry Kilgallen
@ 2003-04-25 17:22           ` soft-eng
  2003-04-25 18:24             ` Chad R. Meiners
  0 siblings, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-04-25 17:22 UTC (permalink / raw)


Kilgallen@SpamCop.net (Larry Kilgallen) wrote in message news:<gpyti6DVkCKo@eisner.encompasserve.org>...
> In article <9fa75d42.0304240950.45114a39@posting.google.com>, softeng3456@netscape.net (soft-eng) writes:
> > Jacob Sparre Andersen <sparre@crs4.it> wrote in message news:<3EA7E0E3.8020407@crs4.it>...
> >> [ FUT comp.lang.ada ]
> >> 
> >> soft-eng wrote:
> >> 
> >> > But if you
> >> > had to develop device drivers for a living, and if
> >> > the language was truly your choice, would you chose Ada as
> >> > the language?
> >> 
> >> Yes.
> >> 
> > 
> > Hmmm.  Very interesting.
> > 
> > But I am sure you folks couldn't come up with some similar
> > pronouncements for AI as well.  How many people out there who have
> > years and years of Artificial Intelligence experience and
> > who really think Ada is the best language for this purpose?
> 
> Hopefully there is nobody who thinks that Ada is automatically the
> best language for _everything_.  But to find people doing AI in Ada
> (if any) please post directly to comp.lang.ada, without the crossposts.

I wasn't really trying to find anybody doing AI in Ada, just trying
to find exactly how degenerate the arguments can get :-)



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-25 17:22           ` soft-eng
@ 2003-04-25 18:24             ` Chad R. Meiners
  0 siblings, 0 replies; 186+ messages in thread
From: Chad R. Meiners @ 2003-04-25 18:24 UTC (permalink / raw)


"soft-eng" <softeng3456@netscape.net> wrote in message
news:9fa75d42.0304250922.50104e0b@posting.google.com...
> I wasn't really trying to find anybody doing AI in Ada, just trying
> to find exactly how degenerate the arguments can get :-)

What are you bothing to see how degenerate your arguments can get?





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-24 23:30         ` Kaz Kylheku
@ 2003-04-27  1:53           ` Frank J. Lhota
  0 siblings, 0 replies; 186+ messages in thread
From: Frank J. Lhota @ 2003-04-27  1:53 UTC (permalink / raw)


"Kaz Kylheku" <kaz@ashi.footprints.net> wrote in message
news:cf333042.0304241530.1e32ec98@posting.google.com...
> softeng3456@netscape.net (soft-eng) wrote in message
news:<9fa75d42.0304240950.45114a39@posting.google.com>...
> Although Ada may be wonderful for device drivers in principle, in some
> platforms you will only find the hooks, toolchain support and run-time
> support for writing your driver in C. Boo hoo; you may have to trade
> one idiotic language for another, what a loss!

You're right. From now on, I'm going to write all my drivers in Smalltalk.





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-24 17:50       ` soft-eng
                           ` (4 preceding siblings ...)
  2003-04-25  7:46         ` Dmitry A. Kazakov
@ 2003-04-30  3:09         ` Will
  2003-04-30  6:13           ` John R. Strohm
  5 siblings, 1 reply; 186+ messages in thread
From: Will @ 2003-04-30  3:09 UTC (permalink / raw)


Deep blue. Raw hardware power with some user interface written in C.
Try to beat that with Ada.




softeng3456@netscape.net (soft-eng) wrote in message news:<9fa75d42.0304240950.45114a39@posting.google.com>...
> Jacob Sparre Andersen <sparre@crs4.it> wrote in message news:<3EA7E0E3.8020407@crs4.it>...
> > [ FUT comp.lang.ada ]
> > 
> > soft-eng wrote:
> > 
> > > But if you
> > > had to develop device drivers for a living, and if
> > > the language was truly your choice, would you chose Ada as
> > > the language?
> > 
> > Yes.
> > 
> 
> Hmmm.  Very interesting.
> 
> But I am sure you folks couldn't come up with some similar
> pronouncements for AI as well.  How many people out there who have
> years and years of Artificial Intelligence experience and
> who really think Ada is the best language for this purpose?
> 
> Any at all?



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-30  3:09         ` Will
@ 2003-04-30  6:13           ` John R. Strohm
  2003-04-30 12:31             ` Will
  2003-04-30 16:35             ` Kaz Kylheku
  0 siblings, 2 replies; 186+ messages in thread
From: John R. Strohm @ 2003-04-30  6:13 UTC (permalink / raw)


Apples and oranges, Will.

The interesting comparison would be to give both sides the same hardware
power, and do the UI software in Ada vs. C.

"Will" <wv9557@yahoo.com> wrote in message
news:4a885870.0304291909.300765f@posting.google.com...
> Deep blue. Raw hardware power with some user interface written in C.
> Try to beat that with Ada.
>
>
>
>
> softeng3456@netscape.net (soft-eng) wrote in message
news:<9fa75d42.0304240950.45114a39@posting.google.com>...
> > Jacob Sparre Andersen <sparre@crs4.it> wrote in message
news:<3EA7E0E3.8020407@crs4.it>...
> > > [ FUT comp.lang.ada ]
> > >
> > > soft-eng wrote:
> > >
> > > > But if you
> > > > had to develop device drivers for a living, and if
> > > > the language was truly your choice, would you chose Ada as
> > > > the language?
> > >
> > > Yes.
> > >
> >
> > Hmmm.  Very interesting.
> >
> > But I am sure you folks couldn't come up with some similar
> > pronouncements for AI as well.  How many people out there who have
> > years and years of Artificial Intelligence experience and
> > who really think Ada is the best language for this purpose?
> >
> > Any at all?





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-30  6:13           ` John R. Strohm
@ 2003-04-30 12:31             ` Will
  2003-04-30 17:17               ` Chad R. Meiners
                                 ` (2 more replies)
  2003-04-30 16:35             ` Kaz Kylheku
  1 sibling, 3 replies; 186+ messages in thread
From: Will @ 2003-04-30 12:31 UTC (permalink / raw)


Now if you want a challenge try to write an Ada chess program to beat
GNU chess. It's all C.

"John R. Strohm" <strohm@airmail.net> wrote in message news:<416273D61ACF7FEF.82C1D1AC17296926.FF0BFD4934A03813@lp.airnews.net>...
> Apples and oranges, Will.
> 
> The interesting comparison would be to give both sides the same hardware
> power, and do the UI software in Ada vs. C.
> 
> "Will" <wv9557@yahoo.com> wrote in message
> news:4a885870.0304291909.300765f@posting.google.com...
> > Deep blue. Raw hardware power with some user interface written in C.
> > Try to beat that with Ada.
> >
> >
> >
> >
> > softeng3456@netscape.net (soft-eng) wrote in message
>  news:<9fa75d42.0304240950.45114a39@posting.google.com>...
> > > Jacob Sparre Andersen <sparre@crs4.it> wrote in message
>  news:<3EA7E0E3.8020407@crs4.it>...
> > > > [ FUT comp.lang.ada ]
> > > >
> > > > soft-eng wrote:
> > > >
> > > > > But if you
> > > > > had to develop device drivers for a living, and if
> > > > > the language was truly your choice, would you chose Ada as
> > > > > the language?
> > > >
> > > > Yes.
> > > >
> > >
> > > Hmmm.  Very interesting.
> > >
> > > But I am sure you folks couldn't come up with some similar
> > > pronouncements for AI as well.  How many people out there who have
> > > years and years of Artificial Intelligence experience and
> > > who really think Ada is the best language for this purpose?
> > >
> > > Any at all?



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-30  6:13           ` John R. Strohm
  2003-04-30 12:31             ` Will
@ 2003-04-30 16:35             ` Kaz Kylheku
  2003-04-30 17:22               ` Frank J. Lhota
  2003-04-30 20:15               ` John R. Strohm
  1 sibling, 2 replies; 186+ messages in thread
From: Kaz Kylheku @ 2003-04-30 16:35 UTC (permalink / raw)


"John R. Strohm" <strohm@airmail.net> wrote in message news:<416273D61ACF7FEF.82C1D1AC17296926.FF0BFD4934A03813@lp.airnews.net>...
> Apples and oranges, Will.
> 
> The interesting comparison would be to give both sides the same hardware
> power, and do the UI software in Ada vs. C.

Newsflash: ``Ada versus C'' is not interesting. Ada and C are much
more similar than they are different. If you don't think so, it's only
because you are too absorbed in the arcane details that separate your
favorite high level assembly language from the next one.

An Ada versus C programming context is the coding equivalent of a
three-legged race in which each side thinks that their particular
method of tying legs together gives them an advantage.

Writing UI in either Ada or C is a waste of productivity that could
only possibly be justified in a freeware project, or some
tax-dollar-supported researchy thing. (To be clear, I don't mean
*morally* justified, only economically).



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-30 12:31             ` Will
@ 2003-04-30 17:17               ` Chad R. Meiners
  2003-05-01  3:37                 ` Will
       [not found]               ` <fhm6o-3u2.ln1@beastie.ix.netcom.com>
  2003-05-02  1:17               ` Richard Riehle
  2 siblings, 1 reply; 186+ messages in thread
From: Chad R. Meiners @ 2003-04-30 17:17 UTC (permalink / raw)


The challenge would have nothing to do with the language used to implement
the algorithm.  The GNU chess algorithm is what determines its game playing
ability not its implementation language.

"Will" <wv9557@yahoo.com> wrote in message
news:4a885870.0304300431.49a61bfa@posting.google.com...
> Now if you want a challenge try to write an Ada chess program to beat
> GNU chess. It's all C.





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-30 16:35             ` Kaz Kylheku
@ 2003-04-30 17:22               ` Frank J. Lhota
  2003-05-01 19:03                 ` Kaz Kylheku
  2003-04-30 20:15               ` John R. Strohm
  1 sibling, 1 reply; 186+ messages in thread
From: Frank J. Lhota @ 2003-04-30 17:22 UTC (permalink / raw)


"Kaz Kylheku" <kaz@ashi.footprints.net> wrote in message
news:cf333042.0304300835.4800e03e@posting.google.com...
>  If you don't think so, it's only
> because you are too absorbed in the arcane details that separate your
> favorite high level assembly language from the next one.

??? A language with generics, exceptions and dispatching is still a
high-level assembly language???





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-30 16:35             ` Kaz Kylheku
  2003-04-30 17:22               ` Frank J. Lhota
@ 2003-04-30 20:15               ` John R. Strohm
  2003-05-01 14:21                 ` soft-eng
  1 sibling, 1 reply; 186+ messages in thread
From: John R. Strohm @ 2003-04-30 20:15 UTC (permalink / raw)


"Kaz Kylheku" <kaz@ashi.footprints.net> wrote in message
news:cf333042.0304300835.4800e03e@posting.google.com...
> "John R. Strohm" <strohm@airmail.net> wrote in message
news:<416273D61ACF7FEF.82C1D1AC17296926.FF0BFD4934A03813@lp.airnews.net>...
> > Apples and oranges, Will.
> >
> > The interesting comparison would be to give both sides the same hardware
> > power, and do the UI software in Ada vs. C.
>
> Newsflash: ``Ada versus C'' is not interesting. Ada and C are much
> more similar than they are different. If you don't think so, it's only
> because you are too absorbed in the arcane details that separate your
> favorite high level assembly language from the next one.
>
> An Ada versus C programming context is the coding equivalent of a
> three-legged race in which each side thinks that their particular
> method of tying legs together gives them an advantage.
>
> Writing UI in either Ada or C is a waste of productivity that could
> only possibly be justified in a freeware project, or some
> tax-dollar-supported researchy thing. (To be clear, I don't mean
> *morally* justified, only economically).

What such a comparison would yield is a data point on the graph of cost per
function point vs. choice of language.

There is considerable evidence that strongly suggests that Ada, all by
itself, makes a significant positive difference in programmer productivity
over the embedded software lifecycle, by reducing defect incidence and
promoting earlier defect detection (i.e., compile-time vs. run-time) and
easier debugging and correction (e.g., by a compiler error message vs. a
core dump), when one controls statistically for all other factors.  It must
be understood that the embedded software lifecycle is one or two orders of
magnitude longer than the typical commercial lifecycle, and the cost impact
of defects escaping into a fielded project is MUCH higher.  (Commercial web
applicatiosn don't kill people when they malfunction.  Computer-controlled
radiation therapy machines can, and have.  Do a search on "Therac-25".)

Or is it your belief that cost of software development, and cost of quality,
is immaterial?  If so, I recommend you read Phil Crosby's "Quality is Free",
where he advances the concept of cost of quality, by quantifying the cost of
reworking defective material and then showing that the added cost of NOT
generating defective material is generally MUCH lower than the cost of
rework.





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-30 17:17               ` Chad R. Meiners
@ 2003-05-01  3:37                 ` Will
  2003-05-01  3:56                   ` Chad R. Meiners
  2003-05-01 12:21                   ` Marin David Condic
  0 siblings, 2 replies; 186+ messages in thread
From: Will @ 2003-05-01  3:37 UTC (permalink / raw)


According to Mr Meiners, Ada addicts should never attempt to rewrite 
any chess programs in Ada. Apparently if you do, your program will not 
do better than a C program with the same algorithm.




"Chad R. Meiners" <crmeiners@hotmail.com> wrote in message news:<b8p0of$pjs$1@msunews.cl.msu.edu>...
> The challenge would have nothing to do with the language used to implement
> the algorithm.  The GNU chess algorithm is what determines its game playing
> ability not its implementation language.
> 
> "Will" <wv9557@yahoo.com> wrote in message
> news:4a885870.0304300431.49a61bfa@posting.google.com...
> > Now if you want a challenge try to write an Ada chess program to beat
> > GNU chess. It's all C.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-01  3:37                 ` Will
@ 2003-05-01  3:56                   ` Chad R. Meiners
  2003-05-01 12:21                   ` Marin David Condic
  1 sibling, 0 replies; 186+ messages in thread
From: Chad R. Meiners @ 2003-05-01  3:56 UTC (permalink / raw)


Hello aspiring troll.  I never said that.  You will have be a little more
subtle with your mischaracterizations and vague statements if you ever hope
to become a real troll.

"Will" <wv9557@yahoo.com> wrote in message
news:4a885870.0304301937.b27ec47@posting.google.com...
> According to Mr Meiners, Ada addicts should never attempt to rewrite
> any chess programs in Ada. Apparently if you do, your program will not
> do better than a C program with the same algorithm.





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-01  3:37                 ` Will
  2003-05-01  3:56                   ` Chad R. Meiners
@ 2003-05-01 12:21                   ` Marin David Condic
  2003-05-01 15:16                     ` Wesley Groleau
  2003-05-02  4:15                     ` Will
  1 sibling, 2 replies; 186+ messages in thread
From: Marin David Condic @ 2003-05-01 12:21 UTC (permalink / raw)


Will <wv9557@yahoo.com> wrote in message
news:4a885870.0304301937.b27ec47@posting.google.com...
> According to Mr Meiners, Ada addicts should never attempt to rewrite
> any chess programs in Ada. Apparently if you do, your program will not
> do better than a C program with the same algorithm.
>
>
According to some experts (me), rewriting *any* program in *any* language is
mostly a waste of time. :-) You need to ask what is gained by building the
thing twice? Maybe, possibly, sometimes, you have a buggy program that might
benefit from being rewritten because you want the functionality but not the
bugs. Changing languages (to Ada) might also help reduce the bugs. But if
you are going to go that far, why not build a *new* program that does more
or otherwise grows from the experience.

And it also seems intuitively obvious that executing the same algorithm in a
different language ought to yield the same result, correct? So why would an
Ada addict want to rewrite a chess program that (presumably) already works
well?

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

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

    "Going cold turkey isn't as delicious as it sounds."
        -- H. Simpson
======================================================================






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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-30 20:15               ` John R. Strohm
@ 2003-05-01 14:21                 ` soft-eng
  2003-05-01 15:22                   ` Wesley Groleau
                                     ` (4 more replies)
  0 siblings, 5 replies; 186+ messages in thread
From: soft-eng @ 2003-05-01 14:21 UTC (permalink / raw)


"John R. Strohm" <strohm@airmail.net> wrote in message news:<C73FB1279386F1CD.BF0175B06B325A3F.212017A5819C3CBB@lp.airnews.net>...
> "Kaz Kylheku" <kaz@ashi.footprints.net> wrote in message
> news:cf333042.0304300835.4800e03e@posting.google.com...
> > "John R. Strohm" <strohm@airmail.net> wrote in message
>  news:<416273D61ACF7FEF.82C1D1AC17296926.FF0BFD4934A03813@lp.airnews.net>...
> > > Apples and oranges, Will.
> > >
> > > The interesting comparison would be to give both sides the same hardware
> > > power, and do the UI software in Ada vs. C.
> >
> > Newsflash: ``Ada versus C'' is not interesting. Ada and C are much
> > more similar than they are different. If you don't think so, it's only
> > because you are too absorbed in the arcane details that separate your
> > favorite high level assembly language from the next one.
> >
> > An Ada versus C programming context is the coding equivalent of a
> > three-legged race in which each side thinks that their particular
> > method of tying legs together gives them an advantage.
> >
> > Writing UI in either Ada or C is a waste of productivity that could
> > only possibly be justified in a freeware project, or some
> > tax-dollar-supported researchy thing. (To be clear, I don't mean
> > *morally* justified, only economically).
> 
> What such a comparison would yield is a data point on the graph of cost per
> function point vs. choice of language.
> 
> There is considerable evidence that strongly suggests that Ada, all by
> itself, makes a significant positive difference in programmer productivity
> over the embedded software lifecycle, by reducing defect incidence and
> promoting earlier defect detection (i.e., compile-time vs. run-time) and
> easier debugging and correction (e.g., by a compiler error message vs. a
> core dump), when one controls statistically for all other factors.  It must
> be understood that the embedded software lifecycle is one or two orders of
> magnitude longer than the typical commercial lifecycle, and the cost impact
> of defects escaping into a fielded project is MUCH higher.  (Commercial web
> applicatiosn don't kill people when they malfunction.  Computer-controlled
> radiation therapy machines can, and have.  Do a search on "Therac-25".)
> 
> Or is it your belief that cost of software development, and cost of quality,
> is immaterial?  If so, I recommend you read Phil Crosby's "Quality is Free",
> where he advances the concept of cost of quality, by quantifying the cost of
> reworking defective material and then showing that the added cost of NOT
> generating defective material is generally MUCH lower than the cost of
> rework.

But you are assuming a stricter type safety translates
to higher quality.

There is little evidence for that.  Type safety is
ONE thing that helps quality.  But if a little
bit of sugar in a recipe is good, ten times
the sugar will not make it taste ten times
tastier.  There are natural limits.

Ultimately, type safety only catches relatively minor
errors typically made by novice programmers.  It cannot
catch errors of design and logic, which are the more complex
sources of quality defects.

Most programmers do not stay novice for their
whole careers.  (If they do, they should consider
other careers too.)  So the role of type safety
in assuring quality is limited.

That having said, if you cannot hire well, a good type
safe language might help in eliminating smaller
errors.  But then, you are never going to have
anything working anyway, so what's the big deal
about eliminating smaller syntax-level errors?

If you can hire well, a super-strong type safe
language will only annoy your best programmers,
who don't need the type safety to avoid bugs
but have to work around it for all the things
that they do need to do.  You can still deliver
projects in that case, but your quality
will be poorer, not better, and you will
have taken much longer for no good reason.
(Though the relation to job-safety issues
is apparent, which is why bureaucrat types
might love such languages.)



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-01 12:21                   ` Marin David Condic
@ 2003-05-01 15:16                     ` Wesley Groleau
  2003-05-02  4:15                     ` Will
  1 sibling, 0 replies; 186+ messages in thread
From: Wesley Groleau @ 2003-05-01 15:16 UTC (permalink / raw)



> And it also seems intuitively obvious that executing the same algorithm in a
> different language ought to yield the same result, correct? So why would an
> Ada addict want to rewrite a chess program that (presumably) already works

Maybe.  But it's possible that:

  - some of the features of Ada might allow greater optimization
    In the case of _some_ chess algorithms, a slightly faster
    execution could win the game, because they give up evaluating
    options when a certain wall-time limit is reached.

  - some of the features of Ada might detect bugs, causing them
    to be corrected.

On the other hand, as you said, there are various other reasons
why a rewrite is probably not a good idea.




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-01 14:21                 ` soft-eng
@ 2003-05-01 15:22                   ` Wesley Groleau
  2003-05-01 15:56                     ` Hyman Rosen
  2003-05-01 18:35                   ` Marc A. Criley
                                     ` (3 subsequent siblings)
  4 siblings, 1 reply; 186+ messages in thread
From: Wesley Groleau @ 2003-05-01 15:22 UTC (permalink / raw)



> That having said, if you cannot hire well, a good type
> safe language might help in eliminating smaller
> errors.  But then, you are never going to have

No, because the incompetent programmers will make everything
'int' or 'double' without taking steps to handle/catch the
problems this causes.

> If you can hire well, a super-strong type safe
> language will only annoy your best programmers,
> who don't need the type safety to avoid bugs
> but have to work around it for all the things
> that they do need to do.  You can still deliver

What a crock.  Nothing stops these guys from declaring
everything as "float" and wasting hours handling problems
that the compiler could have handled.  If there are no
such problems ....




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
       [not found]               ` <fhm6o-3u2.ln1@beastie.ix.netcom.com>
@ 2003-05-01 15:53                 ` Robert A Duff
  0 siblings, 0 replies; 186+ messages in thread
From: Robert A Duff @ 2003-05-01 15:53 UTC (permalink / raw)


Dennis Lee Bieber <wlfraed@ix.netcom.com> writes:

> Will fed this fish to the penguins on Wednesday 30 April 2003 05:31 am:
> 
> > Now if you want a challenge try to write an Ada chess program to beat
> > GNU chess. It's all C.
> 
>         I presume you mean to black-box the development -- after all, it is 
> the /algorithms/ which make or break a chess program. Those algorithms 
> can be implemented in any language (though speed of execution may be 
> rather poor if one were to implement it in TCL <G>).

And the same exact algorithm running faster will play better chess,
since chess is a timed game.

- Bob



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-01 15:22                   ` Wesley Groleau
@ 2003-05-01 15:56                     ` Hyman Rosen
  2003-05-02  3:15                       ` James S. Rogers
  2003-05-02  3:24                       ` Wesley Groleau
  0 siblings, 2 replies; 186+ messages in thread
From: Hyman Rosen @ 2003-05-01 15:56 UTC (permalink / raw)


Wesley Groleau wrote:
>> If you can hire well, a super-strong type safe
>> language will only annoy your best programmers,
>> who don't need the type safety to avoid bugs
>> but have to work around it for all the things
>> that they do need to do.  You can still deliver
> 
> What a crock.  Nothing stops these guys from declaring
> everything as "float" and wasting hours handling problems
> that the compiler could have handled.  If there are no
> such problems ....

I don't know where this notion arose that a "super-strong"
type system is just for preventing bugs. I know that in C++
the type system is an essential part of programming, given
the various static (templates) and dynamic (dispatching)
ways that types guide what code is executed. I'm sure it's
that way in Ada as well.




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-01 14:21                 ` soft-eng
  2003-05-01 15:22                   ` Wesley Groleau
@ 2003-05-01 18:35                   ` Marc A. Criley
  2003-05-01 20:49                     ` Robert A Duff
  2003-05-02  1:27                     ` soft-eng
  2003-05-01 19:29                   ` Gautier
                                     ` (2 subsequent siblings)
  4 siblings, 2 replies; 186+ messages in thread
From: Marc A. Criley @ 2003-05-01 18:35 UTC (permalink / raw)


softeng3456@netscape.net (soft-eng) wrote in message news:<9fa75d42.0305010621.55e99deb@posting.google.com>...
> That having said, if you cannot hire well, a good type
> safe language might help in eliminating smaller
> errors.  But then, you are never going to have
> anything working anyway, so what's the big deal
> about eliminating smaller syntax-level errors?
> 
> If you can hire well, a super-strong type safe
> language will only annoy your best programmers,
> who don't need the type safety to avoid bugs
> but have to work around it for all the things
> that they do need to do.  You can still deliver
> projects in that case, but your quality
> will be poorer, not better, and you will
> have taken much longer for no good reason.
> (Though the relation to job-safety issues
> is apparent, which is why bureaucrat types
> might love such languages.)

This is one of the biggest misconceptions about type-safety and the
languages that utilize it: that its primary purpose is just to help
avoid bugs.  (And this is a misconception held by many Ada programmers
as well.)

Ada is a language whose definition is built around the concept of a
"type model".

The proper definition of types for an application allows the embedding
of vast quantities of information that is there just for the asking by
the application.  One doesn't "work around it" because the "best
programmers...don't need the type safety", one _exploits_ the
information that the type definitions encode.

For example, say you have a scalar C or C++ type, called Altitude; to
what information about that type and its objects does the application
have direct access?  Pretty much just "sizeof()" and the address of a
variable of that type.

Now for a comparable properly defined Ada type, one has the following:

- The first and last values ('First and 'Last)
- Access to the previous and next valid values ('Pred and 'Succ)
- Conversion of the type to a string--without having to know its
  size or whether it's floating, numeric, or enumeration ('Image
  and 'Wide_Image)
- The maximum number of characters such a string representation can
  take ('Width and 'Wide_Width)
- Ability to convert a string representation of that type--whatever
  kind it is--back to a value--with range checking! ('Value,
 'Wide_Value)
- The number of bits required to hold the type's largest value ('Size)

If you have a variable of that type, at the very least you get:
- The number of bits actually allocated for that value ('Size)
- It's address ('Address)

If you know a little bit more about your type, specifically whether
it's a discrete or floating point type, what else do you get with
C/C++?  Nothing.

With Ada (discrete):
- 'Pos, the ordinal position of an enumeral (or number)
- 'Val, convert an ordinal position into a value of the type

(floating):
- 'Machine_Mantissa
- 'Machine_Radix
     and it goes on...

(And yes, one could write a CAltitude class that provides all this
information, but one would have to implement and debug
_all_of_those_functions.  In Ada you write:

  type Altitude is digits 6.0 range -100.0 .. 50_000.0;

and you get access to all that information for free!)

I've seen that one of the critical requirements of an effective Ada
program is getting the types well and correctly defined.  Then
exploiting that information as needed throughout the application.  The
identification of object and interface type mismatches (your nominal
"type safety") is then just a welcome addition, it's the exploitation
of the application's type model that gives the bang for the buck.

And I give Hyman a lot of credit for figuring this out as well,
despite his peripheral familiarity with Ada.  If more programmers
understood the motivation for, and power of, strong typing (such as it
is in C++, Java, or Ada) much better software would get written, and
the "best" programmers wouldn't be struggling to work around it.

Marc A. Criley



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-30 17:22               ` Frank J. Lhota
@ 2003-05-01 19:03                 ` Kaz Kylheku
  2003-05-02  8:26                   ` Dmitry A. Kazakov
  0 siblings, 1 reply; 186+ messages in thread
From: Kaz Kylheku @ 2003-05-01 19:03 UTC (permalink / raw)


"Frank J. Lhota" <NOSPAM.lhota.adarose@verizon.net> wrote in message news:<qDTra.23221$xw4.9186@nwrdny01.gnilink.net>...
> "Kaz Kylheku" <kaz@ashi.footprints.net> wrote in message
> news:cf333042.0304300835.4800e03e@posting.google.com...
> >  If you don't think so, it's only
> > because you are too absorbed in the arcane details that separate your
> > favorite high level assembly language from the next one.
> 
> ??? A language with generics, exceptions and dispatching is still a
> high-level assembly language???

Ada exceptions are a laughably low-level mechanism, that is about as
powerful as some of the feeble C macro packages that wrap up setjmp
and longjmp. Some of those packages are more powerful because they can
subclass errors into categories. Modern languages represent errors
using class hierarchies, allowing handlers to express more or less
specific matches.

Ada's exception system is not useful for much more than containing
errors. It pales in comparison to Common Lisp's conditions and
restarts. The correct design for error handling is to unwind to an
outer dynamic context *as a the very last step*, after an analysis is
performed and the proper place to unwind to has been chosen. Ada's
exception system is more like that of C++; when an exception is
raised, it starts discarding dynamic frames until a handler is found.

An error handler should preserve the full dynamic context of the
situation---this is how exception vectors in processor architectures
work. When an interrupt happens, the currently running thread is not
unwound all the way back to the operating system! No, the exception
pushes new information onto the stack, and can later restart the task
exactly where it left off.  For example, you hit a page fault, the
operating system's handler makes the page available, and then restarts
the process, so the access instuction is tried again and succeeds this
time. Unwinding on error is the stupidest possible thing to do; it
allows for containment, but not recovery.

I would be tempted to hack up my own error system based on registering
handler *functions*, and using the exceptions as the final step in
error handling, to unwind to a restart point. The Ada exception
handlers resemble Common Lisp's restarts in some ways, most notably
that they are points in the dynamic context identified by symbols.
But, sadly, there is no way to introspect over them; in other words,
to compute a list or otherwise enumerate or iterate over the handlers
that are visible in a given dynamic context. So you can't implement
logic like ``if there is a handler for Foo exception, then raise it''
which would represent the idea ``if a Foo way of continuing is
available at this point, let's choose it''. A WHEN clause in the
exception block also has no way of returning back to the raise point
to show that it's declining to handle the error. Nevertheless, with
this approach, one could perhaps implement some rudimentary error
recovery protocols.

For example, suppose that we agree on a very simple convention that we
will have two ways of continuing after an error: an Abort and Retry.
When I call your module and it encounters a problem, it calls a
handler callback in my module. No unwinding takes place yet. In my
module I then decide (perhaps with the help of a user) whether to
retry the operation or abort, and raise the appropriate exception,
which passes back to your code. If I raise Retry, then the operation
which failed will be tried again. Of course, I can raise some third
exception that your module doesn't know about, to obtain a non-local
exit that bypasses your module entirely. In other words, exceptions
are really restart choices; the last step in the protocol for
recovering from an error situation, based on making some sort of
informed decision at a higher layer combined with advice at the lower
layer.

I would want this formalized into a language feature which supports
the dynamic registration and automatic deregistration of handlers,
association of handlers with some symbols or whatnot to support exact
or inexact searching and so on. A decent macro system would go a long
way. Oops!

Interestingly, I see in Ada's exception system an attempt to reinvent
the idea of a symbolic data type. When you write Foo : exception; to
introduce a new exception symbol, this is very much like symbol
interning, except that it's conflated into a subcomponent of the
language rather than standing alone. From Ada95 we have:

 Each distinct exception is represented by a distinct value of type 
 Exception_Id. Null_Id does not represent any exception, and is the
 default initial value of type Exception_Id. Each occurrence of an
 exception is represented by a value of type Exception_Occurrence.
 Null_Occurrence does not represent any exception occurrence, and
 is the default initial value of type Exception_Occurrence. 

And of Common Lisp we could write:

 Each identifier scanned by the reader is interned in the current
package;
 distinct names give rise to distinct symbols, which are objects that
 are useful for their unique identity, and various properties that can
be
 associated with them. The symbol NIL (in the "COMMON-LISP" package)
is not
 equal to any other symbol.

Funny to see Greenspun's Tenth Rule of Programming at work in Ada
also!

I'm warmly entertained, by the way, by how the string returned by
Exception_Message may be truncated to 200 characters. Ah, assembly
language and its fixed buffers.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-01 14:21                 ` soft-eng
  2003-05-01 15:22                   ` Wesley Groleau
  2003-05-01 18:35                   ` Marc A. Criley
@ 2003-05-01 19:29                   ` Gautier
  2003-05-09 13:36                     ` soft-eng
  2003-05-01 19:44                   ` Dr Chaos
  2003-05-02 12:29                   ` Marin David Condic
  4 siblings, 1 reply; 186+ messages in thread
From: Gautier @ 2003-05-01 19:29 UTC (permalink / raw)


softeng3456:

> But you are assuming a stricter type safety translates
> to higher quality.
> 
> There is little evidence for that.  Type safety is
> ONE thing that helps quality.  But if a little
> bit of sugar in a recipe is good, ten times
> the sugar will not make it taste ten times
> tastier.  There are natural limits.

That's right. There are upper _and_ lower limits, by the way...

> Ultimately, type safety only catches relatively minor
> errors typically made by novice programmers.  It cannot
> catch errors of design and logic, which are the more complex
> sources of quality defects.
> 
> Most programmers do not stay novice for their
> whole careers.  (If they do, they should consider
> other careers too.)  So the role of type safety
> in assuring quality is limited.

... if you assume that the programmers will always do novice-
sized programs. With the scale of projects the usefulness
of type safety grows. Type safety is annoying on small
programs and comfortable for large ones.

> That having said, if you cannot hire well, a good type
> safe language might help in eliminating smaller
> errors.  But then, you are never going to have
> anything working anyway, so what's the big deal
> about eliminating smaller syntax-level errors?

It is not only on syntax-level (then it would be just
for the pleasure of it), it prevents lots of run-time
errors that would not appear immediately. So, eliminating them
_is_ a big deal, because, you can concentrate on refining
the design and logic issues instead of chasing these errors.

> If you can hire well, a super-strong type safe
> language will only annoy your best programmers,
> who don't need the type safety to avoid bugs
> but have to work around it for all the things
> that they do need to do.  You can still deliver
> projects in that case, but your quality
> will be poorer, not better, and you will
> have taken much longer for no good reason.
> (Though the relation to job-safety issues
> is apparent, which is why bureaucrat types
> might love such languages.)

You simply ignore the huge debugging time provided
by poorly-typed languages and its effective relation to
job safety. So what ?
It's a question of a good proportion of sugar:
not too much, not too few :-)
________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-01 14:21                 ` soft-eng
                                     ` (2 preceding siblings ...)
  2003-05-01 19:29                   ` Gautier
@ 2003-05-01 19:44                   ` Dr Chaos
  2003-05-02 12:29                   ` Marin David Condic
  4 siblings, 0 replies; 186+ messages in thread
From: Dr Chaos @ 2003-05-01 19:44 UTC (permalink / raw)


On 1 May 2003 07:21:49 -0700, soft-eng <softeng3456@netscape.net> wrote:
> 
> But you are assuming a stricter type safety translates
> to higher quality.
> 
> There is little evidence for that.  Type safety is
> ONE thing that helps quality.  But if a little
> bit of sugar in a recipe is good, ten times
> the sugar will not make it taste ten times
> tastier.  There are natural limits.
 
> Ultimately, type safety only catches relatively minor
> errors typically made by novice programmers.  It cannot
> catch errors of design and logic, which are the more complex
> sources of quality defects.

I think minor errors are made by even experienced programmers
frequently.

Novice programmers cannot really correct errors of design and
logic as well as experienced programmers can.

> Most programmers do not stay novice for their
> whole careers.  (If they do, they should consider
> other careers too.)  So the role of type safety
> in assuring quality is limited.

What it can do is ensure the proper use of code designed
by the more experienced programmers. 

> That having said, if you cannot hire well, a good type
> safe language might help in eliminating smaller
> errors.  But then, you are never going to have
> anything working anyway, so what's the big deal
> about eliminating smaller syntax-level errors?
> 
> If you can hire well, a super-strong type safe
> language will only annoy your best programmers,
> who don't need the type safety to avoid bugs
> but have to work around it for all the things
> that they do need to do.  

And how often is it really necessary to 'work around it'? 

The question is what happens with the typical level
of programmer that typically good people can hire.

I've personally found in my own work that static strict typing is not
so enormously helpful in initial development when I have everything
still "in my mind". 

It is extremely helpful when I return back to a project after many
months, and I have noticed many times when prevented me from making
dumb mistakes by accident, and informed me about what I was
supposed to be doing.  I greatly preferred that to run-time errors. 

Inevitably, people do take other jobs, and having code that
is somewhat resilient to new programmers can be a good idea. 



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-01 18:35                   ` Marc A. Criley
@ 2003-05-01 20:49                     ` Robert A Duff
  2003-05-02  1:27                     ` soft-eng
  1 sibling, 0 replies; 186+ messages in thread
From: Robert A Duff @ 2003-05-01 20:49 UTC (permalink / raw)


mcq95@earthlink.net (Marc A. Criley) writes:

> This is one of the biggest misconceptions about type-safety and the
> languages that utilize it: that its primary purpose is just to help
> avoid bugs.  (And this is a misconception held by many Ada programmers
> as well.)

Well said.  Strong compile-time typing is not a burden, is not
constricting -- it's liberating!

- Bob



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-04-30 12:31             ` Will
  2003-04-30 17:17               ` Chad R. Meiners
       [not found]               ` <fhm6o-3u2.ln1@beastie.ix.netcom.com>
@ 2003-05-02  1:17               ` Richard Riehle
  2 siblings, 0 replies; 186+ messages in thread
From: Richard Riehle @ 2003-05-02  1:17 UTC (permalink / raw)


Will wrote:

> Now if you want a challenge try to write an Ada chess program to beat
> GNU chess. It's all C.

This is an absurd observation.   The quality of the chess game is not
a function of the language.  The same quality program can be written
in Ada.   Howabout, a commercial aircraft with two million lines of
code that transports many thousands of people all over the world
daily  where all the software is written in Ada.   Try to achieve
this in C.   You will take longer to do it, have more defects in the
software and crash a couple of airplanes before you get it right,
if ever.

Richard Riehle




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-01 18:35                   ` Marc A. Criley
  2003-05-01 20:49                     ` Robert A Duff
@ 2003-05-02  1:27                     ` soft-eng
  2003-05-02  3:05                       ` John R. Strohm
                                         ` (3 more replies)
  1 sibling, 4 replies; 186+ messages in thread
From: soft-eng @ 2003-05-02  1:27 UTC (permalink / raw)


mcq95@earthlink.net (Marc A. Criley) wrote in message news:<254c16a.0305011035.13133e8d@posting.google.com>...

> Ada is a language whose definition is built around the concept of a
> "type model".

Yes, it used the then modern concepts of type definition.
(Later superseded by notions of object-oriented type definitions.)

> Now for a comparable properly defined Ada type, one has the following:
> 
> - The first and last values ('First and 'Last)
> - Access to the previous and next valid values ('Pred and 'Succ)
> - Conversion of the type to a string--without having to know its
>   size or whether it's floating, numeric, or enumeration ('Image
>   and 'Wide_Image)
> - The maximum number of characters such a string representation can
>   take ('Width and 'Wide_Width)
> - Ability to convert a string representation of that type--whatever
>   kind it is--back to a value--with range checking! ('Value,
>  'Wide_Value)
> - The number of bits required to hold the type's largest value ('Size)
> 
> If you have a variable of that type, at the very least you get:
> - The number of bits actually allocated for that value ('Size)
> - It's address ('Address)

Yes, Ada extended Pascal very strongly in this regards,
without any particular consideration of how useful
these extensions would actually turn out to be.

> If you know a little bit more about your type, specifically whether
> it's a discrete or floating point type, what else do you get with
> C/C++?  Nothing.
> 
> With Ada (discrete):
> - 'Pos, the ordinal position of an enumeral (or number)
> - 'Val, convert an ordinal position into a value of the type
> 
> (floating):
> - 'Machine_Mantissa
> - 'Machine_Radix
>      and it goes on...
> 
> (And yes, one could write a CAltitude class that provides all this
> information, but one would have to implement and debug
> _all_of_those_functions.  In Ada you write:
> 
>   type Altitude is digits 6.0 range -100.0 .. 50_000.0;
> 
> and you get access to all that information for free!)

Like I said, Ada has amazing amounts of itsy-bitsy stuff.
Now which of these features, if missing, would take you
more than a minor effort to provide yourself?  If and
when necessary, rather than present by default all the time?

> understood the motivation for, and power of, strong typing (such as it
> is in C++, Java, or Ada) much better software would get written, and
> the "best" programmers wouldn't be struggling to work around it.

You misunderstand.  Nobody needs to "work around" the type-safety
of C++ or Java.  Though this was a problem with Pascal, which
was the premier contender at one time.  The need to "work around"
Pascal's type safety was a big problem, and that helped C become
much more popular.  Ada didn't just inherit Pascal's problems,
it enthusiastically extended them.

The type safety in C++ and therefore in Java has evolved slowly
and naturally.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02  1:27                     ` soft-eng
@ 2003-05-02  3:05                       ` John R. Strohm
  2003-05-02 13:07                         ` soft-eng
  2003-05-02  3:30                       ` James S. Rogers
                                         ` (2 subsequent siblings)
  3 siblings, 1 reply; 186+ messages in thread
From: John R. Strohm @ 2003-05-02  3:05 UTC (permalink / raw)


"soft-eng" <softeng3456@netscape.net> wrote in message
news:9fa75d42.0305011727.5eae0222@posting.google.com...
> mcq95@earthlink.net (Marc A. Criley) wrote in message
news:<254c16a.0305011035.13133e8d@posting.google.com>...
>
> > Ada is a language whose definition is built around the concept of a
> > "type model".
>
> Yes, it used the then modern concepts of type definition.
> (Later superseded by notions of object-oriented type definitions.)

Not superseded, extended.

> > Now for a comparable properly defined Ada type, one has the following:
> >
> > - The first and last values ('First and 'Last)
> > - Access to the previous and next valid values ('Pred and 'Succ)
> > - Conversion of the type to a string--without having to know its
> >   size or whether it's floating, numeric, or enumeration ('Image
> >   and 'Wide_Image)
> > - The maximum number of characters such a string representation can
> >   take ('Width and 'Wide_Width)
> > - Ability to convert a string representation of that type--whatever
> >   kind it is--back to a value--with range checking! ('Value,
> >  'Wide_Value)
> > - The number of bits required to hold the type's largest value ('Size)
> >
> > If you have a variable of that type, at the very least you get:
> > - The number of bits actually allocated for that value ('Size)
> > - It's address ('Address)
>
> Yes, Ada extended Pascal very strongly in this regards,
> without any particular consideration of how useful
> these extensions would actually turn out to be.

Actually, it turns out that those extensions proved to be quite useful.
'first and 'last are necessary if you want to write loops over an arbitrary
index type.  'succ and 'pred are absolutely critical if you want to step
from one enumerated value to another.

Conversion to/from string form is just sprintf() in a cleaner form.

'size is critical, for the same reason that sizeof() is critical.

> > If you know a little bit more about your type, specifically whether
> > it's a discrete or floating point type, what else do you get with
> > C/C++?  Nothing.
> >
> > With Ada (discrete):
> > - 'Pos, the ordinal position of an enumeral (or number)
> > - 'Val, convert an ordinal position into a value of the type
> >
> > (floating):
> > - 'Machine_Mantissa
> > - 'Machine_Radix
> >      and it goes on...
> >
> > (And yes, one could write a CAltitude class that provides all this
> > information, but one would have to implement and debug
> > _all_of_those_functions.  In Ada you write:
> >
> >   type Altitude is digits 6.0 range -100.0 .. 50_000.0;
> >
> > and you get access to all that information for free!)
>
> Like I said, Ada has amazing amounts of itsy-bitsy stuff.
> Now which of these features, if missing, would take you
> more than a minor effort to provide yourself?  If and
> when necessary, rather than present by default all the time?

The key is that, by putting them in the language, it is absolutely
guaranteed that they will be implemented CORRECTLY, every time, with NO
programmer workload involved.

And the actual executable code for the feature may not actually be present
in the final system.  It is utterly trivial to hide those features under an
external name interface, and let the linker cull out unused items.  (This
USED to be standard behavior for linkers, back before memories got "large"
and utility programmers got criminally lazy.)  For some reason, linkers used
by common C toolsets generally don't bother to do this: they treat
executables as shovelware repositories.

> > understood the motivation for, and power of, strong typing (such as it
> > is in C++, Java, or Ada) much better software would get written, and
> > the "best" programmers wouldn't be struggling to work around it.
>
> You misunderstand.  Nobody needs to "work around" the type-safety
> of C++ or Java.  Though this was a problem with Pascal, which
> was the premier contender at one time.  The need to "work around"
> Pascal's type safety was a big problem, and that helped C become
> much more popular.  Ada didn't just inherit Pascal's problems,
> it enthusiastically extended them.

Observe that there is actually relatively little difference between the
basic type system enforced by PASCAL and the basic type system enforced by
C++.  I can't speak to Java.  The C hackers (I hesitate to dignify them with
the term "programmers") screamed bloody murder about the strong typing in
PASCAL and Ada.  When C++ came out, and it was strongly typed, the silence
from that corner of the auditorium was absolutely deafening.

> The type safety in C++ and therefore in Java has evolved slowly
> and naturally.

Hardly.  Stroustrup took type safety in C++ from Simula 67, which actually
predated PASCAL.

And note that Stroustrup himself admits that adding strong typing to C was
one of his earliest goals for C++.





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-01 15:56                     ` Hyman Rosen
@ 2003-05-02  3:15                       ` James S. Rogers
  2003-05-02  3:24                       ` Wesley Groleau
  1 sibling, 0 replies; 186+ messages in thread
From: James S. Rogers @ 2003-05-02  3:15 UTC (permalink / raw)


"Hyman Rosen" <hyrosen@mail.com> wrote in message
news:1051804573.732603@master.nyc.kbcfp.com...
> I don't know where this notion arose that a "super-strong"
> type system is just for preventing bugs. I know that in C++
> the type system is an essential part of programming, given
> the various static (templates) and dynamic (dispatching)
> ways that types guide what code is executed. I'm sure it's
> that way in Ada as well.
>

I agree. There is also an underlying assumption in the original
troll that the only distinguishing feature of Ada is strong typing.
This opinion can clearly only come from somebody who does
not understand Ada's scope and visibility rules.

Those rules, combined with intelligent use of user-defined types,
will allow the compiler to detect an amazing range of logic
errors. For instance, Ada scoping rules make it very difficult to
access an out of scope reference object (Ada calls them
access variables). Many languages have less strict scoping
rules, providing the opportunity of inappropriate access to out
of scope pointers.

Jim Rogers





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-01 15:56                     ` Hyman Rosen
  2003-05-02  3:15                       ` James S. Rogers
@ 2003-05-02  3:24                       ` Wesley Groleau
  2003-05-11 18:52                         ` Robert I. Eachus
  1 sibling, 1 reply; 186+ messages in thread
From: Wesley Groleau @ 2003-05-02  3:24 UTC (permalink / raw)



> I don't know where this notion arose that a "super-strong"
> type system is just for preventing bugs. I know that in C++

I didn't say that it was only for preventing bugs.
I said it's a crock that it requires programmers
to do a lot of allegedly unnecessary workarounds.

For me, preventing bugs is the second biggest benefit
of Ada's type system.  The bigger one is that it
allows you to define things in terms of your
abstraction instead of your implementation.




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02  1:27                     ` soft-eng
  2003-05-02  3:05                       ` John R. Strohm
@ 2003-05-02  3:30                       ` James S. Rogers
  2003-05-02 13:16                         ` soft-eng
  2003-05-02 12:57                       ` Marc A. Criley
  2003-05-08  5:14                       ` Gautier
  3 siblings, 1 reply; 186+ messages in thread
From: James S. Rogers @ 2003-05-02  3:30 UTC (permalink / raw)


"soft-eng" <softeng3456@netscape.net> wrote in message
news:9fa75d42.0305011727.5eae0222@posting.google.com...
> mcq95@earthlink.net (Marc A. Criley) wrote in message
news:<254c16a.0305011035.13133e8d@posting.google.com>...
>
> Yes, Ada extended Pascal very strongly in this regards,
> without any particular consideration of how useful
> these extensions would actually turn out to be.

Nonsense. The Ada designers knew very well how useful those
extensions would turn out to be. After all, Ada was not designed
by a committee.

> Like I said, Ada has amazing amounts of itsy-bitsy stuff.
> Now which of these features, if missing, would take you
> more than a minor effort to provide yourself?  If and
> when necessary, rather than present by default all the time?

So, are you arguing against the sizeof operator in C and C++?
Are you arguing against the Length field of an Java array?
Are you arguing against C pointer arithmetic?

What feature of a high level language cannot be created with an
individual effort from an assembler programmer?

> You misunderstand.  Nobody needs to "work around" the type-safety
> of C++ or Java.  Though this was a problem with Pascal, which
> was the premier contender at one time.  The need to "work around"
> Pascal's type safety was a big problem, and that helped C become
> much more popular.  Ada didn't just inherit Pascal's problems,
> it enthusiastically extended them.

Absolutely wrong. Ada did not extend Pascal. It simply belongs to
the same syntax family, which is not rooted in Pascal. Algol came
long before Pascal.

The Ada type system is both stronger than the Pascal type system
and more flexible. It is designed to do its work and keep out of your
way.

>
> The type safety in C++ and therefore in Java has evolved slowly
> and naturally.

There is nothing natural about the development of a language. Classes
belonged to C++ from the very beginning. The same is true of Java.
Those languages are not evolutionary developments. They were discrete
attempts to create languages in the B (yes, the precursor to C) family
with stronger typing and greater support for Object Oriented Programming
than exist in C.

Java is not an evolved C++. The design goals of the two languages are
far different. C++, despite its name, is not merely a superset of C.
If it were the C++ standard would need to subsume the C standard.
It does not. The C++ standard exists independent of the C standard.

Your basic assumptions are invalid. This forces your conclusions to be
invalid also.

Jim Rogers





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-01 12:21                   ` Marin David Condic
  2003-05-01 15:16                     ` Wesley Groleau
@ 2003-05-02  4:15                     ` Will
  2003-05-02 13:57                       ` Chad R. Meiners
  1 sibling, 1 reply; 186+ messages in thread
From: Will @ 2003-05-02  4:15 UTC (permalink / raw)


There is no algorithm. Most chess programs uses alpha beta pruning or some
variation of it.
Unfortunately there is only so much that alpha can help speed up the
search. They employ other heuristics like killer moves, null moves. Techniques
like hashing greatly speed things up. Most will also have a quiescent search,
which basically search fully all the capture moves until there is no more
captures, this is to avoid the horizon effect. Chess software is really
more like  combination of techniques and intution than an exact algorithm.
Apparently the more positions you can look at an infinite amount of time
the stronger  your program is. Therefore an optimized assembly language
program will beat the same C program, even if they use the same techniques.
Just because the assembly language can look at more positions than
the C program. Implementation language DOES matters.
Now does anybody else still want to write an Ada chess program to beat
GNU Chess? For your information, GNU Chess is one of the weakest program
out there. Thank God the IBM researches went ahead with creating
Deep Blue instead of speculating raw speed will outsmart human creativity.
Maybe Ada addicts should try to beat GNU chess instead of offering
speculations.


"Marin David Condic" <mcondic.auntie.spam@acm.org> wrote in message news:<b8r3hu$m8$1@slb4.atl.mindspring.net>...
> Will <wv9557@yahoo.com> wrote in message
> news:4a885870.0304301937.b27ec47@posting.google.com...
> > According to Mr Meiners, Ada addicts should never attempt to rewrite
> > any chess programs in Ada. Apparently if you do, your program will not
> > do better than a C program with the same algorithm.
> >
> >
> According to some experts (me), rewriting *any* program in *any* language is
> mostly a waste of time. :-) You need to ask what is gained by building the
> thing twice? Maybe, possibly, sometimes, you have a buggy program that might
> benefit from being rewritten because you want the functionality but not the
> bugs. Changing languages (to Ada) might also help reduce the bugs. But if
> you are going to go that far, why not build a *new* program that does more
> or otherwise grows from the experience.
> 
> And it also seems intuitively obvious that executing the same algorithm in a
> different language ought to yield the same result, correct? So why would an
> Ada addict want to rewrite a chess program that (presumably) already works
> well?
> 
> MDC
> --
> ======================================================================
> Marin David Condic
> I work for: http://www.belcan.com/
> My project is: http://www.jsf.mil/
> 
> Send Replies To: m c o n d i c @ a c m . o r g
> 
>     "Going cold turkey isn't as delicious as it sounds."
>         -- H. Simpson
> ======================================================================



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-01 19:03                 ` Kaz Kylheku
@ 2003-05-02  8:26                   ` Dmitry A. Kazakov
  0 siblings, 0 replies; 186+ messages in thread
From: Dmitry A. Kazakov @ 2003-05-02  8:26 UTC (permalink / raw)


Kaz Kylheku wrote:

> Ada exceptions are a laughably low-level mechanism, that is about as
> powerful as some of the feeble C macro packages that wrap up setjmp
> and longjmp. Some of those packages are more powerful because they can
> subclass errors into categories.

Can those macros finalize things going out of scope? 

> Modern languages represent errors
> using class hierarchies,

Probably, what is actually needed, is just an order relation on the 
exception type. A subclassing relation induces an order, but isn't it a bit 
too much for that?

> allowing handlers to express more or less specific matches.

It is arguable whether exceptions should to be of any type. C++ way to do it 
has a heavy price. C++ exceptions are very inefficient and there are 
problems with dynamic memory allocation when an exception happens. Consider 
all issues which might appear in a multitasking and/or multiprocessor 
environment.

> An error handler should preserve the full dynamic context of the
> situation---this is how exception vectors in processor architectures
> work. When an interrupt happens, the currently running thread is not
> unwound all the way back to the operating system!

Ada's exception propagation mechanism is far more complex than you describe 
it. For example, when an exception is raised at a rendezvous point it is 
propagated in both the caller and the callee. Let you want to return 
exactly to the point where it was thrown, how could you do it?

> No, the exception
> pushes new information onto the stack, and can later restart the task
> exactly where it left off.  For example, you hit a page fault, the
> operating system's handler makes the page available, and then restarts
> the process, so the access instuction is tried again and succeeds this
> time.

... resuming a real-time task after 1.5 hours of trying to read a bad block!

> Unwinding on error is the stupidest possible thing to do; it
> allows for containment, but not recovery.

What can be recovered needs no exception. Exceptional state is when 
*nothing* useful can be done in the current context. The word nothing 
excludes any "recovery" for the given context. It is gone and dead.

> I would be tempted to hack up my own error system based on registering
> handler *functions*, and using the exceptions as the final step in
> error handling, to unwind to a restart point. The Ada exception
> handlers resemble Common Lisp's restarts in some ways, most notably
> that they are points in the dynamic context identified by symbols.
> But, sadly, there is no way to introspect over them; in other words,
> to compute a list or otherwise enumerate or iterate over the handlers
> that are visible in a given dynamic context. So you can't implement
> logic like ``if there is a handler for Foo exception, then raise it''
> which would represent the idea ``if a Foo way of continuing is
> available at this point, let's choose it''.

This has nothing to do with exceptions. It is rather a typical case for a 
dispatching subroutine = "handler". Again, the decision whether "a Foo way 
is available" *can* be made in the current context. So it is *not* an 
exceptional state at all. It would be just a bad design to try to express 
it in exceptions.

> A WHEN clause in the
> exception block also has no way of returning back to the raise point
> to show that it's declining to handle the error. Nevertheless, with
> this approach, one could perhaps implement some rudimentary error
> recovery protocols.
> 
> For example, suppose that we agree on a very simple convention that we
> will have two ways of continuing after an error: an Abort and Retry.
> When I call your module and it encounters a problem, it calls a
> handler callback in my module. No unwinding takes place yet. In my
> module I then decide (perhaps with the help of a user) whether to
> retry the operation or abort, and raise the appropriate exception,
> which passes back to your code. If I raise Retry, then the operation
> which failed will be tried again. Of course, I can raise some third
> exception that your module doesn't know about, to obtain a non-local
> exit that bypasses your module entirely. In other words, exceptions
> are really restart choices; the last step in the protocol for
> recovering from an error situation, based on making some sort of
> informed decision at a higher layer combined with advice at the lower
> layer.

If this is just a callback, then everything is already here. If it is 
something else, which has to run on both contexts, then how it is supposed 
to work? Consider a callee and a caller of one of its entry points running 
on different processors ...

> I'm warmly entertained, by the way, by how the string returned by
> Exception_Message may be truncated to 200 characters. Ah, assembly
> language and its fixed buffers.

Of course heap allocation of an Out_Of_Memory exception object would be much 
better ...

--
Regards,
Dmitry A. Kazakov
www.dmitry-kazakov.de



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

* RE: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
@ 2003-05-02  9:53 Lionel.DRAGHI
  0 siblings, 0 replies; 186+ messages in thread
From: Lionel.DRAGHI @ 2003-05-02  9:53 UTC (permalink / raw)
  To: comp.lang.ada



| -----Message d'origine-----
| De: mcq95@earthlink.net [mailto:mcq95@earthlink.net]
...
| This is one of the biggest misconceptions about type-safety and the
| languages that utilize it: that its primary purpose is just to help
| avoid bugs.  (And this is a misconception held by many Ada programmers
| as well.)
....
| The proper definition of types for an application allows the embedding
| of vast quantities of information that is there just for the asking by
| the application.
Not just application, but also code reader.

...
|   type Altitude is digits 6.0 range -100.0 .. 50_000.0;
For me, the main point here in this declaration is to move more programmer's
knowledge into the code than possible in any other comparable language.
This knowledge will otherwise resides in the comments, or some doc, or just
nowhere.

In consequence:
- the language is able to provide usefull attributes,
- code readability improve,
- one will reduce documentation/comments, avoid incoherencies between those
and code, avoid knowledge vanishing when the coder leave your company, etc.
- and yes, an Ada compiler provides compilation/execution time checks that
other compiler can't provide, and this is in my opinion by far more usefull
than attributes. 
- etc.

Despite this, i agree with you that type compilation/execution time checks
are just the most visible consequence of the powerfull Ada typing.
When i hear an Ada programmer saying that "its primary purpose is just to
help avoid bugs", i suggest the more general "its primary purpose is to
reduce development cost", and let's go for discussion! 

-- 
Lionel Draghi



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-01 14:21                 ` soft-eng
                                     ` (3 preceding siblings ...)
  2003-05-01 19:44                   ` Dr Chaos
@ 2003-05-02 12:29                   ` Marin David Condic
  2003-05-09 17:37                     ` soft-eng
  4 siblings, 1 reply; 186+ messages in thread
From: Marin David Condic @ 2003-05-02 12:29 UTC (permalink / raw)


This is all some variation of the "Any *Competent* Programmer...." argument.
("Any *competent* programmer doesn't need type safety, etc...") It really
doesn't hold water. Just as competent writers still make spelling and
typographical errors, competent programmers make mistakes with in all sorts
of other ways. Sure, there are errors a compiler can't catch such as logic
and design errors, but there are numerous errors made by competent
programmers every day that a compiler *can* catch and this is a big help.

I collected data over a ten year stretch that involved productivity and
defects on jet engine control software. The results were that where Ada was
used we doubled productivity and reduced defects by a factor of four. I'd
like to think that the folks I worked with in developing controls were
"competent" and most had many years of experience, but still, the language
made a difference to the bottom line. My competitors are still using C. I
say "Good for them!" My improved productivity and reduced defects translates
into a better engine control at less cost. I'll take that benefit any time.

MDC


soft-eng <softeng3456@netscape.net> wrote in message
news:9fa75d42.0305010621.55e99deb@posting.google.com...
>
> But you are assuming a stricter type safety translates
> to higher quality.
<snip>


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

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

    "Going cold turkey isn't as delicious as it sounds."
        -- H. Simpson
======================================================================






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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02  1:27                     ` soft-eng
  2003-05-02  3:05                       ` John R. Strohm
  2003-05-02  3:30                       ` James S. Rogers
@ 2003-05-02 12:57                       ` Marc A. Criley
  2003-05-02 18:55                         ` Hyman Rosen
  2003-05-08  5:14                       ` Gautier
  3 siblings, 1 reply; 186+ messages in thread
From: Marc A. Criley @ 2003-05-02 12:57 UTC (permalink / raw)


softeng3456@netscape.net (soft-eng) wrote in message news:<9fa75d42.0305011727.5eae0222@posting.google.com>...
> Like I said, Ada has amazing amounts of itsy-bitsy stuff.
> Now which of these features, if missing, would take you
> more than a minor effort to provide yourself?  If and
> when necessary, rather than present by default all the time?

As someone else noted, it requires _zero_ effort on my part to have
access to these standardized, portable, correctly implemented,
features.

Out of curiousity I did a quick scan of a little throwaway utility I
wrote to find out which attributes it utilizes.  Here's the list: 
'Range, 'Pos, 'Value, 'Read, 'Last, and 'Image.

Could I have still written the program using mechanisms other than
those attributes to accomplish their purpose?  Of course.  But I
didn't have to.  This was a throwaway program so I didn't want to
spend much time on it.  And all those attributes will continue to work
even if I alter the type definitions to which they're applied (which
can happen a lot when hacking out something quick and dirty).  Again,
I could have ensured that when I implemented their equivalents that
they would be flexible enough to handle that kind of modification. 
But this was a throwaway program, so why go to all that effort when I
can write:

   for H in Capped_Header'Range loop

With 'Range in particular, I didn't have to hardcode the array
bounds--it's just as "cheap" to type 'Range, and 'Range automatically
adapts to changed bounds.  I didn't have to define and maintain
#define's or consts to define those bounds, whose updating could be
overlooked.  I didn't have to write a CCappedHeader class with data
members and member functions first() and last(), or an iterator.

I typed one line of code in less than three seconds that was portable,
correct, and automatically adapted to changes in the array's type
definition.

How many portable, correct, and adaptable functions and classes can
you write in less than three seconds?

Marc A. Criley



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02  3:05                       ` John R. Strohm
@ 2003-05-02 13:07                         ` soft-eng
  2003-05-02 13:14                           ` Martin Dowie
                                             ` (4 more replies)
  0 siblings, 5 replies; 186+ messages in thread
From: soft-eng @ 2003-05-02 13:07 UTC (permalink / raw)


"John R. Strohm" <strohm@airmail.net> wrote in message news:<4F03C83A9C6A478F.688C62D70A2EADA3.068FE6EB5E241C3B@lp.airnews.net>...

> 'first and 'last are necessary if you want to write loops over an arbitrary
> index type.  'succ and 'pred are absolutely critical if you want to step

Yes, each and every single itsy-bitsy feature of Ada can be justified in some
way or the other.

> The key is that, by putting them in the language, it is absolutely
> guaranteed that they will be implemented CORRECTLY, every time, with NO

The key is that by putting all these large number of trivialities in
the language, you make sure the language will be very large.

> PASCAL and Ada.  When C++ came out, and it was strongly typed, the silence
> from that corner of the auditorium was absolutely deafening.

Because C++ type safety allowed them to do whatever
they had been doing all along, while saving them
from the typos in what they had been doing all along.
If it hadn't, there would have been absolutely no hue
and cry over it -- because C++ would have remained an
obscure research project.

> Hardly.  Stroustrup took type safety in C++ from Simula 67, which actually
> predated PASCAL.

The Object Oriented architecture came from Simula 67 (I
am sure he must have been influenced by Smalltalk et al too.)

But the strong typing of C++ was designed to fit
well the existing C style of programming.  In fact,
it was later retrofitted into C (without breaking most
existing code.)



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 13:07                         ` soft-eng
@ 2003-05-02 13:14                           ` Martin Dowie
  2003-05-02 14:23                           ` Chad R. Meiners
                                             ` (3 subsequent siblings)
  4 siblings, 0 replies; 186+ messages in thread
From: Martin Dowie @ 2003-05-02 13:14 UTC (permalink / raw)


"soft-eng" <softeng3456@netscape.net> wrote in message
news:9fa75d42.0305020507.6d071f2b@posting.google.com...
> > Hardly.  Stroustrup took type safety in C++ from Simula 67, which
actually
> > predated PASCAL.
>
> The Object Oriented architecture came from Simula 67 (I
> am sure he must have been influenced by Smalltalk et al too.)

Well, I doubt Alan Kay would agree with you "I invented the
term Object-Oriented, and I can tell you I did not have C++ in mind."






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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02  3:30                       ` James S. Rogers
@ 2003-05-02 13:16                         ` soft-eng
  2003-05-02 14:28                           ` Chad R. Meiners
                                             ` (3 more replies)
  0 siblings, 4 replies; 186+ messages in thread
From: soft-eng @ 2003-05-02 13:16 UTC (permalink / raw)


"James S. Rogers" <jimmaureenrogers@worldnet.att.net> wrote in message news:<ODlsa.134571$ja4.6028499@bgtnsc05-news.ops.worldnet.att.net>...
> "soft-eng" <softeng3456@netscape.net> wrote in message
> news:9fa75d42.0305011727.5eae0222@posting.google.com...
> > mcq95@earthlink.net (Marc A. Criley) wrote in message
>  news:<254c16a.0305011035.13133e8d@posting.google.com>...
> >
> > Yes, Ada extended Pascal very strongly in this regards,
> > without any particular consideration of how useful
> > these extensions would actually turn out to be.
> 
> Nonsense. The Ada designers knew very well how useful those
> extensions would turn out to be. After all, Ada was not designed

So why do you think Ada failed?

> > Like I said, Ada has amazing amounts of itsy-bitsy stuff.
> > Now which of these features, if missing, would take you
> > more than a minor effort to provide yourself?  If and
> > when necessary, rather than present by default all the time?
> 
> So, are you arguing against the sizeof operator in C and C++?
> Are you arguing against the Length field of an Java array?
> Are you arguing against C pointer arithmetic?
> 
> What feature of a high level language cannot be created with an
> individual effort from an assembler programmer?

Obviously, there is a middle ground.  If one feature
in a language is good, ten features aren't ten
times as good.  (Which I stated before in another form,
but apparently it is hard to understand.)

> Absolutely wrong. Ada did not extend Pascal. It simply belongs to
> the same syntax family, which is not rooted in Pascal. Algol came
> long before Pascal.

I suppose you could make that point theoretically.  But
at the time Ada came out, Pascal was very popular.

> There is nothing natural about the development of a language. Classes
> belonged to C++ from the very beginning. The same is true of Java.
> Those languages are not evolutionary developments. They were discrete

Ideas evolve -- someone sees something working in Simula, thinks
about it, and comes up with a new variation of the idea.
The new variation might work or not work.  It competes
against other new variations...

Same way, there exists a type system in C, and it
absolutely *has* to be kept.  But it needs fixing.
So ideas are kicked around how to fix it without
breaking too much.

That's what I meant by "natural development".

> Java is not an evolved C++. The design goals of the two languages are

Java takes a lot of ideas from C++.

> far different. C++, despite its name, is not merely a superset of C.
> If it were the C++ standard would need to subsume the C standard.
> It does not. The C++ standard exists independent of the C standard.
> 
> Your basic assumptions are invalid. This forces your conclusions to be
> invalid also.
> 
> Jim Rogers



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02  4:15                     ` Will
@ 2003-05-02 13:57                       ` Chad R. Meiners
  2003-05-02 16:15                         ` Mark
  2003-05-03  3:13                         ` Will
  0 siblings, 2 replies; 186+ messages in thread
From: Chad R. Meiners @ 2003-05-02 13:57 UTC (permalink / raw)



"Will" <wv9557@yahoo.com> wrote in message
news:4a885870.0305012015.7bea7358@posting.google.com...
> There is no algorithm. Most chess programs uses alpha beta pruning or some
> variation of it.

I hate to say it, but by definition if there is a program, then there is an
algorithm ;)

> Unfortunately there is only so much that alpha can help speed up the
> search. They employ other heuristics like killer moves, null moves.
Techniques
> like hashing greatly speed things up. Most will also have a quiescent
search,
> which basically search fully all the capture moves until there is no more
> captures, this is to avoid the horizon effect. Chess software is really
> more like  combination of techniques and intution than an exact algorithm.

Thus a better algorithm would have better heuristics to prune the search.

> Apparently the more positions you can look at an infinite amount of time

I think you meant a finite amount of time.  With in infinite amount of time
in chess you should be able to find a winning solution with an unoptimized
search ;)

> the stronger  your program is. Therefore an optimized assembly language
> program will beat the same C program, even if they use the same
techniques.
> Just because the assembly language can look at more positions than
> the C program. Implementation language DOES matters.

Implementation always matters; no one said that it did not matter.  Modern
Ada compilers are pretty good at optimizations so I would expect that there
should not be much of a difference between the run times of comparable C and
Ada programs.

> Now does anybody else still want to write an Ada chess program to beat
> GNU Chess? For your information, GNU Chess is one of the weakest program
> out there.

If a chess program is implemented in Ada that beats GNU Chess, what does it
prove?  It proves nothing interesting.  We already know that is possible to
write faster programs in Ada than C.  Interesting enough we also know that
is possible to write faster programs in C than Ada.  Implementation language
does not necessarily impact the speed of the resultant machine code.

>Thank God the IBM researches went ahead with creating
> Deep Blue instead of speculating raw speed will outsmart human creativity.
> Maybe Ada addicts should try to beat GNU chess instead of offering
> speculations.

False analogy--We have evidence for cases where similar algorithms result in
similar times; whereas, we have plenty of evidence that best guess
algorithms produce non-optimal results.





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 13:07                         ` soft-eng
  2003-05-02 13:14                           ` Martin Dowie
@ 2003-05-02 14:23                           ` Chad R. Meiners
  2003-05-02 17:27                           ` Richard Riehle
                                             ` (2 subsequent siblings)
  4 siblings, 0 replies; 186+ messages in thread
From: Chad R. Meiners @ 2003-05-02 14:23 UTC (permalink / raw)



"soft-eng" <softeng3456@netscape.net> wrote in message
news:9fa75d42.0305020507.6d071f2b@posting.google.com...
> Yes, each and every single itsy-bitsy feature of Ada can be justified in
some
> way or the other.

This statement demonstrates your unwillingness to have a reasonable
discussion.

> The key is that by putting all these large number of trivialities in
> the language, you make sure the language will be very large.

Define large language and large number of trivialities.  For that matter
define trivial language feature.





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 13:16                         ` soft-eng
@ 2003-05-02 14:28                           ` Chad R. Meiners
  2003-05-02 17:35                           ` Richard Riehle
                                             ` (2 subsequent siblings)
  3 siblings, 0 replies; 186+ messages in thread
From: Chad R. Meiners @ 2003-05-02 14:28 UTC (permalink / raw)



"soft-eng" <softeng3456@netscape.net> wrote in message
news:9fa75d42.0305020516.bdba239@posting.google.com...

> So why do you think Ada failed?

It did not fail.  Why do you continue to ignore sound arguments and to spout
ignorance?





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 13:57                       ` Chad R. Meiners
@ 2003-05-02 16:15                         ` Mark
  2003-05-03  3:13                         ` Will
  1 sibling, 0 replies; 186+ messages in thread
From: Mark @ 2003-05-02 16:15 UTC (permalink / raw)


Chad R. Meiners wrote:

> 
> Implementation always matters; no one said that it did not matter.  Modern
> Ada compilers are pretty good at optimizations so I would expect that there
> should not be much of a difference between the run times of comparable C and
> Ada programs.
> 

I would expect that GNU Chess is compiled with GNU gcc. GNAT uses the 
same technology. They are probably using the same optimizer since both 
are run through the same 'back-end'.

If the programs are 'comparable' there might not be any differences in 
run time!




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 13:07                         ` soft-eng
  2003-05-02 13:14                           ` Martin Dowie
  2003-05-02 14:23                           ` Chad R. Meiners
@ 2003-05-02 17:27                           ` Richard Riehle
  2003-05-02 21:20                           ` Tom Welsh
  2003-05-03  4:09                           ` Dr Chaos
  4 siblings, 0 replies; 186+ messages in thread
From: Richard Riehle @ 2003-05-02 17:27 UTC (permalink / raw)


soft-eng wrote:

> The key is that by putting all these large number of trivialities in
> the language, you make sure the language will be very large.

1)  I suspect your understanding of the visibility rules in Ada is not
     well-developed.

2) Those itsy-bitsy features actually exist in most other languages, in one
     way or another.  They are the rules the compiler must follow to achieve
     reliable results.  In Ada, the rules are carefully defined.   In many other
     languages, they are carefully assumed.   For example, in C++, one still
     enjoys little surprises from time to time because some feature was not
     as rigorously specified (although this is getting better with time).

3) Because those rules are carefully and thoroughly specified, we can rely
    on the compiler to detect errors in our programs that we would not expect
    from compilers for other languages.   This may not be important for most
    software. However, the targeted domain for Ada is safety-critical software.
    Those who build software in that domain enjoy the benefits of a specification
    that is complete, thorough, and reliable.

4) When developing with a language not as carefully specified, one can achieve
     perfectly good results when there is an understanding that quality is dependent
     on understanding those open-ended items not specified by the language design.

5)  I recommend you choose a language other than Ada for your work.  However,
     I also suggest you might appreciate the fact that the airplane on which you
     travel from one coast to the other is programmed in Ada, that the GPS
     satellite that helps you find your way when lost is programmed in Ada, and
     the communication satellite that brings you your Monday night football is
     programmed in Ada.

Richard Riehle




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 13:16                         ` soft-eng
  2003-05-02 14:28                           ` Chad R. Meiners
@ 2003-05-02 17:35                           ` Richard Riehle
  2003-05-02 21:23                           ` Tom Welsh
  2003-05-02 22:18                           ` Jim Rogers
  3 siblings, 0 replies; 186+ messages in thread
From: Richard Riehle @ 2003-05-02 17:35 UTC (permalink / raw)


soft-eng wrote:

> So why do you think Ada failed?

Ada has not failed.  It has been successful in a large number of
military and non-military projects.   You may want to read my
article on the abrogation of the Ada mandate in the February issue
of Crosstalk.

                  http://stsc.hill.af.mil/Crosstalk

Actually, there are several excellent articles on programming languages
in that issue of Crosstalk.

Regards,

Richard Riehle




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 12:57                       ` Marc A. Criley
@ 2003-05-02 18:55                         ` Hyman Rosen
  2003-05-09 14:57                           ` soft-eng
  0 siblings, 1 reply; 186+ messages in thread
From: Hyman Rosen @ 2003-05-02 18:55 UTC (permalink / raw)


In tribute to Ada, my C++ code usually contains

template<typename T>
std::string image(const T &value)
{
     std::ostringstream o;
     o << value;
     return o.str();
}




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 13:07                         ` soft-eng
                                             ` (2 preceding siblings ...)
  2003-05-02 17:27                           ` Richard Riehle
@ 2003-05-02 21:20                           ` Tom Welsh
  2003-05-04 13:09                             ` Bill Findlay
  2003-05-03  4:09                           ` Dr Chaos
  4 siblings, 1 reply; 186+ messages in thread
From: Tom Welsh @ 2003-05-02 21:20 UTC (permalink / raw)


In article <9fa75d42.0305020507.6d071f2b@posting.google.com>, soft-eng
<softeng3456@netscape.net> writes
>"John R. Strohm" <strohm@airmail.net> wrote in message news:<4F03C83A9C6A478F.68
>8C62D70A2EADA3.068FE6EB5E241C3B@lp.airnews.net>...
>
>> 'first and 'last are necessary if you want to write loops over an arbitrary
>> index type.  'succ and 'pred are absolutely critical if you want to step
>
>Yes, each and every single itsy-bitsy feature of Ada can be justified in some
>way or the other.
>
>> The key is that, by putting them in the language, it is absolutely
>> guaranteed that they will be implemented CORRECTLY, every time, with NO
>
>The key is that by putting all these large number of trivialities in
>the language, you make sure the language will be very large.
>

That is a tradeoff that each language designer has to make. In the case
of Ada, it was desirable to include a large set of features because one
of the language's main objectives was to support programming in the
large, including realtime and concurrent programmming. Then there is the
compilation system...

Pascal, for example, is much smaller and tidier. That makes it more
suitable as a first language for students to learn - which was one of
its design goals. On the other hand, its very simplicity has sometimes
made unextended Pascal inappropriate for production systems.
-- 
Tom Welsh



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 13:16                         ` soft-eng
  2003-05-02 14:28                           ` Chad R. Meiners
  2003-05-02 17:35                           ` Richard Riehle
@ 2003-05-02 21:23                           ` Tom Welsh
  2003-05-02 22:18                           ` Jim Rogers
  3 siblings, 0 replies; 186+ messages in thread
From: Tom Welsh @ 2003-05-02 21:23 UTC (permalink / raw)


In article <9fa75d42.0305020516.bdba239@posting.google.com>, soft-eng
<softeng3456@netscape.net> writes
>
>So why do you think Ada failed?
>

What makes you think Ada failed?

It doesn't get a lot of publicity compared with C++, C sharp or Java.

Then again, neither do CICS, IMS, Tandem NonStop, VMS or CORBA - all of
which are involved to a greater or lesser extent in driving a lot of the
amenities we take for granted every day.
-- 
Tom Welsh



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 13:16                         ` soft-eng
                                             ` (2 preceding siblings ...)
  2003-05-02 21:23                           ` Tom Welsh
@ 2003-05-02 22:18                           ` Jim Rogers
  2003-05-03  4:07                             ` Dr Chaos
  2003-05-06 13:21                             ` soft-eng
  3 siblings, 2 replies; 186+ messages in thread
From: Jim Rogers @ 2003-05-02 22:18 UTC (permalink / raw)


softeng3456@netscape.net (soft-eng) wrote in message news:<9fa75d42.0305020516.bdba239@posting.google.com>...
> "James S. Rogers" <jimmaureenrogers@worldnet.att.net> wrote in message news:<ODlsa.134571$ja4.6028499@bgtnsc05-news.ops.worldnet.att.net>...
> > "soft-eng" <softeng3456@netscape.net> wrote in message
> > news:9fa75d42.0305011727.5eae0222@posting.google.com...
> > > mcq95@earthlink.net (Marc A. Criley) wrote in message
>  news:<254c16a.0305011035.13133e8d@posting.google.com>...
> > >
> > > Yes, Ada extended Pascal very strongly in this regards,
> > > without any particular consideration of how useful
> > > these extensions would actually turn out to be.
> > 
> > Nonsense. The Ada designers knew very well how useful those
> > extensions would turn out to be. After all, Ada was not designed
> 
> So why do you think Ada failed?

I see. Let's change the subject.

How do you determine the success or failure of a language?
Did Cobol succeed or fail?
Did Fortran succeed or fail?
Did Bourne Shell succeed or fail?
How about Common Lisp, smalltalk, or eiffel?

> 
> > > Like I said, Ada has amazing amounts of itsy-bitsy stuff.
> > > Now which of these features, if missing, would take you
> > > more than a minor effort to provide yourself?  If and
> > > when necessary, rather than present by default all the time?
> > 
> > So, are you arguing against the sizeof operator in C and C++?
> > Are you arguing against the Length field of an Java array?
> > Are you arguing against C pointer arithmetic?
> > 
> > What feature of a high level language cannot be created with an
> > individual effort from an assembler programmer?
> 
> Obviously, there is a middle ground.  If one feature
> in a language is good, ten features aren't ten
> times as good.  (Which I stated before in another form,
> but apparently it is hard to understand.)

Are you saying that high level features are good but only if
the language has very few of them?

What is the opitimal number? How is that number determined?

> 
> > Absolutely wrong. Ada did not extend Pascal. It simply belongs to
> > the same syntax family, which is not rooted in Pascal. Algol came
> > long before Pascal.
> 
> I suppose you could make that point theoretically.  But
> at the time Ada came out, Pascal was very popular.

What has popularity got to do with truth?
By the way, did Pascal succeed or fail?

> 
> > There is nothing natural about the development of a language. Classes
> > belonged to C++ from the very beginning. The same is true of Java.
> > Those languages are not evolutionary developments. They were discrete
> 
> Ideas evolve -- someone sees something working in Simula, thinks
> about it, and comes up with a new variation of the idea.
> The new variation might work or not work.  It competes
> against other new variations...

Gee. That sounds a lot like the way Ada was developed.
The ideas and accomplishments of many languages were considered
during the development of the language. By your definition, Ada
was an evolutionary development.

> 
> Same way, there exists a type system in C, and it
> absolutely *has* to be kept.  But it needs fixing.
> So ideas are kicked around how to fix it without
> breaking too much.

So, did the type system succeed or fail? Did it succeed because
it was broken? Will C enjoy greater success with a fixed type
system?

> 
> That's what I meant by "natural development".

So unnatural development would be the invention of something
completely new. Interesting. Would that require some form of
devine intervention?

How would you describe the invention of the punch cards used in
the Jacquard loom? Would that be natural or not? Does "natural
development" imply a virtue not found in other kinds of 
development?

> 
> > Java is not an evolved C++. The design goals of the two languages are
> 
> Java takes a lot of ideas from C++.

It also takes a lot of ideas from smalltalk. Why not call it an
evolved smalltalk?

Jim Rogers



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 13:57                       ` Chad R. Meiners
  2003-05-02 16:15                         ` Mark
@ 2003-05-03  3:13                         ` Will
  2003-05-03  4:24                           ` Chad R. Meiners
  1 sibling, 1 reply; 186+ messages in thread
From: Will @ 2003-05-03  3:13 UTC (permalink / raw)


I hate to say it but your definition of algorithm is wrong. Algorithm
is an established and provable way to  solve a problem. There are
steps you can follow to solve a Rubik cube. Now that is an algorithm.
There is no documented way, that I know of, to win a chess game.
Therefore there is not a chess algorithm.



"Chad R. Meiners" <crmeiners@hotmail.com> wrote in message news:<b8u0u5$2ere$1@msunews.cl.msu.edu>...
> "Will" <wv9557@yahoo.com> wrote in message
> news:4a885870.0305012015.7bea7358@posting.google.com...
> > There is no algorithm. Most chess programs uses alpha beta pruning or some
> > variation of it.
> 
> I hate to say it, but by definition if there is a program, then there is an
> algorithm ;)
> 
> > Unfortunately there is only so much that alpha can help speed up the
> > search. They employ other heuristics like killer moves, null moves.
>  Techniques
> > like hashing greatly speed things up. Most will also have a quiescent
>  search,
> > which basically search fully all the capture moves until there is no more
> > captures, this is to avoid the horizon effect. Chess software is really
> > more like  combination of techniques and intution than an exact algorithm.
> 
> Thus a better algorithm would have better heuristics to prune the search.
> 
> > Apparently the more positions you can look at an infinite amount of time
> 
> I think you meant a finite amount of time.  With in infinite amount of time
> in chess you should be able to find a winning solution with an unoptimized
> search ;)
> 
> > the stronger  your program is. Therefore an optimized assembly language
> > program will beat the same C program, even if they use the same
>  techniques.
> > Just because the assembly language can look at more positions than
> > the C program. Implementation language DOES matters.
> 
> Implementation always matters; no one said that it did not matter.  Modern
> Ada compilers are pretty good at optimizations so I would expect that there
> should not be much of a difference between the run times of comparable C and
> Ada programs.
> 
> > Now does anybody else still want to write an Ada chess program to beat
> > GNU Chess? For your information, GNU Chess is one of the weakest program
> > out there.
> 
> If a chess program is implemented in Ada that beats GNU Chess, what does it
> prove?  It proves nothing interesting.  We already know that is possible to
> write faster programs in Ada than C.  Interesting enough we also know that
> is possible to write faster programs in C than Ada.  Implementation language
> does not necessarily impact the speed of the resultant machine code.

Every now and then, I see people trying things like rewriting OS in
Ada
(the Marte project) or doing DirectX in Ada. Despite of my profound
aversion
for Ada, I am impressed by what they are trying to do. I don't think 
they are out to prove a thing

> 
> >Thank God the IBM researches went ahead with creating
> > Deep Blue instead of speculating raw speed will outsmart human creativity.
> > Maybe Ada addicts should try to beat GNU chess instead of offering
> > speculations.
> 
> False analogy--We have evidence for cases where similar algorithms result in
> similar times; whereas, we have plenty of evidence that best guess
> algorithms produce non-optimal results.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 22:18                           ` Jim Rogers
@ 2003-05-03  4:07                             ` Dr Chaos
  2003-05-06 13:21                             ` soft-eng
  1 sibling, 0 replies; 186+ messages in thread
From: Dr Chaos @ 2003-05-03  4:07 UTC (permalink / raw)


Jim Rogers <jimmaureenrogers@worldnet.att.net> wrote:
> 
> How do you determine the success or failure of a language?

A) how many people use it and for what magnitude of tasks, and 

B) how influential its design and ideas were intellectually,
and how many other languages were influenced by it and
how many times it itself gets revised with new ideas

> Did Cobol succeed or fail?

succeed / fail 

> Did Fortran succeed or fail?

succeed / succeed

> Did Bourne Shell succeed or fail?

succeed / fail 

> How about Common Lisp, smalltalk, or eiffel?

fail/succeed
partial succeed/partial succeed
fail/partial succeed




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 13:07                         ` soft-eng
                                             ` (3 preceding siblings ...)
  2003-05-02 21:20                           ` Tom Welsh
@ 2003-05-03  4:09                           ` Dr Chaos
  4 siblings, 0 replies; 186+ messages in thread
From: Dr Chaos @ 2003-05-03  4:09 UTC (permalink / raw)


On 2 May 2003 06:07:52 -0700, soft-eng <softeng3456@netscape.net> wrote:
> 
> But the strong typing of C++ was designed to fit
> well the existing C style of programming. 

nay. 

the clash between those and the existence of the "&" operator
is responsible for many crimes.

> In fact,
> it was later retrofitted into C (without breaking most
> existing code.)





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-03  3:13                         ` Will
@ 2003-05-03  4:24                           ` Chad R. Meiners
  0 siblings, 0 replies; 186+ messages in thread
From: Chad R. Meiners @ 2003-05-03  4:24 UTC (permalink / raw)


"Will" <wv9557@yahoo.com> wrote in message
news:4a885870.0305021913.31ffb745@posting.google.com...
> I hate to say it but your definition of algorithm is wrong. Algorithm
> is an established and provable way to  solve a problem.

An algorithm is any sequence of well defined instructions that halt.
Whether or not an algorithm solves a problem is irrelevant.

> There is no documented way, that I know of, to win a chess game.
> Therefore there is not a chess algorithm.

There are a finite number of states in which a chessboard can be configured.
Thus, the existence of a winning strategy can be determined in a finite
amount of time.  Unfortunately the cost in time is rather large, but it is
finite; thus, an optimal chess algorithm exists.






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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 21:20                           ` Tom Welsh
@ 2003-05-04 13:09                             ` Bill Findlay
  0 siblings, 0 replies; 186+ messages in thread
From: Bill Findlay @ 2003-05-04 13:09 UTC (permalink / raw)


On 2/5/03 22:20, in article 34Y+3LACEus+EwF5@nildram.co.uk, "Tom Welsh"
<news@tom-welsh.co.uk> wrote:
 
> 
> That is a tradeoff that each language designer has to make. In the case
> of Ada, it was desirable to include a large set of features because one
> of the language's main objectives was to support programming in the
> large, including realtime and concurrent programmming. Then there is the
> compilation system...
> 

What you don't know about Ada does not hurt you, so its absolute size is
pretty irrelevant to a teaching argument.

Once you get past the basics, Ada's strong support for OOP, programming in
the large, concurrent programming, and consistency-enforcing compilation are
all major assets of Ada as a teaching language.

> Pascal, for example, is much smaller and tidier. That makes it more
> suitable as a first language for students to learn - which was one of
> its design goals. On the other hand, its very simplicity has sometimes
> made unextended Pascal inappropriate for production systems.

Pascal is certainly smaller than Ada, but it is NOT tidier.
Both the syntax and the semantics of Ada are much more consistent, and
therefore easier to learn.

I was formerly at a university that has been teaching 400-500 novices a year
in Ada 95 since 1997. More students become able to write working code with
confidence, sooner, and more consistently, than they ever did with Pascal
(the previous teaching language).

The staff teaching those courses have successful beaten off an attempt to
replace Ada 95 with Java, and are set to go on with Ada for another 5 years.

-- 
Bill-Findlay chez blue-yonder.co.uk ("-" => "")





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 22:18                           ` Jim Rogers
  2003-05-03  4:07                             ` Dr Chaos
@ 2003-05-06 13:21                             ` soft-eng
  2003-05-06 19:03                               ` Jim Rogers
  1 sibling, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-05-06 13:21 UTC (permalink / raw)


jimmaureenrogers@worldnet.att.net (Jim Rogers) wrote in message news:<82347202.0305021418.4719da45@posting.google.com>...

> How do you determine the success or failure of a language?
> Did Cobol succeed or fail?
> Did Fortran succeed or fail?
> Did Bourne Shell succeed or fail?
> How about Common Lisp, smalltalk, or eiffel?

I suppose you could define success as "having a name
that starts and ends with the letter a" and then claim
Ada as being wildly successful.

However, by more objective criteria, the language
failed to meet most of its expectations.  It was
expected to be used primarily in ALL government
work within a few years, and there was a general
expectation that it will also become very
popular outside the government.  (Sorry, not
going to define "general", "expectation", "will",
"government"...)

> Are you saying that high level features are good but only if
> the language has very few of them?
> 
> What is the opitimal number? How is that number determined?

Ah, we need more strict definitions!  Sorry, this is common
sense.  If you take sugar in your coffee,
too little is going to taste bad and so is too much.
Exact counting of granules is not necessary or relevant.
(Though maybe someone could do a study on ranges
where a language might become "feature-heavy", but
it's very difficult, because first you have to rank
features and separate "deep concept"s from "itsy-bitsy-feature"s,
from "nice-to-have-feature"s and so on...)

> > > Absolutely wrong. Ada did not extend Pascal. It simply belongs to
> > > the same syntax family, which is not rooted in Pascal. Algol came
> > > long before Pascal.
> > 
> > I suppose you could make that point theoretically.  But
> > at the time Ada came out, Pascal was very popular.
> 
> What has popularity got to do with truth?

Simply that Ada designers were much more likely to have
been exposed in depth to Pascal, than to the "Algol family tree".

> By the way, did Pascal succeed or fail?

Depends upon your definitions, but by normal definitions
it was very successful until early 80s, then was
replaced as C became very successful.

> Gee. That sounds a lot like the way Ada was developed.
> The ideas and accomplishments of many languages were considered
> during the development of the language. By your definition, Ada
> was an evolutionary development.

No, you need to learn the history of Ada.
Ada was not a slow natural development.  It was artificially
developed at the behest of, and following the requirements of,
the DoD.

> So, did the type system succeed or fail? Did it succeed because
> it was broken? Will C enjoy greater success with a fixed type
> system?

C type-sytem was more useful, and that's why C succeeded and
replaced Pascal even though Pascal had a strict and
theoretically better (according to some definitions)
type system.

> So unnatural development would be the invention of something
> completely new. Interesting. Would that require some form of
> devine intervention?
> How would you describe the invention of the punch cards used in
> the Jacquard loom? Would that be natural or not? Does "natural
> development" imply a virtue not found in other kinds of 
> development?

I think there was an actual point I made.
Witticisms are nice, but sound even better if you
understand and actually refute the point wittily.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-06 13:21                             ` soft-eng
@ 2003-05-06 19:03                               ` Jim Rogers
  2003-05-07 13:04                                 ` soft-eng
  0 siblings, 1 reply; 186+ messages in thread
From: Jim Rogers @ 2003-05-06 19:03 UTC (permalink / raw)


softeng3456@netscape.net (soft-eng) wrote in message news:<9fa75d42.0305060521.400f1d80@posting.google.com>...
> jimmaureenrogers@worldnet.att.net (Jim Rogers) wrote in message news:<82347202.0305021418.4719da45@posting.google.com>...
> 
> > How do you determine the success or failure of a language?
> > Did Cobol succeed or fail?
> > Did Fortran succeed or fail?
> > Did Bourne Shell succeed or fail?
> > How about Common Lisp, smalltalk, or eiffel?
> 
> I suppose you could define success as "having a name
> that starts and ends with the letter a" and then claim
> Ada as being wildly successful.

Nope.
I never claimed any language has been successful or
unsuccessful. I only want to understand how you arrive
at your conclusions.

> 
> However, by more objective criteria, the language
> failed to meet most of its expectations.  It was
> expected to be used primarily in ALL government
> work within a few years, and there was a general
> expectation that it will also become very
> popular outside the government.  (Sorry, not
> going to define "general", "expectation", "will",
> "government"...)

Expectations are a marketing issue. Language design goals
are a technical issue. Ada meets its language design goals
very well, as do most languages. Ada has had some remarkably
bad marketing.

> 
> > Are you saying that high level features are good but only if
> > the language has very few of them?
> > 
> > What is the opitimal number? How is that number determined?
> 
> Ah, we need more strict definitions!  Sorry, this is common
> sense.  If you take sugar in your coffee,
> too little is going to taste bad and so is too much.

You are willing to accept that a proper number of high level
features is, to expand on your analogy, a matter of taste.

(one lump or two?)

> Exact counting of granules is not necessary or relevant.
> (Though maybe someone could do a study on ranges
> where a language might become "feature-heavy", but
> it's very difficult, because first you have to rank
> features and separate "deep concept"s from "itsy-bitsy-feature"s,
> from "nice-to-have-feature"s and so on...)

And you have to determine which feature is a deep concept and
which is "itsy-bitsy". Again, this becomes a matter of personal
judgement rather than an objective measure.

> > Gee. That sounds a lot like the way Ada was developed.
> > The ideas and accomplishments of many languages were considered
> > during the development of the language. By your definition, Ada
> > was an evolutionary development.
> 
> No, you need to learn the history of Ada.
> Ada was not a slow natural development.  It was artificially
> developed at the behest of, and following the requirements of,
> the DoD.

I am quite familiar with the history of Ada. It is every bit
as evolutionary as C, C++, Java, or Eiffel. All these languages
were built borrowing ideas from existing languages. Each of these
languages was built with a particular set of design goals. Each
of these languages was built by the primary efforts of an
individual or small team.

C was built to satisfy the requirements of Bell Laboratories.
C++ was built to satisfy another set of requirements at Bell
Laboratories.
Java was built to satisfy a set of requirements from Sun.
Ada was built to satisfy a set of requirements from the U.S. DoD.

Nothing in that history points to a difference in how the language
was developed. I suppose you will state that the DoD was more 
specific in their requirements definition than were the other
organizations. That may be so. Requirements, however, are not
implementation. The implementation was supplied by a the team
that developed Ada, working for Thompson CSF of France.

> 
> > So, did the type system succeed or fail? Did it succeed because
> > it was broken? Will C enjoy greater success with a fixed type
> > system?
> 
> C type-sytem was more useful, and that's why C succeeded and
> replaced Pascal even though Pascal had a strict and
> theoretically better (according to some definitions)
> type system.

Pascal's type system was also inconsistent and contradictory.
Remember Pascal's design goal. It was designed to be a teaching
language, not a language used for commercial production. In fact
Pascal did very well for many decades, dominating all languages
used as a first programming language in colleges and universities
around the globe.

C has never achieved a similar acceptance as a first teaching
language. On the other hand, C was never designed to be a teaching
language. It was designed to provide a high level assembler with
what was at the time an unprecedented level of portability.

> 
> > So unnatural development would be the invention of something
> > completely new. Interesting. Would that require some form of
> > devine intervention?
> > How would you describe the invention of the punch cards used in
> > the Jacquard loom? Would that be natural or not? Does "natural
> > development" imply a virtue not found in other kinds of 
> > development?
> 
> I think there was an actual point I made.
> Witticisms are nice, but sound even better if you
> understand and actually refute the point wittily.

I am sure you think you made a point. I am also sure that I do
not clearly understand your point. 

Since a number of your metrics for language success are subjective,
I currently conclude that your overall assessment is also 
subjective. Subjective assessments are fine. They can also be very
difficult to clearly explain to others.

Jim Rogers



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-06 19:03                               ` Jim Rogers
@ 2003-05-07 13:04                                 ` soft-eng
  2003-05-07 14:05                                   ` Preben Randhol
                                                     ` (4 more replies)
  0 siblings, 5 replies; 186+ messages in thread
From: soft-eng @ 2003-05-07 13:04 UTC (permalink / raw)


jimmaureenrogers@worldnet.att.net (Jim Rogers) wrote in message news:<82347202.0305061103.2ddd98e4@posting.google.com>...

> C was built to satisfy the requirements of Bell Laboratories.

Ah, I see.  You have no experience with actual
research environments!

That's not work it works.  Bell Labs did not come
up with something like "now this set of research engineers
will design a language, as per this set of requirements".
Research labs can't get very many useful results that way.

Ken Thompson in fact started working on developing a
Fortran compiler for his project's needs, but
didn't like it and instead ended up creating a
language called "B", based upon something
called "BCPL".

People at Bell Labs liked "B", and started using it.  It
picked up direction and momentum, and with some work
from Dennis Ritchie, ended up as as "NB" (new "B")
and then "C".  Even "C" didn't start off in any
kind of stable form.  There were many early changes
and revisions.

In fact, that may have been the major underlying
strength of C -- it was designed by people who
were also using it.  They *had* to make it usable.
(As opposed to Ichbiah, who *had* to make it impressive
to a committee.)  In fact, the languages B and C were
so evolution driven that they did not have a chicken-and-egg
problem of compilers-and-language variety.  From the
early stages, the languages had compilers written in
themselves!  If you are doing something complex enough
like writing a compiler in a language you are designing, you
will of course end up making the language usable.

So all future users of "C" found it usable, rather
than impressive.  And when you have to get actual
projects done in a short time, theoretical considerations
weigh little in the end, actual usability looms large.

Giving people a set of requirements and saying
"now go design a perfect language" is the
opposite of how such things evolve naturally.

Here is a link from the author of "C" on
how "C" evolved:

  http://cm.bell-labs.com/cm/cs/who/dmr/chist.html



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-07 13:04                                 ` soft-eng
@ 2003-05-07 14:05                                   ` Preben Randhol
  2003-05-07 17:29                                     ` soft-eng
  2003-05-07 16:33                                   ` Wesley Groleau
                                                     ` (3 subsequent siblings)
  4 siblings, 1 reply; 186+ messages in thread
From: Preben Randhol @ 2003-05-07 14:05 UTC (permalink / raw)


soft-eng wrote:
> In fact, that may have been the major underlying
> strength of C -- it was designed by people who
> were also using it.  They *had* to make it usable.

Well, that is also the flaw of C in that the usage requirements are too
weak today.

> (As opposed to Ichbiah, who *had* to make it impressive
> to a committee.)

No, he had to design a language from the requirements given. Many of these
requirements C does not meet.

> So all future users of "C" found it usable, rather
> than impressive.  And when you have to get actual
> projects done in a short time, theoretical considerations
> weigh little in the end, actual usability looms large.

If you look at studies you will see that C is not a cost efficient
language. Here is an study that compare the old Ada83 language to C and
you can see that even this version is more cost efficient than C.
http://www.adaic.com/whyada/ada-vs-c/cada_art.pdf

Other comparisons can be found here: http://archive.adaic.com/intro/c.html

> Giving people a set of requirements and saying
> "now go design a perfect language" is the
> opposite of how such things evolve naturally.

That C is evolving is an overstatment. C has not evolved to deal with
it's flaws and problems. 

I don't think the reason for the high usage of C is only a merit of the
language itself, but also to a great extent the inertia.

   LinuxWorld.com: Five or ten years from now, will C still be as
   popular [...]

   Dennis Ritchie: I really don't know the answer to this, except to
   observe that software is much harder to change en masse than
   hardware. [...]

http://www.linuxworld.com/linuxworld/lw-2000-12/lw-12-ritchie.html
http://www.linuxfocus.org/English/July1999/article79.html

-- 
Preben Randhol                    http://www.pvv.org/~randhol/



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-07 13:04                                 ` soft-eng
  2003-05-07 14:05                                   ` Preben Randhol
@ 2003-05-07 16:33                                   ` Wesley Groleau
  2003-05-07 18:48                                   ` Jim Rogers
                                                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 186+ messages in thread
From: Wesley Groleau @ 2003-05-07 16:33 UTC (permalink / raw)



> and then "C".  Even "C" didn't start off in any
> kind of stable form.  There were many early changes

Now the definition is fairly stable, but the language
still is not.  :-)

> themselves!  If you are doing something complex enough
> like writing a compiler in a language you are designing, you
> will of course end up making the language usable.

What does that say about Ada 95, which had it's first
compiler written in Ada 83 and it's second in Ada 95 ?

Or COBOL (which had what some say is its best compiler
written in COBOL)?

> Giving people a set of requirements and saying
> "now go design a perfect language" is the
> opposite of how such things evolve naturally.

Maybe that's why the natural state of software
is so pitiful.




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-07 14:05                                   ` Preben Randhol
@ 2003-05-07 17:29                                     ` soft-eng
  2003-05-07 19:37                                       ` Mark Thornton
                                                         ` (3 more replies)
  0 siblings, 4 replies; 186+ messages in thread
From: soft-eng @ 2003-05-07 17:29 UTC (permalink / raw)


Preben Randhol <randhol+news@pvv.org> wrote in message news:<slrnbbi4li.9l5.randhol+news@kiuk0152.chembio.ntnu.no>...


> I don't think the reason for the high usage of C is only a merit of the
> language itself, but also to a great extent the inertia.

No doubt, but how do you think C became popular in the
first place, overcoming the inertia (that was then) in favor
of Fortran, Cobol, and Pascal?

C++ actually took this inertia into account, but what
about Java which did not retain backward compability
with C?

Inertia explains the continued usage of languages
well past the time that they have become obsolete.
It even explains how 20 years after its trumpet-and-fanfare
inception, people who got hooked into it are still trying
to explain how wonderful Ada is.  But it does not
explain how new languages come into popularity.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-07 13:04                                 ` soft-eng
  2003-05-07 14:05                                   ` Preben Randhol
  2003-05-07 16:33                                   ` Wesley Groleau
@ 2003-05-07 18:48                                   ` Jim Rogers
  2003-05-07 19:09                                   ` Gautier
  2003-05-07 22:45                                   ` Dr Chaos
  4 siblings, 0 replies; 186+ messages in thread
From: Jim Rogers @ 2003-05-07 18:48 UTC (permalink / raw)


softeng3456@netscape.net (soft-eng) wrote in message news:<9fa75d42.0305070504.6866e7a3@posting.google.com>...
> jimmaureenrogers@worldnet.att.net (Jim Rogers) wrote in message news:<82347202.0305061103.2ddd98e4@posting.google.com>...
> 
> > C was built to satisfy the requirements of Bell Laboratories.
> 
> Ah, I see.  You have no experience with actual
> research environments!
> 
> That's not work it works.  Bell Labs did not come
> up with something like "now this set of research engineers
> will design a language, as per this set of requirements".
> Research labs can't get very many useful results that way.
> 
> Ken Thompson in fact started working on developing a
> Fortran compiler for his project's needs, but
> didn't like it and instead ended up creating a
> language called "B", based upon something
> called "BCPL".

Ken Thompson may not have had a formal requirements document,
but he did have a clear understanding of his project's needs.
Designing a language to satisfy a set of needs is the same as
designing a language to satisfy a set of requirements.
Requirements are a formal notation of needs.

It is clear that Ken Thompson had determined a set of needs not
met by the compiler or language his team was originally using, 
or considering. It was those needs that provided the motivation
to develop another language. Even in a research environment you
must be able to justify your use of time. You are not paid to
act without reason or motivation.

> 
> People at Bell Labs liked "B", and started using it.  It
> picked up direction and momentum, and with some work
> from Dennis Ritchie, ended up as as "NB" (new "B")
> and then "C".  Even "C" didn't start off in any
> kind of stable form.  There were many early changes
> and revisions.

The set of requirements changed during the development of
the language. This is standard on most software projects.

> 
> In fact, that may have been the major underlying
> strength of C -- it was designed by people who
> were also using it.  They *had* to make it usable.
> (As opposed to Ichbiah, who *had* to make it impressive
> to a committee.)  In fact, the languages B and C were
> so evolution driven that they did not have a chicken-and-egg
> problem of compilers-and-language variety.  From the
> early stages, the languages had compilers written in
> themselves!  If you are doing something complex enough
> like writing a compiler in a language you are designing, you
> will of course end up making the language usable.

There are several ways to arrive at a final set of project
requirements. One way is to start with a short list of
requirements, and then refine those requirements in response
to a set of prototype development efforts.

Another way is to study and analyze the requirements in a formal
process. The goal of this approach is to produce a more stable
set of requirements before project design and implementation begin.

Both approaches are subject to feature creap.

In the case of C, the set of language features was "specified" by
a committee consisting of the first users of the language. In the
case of Ada the set of language features was "specified" by a
committee consisting of software experts from many domains, including
military, industry, and academia.

The processes to create C and Ada were different. Both efforts 
resulted in usable languages.

> 
> So all future users of "C" found it usable, rather
> than impressive.  And when you have to get actual
> projects done in a short time, theoretical considerations
> weigh little in the end, actual usability looms large.

Ada was not designed to be impressive. It was designed to 
meet a set of requirements. During the development of the
requirements that eventually lead to the creation of Ada, 
existing languages were evaluated in an effort to find a
language satisfying those requirements. C did not meet the
requirements.

This does not label C as deficient. It only states that C
does not meet the requirements developed by the team that
eventually generated the requirements satisfied by Ada.

> 
> Giving people a set of requirements and saying
> "now go design a perfect language" is the
> opposite of how such things evolve naturally.

I would state that differently. I would say that giving
people a set of requirements and then charging them with
developing a language satisfying those requirements is the
way you work when you contract the work to an outside
developer.

The approach taken by Mr Thompson and Mr Ritchie is one
frequently used for internal development. This is what
the people at Hewlett-Packard company called "next bench"
development. You look over at the engineer at the next
work bench, see him or her struggling with a technical
problem, and design a solution for that problem.

Jim Rogers



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-07 13:04                                 ` soft-eng
                                                     ` (2 preceding siblings ...)
  2003-05-07 18:48                                   ` Jim Rogers
@ 2003-05-07 19:09                                   ` Gautier
  2003-05-07 22:45                                   ` Dr Chaos
  4 siblings, 0 replies; 186+ messages in thread
From: Gautier @ 2003-05-07 19:09 UTC (permalink / raw)


softeng:

[...]

> Giving people a set of requirements and saying
> "now go design a perfect language" is the
> opposite of how such things evolve naturally.

Your demonstration about the successful bottom-up
evolution of C and the failure of the top-down Ada
83 is bright.

Well, in the nature, some species do survie well
without evolving anymore - maybe this is why a lot
of programmers have to cope with included headers
files fighting each others with messy conditional
defines and so on, or need to bracket every group
of more that one instruction... all these things
that were surely fine for programming small tools
on a PDP-11.

Of course the "image" that was behind Ada 83 is
comitees, a military style of communication,
absence of contacts with programmers, expensive
and bad compilers, rigidity, bureaucracy.
There is surely some truth behind it.

But, in the nature, there are surprises.
First, excepted some non-neglitible details,
Ada 83 (even it!) is usable. It is even unexpectedly
professional and performance-friendly.
It is obvious that the people behind Ada 83 were
not amateurs or poseurs, since it is impressive _and_
quite usable.

The present Ada (Ada 95), more usable, left in the nature
without official support, follows (is forced to) a natural
evolution for 5 years.
My impression is that the removal of the artificial
constraint from the US DoD has had rather overall positive
effects up to now.
________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-07 17:29                                     ` soft-eng
@ 2003-05-07 19:37                                       ` Mark Thornton
  2003-05-08 13:48                                         ` soft-eng
  2003-05-07 22:58                                       ` Dr Chaos
                                                         ` (2 subsequent siblings)
  3 siblings, 1 reply; 186+ messages in thread
From: Mark Thornton @ 2003-05-07 19:37 UTC (permalink / raw)


soft-eng wrote:
> Preben Randhol <randhol+news@pvv.org> wrote in message news:<slrnbbi4li.9l5.randhol+news@kiuk0152.chembio.ntnu.no>...
> 
> 
> 
>>I don't think the reason for the high usage of C is only a merit of the
>>language itself, but also to a great extent the inertia.
> 
> 
> No doubt, but how do you think C became popular in the
> first place, overcoming the inertia (that was then) in favor
> of Fortran, Cobol, and Pascal?

None of those langauges competed in the area in which C initially gained 
popularity --- systems programming. The main system programming language 
at the time was probably still assembler. The more general use of C came 
later --- after it had established a foothold.

Mark Thornton




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-07 13:04                                 ` soft-eng
                                                     ` (3 preceding siblings ...)
  2003-05-07 19:09                                   ` Gautier
@ 2003-05-07 22:45                                   ` Dr Chaos
  4 siblings, 0 replies; 186+ messages in thread
From: Dr Chaos @ 2003-05-07 22:45 UTC (permalink / raw)


On 7 May 2003 06:04:07 -0700, soft-eng <softeng3456@netscape.net> wrote:
> People at Bell Labs liked "B", and started using it.  It
> picked up direction and momentum, and with some work
> from Dennis Ritchie, ended up as as "NB" (new "B")
> and then "C".  Even "C" didn't start off in any
> kind of stable form.  There were many early changes
> and revisions.
 
And there weren't for other languages?  That's silly.

> In fact, that may have been the major underlying
> strength of C -- it was designed by people who
> were also using it.  They *had* to make it usable.
> (As opposed to Ichbiah, who *had* to make it impressive
> to a committee.)  In fact, the languages B and C were
> so evolution driven that they did not have a chicken-and-egg
> problem of compilers-and-language variety.  From the
> early stages, the languages had compilers written in
> themselves!  If you are doing something complex enough
> like writing a compiler in a language you are designing, you
> will of course end up making the language usable.

No, you will end up with a language which is good for writing its own
compiler in if the mindset of the users is similar to the language
developer.

There are many cases where that is wildly inappropriate: Ada is
one of those. 

Bell Labs researchers set out to design an operating system.  That
was pretty good.  They made a language along the way.  It was OK
for writing the operating system. 

That which they intentionally designed and thought was important
came out better than stuff that happens along the way.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-07 17:29                                     ` soft-eng
  2003-05-07 19:37                                       ` Mark Thornton
@ 2003-05-07 22:58                                       ` Dr Chaos
  2003-05-08 14:06                                         ` soft-eng
  2003-05-08 12:29                                       ` Marin David Condic
  2003-05-08 14:34                                       ` Preben Randhol
  3 siblings, 1 reply; 186+ messages in thread
From: Dr Chaos @ 2003-05-07 22:58 UTC (permalink / raw)


On 7 May 2003 10:29:10 -0700, soft-eng <softeng3456@netscape.net> wrote:
> Preben Randhol <randhol+news@pvv.org> wrote in message news:<slrnbbi4li.9l5.randhol+news@kiuk0152.chembio.ntnu.no>...
> 
> 
>> I don't think the reason for the high usage of C is only a merit of the
>> language itself, but also to a great extent the inertia.
> 
> No doubt, but how do you think C became popular in the
> first place, overcoming the inertia (that was then) in favor
> of Fortran, Cobol, and Pascal?

A) C came attached to Unix.  The native operating system interface, i.e.
the definition of the data structures and the calls and everything
wrapped up in the .h files, was, and still is, essentially only 
defined by parsing and interpreting actual C language syntax and
semantics.    That was just laziness. 

By contrast, VMS was explicitly designed to NOT be like this.

B) Unix was very open to experimentation and reprogramming by academic
groups with hardworking cheap gradstudent and postdoc labor because
the source was available.  And it came with a C compiler. 

C) That was because of government regulation of AT&T as opposed to DEC or
IBM, which had full control over their own operating systems. 

D) As a result, TCP/IP became attached to Unix first in the Berkeley
System Development laboratories, and TCP/IP hardware was attached to
each other nationally because of DARPA government funding.  TCP/IP was
a Very Very Good Thing.

E) Soon, in large part because of C) (not the C programming language),
Unix became attached to powerful, but *much* less expensive hardware
than its proprietary-OS competitors.  This permitted the Stanford
University Network startup corporation to license some version of Unix
with TCP/IP in it on those really cool Motorola 68000 microprocessors
that Andy Bechtolsheim found, giving VAX-like performance at 1/10th
the cost.

F) The C programming language rode the wave of economics and the intrinsic
coolness of the Internet. 

G) The End. 

> Inertia explains the continued usage of languages
> well past the time that they have become obsolete.
> It even explains how 20 years after its trumpet-and-fanfare
> inception, people who got hooked into it are still trying
> to explain how wonderful Ada is.  But it does not
> explain how new languages come into popularity.

the become popular when they come attached to something
else which is really cool. 

If Unix had been written in Ada, then Ada would be wildly popular
today, and software would be significantly less buggy.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02  1:27                     ` soft-eng
                                         ` (2 preceding siblings ...)
  2003-05-02 12:57                       ` Marc A. Criley
@ 2003-05-08  5:14                       ` Gautier
  2003-05-09 14:12                         ` soft-eng
  3 siblings, 1 reply; 186+ messages in thread
From: Gautier @ 2003-05-08  5:14 UTC (permalink / raw)


softeng3456@netscape.net (soft-eng):

[Ada attributes]

> Yes, Ada extended Pascal very strongly in this regards,
> without any particular consideration of how useful
> these extensions would actually turn out to be.

[other Ada attributes]

> Like I said, Ada has amazing amounts of itsy-bitsy stuff.
> Now which of these features, if missing, would take you
> more than a minor effort to provide yourself?  If and
> when necessary, rather than present by default all the time?

If I had to reproduce them each time I use them, it would sum
up to a lot of time... and there are more interesting to do
in life than reprogramming them.

No, you are right. Back to the roots. Hey, there are more.
Are these fluffy gadgets like the "for" or "while" loops really
useful ? Of course not, it is better with IF's good ol' GOTO's.
And these "case", "else". For novice youngsters who didn't
even see a true punched card. They should use their "hard drives"
only for downloading music or so what. Long life to PDP-11 !
________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-07 17:29                                     ` soft-eng
  2003-05-07 19:37                                       ` Mark Thornton
  2003-05-07 22:58                                       ` Dr Chaos
@ 2003-05-08 12:29                                       ` Marin David Condic
  2003-05-08 20:22                                         ` soft-eng
  2003-05-08 14:34                                       ` Preben Randhol
  3 siblings, 1 reply; 186+ messages in thread
From: Marin David Condic @ 2003-05-08 12:29 UTC (permalink / raw)


soft-eng <softeng3456@netscape.net> wrote in message
news:9fa75d42.0305070929.2d7a0d4c@posting.google.com...
>
> No doubt, but how do you think C became popular in the
> first place, overcoming the inertia (that was then) in favor
> of Fortran, Cobol, and Pascal?
>
Simple: AT&T practically gave away Unix to anybody that wanted it and it
came with a C compiler. Computer manufacturers didn't want to invent their
own OS's and used Unix as a cost savings. Universities had freebie Unix
floating around on thousands of computers in their various labs. Hence there
were millions of C compilers out there just native on a bunch of machines.
What would someone with one of those machines use to write their programs? A
Fortran compiler that they had to buy or the native C compiler that they got
as a freebie with the machine?

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

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

    "Going cold turkey isn't as delicious as it sounds."
        -- H. Simpson
======================================================================






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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-07 19:37                                       ` Mark Thornton
@ 2003-05-08 13:48                                         ` soft-eng
  2003-05-08 15:46                                           ` Thant Tessman
  0 siblings, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-05-08 13:48 UTC (permalink / raw)


Mark Thornton <m.p.thornton@ntlworld.com> wrote in message news:<b9bnab$hnai1$1@ID-139894.news.dfncis.de>...
> soft-eng wrote:
> > Preben Randhol <randhol+news@pvv.org> wrote in message news:<slrnbbi4li.9l5.randhol+news@kiuk0152.chembio.ntnu.no>...
> > 
> > 
> > 
> >>I don't think the reason for the high usage of C is only a merit of the
> >>language itself, but also to a great extent the inertia.
> > 
> > 
> > No doubt, but how do you think C became popular in the
> > first place, overcoming the inertia (that was then) in favor
> > of Fortran, Cobol, and Pascal?
> 
> None of those langauges competed in the area in which C initially gained 
> popularity --- systems programming. The main system programming language 
> at the time was probably still assembler. The more general use of C came 
> later --- after it had established a foothold.
> 
> Mark Thornton

Yes, some sort of an initial entry point seems necessary.

Java perhaps repeated the pattern, by being branded as
the "language for the web".  Even though the initial
claim was wrong (J2EE wasn't available at the time,
and applets never proved to be very popular), the
branding helped it gain a foothold.  From there,
its good library, GC, and other features helped
it become popular.

I think Ada already had a similar foothold, though, by
virtue of its defense backing.  Several projects had
already started in Ada, and there was big motivation
for Ada projects.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-07 22:58                                       ` Dr Chaos
@ 2003-05-08 14:06                                         ` soft-eng
  2003-05-08 17:57                                           ` Dr Chaos
                                                             ` (2 more replies)
  0 siblings, 3 replies; 186+ messages in thread
From: soft-eng @ 2003-05-08 14:06 UTC (permalink / raw)


Dr Chaos <mbkennelSPAMBEGONE@NOSPAMyahoo.com> wrote in message news:<slrnbbj3sf.2o1.mbkennelSPAMBEGONE@lyapunov.ucsd.edu>...
> On 7 May 2003 10:29:10 -0700, soft-eng <softeng3456@netscape.net> wrote:
> > Preben Randhol <randhol+news@pvv.org> wrote in message news:<slrnbbi4li.9l5.randhol+news@kiuk0152.chembio.ntnu.no>...
> > 
> > 
> >> I don't think the reason for the high usage of C is only a merit of the
> >> language itself, but also to a great extent the inertia.
> > 
> > No doubt, but how do you think C became popular in the
> > first place, overcoming the inertia (that was then) in favor
> > of Fortran, Cobol, and Pascal?
> 
> A) C came attached to Unix.  The native operating system interface, i.e.
> the definition of the data structures and the calls and everything
> wrapped up in the .h files, was, and still is, essentially only 
> defined by parsing and interpreting actual C language syntax and
> semantics.    That was just laziness. 
> 
> By contrast, VMS was explicitly designed to NOT be like this.
> 
> B) Unix was very open to experimentation and reprogramming by academic
> groups with hardworking cheap gradstudent and postdoc labor because
> the source was available.  And it came with a C compiler. 
> 
> C) That was because of government regulation of AT&T as opposed to DEC or
> IBM, which had full control over their own operating systems. 
> 
> D) As a result, TCP/IP became attached to Unix first in the Berkeley
> System Development laboratories, and TCP/IP hardware was attached to
> each other nationally because of DARPA government funding.  TCP/IP was
> a Very Very Good Thing.
> 
> E) Soon, in large part because of C) (not the C programming language),
> Unix became attached to powerful, but *much* less expensive hardware
> than its proprietary-OS competitors.  This permitted the Stanford
> University Network startup corporation to license some version of Unix
> with TCP/IP in it on those really cool Motorola 68000 microprocessors
> that Andy Bechtolsheim found, giving VAX-like performance at 1/10th
> the cost.
> 
> F) The C programming language rode the wave of economics and the intrinsic
> coolness of the Internet. 
> 
> G) The End. 
> 
> > Inertia explains the continued usage of languages
> > well past the time that they have become obsolete.
> > It even explains how 20 years after its trumpet-and-fanfare
> > inception, people who got hooked into it are still trying
> > to explain how wonderful Ada is.  But it does not
> > explain how new languages come into popularity.
> 
> the become popular when they come attached to something
> else which is really cool. 
> 
> If Unix had been written in Ada, then Ada would be wildly popular
> today, and software would be significantly less buggy.

PC's don't show this.  CP/M and MS/DOS etc were written
in assembler, and the field was open for other languages.
At first Basic and Turbo Pascal were the most popular
high-level language on the PC.  C compilers started
arriving later, but became popular quickly.  There
were at least three Ada compilers, but the quality
of these may have been questionable, and the
price was definitely high by PC standards.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-07 17:29                                     ` soft-eng
                                                         ` (2 preceding siblings ...)
  2003-05-08 12:29                                       ` Marin David Condic
@ 2003-05-08 14:34                                       ` Preben Randhol
  2003-05-08 17:58                                         ` Dr Chaos
  3 siblings, 1 reply; 186+ messages in thread
From: Preben Randhol @ 2003-05-08 14:34 UTC (permalink / raw)


soft-eng wrote:
> Inertia explains the continued usage of languages
> well past the time that they have become obsolete.

Yes and C is obsolete in many of the areas it is used today. One being
application development.

> It even explains how 20 years after its trumpet-and-fanfare
> inception, people who got hooked into it are still trying
> to explain how wonderful Ada is.  But it does not
> explain how new languages come into popularity.

I didn't get hooked on Ada 20 years ago. It was about 3 years ago. And
contrary to C Ada evolved into something better (Ada 95).

-- 
Preben Randhol                    http://www.pvv.org/~randhol/



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-08 13:48                                         ` soft-eng
@ 2003-05-08 15:46                                           ` Thant Tessman
  2003-05-09  3:37                                             ` Wesley Groleau
  0 siblings, 1 reply; 186+ messages in thread
From: Thant Tessman @ 2003-05-08 15:46 UTC (permalink / raw)


soft-eng wrote:

[...]

> Java perhaps repeated the pattern, by being branded as
> the "language for the web".  Even though the initial
> claim was wrong (J2EE wasn't available at the time,
> and applets never proved to be very popular), the
> branding helped it gain a foothold.  From there,
> its good library, GC, and other features helped
> it become popular.

You're right about the "language for the web" marketing propaganda, but 
Java's good library was a product of its popularity, not the other way 
around. Also, there were plenty of other languages that already had GC 
and could have done Java's job as good if not better than Java. What 
Java did have was a somewhat superficial, but otherwise very deliberate 
resemblance to C++. Also, Netscape chose Java as the language for applet 
support as a way to soften their (then) image as a company that had too 
much weight to throw around as far as setting industry standards were 
concerned.

I'm not qualified to defend Ada, and of course if a programming language 
simply doesn't work for a task it won't be used, but the notion that a 
language's (or OS's) popular success is primarily due to its tecnhical 
appropriateness is flat-out absurd. The main factor that determines the 
popularity of a programming language that I can detect is simply fear of 
the loss of capital investment--not just monetary capital, but human 
capital. C became popular because it was part of the payload of a virus 
known as Unix. C++ became popular because it was deliberately designed 
as an object-oriented extension of C. Java became popular because it was 
deliberately designed to give C and C++ programmers features (like GC) 
that had already been around in other languages for years.

-thant




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-08 14:06                                         ` soft-eng
@ 2003-05-08 17:57                                           ` Dr Chaos
  2003-05-08 18:20                                           ` tmoran
  2003-05-08 23:16                                           ` John R. Strohm
  2 siblings, 0 replies; 186+ messages in thread
From: Dr Chaos @ 2003-05-08 17:57 UTC (permalink / raw)


On 8 May 2003 07:06:36 -0700, soft-eng <softeng3456@netscape.net> wrote:
> Dr Chaos <mbkennelSPAMBEGONE@NOSPAMyahoo.com> wrote in message news:<slrnbbj3sf.2o1.mbkennelSPAMBEGONE@lyapunov.ucsd.edu>...
>> 
>> If Unix had been written in Ada, then Ada would be wildly popular
>> today, and software would be significantly less buggy.
> 
> PC's don't show this.  CP/M and MS/DOS etc were written
> in assembler, and the field was open for other languages.
> At first Basic and Turbo Pascal were the most popular
> high-level language on the PC.  C compilers started
> arriving later, but became popular quickly.  

> There
> were at least three Ada compilers, but the quality
> of these may have been questionable, and the
> price was definitely high by PC standards.

Right. 

I think at the time of the early-mid 1980's the computational power of
a PC was not really sufficient to host a successful Ada compiler,
whereas it could do so for a simple C compiler.  

The PC's were about on par in power with a mid 1970's PDP-11, an early
host for Unix and Bell Labs's portable C compiler.  64 to 128k of
memory, floppy disks, physical addressing only.  

VAX-11's had 768k to 1M of memory with much more sophisticated
operating systems with virtual memory, typically with hard disk
storage as well.

I think C is actually was good language for systems programming in the
mid 1980's environment.  It isn't any more for applications
programming and wasn't a suitable base for one.


-- 
---------------------------------------------
Matthew Kennel, mkennel@ucsd.edu
Institute For Nonlinear Science, UC San Diego
---------------------------------------------



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-08 14:34                                       ` Preben Randhol
@ 2003-05-08 17:58                                         ` Dr Chaos
  0 siblings, 0 replies; 186+ messages in thread
From: Dr Chaos @ 2003-05-08 17:58 UTC (permalink / raw)


Preben Randhol <randhol+abuse@pvv.org> wrote:
> 
> I didn't get hooked on Ada 20 years ago. It was about 3 years ago. And
> contrary to C Ada evolved into something better (Ada 95).

As for myself, I learned ancient Fortran, C and C++ first, and have
switched to Fortran 95 and Eiffel.




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-08 14:06                                         ` soft-eng
  2003-05-08 17:57                                           ` Dr Chaos
@ 2003-05-08 18:20                                           ` tmoran
  2003-05-09 13:22                                             ` soft-eng
  2003-05-08 23:16                                           ` John R. Strohm
  2 siblings, 1 reply; 186+ messages in thread
From: tmoran @ 2003-05-08 18:20 UTC (permalink / raw)


>> were at least three Ada compilers, but the quality
>> of these may have been questionable, and the
>> price was definitely high by PC standards.
  IIRC, I purchased both BDS-C and later Janus Ada for $100.
The former ran on CP/M and the latter on MSDOS, both on 286s.
The latter was, of course, much more powerful and infinitely
better for debugging.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-08 12:29                                       ` Marin David Condic
@ 2003-05-08 20:22                                         ` soft-eng
  2003-05-08 21:33                                           ` Robert A Duff
                                                             ` (2 more replies)
  0 siblings, 3 replies; 186+ messages in thread
From: soft-eng @ 2003-05-08 20:22 UTC (permalink / raw)


"Marin David Condic" <mcondic.auntie.spam@acm.org> wrote in message news:<b9dij7$9ra$1@slb4.atl.mindspring.net>...
> soft-eng <softeng3456@netscape.net> wrote in message
> news:9fa75d42.0305070929.2d7a0d4c@posting.google.com...
> >
> > No doubt, but how do you think C became popular in the
> > first place, overcoming the inertia (that was then) in favor
> > of Fortran, Cobol, and Pascal?
> >
> Simple: AT&T practically gave away Unix to anybody that wanted it and it
> came with a C compiler. Computer manufacturers didn't want to invent their
> own OS's and used Unix as a cost savings. Universities had freebie Unix
> floating around on thousands of computers in their various labs. Hence there
> were millions of C compilers out there just native on a bunch of machines.
> What would someone with one of those machines use to write their programs? A
> Fortran compiler that they had to buy or the native C compiler that they got
> as a freebie with the machine?
> 
> MDC
> --
> ======================================================================
> Marin David Condic
> I work for: http://www.belcan.com/
> My project is: http://www.jsf.mil/
> 
> Send Replies To: m c o n d i c @ a c m . o r g
> 
>     "Going cold turkey isn't as delicious as it sounds."
>         -- H. Simpson
> ======================================================================


Free compilers for other languages were available, too.
And Unix was never the only OS around (in its range), there
were OS's from DEC, DG etc.  Many of these were
popular at unis.   And I could be mistaken, but I
thought even Unix had an "f77" compiler included in
the distribution, there was no need to buy it separately.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-08 20:22                                         ` soft-eng
@ 2003-05-08 21:33                                           ` Robert A Duff
  2003-05-08 23:21                                           ` John R. Strohm
  2003-05-09  8:30                                           ` Tom Welsh
  2 siblings, 0 replies; 186+ messages in thread
From: Robert A Duff @ 2003-05-08 21:33 UTC (permalink / raw)


softeng3456@netscape.net (soft-eng) writes:

> Free compilers for other languages were available, too.
> And Unix was never the only OS around (in its range), there
> were OS's from DEC, DG etc.

Most of those were tied to particular hardware.
I think Unix succeeded, in part, because it was more portable.

I think it's fair to say that a large part of the success of C was in
riding on the coattails of Unix.

>...  Many of these were
> popular at unis.   And I could be mistaken, but I
> thought even Unix had an "f77" compiler included in
> the distribution, there was no need to buy it separately.

Unix was written in C.  The language in which an OS is written
_shouldn't_ matter, but in the case of Unix it does.  All the interfaces
to the OS are defined in C (as .h files).  And they use data structures
that are natural to define in C.  So if you choose a different language,
you have extra headaches interfacing to the OS.

Some of those interfaces are macros.  It's not that easy to call a C
macro from a Fortran or Ada program!  (Actually, one of our (SofCheck's)
Ada compiler's generates C, and in that compiler, you *can* call C
macros from Ada, using pragma Import.  But most compilers don't support
that.)

- Bob



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-08 14:06                                         ` soft-eng
  2003-05-08 17:57                                           ` Dr Chaos
  2003-05-08 18:20                                           ` tmoran
@ 2003-05-08 23:16                                           ` John R. Strohm
  2003-05-09 12:24                                             ` soft-eng
  2 siblings, 1 reply; 186+ messages in thread
From: John R. Strohm @ 2003-05-08 23:16 UTC (permalink / raw)


X-A-Notice: References line has been trimed due to 512 byte limitation
Abuse-Reports-To: abuse at airmail.net to report improper postings
NNTP-Proxy-Relay: library1-aux.airnews.net
NNTP-Posting-Time: Thu, 08 May 2003 18:27:47 -0500 (CDT)
NNTP-Posting-Host: !\THX1k-VKme$@< (Encoded at Airnews!)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

"soft-eng" <softeng3456@netscape.net> wrote in message
news:9fa75d42.0305080606.70eebec@posting.google.com...
> PC's don't show this.  CP/M and MS/DOS etc were written
> in assembler, and the field was open for other languages.

Unfortunately, the facts do not agree with you.

CP/M was written in PL/M, a variant of PL/I developed by Dr. Gary Kildall.

The exact genesis of MS-DOS is not completely known.  It is known that it
started out as QDOS from Seattle Computer Products.  Anecdotal evidence
exists to show that QDOS was a mechanical translation (translation: "theft")
of CP/M to 8086, with some hand fixups.  Supposedly (as the story goes), a
Digital Research lawsuit against Microsoft was settled VERY quickly, with
Digital Research receiving MUCH money *AND* the right to clone MS-DOS, when
Gary Kildall typed a "secret code" into an MS-DOS PC and let the Microsoft
attorneys read the Digital Research copyright notice that was still embedded
deep inside MS-DOS.  (Such "secret codes" were quite common in those days.
They persist, as "Easter Eggs", today.)





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-08 20:22                                         ` soft-eng
  2003-05-08 21:33                                           ` Robert A Duff
@ 2003-05-08 23:21                                           ` John R. Strohm
  2003-05-09  8:30                                           ` Tom Welsh
  2 siblings, 0 replies; 186+ messages in thread
From: John R. Strohm @ 2003-05-08 23:21 UTC (permalink / raw)


X-A-Notice: References line has been trimed due to 512 byte limitation
Abuse-Reports-To: abuse at airmail.net to report improper postings
NNTP-Proxy-Relay: library1-aux.airnews.net
NNTP-Posting-Time: Thu, 08 May 2003 18:27:48 -0500 (CDT)
NNTP-Posting-Host: !\THX1k-VKme$@< (Encoded at Airnews!)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106


"soft-eng" <softeng3456@netscape.net> wrote in message
news:9fa75d42.0305081222.623e0b31@posting.google.com...
> "Marin David Condic" <mcondic.auntie.spam@acm.org> wrote in message
news:<b9dij7$9ra$1@slb4.atl.mindspring.net>...
> > soft-eng <softeng3456@netscape.net> wrote in message
> > news:9fa75d42.0305070929.2d7a0d4c@posting.google.com...
> > >
> > > No doubt, but how do you think C became popular in the
> > > first place, overcoming the inertia (that was then) in favor
> > > of Fortran, Cobol, and Pascal?
> > >
> > Simple: AT&T practically gave away Unix to anybody that wanted it and it
> > came with a C compiler. Computer manufacturers didn't want to invent
their
> > own OS's and used Unix as a cost savings. Universities had freebie Unix
> > floating around on thousands of computers in their various labs. Hence
there
> > were millions of C compilers out there just native on a bunch of
machines.
> > What would someone with one of those machines use to write their
programs? A
> > Fortran compiler that they had to buy or the native C compiler that they
got
> > as a freebie with the machine?
> >
> > MDC
> > --
> > ======================================================================
> > Marin David Condic
> > I work for: http://www.belcan.com/
> > My project is: http://www.jsf.mil/
> >
> > Send Replies To: m c o n d i c @ a c m . o r g
> >
> >     "Going cold turkey isn't as delicious as it sounds."
> >         -- H. Simpson
> > ======================================================================
>
>
> Free compilers for other languages were available, too.
> And Unix was never the only OS around (in its range), there
> were OS's from DEC, DG etc.  Many of these were
> popular at unis.   And I could be mistaken, but I
> thought even Unix had an "f77" compiler included in
> the distribution, there was no need to buy it separately.

Yes, there were operating systems from DEC, DG, and others.  They all
carried prices greater than zero dollars.  Unix was fairly unique in that
the price was zero dollars.  This made it uniquely attractive to
universities.

At that time, as others have pointed out, C was the most practical choice of
programming language for doing systems and applications programming on Unix.





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-08 15:46                                           ` Thant Tessman
@ 2003-05-09  3:37                                             ` Wesley Groleau
  2003-05-09  7:23                                               ` Marshall Spight
                                                                 ` (2 more replies)
  0 siblings, 3 replies; 186+ messages in thread
From: Wesley Groleau @ 2003-05-09  3:37 UTC (permalink / raw)



> as an object-oriented extension of C. Java became popular because it was 
> deliberately designed to give C and C++ programmers features (like GC) 
> that had already been around in other languages for years.

No, Java became popular partly from hype and partly
because it is better than C and C++ but not enough
to intimidate users of those languages.




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09  3:37                                             ` Wesley Groleau
@ 2003-05-09  7:23                                               ` Marshall Spight
  2003-05-09 13:14                                                 ` soft-eng
  2003-05-09 12:31                                               ` soft-eng
  2003-05-09 15:09                                               ` Thant Tessman
  2 siblings, 1 reply; 186+ messages in thread
From: Marshall Spight @ 2003-05-09  7:23 UTC (permalink / raw)


"Wesley Groleau" <wesgroleau@despammed.com> wrote in message news:qaOcnZhr4PwRvyajXTWcoA@gbronline.com...
>
> > as an object-oriented extension of C. Java became popular because it was
> > deliberately designed to give C and C++ programmers features (like GC)
> > that had already been around in other languages for years.
>
> No, Java became popular partly from hype and partly
> because it is better than C and C++ but not enough
> to intimidate users of those languages.

Don't forget anti-Microsoft sentiment! That has been
a powerful force in Java's favor.


Marshall






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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-08 20:22                                         ` soft-eng
  2003-05-08 21:33                                           ` Robert A Duff
  2003-05-08 23:21                                           ` John R. Strohm
@ 2003-05-09  8:30                                           ` Tom Welsh
  2003-05-09 13:18                                             ` soft-eng
  2003-05-09 23:41                                             ` Dr Chaos
  2 siblings, 2 replies; 186+ messages in thread
From: Tom Welsh @ 2003-05-09  8:30 UTC (permalink / raw)


In article <9fa75d42.0305081222.623e0b31@posting.google.com>, soft-eng
<softeng3456@netscape.net> writes
>
>Free compilers for other languages were available, too.
>And Unix was never the only OS around (in its range), there
>were OS's from DEC, DG etc.  Many of these were
>popular at unis.   And I could be mistaken, but I
>thought even Unix had an "f77" compiler included in
>the distribution, there was no need to buy it separately.

I can confirm that, when I was working at DEC in the 1980s, we saw Unix
first of all as a nuisance, then a threat, and finally as a scourge. The
reason was its low cost.

As of about 1981-2, a few of our customer showed up using Unix. At the
time I was working in the UK Remote Diagnosis Centre, where we could run
automated tests on remote computers - basically letting our computers
interrogate the diagnostic consoles. The leading edge of our efforts was
in looking at the operating system and using it, as well as hardware
registers, to diagnose problems that could be either hardware or
software. I remember being able to tell a field service tech, when he
arrived on site, which fuse to replace in which magtape drive to stop
the whole system from hanging (bad design, I agree).

All of this broke down with Unix, because we weren't trained on it and
had no clue how it worked. (Also, its troubleshooting features at that
time were rudimentary compared to VMS).

It was annoying to us that more and more customers - starting with
universities and other research organisations that couldn't afford our
usual "corporate" rates - were taking up Unix. VMS was designed
simultaneously with the VAX architecture, and they had a lot of synergy.
Unix threw a lot of that away, from our point of view.

What we didn't understand was that, from the users' point of view, Unix
gave them 80 percent (at least) of the benefits for 20 percent (at most)
of the cost.

Later DEC executives (a remarkable number of whom now work for
Microsoft) thought up a new line, which went something like this. Unix
is OK if all you want is a basic LCD OS. But VMS will always have the
really valuable extras that help give you competitive differentiation
(Michael Porter came along just in time for them to grab that straw).
So, for the extra cost, VMS keeps you 2-3 years ahead of the curve.

Heard something similar to that lately?
-- 
Tom Welsh



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-08 23:16                                           ` John R. Strohm
@ 2003-05-09 12:24                                             ` soft-eng
  2003-05-09 16:03                                               ` John R. Strohm
  0 siblings, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-05-09 12:24 UTC (permalink / raw)


"John R. Strohm" <strohm@airmail.net> wrote in message news:<b9ep5j$bkd@library1.airnews.net>...
> X-A-Notice: References line has been trimed due to 512 byte limitation
> Abuse-Reports-To: abuse at airmail.net to report improper postings
> NNTP-Proxy-Relay: library1-aux.airnews.net
> NNTP-Posting-Time: Thu, 08 May 2003 18:27:47 -0500 (CDT)
> NNTP-Posting-Host: !\THX1k-VKme$@< (Encoded at Airnews!)
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
> 
> "soft-eng" <softeng3456@netscape.net> wrote in message
> news:9fa75d42.0305080606.70eebec@posting.google.com...
> > PC's don't show this.  CP/M and MS/DOS etc were written
> > in assembler, and the field was open for other languages.
> 
> Unfortunately, the facts do not agree with you.
> 
> CP/M was written in PL/M, a variant of PL/I developed by Dr. Gary Kildall.

Any URL, quote or something for this "fact"?

While Gary Kildall did write both the language PL/M and also CP/M for
8086 machines, that doesn't mean he wrote CP/M in PL/M!



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09  3:37                                             ` Wesley Groleau
  2003-05-09  7:23                                               ` Marshall Spight
@ 2003-05-09 12:31                                               ` soft-eng
  2003-05-10  4:57                                                 ` Tim Ottinger
  2003-05-09 15:09                                               ` Thant Tessman
  2 siblings, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-05-09 12:31 UTC (permalink / raw)


Wesley Groleau <wesgroleau@despammed.com> wrote in message news:<qaOcnZhr4PwRvyajXTWcoA@gbronline.com>...
> > as an object-oriented extension of C. Java became popular because it was 
> > deliberately designed to give C and C++ programmers features (like GC) 
> > that had already been around in other languages for years.
> 
> No, Java became popular partly from hype and partly
> because it is better than C and C++ but not enough
> to intimidate users of those languages.

But to intimidate Ada advocates you only
need to mention the word "pointers" :-)



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09  7:23                                               ` Marshall Spight
@ 2003-05-09 13:14                                                 ` soft-eng
  0 siblings, 0 replies; 186+ messages in thread
From: soft-eng @ 2003-05-09 13:14 UTC (permalink / raw)


"Marshall Spight" <mspight@dnai.com> wrote in message news:<9IIua.780556$3D1.429428@sccrnsc01>...
> "Wesley Groleau" <wesgroleau@despammed.com> wrote in message news:qaOcnZhr4PwRvyajXTWcoA@gbronline.com...
> >
> > > as an object-oriented extension of C. Java became popular because it was
> > > deliberately designed to give C and C++ programmers features (like GC)
> > > that had already been around in other languages for years.
> >
> > No, Java became popular partly from hype and partly
> > because it is better than C and C++ but not enough
> > to intimidate users of those languages.
> 
> Don't forget anti-Microsoft sentiment! That has been
> a powerful force in Java's favor.
> 
> 
> Marshall

Yes, I thought so too.  Whatever the reasons, the
language does work well for a large domain!



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09  8:30                                           ` Tom Welsh
@ 2003-05-09 13:18                                             ` soft-eng
  2003-05-09 15:01                                               ` Tom Welsh
  2003-05-09 23:41                                             ` Dr Chaos
  1 sibling, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-05-09 13:18 UTC (permalink / raw)


Tom Welsh <news@tom-welsh.co.uk> wrote in message news:<vgS4RJAic2u+EwXL@nildram.co.uk>...
> In article <9fa75d42.0305081222.623e0b31@posting.google.com>, soft-eng
> <softeng3456@netscape.net> writes
> >
> >Free compilers for other languages were available, too.
> >And Unix was never the only OS around (in its range), there
> >were OS's from DEC, DG etc.  Many of these were
> >popular at unis.   And I could be mistaken, but I
> >thought even Unix had an "f77" compiler included in
> >the distribution, there was no need to buy it separately.
> 
> I can confirm that, when I was working at DEC in the 1980s, we saw Unix
> first of all as a nuisance, then a threat, and finally as a scourge. The
> reason was its low cost.
> 

But there was the Ultrix group at DEC -- and DEC should have
been the least concerned of all companies about Unix.
That's because BSD was developed on Vax machines, and people
using Unix bought Vax machines to run it on.  So
Unix was free, but people bought Vax hardware
from DEC so they could throw away VMS and run Unix on it!

That changed as Sun started becoming popular, though,
which might have been when your problems with
Unix must have gotten really serious!



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-08 18:20                                           ` tmoran
@ 2003-05-09 13:22                                             ` soft-eng
  2003-05-11 20:12                                               ` Richard Riehle
  0 siblings, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-05-09 13:22 UTC (permalink / raw)


tmoran@acm.org wrote in message news:<Edxua.536070$Zo.114252@sccrnsc03>...
> >> were at least three Ada compilers, but the quality
> >> of these may have been questionable, and the
> >> price was definitely high by PC standards.
>   IIRC, I purchased both BDS-C and later Janus Ada for $100.
> The former ran on CP/M and the latter on MSDOS, both on 286s.
> The latter was, of course, much more powerful and infinitely
> better for debugging.

Oh, right!  The Ada compilers ranged as high as $1500s iirc,
but Janus had a low cost one.  But if the quality was
so good, and the cost was so low (right in line
with Turbo Pasca, Quick C etc), the incentives
so high (defense contracts) it just proves
that the language was found un-usable
by programmers.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-01 19:29                   ` Gautier
@ 2003-05-09 13:36                     ` soft-eng
  2003-05-09 16:14                       ` John R. Strohm
                                         ` (2 more replies)
  0 siblings, 3 replies; 186+ messages in thread
From: soft-eng @ 2003-05-09 13:36 UTC (permalink / raw)


gautier_niouzes@hotmail.com (Gautier) wrote in message news:<17cd177c.0305011129.2eab5fb8@posting.google.com>...

> You simply ignore the huge debugging time provided
> by poorly-typed languages and its effective relation to
> job safety. So what ?

No -- having worked on reasonably large projects
in C, I can say that with professional programmers
with experience in a language like C, this
simply ceases to be an issue.  *MOST* bugs
in a professional C project have nothing to do
with type safety.  The bugs would have happened
in any language, because they involved logic issues.
So the advantages of a fully type-safe language
are small, perhaps 5%.  And that's very easily
offset by the disadvantages (extra time, effort,
debugging for the situations that _require_ getting
around the type-safety, loss of the automatic
programmer-pruning that "hard" languages such
as C/C++ bring...)



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-08  5:14                       ` Gautier
@ 2003-05-09 14:12                         ` soft-eng
  2003-05-09 14:33                           ` Vinzent Hoefler
                                             ` (6 more replies)
  0 siblings, 7 replies; 186+ messages in thread
From: soft-eng @ 2003-05-09 14:12 UTC (permalink / raw)


gautier_niouzes@hotmail.com (Gautier) wrote in message news:<17cd177c.0305072114.24f04783@posting.google.com>...
> softeng3456@netscape.net (soft-eng):
> 
> [Ada attributes]
> 
> > Yes, Ada extended Pascal very strongly in this regards,
> > without any particular consideration of how useful
> > these extensions would actually turn out to be.
> 
> [other Ada attributes]
> 
> > Like I said, Ada has amazing amounts of itsy-bitsy stuff.
> > Now which of these features, if missing, would take you
> > more than a minor effort to provide yourself?  If and
> > when necessary, rather than present by default all the time?
> 
> If I had to reproduce them each time I use them, it would sum
> up to a lot of time... and there are more interesting to do
> in life than reprogramming them.

Do you really need your own sub-range of integers
very often?  Arrays with variable index ranges?
You must do a very different type of programming
from what I do.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 14:12                         ` soft-eng
@ 2003-05-09 14:33                           ` Vinzent Hoefler
  2003-05-09 14:38                           ` Frank J. Lhota
                                             ` (5 subsequent siblings)
  6 siblings, 0 replies; 186+ messages in thread
From: Vinzent Hoefler @ 2003-05-09 14:33 UTC (permalink / raw)


softeng3456@netscape.net (soft-eng) wrote:

>Do you really need your own sub-range of integers
>very often?

Yes.

>  Arrays with variable index ranges?

This comes handy quite often. But more important is the type safety
that comes with them.

>You must do a very different type of programming
>from what I do.

Well, I do some embedded stuff and application software. It always
seems to be a lack of imagination when someone claims, he'd never need
it.

Well, I don't *need* it either, I am mentally able to address arrays
with zero-based indices, too, even if this does not look very
naturally, but to do it can make the life a whole lot easier.


Vinzent.

-- 
Parents strongly cautioned  --  this  posting  is  intended for mature
audiences  over  18.  It  may  contain some material that many parents
would not find suitable for children and may include intense violence,
sexual situations, coarse language and suggestive dialogue.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 14:12                         ` soft-eng
  2003-05-09 14:33                           ` Vinzent Hoefler
@ 2003-05-09 14:38                           ` Frank J. Lhota
  2003-05-09 16:09                           ` John R. Strohm
                                             ` (4 subsequent siblings)
  6 siblings, 0 replies; 186+ messages in thread
From: Frank J. Lhota @ 2003-05-09 14:38 UTC (permalink / raw)


> Do you really need your own sub-range of integers
> very often?

Yes.

>  Arrays with variable index ranges?

Yes.

> You must do a very different type of programming
> from what I do.

I guess so.





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 18:55                         ` Hyman Rosen
@ 2003-05-09 14:57                           ` soft-eng
  2003-05-09 15:44                             ` Hyman Rosen
  0 siblings, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-05-09 14:57 UTC (permalink / raw)


Hyman Rosen <hyrosen@mail.com> wrote in message news:<1051901740.277992@master.nyc.kbcfp.com>...
> In tribute to Ada, my C++ code usually contains
> 
> template<typename T>
> std::string image(const T &value)
> {
>      std::ostringstream o;
>      o << value;
>      return o.str();
> }

That should be "in tribute to CLU".



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 13:18                                             ` soft-eng
@ 2003-05-09 15:01                                               ` Tom Welsh
  0 siblings, 0 replies; 186+ messages in thread
From: Tom Welsh @ 2003-05-09 15:01 UTC (permalink / raw)


In article <9fa75d42.0305090518.513731f4@posting.google.com>, soft-eng
<softeng3456@netscape.net> writes
>
>But there was the Ultrix group at DEC -- and DEC should have
>been the least concerned of all companies about Unix.
>That's because BSD was developed on Vax machines, and people
>using Unix bought Vax machines to run it on.  So
>Unix was free, but people bought Vax hardware
>from DEC so they could throw away VMS and run Unix on it!
>
It's more a case of "then there was the Ultrix group at DEC".
In the manner of dominant vendors, DEC was extremely reluctant
to believe that customers could prefer an "alien" product -
still more, one written by hackers in their spare time (as
DEC saws it) and given away free or as good as. Same response
MS had to open source, really.

So Ultrix was only launched (or at least, supported from the
top) once the Unix breakthrough was well developed. But it
was *never* loved. In fact, at one point a bit later on there
were three corporate camps supporting VMS, Unix and Windows
respectively. (I know Windows has never run on VAX - it's a
long and tedious tale of pointy-haired folk).

>That changed as Sun started becoming popular, though,
>which might have been when your problems with
>Unix must have gotten really serious!

Exactly. But Ken Olsen and his smarter executives could
see that coming as soon as Unix became popular. Cheap
software - expensive hardware - duh!

-- 
Tom Welsh



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09  3:37                                             ` Wesley Groleau
  2003-05-09  7:23                                               ` Marshall Spight
  2003-05-09 12:31                                               ` soft-eng
@ 2003-05-09 15:09                                               ` Thant Tessman
  2 siblings, 0 replies; 186+ messages in thread
From: Thant Tessman @ 2003-05-09 15:09 UTC (permalink / raw)


Wesley Groleau wrote:
> 
>> as an object-oriented extension of C. Java became popular because it 
>> was deliberately designed to give C and C++ programmers features (like 
>> GC) that had already been around in other languages for years.
> 
> 
> No, Java became popular partly from hype and partly
> because it is better than C and C++ but not enough
> to intimidate users of those languages.
> 

Java has advantages over C++ and C++ has advantages over Java. But my 
point was actually that neither C++ nor Java are all that great.

-thant




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 14:57                           ` soft-eng
@ 2003-05-09 15:44                             ` Hyman Rosen
  2003-05-10 17:17                               ` soft-eng
  0 siblings, 1 reply; 186+ messages in thread
From: Hyman Rosen @ 2003-05-09 15:44 UTC (permalink / raw)


soft-eng wrote:
> That should be "in tribute to CLU".

Well, *I* write it in tribute to Ada, regardless of whether
it has its origins in a different language.




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 12:24                                             ` soft-eng
@ 2003-05-09 16:03                                               ` John R. Strohm
  2003-05-09 16:28                                                 ` John R. Strohm
  0 siblings, 1 reply; 186+ messages in thread
From: John R. Strohm @ 2003-05-09 16:03 UTC (permalink / raw)


X-A-Notice: References line has been trimed due to 512 byte limitation
Abuse-Reports-To: abuse at airmail.net to report improper postings
NNTP-Proxy-Relay: library1-aux.airnews.net
NNTP-Posting-Time: Fri, 09 May 2003 11:24:33 -0500 (CDT)
NNTP-Posting-Host: !b]\%1k-W<Vhm_" (Encoded at Airnews!)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106


"soft-eng" <softeng3456@netscape.net> wrote in message
news:9fa75d42.0305090424.45b522b5@posting.google.com...
> "John R. Strohm" <strohm@airmail.net> wrote in message
news:<b9ep5j$bkd@library1.airnews.net>...
> > X-A-Notice: References line has been trimed due to 512 byte limitation
> > Abuse-Reports-To: abuse at airmail.net to report improper postings
> > NNTP-Proxy-Relay: library1-aux.airnews.net
> > NNTP-Posting-Time: Thu, 08 May 2003 18:27:47 -0500 (CDT)
> > NNTP-Posting-Host: !\THX1k-VKme$@< (Encoded at Airnews!)
> > X-Priority: 3
> > X-MSMail-Priority: Normal
> > X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
> > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
> >
> > "soft-eng" <softeng3456@netscape.net> wrote in message
> > news:9fa75d42.0305080606.70eebec@posting.google.com...
> > > PC's don't show this.  CP/M and MS/DOS etc were written
> > > in assembler, and the field was open for other languages.
> >
> > Unfortunately, the facts do not agree with you.
> >
> > CP/M was written in PL/M, a variant of PL/I developed by Dr. Gary
Kildall.
>
> Any URL, quote or something for this "fact"

http://www.maxframe.com/GARY&CPM.HTM





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 14:12                         ` soft-eng
  2003-05-09 14:33                           ` Vinzent Hoefler
  2003-05-09 14:38                           ` Frank J. Lhota
@ 2003-05-09 16:09                           ` John R. Strohm
  2003-05-09 23:49                             ` soft-eng
  2003-05-09 16:23                           ` Wesley Groleau
                                             ` (3 subsequent siblings)
  6 siblings, 1 reply; 186+ messages in thread
From: John R. Strohm @ 2003-05-09 16:09 UTC (permalink / raw)


X-A-Notice: References line has been trimed due to 512 byte limitation
Abuse-Reports-To: abuse at airmail.net to report improper postings
NNTP-Proxy-Relay: library1-aux.airnews.net
NNTP-Posting-Time: Fri, 09 May 2003 11:24:34 -0500 (CDT)
NNTP-Posting-Host: !b]\%1k-W<Vhm_" (Encoded at Airnews!)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106


"soft-eng" <softeng3456@netscape.net> wrote in message
news:9fa75d42.0305090612.261d5a5c@posting.google.com...
> gautier_niouzes@hotmail.com (Gautier) wrote in message
news:<17cd177c.0305072114.24f04783@posting.google.com>...
> > softeng3456@netscape.net (soft-eng):
> >
> > [Ada attributes]
> >
> > > Yes, Ada extended Pascal very strongly in this regards,
> > > without any particular consideration of how useful
> > > these extensions would actually turn out to be.
> >
> > [other Ada attributes]
> >
> > > Like I said, Ada has amazing amounts of itsy-bitsy stuff.
> > > Now which of these features, if missing, would take you
> > > more than a minor effort to provide yourself?  If and
> > > when necessary, rather than present by default all the time?
> >
> > If I had to reproduce them each time I use them, it would sum
> > up to a lot of time... and there are more interesting to do
> > in life than reprogramming them.
>
> Do you really need your own sub-range of integers
> very often?  Arrays with variable index ranges?
> You must do a very different type of programming
> from what I do.

Let me guess, you're one of these people who believes that only freshmen
need subscript range checking, aren't you?  You're one of these people who'd
rather debug a segmentation fault from a core dump than see a message
"Subscript out of range in <FILE> at <LINE NUMBER>", right?





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 13:36                     ` soft-eng
@ 2003-05-09 16:14                       ` John R. Strohm
  2003-05-09 17:46                       ` soft-eng
  2003-05-10  8:30                       ` Preben Randhol
  2 siblings, 0 replies; 186+ messages in thread
From: John R. Strohm @ 2003-05-09 16:14 UTC (permalink / raw)


X-A-Notice: References line has been trimed due to 512 byte limitation
Abuse-Reports-To: abuse at airmail.net to report improper postings
NNTP-Proxy-Relay: library1-aux.airnews.net
NNTP-Posting-Time: Fri, 09 May 2003 11:24:35 -0500 (CDT)
NNTP-Posting-Host: !b]\%1k-W<Vhm_" (Encoded at Airnews!)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

"soft-eng" <softeng3456@netscape.net> wrote in message
news:9fa75d42.0305090536.49431321@posting.google.com...
> gautier_niouzes@hotmail.com (Gautier) wrote in message
news:<17cd177c.0305011129.2eab5fb8@posting.google.com>...
>
> > You simply ignore the huge debugging time provided
> > by poorly-typed languages and its effective relation to
> > job safety. So what ?
>
> No -- having worked on reasonably large projects
> in C, I can say that with professional programmers
> with experience in a language like C, this
> simply ceases to be an issue.  *MOST* bugs
> in a professional C project have nothing to do
> with type safety.  The bugs would have happened
> in any language, because they involved logic issues.
> So the advantages of a fully type-safe language
> are small, perhaps 5%.  And that's very easily
> offset by the disadvantages (extra time, effort,
> debugging for the situations that _require_ getting
> around the type-safety, loss of the automatic
> programmer-pruning that "hard" languages such
> as C/C++ bring...)

Let me see if I understand this.

You WANT to predicate your systems development work, on all problems, on
being able to hire only wizards who can handle the hard language, in
quantity.

Isn't that mostly like using only expert neurosurgeons to stitch up paper
cuts?

I observe that you say *MOST* bugs, not *ALL* bugs.  That implies that SOME
of those bugs would not have occurred in a type-safe language.

My personal experience in type-safe languages are that you only RARELY have
to get around the type system, and the mere existence of the hackarounds
warns the maintenance programmer that something is going on here.  Of
course, you've probably NEVER had to contemplate doing maintenance on code
that was written ten years ago, much less code that might have been written
before you were born.





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 14:12                         ` soft-eng
                                             ` (2 preceding siblings ...)
  2003-05-09 16:09                           ` John R. Strohm
@ 2003-05-09 16:23                           ` Wesley Groleau
  2003-05-09 18:52                           ` Jim Rogers
                                             ` (2 subsequent siblings)
  6 siblings, 0 replies; 186+ messages in thread
From: Wesley Groleau @ 2003-05-09 16:23 UTC (permalink / raw)



> Do you really need your own sub-range of integers

yes

> very often?  Arrays with variable index ranges?

yes

> You must do a very different type of programming
> from what I do.

Apparently.




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 16:03                                               ` John R. Strohm
@ 2003-05-09 16:28                                                 ` John R. Strohm
  2003-05-09 23:45                                                   ` soft-eng
  2003-05-10  4:24                                                   ` Jim Weirich
  0 siblings, 2 replies; 186+ messages in thread
From: John R. Strohm @ 2003-05-09 16:28 UTC (permalink / raw)


"John R. Strohm" <strohm@airmail.net> wrote in message
news:b9gko1$pub@library1.airnews.net...
> X-A-Notice: References line has been trimed due to 512 byte limitation
> Abuse-Reports-To: abuse at airmail.net to report improper postings
> NNTP-Proxy-Relay: library1-aux.airnews.net
> NNTP-Posting-Time: Fri, 09 May 2003 11:24:33 -0500 (CDT)
> NNTP-Posting-Host: !b]\%1k-W<Vhm_" (Encoded at Airnews!)
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
>
>
> "soft-eng" <softeng3456@netscape.net> wrote in message
> news:9fa75d42.0305090424.45b522b5@posting.google.com...
> > "John R. Strohm" <strohm@airmail.net> wrote in message
> news:<b9ep5j$bkd@library1.airnews.net>...
> > > X-A-Notice: References line has been trimed due to 512 byte limitation
> > > Abuse-Reports-To: abuse at airmail.net to report improper postings
> > > NNTP-Proxy-Relay: library1-aux.airnews.net
> > > NNTP-Posting-Time: Thu, 08 May 2003 18:27:47 -0500 (CDT)
> > > NNTP-Posting-Host: !\THX1k-VKme$@< (Encoded at Airnews!)
> > > X-Priority: 3
> > > X-MSMail-Priority: Normal
> > > X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
> > > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
> > >
> > > "soft-eng" <softeng3456@netscape.net> wrote in message
> > > news:9fa75d42.0305080606.70eebec@posting.google.com...
> > > > PC's don't show this.  CP/M and MS/DOS etc were written
> > > > in assembler, and the field was open for other languages.
> > >
> > > Unfortunately, the facts do not agree with you.
> > >
> > > CP/M was written in PL/M, a variant of PL/I developed by Dr. Gary
> Kildall.
> >
> > Any URL, quote or something for this "fact"
>
> http://www.maxframe.com/GARY&CPM.HTM

And this one http://www.cpm.z80.de/source.html contains, among other things,
the original CP/M source code.  In PL/M.  Complete with Gary Kildall's
copyright notice.

Here are the first few lines.
$Q=1
$RIGHTMARGIN=80
/* FDOS LLL V.3  11/21/75
   CON DEVICE 3 IS TI SILENT 700.
   OCT IS READER DEVICE 3 OR 4. */
3200H: DECLARE BOOT LITERALLY '0H';


 /* C P / M   B A S I C   I / O    S Y S T E M    (B I O S)

                    COPYRIGHT (C) GARY A. KILDALL
                             JUNE, 1975

                                                          */

DECLARE CONSOLE LITERALLY '00$00$10$00B'; /* READER IS OCT CHANNEL A. */
DECLARE ECHO BYTE INITIAL (0FFH); /* ECHO CALL NO. 1.  SEE CALL 30 */


DISKMON: PROCEDURE(FUNC,INFO) ADDRESS;
    DECLARE FUNC BYTE,
        LINFO BYTE,       /* LOW ORDER INFO */
       INFO ADDRESS,
       ARET ADDRESS, RET BYTE;

    /* FUNC IS THE DISK MONITOR FUNCTION NUMBER AS SHOWN BELOW:
        0:   SYSTEM RESET
        1:   READ CONSOLE DEVICE
        2:   WRITE CONSOLE DEVICE
        3:   READ OCTOPUS
        4:   WRITE OCTOPUS
        5:   WRITE LIST DEVICE
        6:   INTERROGATE MEMORY SIZE
        7:   INTERROGATE DEVICE STATUS
        8:   CHANGE DEVICE STATUS
        9:   PRINT BUFFER ON CONSOLE
       10:   READ BUFFER FROM CONSOLE
       11:   CONSOLE CHARACTER READY
       12:   LIFT HEAD (NO OPERATION ON CPM 16D2JUN75)
       13:   RESET DISK SYSTEM - SELECT DISK 0
       14:   SELECT DISK 'INFO'
       15:   OPEN FILE
       16:   CLOSE FILE
       17:   SEARCH FOR FIRST OCCURRENCE
       18:   SEARCH FOR NEXT OCCURRENCE
       19:   DELETE A FILE
       20:   READ A FILE
       21:   WRITE A FILE
       22:   CREATE A FILE
       23:   RENAME A FILE
       24:   RETURN LOGIN VECTOR - EACH BIT CORRESPONDS TO
             A DISK NUMBER, FROM LSB TO MSB.  1 INDICATES
             THE DISK IS LOGGED IN.
       25:   RETURN CURRENTLY SELECTED DISK NUMBER
       26:   SET SUBSEQUENT DMA ADDRESS
       27:   RETURN BASE ADDRESS OF ALLOCATION VECTOR
             (USED TO DETERMINE REMAINING SPACE)
       28:   UNUSED
       29:   UNUSED
       30:   CONTROL ECHO FOR CALL 1
    */

 /* CONSOLE COMMUNICATION PROCEDURES */

DECLARE
    /* TELETYPE DECLARATIONS */
    TTI LITERALLY '0',
    TTO LITERALLY '0',
    TTS LITERALLY '1',
    TTC LITERALLY '1',
    /* CRT DECLARATIONS (NOTE CONFLICT WITH OCTOPUS)*/
    CTI LITERALLY '4',
    CTO LITERALLY '4',
    CTS LITERALLY '5',
    /* OCTOPUS DECLARATIONS */
    /* (CHECK WITH TORODE FOR CHANNEL B ASSIGNMENTS) */
    OAI LITERALLY '4',
    OAO LITERALLY '4',
    OAS LITERALLY '5',
    OBI LITERALLY '6',
    OBO LITERALLY '6',
    OBS LITERALLY '7',

    /* SPECIAL CHARACTERS */
    ALT LITERALLY '7DH',
    ESC LITERALLY '1BH',
    TAB LITERALLY '09H',
    BEL LITERALLY '07H',
    LF  LITERALLY '10',
    CR  LITERALLY '13';

DECLARE COLUMN BYTE INITIAL(0); /* CURRENT CONSOLE COLUMN */
DECLARE OCT$TIMEOUT LITERALLY '65000';


DECLARE IOSTAT BYTE INITIAL(CONSOLE);
    /* IOSTAT DEFINES THE CURRENT DEVICE ASSIGNMENT
    0-1 CONSOLE
        0 TTY
        1 CRT
        2 BATCH (USE READER DEFINITION)
        3 USER (1) TI SILENT 700
    2-3 READER
        0 TTY
        1 PTR
        2 USER (1)OCTOPUS CHANNEL A
        3 USER (2)OCTOPUS CHANNEL B
    4-5 PUNCH
        0 TTY
        1 PTP
        2 USER (1)
        3 USER (2)
    6-7 LIST
        0 TTY
        1 CRT
        2 USER (1)
        3 USER (2)
    */

CONSTAT: PROCEDURE BYTE;
    RETURN IOSTAT AND 11B;
    END CONSTAT;

CONBRK: PROCEDURE BYTE;
    /* LOOK FOR CHARACTER AT CONSOLE PORT */
    DECLARE I BYTE;
    IF (I:=CONSTAT) = 0 OR I = 3 THEN RETURN NOT INPUT(TTS);
    RETURN NOT INPUT(CTS);
    END CONBRK;

TTYOUT: PROCEDURE(CHAR);
    DECLARE CHAR BYTE;
        DO WHILE ROR(INPUT(TTS),2);
        END;
    OUTPUT(TTO) = NOT CHAR;
    END TTYOUT;

CRTOUT: PROCEDURE(CHAR);
    DECLARE CHAR BYTE;
        DO WHILE ROR(INPUT(CTS),2);
        END;
    OUTPUT(CTO) = NOT CHAR;
    END CRTOUT;

TTYIN: PROCEDURE BYTE;
        DO WHILE INPUT(TTS);
        END;
    RETURN NOT INPUT(TTI) AND 07FH;
    END TTYIN;

CRTIN: PROCEDURE BYTE;
        DO WHILE INPUT(CTS);
        END;
    RETURN NOT INPUT(CTI) AND 07FH;
    END CRTIN;



As I said, get your facts straight.





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02 12:29                   ` Marin David Condic
@ 2003-05-09 17:37                     ` soft-eng
  2003-05-10  6:56                       ` Tom Welsh
  2003-05-10 14:36                       ` Marin David Condic
  0 siblings, 2 replies; 186+ messages in thread
From: soft-eng @ 2003-05-09 17:37 UTC (permalink / raw)


"Marin David Condic" <mcondic.auntie.spam@acm.org> wrote in message news:<b8toba$79o$1@slb0.atl.mindspring.net>...

> "competent" and most had many years of experience, but still, the language
> made a difference to the bottom line. My competitors are still using C. I
> say "Good for them!" My improved productivity and reduced defects translates

If you can indeed have improved productivity and reduced defects,
it stands to reason that your competitor will not be doing very
well versus you!

Bottom lines do count.  If time after time it so happened
that people using Ada out-competed the ones using C,
others would start taking notice.

But in fact time after time it has failed to happen, and the only
successful cases in Ada usage come from the situations
where it was mandated and no competition existed at all,
and money was no object.  If you have a business
like that, sure, use whatever language you like.

Otherwise, it might be worthwhile looking carefully at
situation, and not just basing things on a study or two.

Studies, in general, can prove all kinds of amazingly
interesting things.  Sometimes even six before breakfast.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 13:36                     ` soft-eng
  2003-05-09 16:14                       ` John R. Strohm
@ 2003-05-09 17:46                       ` soft-eng
  2003-05-10  8:40                         ` Preben Randhol
  2003-05-10  8:30                       ` Preben Randhol
  2 siblings, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-05-09 17:46 UTC (permalink / raw)


softeng3456@netscape.net (soft-eng) wrote in message news:<9fa75d42.0305090536.49431321@posting.google.com>...
> gautier_niouzes@hotmail.com (Gautier) wrote in message news:<17cd177c.0305011129.2eab5fb8@posting.google.com>...
> 
> > You simply ignore the huge debugging time provided
> > by poorly-typed languages and its effective relation to
> > job safety. So what ?
> 
> No -- having worked on reasonably large projects
> in C, I can say that with professional programmers
> with experience in a language like C, this
> simply ceases to be an issue.  *MOST* bugs
> in a professional C project have nothing to do
> with type safety.  The bugs would have happened
> in any language, because they involved logic issues.
> So the advantages of a fully type-safe language
> are small, perhaps 5%.  And that's very easily
> offset by the disadvantages (extra time, effort,
> debugging for the situations that _require_ getting
> around the type-safety, loss of the automatic
> programmer-pruning that "hard" languages such
> as C/C++ bring...)

PS:  Now if Ada had GC, that could have changed
things a lot.  People would have used it despite
all the warts.

A LARGE amount of debugging time in C/C++ is spent
dealing with dynamic memory bugs!  But Ada had
only a half-hearted nod to GC, no actual GC support.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 14:12                         ` soft-eng
                                             ` (3 preceding siblings ...)
  2003-05-09 16:23                           ` Wesley Groleau
@ 2003-05-09 18:52                           ` Jim Rogers
  2003-05-12  0:47                             ` Dave Thompson
  2003-05-09 19:27                           ` Marc A. Criley
  2003-05-09 22:32                           ` Gautier
  6 siblings, 1 reply; 186+ messages in thread
From: Jim Rogers @ 2003-05-09 18:52 UTC (permalink / raw)


softeng3456@netscape.net (soft-eng) wrote in message news:<9fa75d42.0305090612.261d5a5c@posting.google.com>...
> Do you really need your own sub-range of integers
> very often?  Arrays with variable index ranges?
> You must do a very different type of programming
> from what I do.

Perhaps not so different as you think.
User defined numeric types have a very convenient set
of behaviors in Ada. Those behaviors become even more
convenient when user defined discrete types are created
for array indexing.

The most convenient feature when dealing with arrays is
Ada's ability to efficiently deal with array bounds 
checking. 

For example, if I define an Ada string with a length
of 10 characters:

   Name : String(1..10);

I can then perform I/O using that string object and
never need to worry about array bounds violations.

Ada.Text_Io.Get_Line(Item => Name, Last => Count);

The Get_Line procedure will read from standard input
and place the characters read into the variable "Name".
It will record the number of characters read in the
variable "Count". The input routine will not overflow
the array. It will assign no more characters than can
fit into the receiving array.

In C I would need to do something like the following:
   char name[11];

   scanf("%.10s", name);

The point here is that I must hardcode the size limit
into the scanf format string. If I change the size of
the array then I must also change the scanf format 
string.

Unfortunately, array bounds violations are still a common
failure mode in C programs. The techniques for avoiding 
array bounds violations are well known. Unfortunately
they are not used as frequently as one would like.

Another issue with Ada arrays is iterating through the
array elements. This is also much easier to do safely than
in C.

In Ada one could safely iterate through the above defined 
string as follows:

   for index in Name'Range loop
      Ada.Text_IO.Put(Item => Name(Index));
   end loop;


Using C you could do the following:

   int i;
   for(i = 0; name[i]; ++i)
   {
     putc(name[i]);
   }

This relies upon having a properly formatted, null-
terminated string. If, however, the string is not
properly null-terminated, or the character array was
a victim of bounds violation, the loop can easily
read beyond the end of the character array. Now a
bounds violation in one part of the program is
propogated into other parts of the program. Detecting
and correcting this fault is not fun.

The Ada model of allowing array indices to start at
any discrete value is very convenient for array slicing.
If I wanted to create my own procedure to print an array
character by character, I could do the following:

procedure My_Print(Item : in String) is
begin
   for i in Item'Range loop
      Ada.Text_IO.Put(Item(i));
   end loop;
end My_Print;

I could then successfully call this procedure either
with an entire string object or with a slice of a 
string object:

My_Print(Name);
My_Print(Name(3..6));

The first call would print the entire 10 characters in
the Name string. The second call would print only the
3rd, 4th, 5th and 6th characters in the string.

An eqivalent C function would be:

  void myPrint(char *c, int l)
  {
     int i;
     for(i = 0; i < l; ++i)
     {
        putc(c[i]);
     }
  }

The problem here is that neither the run time code nor
the compiler will know if the parameter c actually points
to a character in a character array. Neither can it tell
if the second parameter "l" will cause an array bounds
violation during the iteration.

The Ada solution is entirely safe in this regard. An array
slice cannot reference elements outside the array bounds.
An array parameter must reference an actual array. There is
no masking caused by pointer referencing.

Jim Rogers



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 14:12                         ` soft-eng
                                             ` (4 preceding siblings ...)
  2003-05-09 18:52                           ` Jim Rogers
@ 2003-05-09 19:27                           ` Marc A. Criley
  2003-05-10 14:09                             ` Marin David Condic
  2003-05-09 22:32                           ` Gautier
  6 siblings, 1 reply; 186+ messages in thread
From: Marc A. Criley @ 2003-05-09 19:27 UTC (permalink / raw)


softeng3456@netscape.net (soft-eng) wrote in message news:<9fa75d42.0305090612.261d5a5c@posting.google.com>...

> Do you really need your own sub-range of integers
> very often?  Arrays with variable index ranges?
> You must do a very different type of programming
> from what I do.

Several others have answered this as "Yes, yes, and Apparently"--as I
would--but I'm not so sure about that last one.

So here's a situation where I use integer subranges regularly: 
arrays!  I virtually never declare an array where the bounds are
explicitly specified as part of the _array_ definition.  I always do
something like this:

   Max_Items : constant := 100;

   type Item_Count is range 0 .. Max_Items;
   subtype Item_Index is Item_Count range 1 .. Item_Count'Last;

   type Item_Array is array(Item_Index) of Some_Type;
   Items : Item_Array;

So of course I now have full range checking on my indexing and item
counting, and reduce the risk of trying to index it with an "alien"
index.

By that I mean that if Items has been declared as

   Items : array(1..100) of Some_Type;

It could be indexed by any of:

   Widget_Count : Integer;
   Population_Count : Integer;
   Item_Count_A : Integer;
   Item_Count_B : Integer;
   Item_Count_C : Integer;

For none of which are there any constraints on the values they take,
but all are legal array indexers given the latter Items definition. 
(And this is in effect what you get with C/C++ when it comes to
arrays.)

Obviously I've written a few extra lines of code for my array
declaration, what with the three type definitions, but the ROI is that
I've embedded lots of information into my code (which I can extract
with Ada's attributes), plus I get range checking, count and index
verification, and reduced the risk of indexing with the wrong index
variable.

Again, do I or anyone _need_ to do it this way?  No, of course not, I
can be very careful, or be a preternatually gifted programmer that
rarely makes such mistakes, but the latter are rather rare, and don't
you want them focusing their skills on bigger and better things than
keeping array indices straight?

Marc A. Criley



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 14:12                         ` soft-eng
                                             ` (5 preceding siblings ...)
  2003-05-09 19:27                           ` Marc A. Criley
@ 2003-05-09 22:32                           ` Gautier
  6 siblings, 0 replies; 186+ messages in thread
From: Gautier @ 2003-05-09 22:32 UTC (permalink / raw)


> > [Ada attributes]
> > ...
> > [other Ada attributes]
> > ...
> > If I had to reproduce them each time I use them, it would sum
> > up to a lot of time... and there are more interesting to do
> > in life than reprogramming them.

softeng:

> Do you really need your own sub-range of integers
> very often?  Arrays with variable index ranges?
> You must do a very different type of programming
> from what I do.

Did I mention "sub-range of integers" ? I did mention
attributes (the things with that symbol: ').
I use 'image, 'value, 'pos, 'val, 'range, 'length very often.
Of course, you'll say "sour grapes", these are useless gadgets
so easy to reproduce.
I say they are very handy, bring clarity and along with subtypes
and enumerated types spares nights with a debugger
- life is too short for it, isn't it ?

Here is a good bunch of these gadgets (in a device driver, BTW!)
-> http://www.mysunrise.ch/users/gdm/e3d_html/multkeys__adb.htm
________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09  8:30                                           ` Tom Welsh
  2003-05-09 13:18                                             ` soft-eng
@ 2003-05-09 23:41                                             ` Dr Chaos
  2003-05-12 13:43                                               ` soft-eng
                                                                 ` (2 more replies)
  1 sibling, 3 replies; 186+ messages in thread
From: Dr Chaos @ 2003-05-09 23:41 UTC (permalink / raw)


On Fri, 9 May 2003 09:30:26 +0100, Tom Welsh <news@tom-welsh.co.uk> wrote:
> 
> I can confirm that, when I was working at DEC in the 1980s, we saw Unix
> first of all as a nuisance, then a threat, and finally as a scourge. The
> reason was its low cost.
> 
> As of about 1981-2, a few of our customer showed up using Unix. At the
> time I was working in the UK Remote Diagnosis Centre, where we could run
> automated tests on remote computers - basically letting our computers
> interrogate the diagnostic consoles. The leading edge of our efforts was
> in looking at the operating system and using it, as well as hardware
> registers, to diagnose problems that could be either hardware or
> software. I remember being able to tell a field service tech, when he
> arrived on site, which fuse to replace in which magtape drive to stop
> the whole system from hanging (bad design, I agree).
> 
> All of this broke down with Unix, because we weren't trained on it and
> had no clue how it worked. (Also, its troubleshooting features at that
> time were rudimentary compared to VMS).
> 
> It was annoying to us that more and more customers - starting with
> universities and other research organisations that couldn't afford our
> usual "corporate" rates - were taking up Unix. VMS was designed
> simultaneously with the VAX architecture, and they had a lot of synergy.
> Unix threw a lot of that away, from our point of view.

Yes that's right.  To a large degree, that was the entire point, and
the attraction.

Nobody cared about the Vax architecture that much.  

I remember academic computing at that time.  People liked the
reliability of the VMS compilers.  Everything else about VMS seemed
constraining and plodding.

Here is one key example.  VMS didn't have a shell where actual
ordinary users could write programs which functioned like the built in
ones.  It was "RUN MY_USER_PROGRAM" versus the huge hairball of "SHOW
THIS/THAT" or "SET THIS TO THAT".

If you wanted to have your own software work like that it was a huge
rigamarole poring through one of the 20 or 30 orange covered
notebooks.

Unix had argc and argv, and a simple library that you didn't even
need to use if you didn't want to.

It was like Alexander cutting the Gordian knot. 

DCL was completely cognitively opaque.  What exactly was it doing, what
programs is it running when?

Unix was dumb, and smart at the same time.

Simply: 

      Unix *felt* like freedom.  
      VMS didn't.

> What we didn't understand was that, from the users' point of view, Unix
> gave them 80 percent (at least) of the benefits for 20 percent (at most)
> of the cost.

It was more than that.  It was fast.  

I knew it was over for DEC the first day the lab I worked in got a Sun
3/260 (?) with a bitmapped terminal, as opposed to the serial
VT220/240's going into the VAX.  The difference was huge: you type
"DIR" and you watch as the system emitted the listing of files, line
by line.  About 15 seconds to complete.  On the Sun, one 'ls' and the
entire home directory listing just *appeared* the moment the return
key returned.

And then when the first MIPS and SPARCs offered an enormous 4-5x VAX
performance at a very much lower cost it was over.

The VAX microstations were pathetic next to their competing Sun 4's. 

> Later DEC executives (a remarkable number of whom now work for
> Microsoft) thought up a new line, which went something like this. Unix
> is OK if all you want is a basic LCD OS. But VMS will always have the
> really valuable extras that help give you competitive differentiation
> (Michael Porter came along just in time for them to grab that straw).
> So, for the extra cost, VMS keeps you 2-3 years ahead of the curve.

> Heard something similar to that lately?

Yeah.  The difference was that DEC was profoundly misguided but ethical,
and DEC never had a substantial monopoly.  

Microsoft has taken the lesson of the IBM anti-trust trial to heart: NEVER
give in to anything.

> -- 
> Tom Welsh



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 16:28                                                 ` John R. Strohm
@ 2003-05-09 23:45                                                   ` soft-eng
  2003-05-10  2:32                                                     ` John R. Strohm
  2003-05-10  4:24                                                   ` Jim Weirich
  1 sibling, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-05-09 23:45 UTC (permalink / raw)


"John R. Strohm" <strohm@airmail.net> wrote in message news:<b9gldl$9d3@library1.airnews.net>...
...
> 
> As I said, get your facts straight.

This is listed as "early CP/M" source.  The later CP/M
sources are in assembler.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 16:09                           ` John R. Strohm
@ 2003-05-09 23:49                             ` soft-eng
  2003-05-10  2:44                               ` John R. Strohm
  2003-05-10 10:49                               ` Dale Stanbrough
  0 siblings, 2 replies; 186+ messages in thread
From: soft-eng @ 2003-05-09 23:49 UTC (permalink / raw)


"John R. Strohm" <strohm@airmail.net> wrote in message news:<b9gko2$pub@library1.airnews.net>...

> Let me guess, you're one of these people who believes that only freshmen
> need subscript range checking, aren't you?  You're one of these people who'd
> rather debug a segmentation fault from a core dump than see a message
> "Subscript out of range in <FILE> at <LINE NUMBER>", right?

Well, no.  When I was a freshman and in the habit of making
too many such mistakes, I would indeed have preferred the
latter messages.  Even to the extent of making it the primary
criteria for choosing a language.

But for how long can you keep on making the same type
of mistakes?



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 23:45                                                   ` soft-eng
@ 2003-05-10  2:32                                                     ` John R. Strohm
  0 siblings, 0 replies; 186+ messages in thread
From: John R. Strohm @ 2003-05-10  2:32 UTC (permalink / raw)


X-A-Notice: References line has been trimed due to 512 byte limitation
Abuse-Reports-To: abuse at airmail.net to report improper postings
NNTP-Proxy-Relay: library1-aux.airnews.net
NNTP-Posting-Time: Fri, 09 May 2003 21:50:28 -0500 (CDT)
NNTP-Posting-Host: !dQgP1k-XV\OHm? (Encoded at Airnews!)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

"soft-eng" <softeng3456@netscape.net> wrote in message
news:9fa75d42.0305091545.3338f5d5@posting.google.com...
> "John R. Strohm" <strohm@airmail.net> wrote in message
news:<b9gldl$9d3@library1.airnews.net>...
> ...
> >
> > As I said, get your facts straight.
>
> This is listed as "early CP/M" source.  The later CP/M
> sources are in assembler.

Kildall originally wrote CP/M at least partially to demonstrate that PL/M
was powerful enough to write a complete single-user operating system.

The listing I extracted was for CP/M 1.4, the first commonly-available
version.  CP/M 1.4 and CP/M 2.0 were written in PL/M.  The BDOS for CP/M
2.2, by far the most common version, was rewritten in assembler, but the
common utilities (PIP, STAT, and the like) were STILL in PL/M.  CP/M 3.0 did
not see nearly as wide use as CP/M 2.2, as it came out around the same time
as the IBM PC and MS-DOS.

And why the heck am I wasting my time feeding a troll?





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 23:49                             ` soft-eng
@ 2003-05-10  2:44                               ` John R. Strohm
  2003-05-11 20:59                                 ` Robert I. Eachus
  2003-05-13  3:15                                 ` Dr Chaos
  2003-05-10 10:49                               ` Dale Stanbrough
  1 sibling, 2 replies; 186+ messages in thread
From: John R. Strohm @ 2003-05-10  2:44 UTC (permalink / raw)


X-A-Notice: References line has been trimed due to 512 byte limitation
Abuse-Reports-To: abuse at airmail.net to report improper postings
NNTP-Proxy-Relay: library1-aux.airnews.net
NNTP-Posting-Time: Fri, 09 May 2003 21:50:29 -0500 (CDT)
NNTP-Posting-Host: !dQgP1k-XV\OHm? (Encoded at Airnews!)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

"soft-eng" <softeng3456@netscape.net> wrote in message
news:9fa75d42.0305091549.48b9c5d9@posting.google.com...
> "John R. Strohm" <strohm@airmail.net> wrote in message
news:<b9gko2$pub@library1.airnews.net>...
>
> > Let me guess, you're one of these people who believes that only freshmen
> > need subscript range checking, aren't you?  You're one of these people
who'd
> > rather debug a segmentation fault from a core dump than see a message
> > "Subscript out of range in <FILE> at <LINE NUMBER>", right?
>
> Well, no.  When I was a freshman and in the habit of making
> too many such mistakes, I would indeed have preferred the
> latter messages.  Even to the extent of making it the primary
> criteria for choosing a language.
>
> But for how long can you keep on making the same type
> of mistakes?

It only takes one such error in commercial code to create a buffer overrun
vulnerability.  Haven't we seen enough of those?  (Was it Edsger Dijkstra
who compared testing with subscript checking enabled and running production
with it disabled to sailing in the harbor with a life jacket and then taking
the jacket off when you ventured out onto the open ocean?  Maybe it was Tony
Hoare.  I've sailed on the Pacific, in 10-foot seas as I recall; I have a
LOT of respect for open ocean.)

It only takes one such error in safety-critical code to kill someone.  (To
the best of my knowledge, the actual code error behind the Therac-25
fatalities has never been explained.  I would not be at all surprised to
learn that it was a buffer indexing problem that could have been caught
automatically by a type-safe language used properly.)  I take
safety-critical code very seriously.  (Maybe it comes from working on F-16,
knowing that friends of mine would be flying those airplanes, betting their
lives on that code.)

And then there was image processing on the TI 320C80, where you HAD to do it
in assembly language, and the first warning that you'd overrun your buffer
was that the processor (and emulator) hung up hard, waiting for a memory
fetch that would never finish...





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 16:28                                                 ` John R. Strohm
  2003-05-09 23:45                                                   ` soft-eng
@ 2003-05-10  4:24                                                   ` Jim Weirich
  1 sibling, 0 replies; 186+ messages in thread
From: Jim Weirich @ 2003-05-10  4:24 UTC (permalink / raw)


John R. Strohm wrote:

> And this one http://www.cpm.z80.de/source.html contains, among other
> things,
> the original CP/M source code.  In PL/M.  Complete with Gary Kildall's
> copyright notice.
> 
> Here are the first few lines.

Wow ... this brings back memories.  PL/M was the system programming 
language for Intel's iRMX real timg system back in the 80s.  We used iRMX 
as a basis for a real time data acquisition system for digital jet engine 
controllers.  All the programming was done in PL/M, including interrupt 
handlers and device drivers.  No assembly code anywhere.  (C was used in 
some later systems.)

However, I didn't know that CP/M was written in it.  Thanks for the info.

One minor quibble ... 

  > CP/M was written in PL/M, a variant of PL/I developed by Dr. Gary
  > Kildall.

PL/M certainly owed its syntactic heritage to PL/I (that's obvious from 
looking at the code), but semantically it was much closer to C (which is 
appropriate given its target platform).

-- 
-- Jim Weirich     jweirich@one.net    http://w3.one.net/~jweirich
---------------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct, 
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 12:31                                               ` soft-eng
@ 2003-05-10  4:57                                                 ` Tim Ottinger
  2003-05-11 19:24                                                   ` Robert I. Eachus
  2003-05-12  9:51                                                   ` Leif Roar Moldskred
  0 siblings, 2 replies; 186+ messages in thread
From: Tim Ottinger @ 2003-05-10  4:57 UTC (permalink / raw)


soft-eng wrote:
> 
> But to intimidate Ada advocates you only
> need to mention the word "pointers" :-)

I never try to intimidate Ada programmers.
Some wonderful programmers have been Ada
guys. I once saw a project for the army
written in Ada (of course) with no comments
at all. And it didn't need them. If you
could read Ada, you could tell what it was
doing.

But if you try to intimidate Ada guys, they'll
let you know that their data types and generics
can beat up your data types and templates.

Any day.

I don't remember much about my Ada training.
That's sad. I wish I did. Of course, now I'm
migrating toward more Python and Perl than even
C++, and PHP on the side for fun.  I can't be
a language bigot, because I use more than one.

When I only knew C and BASIC, it was easy to
be biased toward C.  But you live and you learn.

Oh, the only SERIOUSLY multi-lingual (software-wise)
people I know who are seriously bigoted are bigoted
towards Mod3 or Smalltalk.

And I suspect that they're right.

Tim




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 17:37                     ` soft-eng
@ 2003-05-10  6:56                       ` Tom Welsh
  2003-05-10 14:51                         ` Marin David Condic
  2003-05-10 17:27                         ` soft-eng
  2003-05-10 14:36                       ` Marin David Condic
  1 sibling, 2 replies; 186+ messages in thread
From: Tom Welsh @ 2003-05-10  6:56 UTC (permalink / raw)


In article <9fa75d42.0305090937.2bbe1238@posting.google.com>, soft-eng
<softeng3456@netscape.net> writes
>"Marin David Condic" <mcondic.auntie.spam@acm.org> wrote in message news:<b8toba
>$79o$1@slb0.atl.mindspring.net>...
>
>> "competent" and most had many years of experience, but still, the language
>> made a difference to the bottom line. My competitors are still using C. I
>> say "Good for them!" My improved productivity and reduced defects translates
>
>If you can indeed have improved productivity and reduced defects,
>it stands to reason that your competitor will not be doing very
>well versus you!
>
>Bottom lines do count.  If time after time it so happened
>that people using Ada out-competed the ones using C,
>others would start taking notice.
>
Such "bottom-line" comparisons are usually vitiated by failure to
account for total lifetime costs (total cost of ownership). 

Having followed the software development industry for the last 20 years,
I have been struck time and again by the short-term nature of buying
decisions. Usually, people simply do not take into account how much it
will cost to maintain and/or extend an application over 10, 20 or 30
years. Indeed, these lifetimes themselves are often grossly
underestimated - one of the reasons for the Y2K panic.

It's not surprising, as decision-makers are usually not technically
knowledgeable - and even if they were, it's more art than science.
But how many times have we heard of projects going to the low bidder,
who ends up (surprise, surprise!) costing far more than the higher
bidder with a better grip on quality? And that's just for
implementation!

One of the main reasons for the whole Ada initiative was to reduce the
cost of the whole software lifecycle - not just initial development. But
because that TCO is so hard to measure, Ada has not been given credit
for reducing it.

-- 
Tom Welsh



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 13:36                     ` soft-eng
  2003-05-09 16:14                       ` John R. Strohm
  2003-05-09 17:46                       ` soft-eng
@ 2003-05-10  8:30                       ` Preben Randhol
  2003-05-10 17:35                         ` soft-eng
  2 siblings, 1 reply; 186+ messages in thread
From: Preben Randhol @ 2003-05-10  8:30 UTC (permalink / raw)


soft-eng wrote:
> gautier_niouzes@hotmail.com (Gautier) wrote in message news:<17cd177c.0305011129.2eab5fb8@posting.google.com>...
> 
>> You simply ignore the huge debugging time provided
>> by poorly-typed languages and its effective relation to
>> job safety. So what ?
> 
> No -- having worked on reasonably large projects
> in C, I can say that with professional programmers
> with experience in a language like C, this
> simply ceases to be an issue.  *MOST* bugs
> in a professional C project have nothing to do
> with type safety.  

This is utter hogwash and it is a great folly to depend on the
infallibility of humans!

-- 
Preben Randhol                    http://www.pvv.org/~randhol/



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 17:46                       ` soft-eng
@ 2003-05-10  8:40                         ` Preben Randhol
  0 siblings, 0 replies; 186+ messages in thread
From: Preben Randhol @ 2003-05-10  8:40 UTC (permalink / raw)


soft-eng wrote:
> PS:  Now if Ada had GC, that could have changed
> things a lot.  People would have used it despite
> all the warts.

And what warts might that be?

> A LARGE amount of debugging time in C/C++ is spent
> dealing with dynamic memory bugs!  But Ada had
> only a half-hearted nod to GC, no actual GC support.

http://www.datanation.com/fallacies/

-- 
Preben Randhol                    http://www.pvv.org/~randhol/



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 23:49                             ` soft-eng
  2003-05-10  2:44                               ` John R. Strohm
@ 2003-05-10 10:49                               ` Dale Stanbrough
  1 sibling, 0 replies; 186+ messages in thread
From: Dale Stanbrough @ 2003-05-10 10:49 UTC (permalink / raw)


soft-eng wrote:

> But for how long can you keep on making the same type
> of mistakes?

Forever, if we examine software faults. What's your point?
That people -shouldn't-? I would agree with that. That people
can learn to be 100% accurate in everything they do? I don't
think i'll agree on that.

dale



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 19:27                           ` Marc A. Criley
@ 2003-05-10 14:09                             ` Marin David Condic
  2003-05-10 17:37                               ` soft-eng
  0 siblings, 1 reply; 186+ messages in thread
From: Marin David Condic @ 2003-05-10 14:09 UTC (permalink / raw)


I think this is an execlent illustration of a point you made elsewhere. Ada
types and checks are nice for avoiding errors, but an even bigger benefit is
that they allow you to express the solution to a problem in a manner that is
reflective of the problem. Sort of like the difference between a language
that allowed only 1 character for variable names (or 6 or 8 or some limited
number) versus a language that has unlimited length identifiers. Sure, you
can program a solution to something using names like X and Y and Z and one
might argue that "Any Competent Programmer" would document the meanings of
X, Y and Z with comments and be able to follow the "intuitively obvious"
meaning of the code from there (to *competent* programmers, of course). But
given unlimited length identifiers, would not the solution be more
reflective of the problem at hand? The same thing goes for use of type
definitions. You can get there with int and float and char and bool, but
isn't it a lot more expressive of the problem when you can define types that
reflect the intent behind what you're trying to solve? Wasn't that one of
the incentives behind the whole OO thing?

MDC



Marc A. Criley <mcq95@earthlink.net> wrote in message
news:254c16a.0305091127.42ec7b21@posting.google.com...
> softeng3456@netscape.net (soft-eng) wrote in message
news:<9fa75d42.0305090612.261d5a5c@posting.google.com>...
>
> So here's a situation where I use integer subranges regularly:
> arrays!  I virtually never declare an array where the bounds are
> explicitly specified as part of the _array_ definition.  I always do
> something like this:
>
--
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/

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

    "Going cold turkey isn't as delicious as it sounds."
        -- H. Simpson
======================================================================






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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 17:37                     ` soft-eng
  2003-05-10  6:56                       ` Tom Welsh
@ 2003-05-10 14:36                       ` Marin David Condic
  1 sibling, 0 replies; 186+ messages in thread
From: Marin David Condic @ 2003-05-10 14:36 UTC (permalink / raw)


There were at least two formal studies I've seen comparing Ada and C. One
was as close to a controlled scientific experiment as you can get with
software development as I've ever seen. Both showed that when all other
factors were held equal, Ada came out significantly more productive & less
defective than C. In particular, it appeared that Ada got its best
improvements against C when it came to realtime, embedded work. (Dr.
McCormac's railroad experiments). This validates my own study, so I'm happy
to rest with that conclusion. There are probably other studies of which I'm
not aware. It would be highly unscientific to neglect what they demonstrate,
but I'm sure that there are folks who will not be satisfied that this is the
case even if you showed them 100 studies. When someone doesn't want to
believe something, they will inevitably find reasons to do so.

The problems Ada has encountered in gaining market acceptance don't have
much to do with either lack of real productivity improvements nor with lack
of technical merit. It has plenty more to do with the "all other things
being equal" part. In the real world, all other things are seldom equal.
When most RTOS's, support tools, embedded target hardware, prefabricated
libraries, etc., are all oriented towards C, its tough to consider some
other language because it lacks the same development leverage. If Ada wants
to be competitive against C, C++, Java and others, it has to look to provide
similar or more leverage than one gets with these other environments.

In the mean time, I'll keep using Ada in my little world and, yes, we have
kicked our competitor's butts using it. :-)

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

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

    "Going cold turkey isn't as delicious as it sounds."
        -- H. Simpson
======================================================================

soft-eng <softeng3456@netscape.net> wrote in message
news:9fa75d42.0305090937.2bbe1238@posting.google.com...
> "Marin David Condic" <mcondic.auntie.spam@acm.org> wrote in message
news:<b8toba$79o$1@slb0.atl.mindspring.net>...
>
> If you can indeed have improved productivity and reduced defects,
> it stands to reason that your competitor will not be doing very
> well versus you!
>
> Bottom lines do count.  If time after time it so happened
> that people using Ada out-competed the ones using C,
> others would start taking notice.
>
> But in fact time after time it has failed to happen, and the only
> successful cases in Ada usage come from the situations
> where it was mandated and no competition existed at all,
> and money was no object.  If you have a business
> like that, sure, use whatever language you like.
>
> Otherwise, it might be worthwhile looking carefully at
> situation, and not just basing things on a study or two.
>
> Studies, in general, can prove all kinds of amazingly
> interesting things.  Sometimes even six before breakfast.





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-10  6:56                       ` Tom Welsh
@ 2003-05-10 14:51                         ` Marin David Condic
  2003-05-10 17:27                         ` soft-eng
  1 sibling, 0 replies; 186+ messages in thread
From: Marin David Condic @ 2003-05-10 14:51 UTC (permalink / raw)


While I agree with the sentiment here, I ought to toss out a couple of
cautionary notes. First off, remember that most software projects don't have
the lifespan of your typical DoD project. The programming for this year's
model of VCR or Accounting Package or Video Game can become pretty much
obsolete within one to two years. The programming for the JSF engine control
will pretty much have to stick around for 30 or more years. In the former
case "Time To Market" is everything, so you'd better look at development
leverage and to hell with long term cost of ownership. In the latter case,
the metal-benders will still be trying to figure out how to cut a turbine
blade while you're getting a part number for the first validated release of
your software, so you need not worry about development leverage so much as
the long term costs of cutting software releases over 30 years.

Another cautionary note is that all too often we engineers tend to see a
cost savings in some area and latch onto that as if it were the whole
picture. I believe that Ada saves long-term development and maintenance
costs because I've seen the metrics to demonstrate this within the realm I
deal in. However, the maintenance is not the *only* factor in the whole
economic equation, and I have seen other software developments in other
disciplines where this can be shown to be minimal in comparison to other
cost drivers. Hence we need to always be careful to do a real assessment of
all the costs and not assume that Ada is an automatic winner. Ada can often
lose because it doesn't provide as much leverage or costs more to get the
support tools needed. You need to do the math.

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

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

    "Going cold turkey isn't as delicious as it sounds."
        -- H. Simpson
======================================================================

Tom Welsh <news@tom-welsh.co.uk> wrote in message
news:5s29SIA1KKv+EwcU@nildram.co.uk...
>
> One of the main reasons for the whole Ada initiative was to reduce the
> cost of the whole software lifecycle - not just initial development. But
> because that TCO is so hard to measure, Ada has not been given credit
> for reducing it.
>






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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 15:44                             ` Hyman Rosen
@ 2003-05-10 17:17                               ` soft-eng
  2003-05-12  8:06                                 ` Preben Randhol
  0 siblings, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-05-10 17:17 UTC (permalink / raw)


Hyman Rosen <hyrosen@mail.com> wrote in message news:<1052495061.43545@master.nyc.kbcfp.com>...
> soft-eng wrote:
> > That should be "in tribute to CLU".
> 
> Well, *I* write it in tribute to Ada, regardless of whether
> it has its origins in a different language.

Oh!  That's all right then -- I misread that as you not having
any clu about the source of generics in Ada!!



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-10  6:56                       ` Tom Welsh
  2003-05-10 14:51                         ` Marin David Condic
@ 2003-05-10 17:27                         ` soft-eng
  2003-05-11  1:36                           ` John R. Strohm
  2003-05-11 22:13                           ` Robert I. Eachus
  1 sibling, 2 replies; 186+ messages in thread
From: soft-eng @ 2003-05-10 17:27 UTC (permalink / raw)


Tom Welsh <news@tom-welsh.co.uk> wrote in message news:<5s29SIA1KKv+EwcU@nildram.co.uk>...
> In article <9fa75d42.0305090937.2bbe1238@posting.google.com>, soft-eng
> <softeng3456@netscape.net> writes
> >"Marin David Condic" <mcondic.auntie.spam@acm.org> wrote in message news:<b8toba
> >$79o$1@slb0.atl.mindspring.net>...
> >
> >> "competent" and most had many years of experience, but still, the language
> >> made a difference to the bottom line. My competitors are still using C. I
> >> say "Good for them!" My improved productivity and reduced defects translates
> >
> >If you can indeed have improved productivity and reduced defects,
> >it stands to reason that your competitor will not be doing very
> >well versus you!
> >
> >Bottom lines do count.  If time after time it so happened
> >that people using Ada out-competed the ones using C,
> >others would start taking notice.
> >
> Such "bottom-line" comparisons are usually vitiated by failure to
> account for total lifetime costs (total cost of ownership). 
> 
> Having followed the software development industry for the last 20 years,
> I have been struck time and again by the short-term nature of buying
> decisions. Usually, people simply do not take into account how much it
> will cost to maintain and/or extend an application over 10, 20 or 30
> years. Indeed, these lifetimes themselves are often grossly
> underestimated - one of the reasons for the Y2K panic.

Y2K impact was overestimated!

> It's not surprising, as decision-makers are usually not technically
> knowledgeable - and even if they were, it's more art than science.
> But how many times have we heard of projects going to the low bidder,
> who ends up (surprise, surprise!) costing far more than the higher
> bidder with a better grip on quality? And that's just for
> implementation!

And how many times exactly, has this not happened due to Ada?

> One of the main reasons for the whole Ada initiative was to reduce the
> cost of the whole software lifecycle - not just initial development. But
> because that TCO is so hard to measure, Ada has not been given credit
> for reducing it.

I agree that total cost is hard to measure.  My point was that
a language like Ada SEEMs like it is great for software
development.  And it is indeed great for academic exercises.
But actual software development doesn't suffer much from
the maladies Ada targets (it suffers from different ones.)
So a cost-benefit analysis would have to assign some slight
benefits to Ada but much other costs.  So if you are
willing to put up with lots of costs for little benefit
(e.g. if you have a bottomless pit to draw funds from),
Ada might be excellent.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-10  8:30                       ` Preben Randhol
@ 2003-05-10 17:35                         ` soft-eng
  2003-05-12  8:16                           ` Preben Randhol
  0 siblings, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-05-10 17:35 UTC (permalink / raw)


Preben Randhol <randhol+abuse@pvv.org> wrote in message news:<slrnbbpe3n.3o1.randhol+abuse@kiuk0152.chembio.ntnu.no>...
> soft-eng wrote:
> > gautier_niouzes@hotmail.com (Gautier) wrote in message news:<17cd177c.0305011129.2eab5fb8@posting.google.com>...
> > 
> >> You simply ignore the huge debugging time provided
> >> by poorly-typed languages and its effective relation to
> >> job safety. So what ?
> > 
> > No -- having worked on reasonably large projects
> > in C, I can say that with professional programmers
> > with experience in a language like C, this
> > simply ceases to be an issue.  *MOST* bugs
> > in a professional C project have nothing to do
> > with type safety.  
> 
> This is utter hogwash and it is a great folly to depend on the
> infallibility of humans!

Thanks for proving my point!

Here we have a clearly novice user, who has been fed
the impression Ada solves the problem of fallible humans.

Imagine his surprise when he slowly progresses to serious
programming, and starts to discover that all of his logic
errors will continue to stay logic errors, Ada or no Ada.
And the ultimate solution for those logic errors will
come from -- horrors, fallible humans.

Of course, for freshmen programmers whose biggest problem is
getting the types right, Ada is clearly useful.  No doubts
about that.  Also for those who are never going to
progress to any programming that requires something more
complex than getting the types right.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-10 14:09                             ` Marin David Condic
@ 2003-05-10 17:37                               ` soft-eng
  2003-05-10 18:00                                 ` Vinzent Hoefler
  0 siblings, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-05-10 17:37 UTC (permalink / raw)


"Marin David Condic" <mcondic.auntie.spam@acm.org> wrote in message news:<b9j17h$svj$1@slb6.atl.mindspring.net>...
> reflect the intent behind what you're trying to solve? Wasn't that one of
> the incentives behind the whole OO thing?

Yes.  OO solves the problem using a new model.  Ada solves
the problem by collecting numerous small solutions.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-10 17:37                               ` soft-eng
@ 2003-05-10 18:00                                 ` Vinzent Hoefler
  0 siblings, 0 replies; 186+ messages in thread
From: Vinzent Hoefler @ 2003-05-10 18:00 UTC (permalink / raw)


softeng3456@netscape.net (soft-eng) wrote:

>Yes.  OO solves the problem using a new model.

And introduces new ones as well... instead of tracing a function with
the debugger like one did in the old days, we now look at an
inheritance graph and try to guess which method may do the unexpected
thing the customer encountered. :)

>  Ada solves
>the problem by collecting numerous small solutions.

Not exactly. Ada95 has complete OO, although its syntax might be a
little bit, mmh... unusual[0] (but this has even other advantages) -
but it still has all the type information features that makes portable
and dynamic (in the sense of requirements changes) programming much
more easier.

I may state John Barnes from his "High Integrity Software" talking
about the lack of enumeration types in Java (but this applies to C++
as well because the enumeration model there is still just based on
integer constants):

"The wave of enthusiasm for Object Orientation (OO) in all its dynamic
glory (which indeed has its uses but by its very dynamic nature can
create difficult problems) appears to have caused other established
language features to be neglected with the consequence that many
programmers no longer have the benefits of simple language-based
debugging aids."

I think, he's right. My question would be: What use is OOP when the
only objects I can have are chars, ints and doubles?


[0] Well, let's talk about the syntax of Smalltalk, then... ;-) 


Vinzent.

-- 
Parents strongly cautioned  --  this  posting  is  intended for mature
audiences  over  18.  It  may  contain some material that many parents
would not find suitable for children and may include intense violence,
sexual situations, coarse language and suggestive dialogue.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-10 17:27                         ` soft-eng
@ 2003-05-11  1:36                           ` John R. Strohm
  2003-05-11 22:13                           ` Robert I. Eachus
  1 sibling, 0 replies; 186+ messages in thread
From: John R. Strohm @ 2003-05-11  1:36 UTC (permalink / raw)


X-A-Notice: References line has been trimed due to 512 byte limitation
Abuse-Reports-To: abuse at airmail.net to report improper postings
NNTP-Proxy-Relay: library1-aux.airnews.net
NNTP-Posting-Time: Sat, 10 May 2003 20:57:27 -0500 (CDT)
NNTP-Posting-Host: !^4pV1k-WRrN-n` (Encoded at Airnews!)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

"soft-eng" <softeng3456@netscape.net> wrote in message
news:9fa75d42.0305100927.422ffb88@posting.google.com...
> I agree that total cost is hard to measure.  My point was that
> a language like Ada SEEMs like it is great for software
> development.  And it is indeed great for academic exercises.
> But actual software development doesn't suffer much from
> the maladies Ada targets (it suffers from different ones.)

How about you cite a few URLs to back up this claim?





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-02  3:24                       ` Wesley Groleau
@ 2003-05-11 18:52                         ` Robert I. Eachus
  2003-05-11 20:11                           ` Hyman Rosen
                                             ` (2 more replies)
  0 siblings, 3 replies; 186+ messages in thread
From: Robert I. Eachus @ 2003-05-11 18:52 UTC (permalink / raw)


Wesley Groleau wrote:
> 
>> I don't know where this notion arose that a "super-strong"
>> type system is just for preventing bugs. I know that in C++
> 
> 
> I didn't say that it was only for preventing bugs.
> I said it's a crock that it requires programmers
> to do a lot of allegedly unnecessary workarounds.
> 
> For me, preventing bugs is the second biggest benefit
> of Ada's type system.  The bigger one is that it
> allows you to define things in terms of your
> abstraction instead of your implementation.

I think my first deep insight into the implications of Ada programming 
came in 1983, just after Ada 83 became an ANSI standard.  I told someone 
working on our (Ada) compiler: "No, in Ada you model the problem space, 
not the solution space."  I then excused myself for a minute to write it 
on my office whiteboard.

The reasons this works so well are twofold.  First it makes code much 
more understandable to the reader--and therefore logic bugs are much 
more obvious.  But the second and more powerful reason is that 
requirements change.  If your abstraction model is close to the "real" 
world problem space, then changing requirements have no effect on most 
of the code.

My favorite example is a program I wrote in a few hours to demonstrate 
the "right" way to generate random permutations in Ada.  The main loop 
of the program looks like:

for I in 0..Number_of_Hands - 1 loop
         Text_IO.New_Page;
-- Print header
     --  Put_Line calls to output Board number, Dealer and
     --  Vulnerability omitted.
     Shuffle(Deck, Gen);
     Deal;

-- Print hands.
    --  More Put_Line calls with arguments like Cards(North, Spades)
    --  omitted.
   end loop;

The type declarations are also very closely bound to the problem space, 
a deck of cards:

   type Suits is (Spades, Hearts, Diamonds, Clubs);
   type Ranks is (Ace, King, Queen, Jack, Ten, Nine, Eight, Seven,
                 Six, Five, Four, Three, Deuce);
   ...
   type Card is record
     Suit: Suits;
     Rank: Ranks;
   end record;

   type Card_Array is array (Natural range <>) of Card;

   Deck: Card_Array(0..51);

It is really, really hard to have bugs in code that is as unsubtle as 
that.  And even if the universe changes, the changes are pretty 
localized.  For example, it would take just a few minutes to change the 
code to deal Pinochle hands, or even to switch to a Tarot deck.







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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-10  4:57                                                 ` Tim Ottinger
@ 2003-05-11 19:24                                                   ` Robert I. Eachus
  2003-05-12  9:51                                                   ` Leif Roar Moldskred
  1 sibling, 0 replies; 186+ messages in thread
From: Robert I. Eachus @ 2003-05-11 19:24 UTC (permalink / raw)


Tim Ottinger wrote:

> Oh, the only SERIOUSLY multi-lingual (software-wise)
> people I know who are seriously bigoted are bigoted
> towards Mod3 or Smalltalk.
> 
> And I suspect that they're right.

I won't argue against either language.  And I think if you study the 
people who are considered Ada language bigots, you will find that by and 
large, they have written a lot more code in other languages than you 
have.  In my case, I have used APL, Lisp, C, Fortran, Cobol, Pascal and 
perhaps a dozen other languages on significant projects.  Due to working 
at Honeywell and Stratus, over my career, I have probably written more 
lines of PL/I than Ada or any other language.  In any case, I am 
probably most fluent in BNF.  (Backus-Naur Form, used for specifying 
grammars.)

The original purpose of the HOLWG (High Order Language Working Group) 
that eventually created Ada was to reduce the number of programming 
languages used by the DoD.  At one point this was over 800.

When they studied the problem the biggest problems were in embedded 
software and there was no single high-level language that could deal 
with all of the DoD's embedded programming needs.  Ada was created to be 
that language, and the first DoD mandage was to use one of 17 (I think) 
high-level languages.  When Ada became available that list was prunded 
further, and the misunderstood Ada madate (for large programs) cut that 
to one.

So almost every Ada advocate will tell you that this language or that 
language is better for this particular purpose.  What we agree strongly 
on is that when "programming in the large" the only language to consider 
is Ada, even if most of the low-level modules are written in C, Fortran, 
or whatever.






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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 18:52                         ` Robert I. Eachus
@ 2003-05-11 20:11                           ` Hyman Rosen
  2003-05-11 21:09                             ` John R. Strohm
                                               ` (4 more replies)
  2003-05-11 21:07                           ` John R. Strohm
  2003-05-13  3:21                           ` Dr Chaos
  2 siblings, 5 replies; 186+ messages in thread
From: Hyman Rosen @ 2003-05-11 20:11 UTC (permalink / raw)


Robert I. Eachus wrote:
>     Shuffle(Deck, Gen);
> 
> It is really, really hard to have bugs in code that is as unsubtle as 
> that.  And even if the universe changes, the changes are pretty 
> localized.  For example, it would take just a few minutes to change the 
> code to deal Pinochle hands, or even to switch to a Tarot deck.

I think this is a perfect example of the blind spot of Ada programmers.
You are so enamored of enumerations and perfectly indexed arrays and
lack of buffer overflows that you will probably miss the most likely
and subtle bug of this kind of code, which is that the Shuffle routine
fails to produce each possible permutation with uniform probability!




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 13:22                                             ` soft-eng
@ 2003-05-11 20:12                                               ` Richard Riehle
  2003-05-11 20:24                                                 ` Hyman Rosen
  0 siblings, 1 reply; 186+ messages in thread
From: Richard Riehle @ 2003-05-11 20:12 UTC (permalink / raw)


soft-eng wrote:

> Oh, right!  The Ada compilers ranged as high as $1500s iirc,
> but Janus had a low cost one.  But if the quality was
> so good, and the cost was so low (right in line
> with Turbo Pasca, Quick C etc), the incentives
> so high (defense contracts) it just proves
> that the language was found un-usable
> by programmers.

It was not the language that was un-usable, but the
implementations often fell short of what was necessary
for a given platform.

Turbo Pascal was popular because it had a good development
environment.  No one ever developed anything as good for
Ada that was reasonably priced.    Ada was a better language
design, and could be used with the same ease as Pascal, but
those who published compilers seemed to overlook the need
for ordinary programmers to be able to create code easily.

Meridian Ada had a set of very nice packages that made DOS
programming a little easier.  It was even priced so it could
be used.  Meridian also, finally, produced a development
environment.    Then, Meridian sold itself to Verdix,  which
did nothing much with it, which finally became absorbed
by Rational which quietly euthanized it by selling it to a
publisher who had no idea what to do with it.  Had Meridian
been allowed to migrate to Ada 95, it might have done well,
even in competition with GNAT and ObjectAda.

It is not enough to create a better language.  These days, the
development environment and libraries are as important as
the language.   If I have some really excellent seeds that will
grow into great flowers,  those seeds are no good to me unless
I have suitable soil, climate, and growing conditions for them.
And, if I have no tools for plowing, planting, tending, and
harvesting, even the best of plants will be starved out by the
weeds.

One of the best examples was the Tandem Computers Ada
compiler.  The small group within Ada that developed the
compiler did a pretty good job.   They produced a compiler
that could be validated by the then standard validation suite.
Once that was done, Tandem executives halted all additional
work.   There was no effort to ensure the Tandem Ada compiler
could work in conjunction with the other Tandem products.
There was not effort to take advantage of Tandem's excellent
non-stop environment (still an superior product even today),
or distribute tasks across its dynabus architecture.  One
Tandem executive quietly confided to one of my (now-deceased)
colleagues, that Tandem Ada was intended to be a "checkbox"
product so they could check off the box on a procurement
RFP's, "Yes" for validated Ada.   No one was expected to
actually use it for anything.   I did have a chance to use it,
and even talked with one of the programmers who wrote the
compiler.   A medical group in Salt Lake City used Tandem
Ada but finally gave up on it because it was so hard to
interface it to the rest of Tandem's products.

The Tandem story illustrates the attitude of a lot of people
throughout the 1980's regarding Ada.   Although Tandem could
not be accused of "malicious compliance" the ultimate effect
was the same.   Perhaps it was more like "indifferent compliance,"
a more insidious path to destruction.    Other hardware vendors
were as guilty (some more so) in their attitude toward Ada.  At
least one gigantic company, after being awarded a huge contract
for an Air Traffic Control project, blamed Ada for their failure,
their own Ada compiler it seems,  even though many of the
programmers on the project knew  that the failure originated
in the incompetence of those assigned to manage the project.
This included the fact that they never created development
tools to support their own Ada compiler.

Most of the project failures with Ada happen for the same reasons
projects fail using other languages:  managerial incompetence.  While
I believe Ada is more appropriate for certain kinds of software
applications than some competing technologies, it is not more appropriate
if it is handicapped by a lack of development tools.   The best seeds
will not grow without  water and good soil.

Java succeeds for a variety of reasons, none of which has anything to do
with its qualities as a programming language design.   Someone mentioned
the anti-Microsoft sentiment.  This is often justified since Microsoft seems
to have become someone arrogant about the developer community.  Sun
did an excellent job of publicizing Java's benefits, if not its drawbacks. Of
real importance is the the sustained availability of libraries, development
tools, and infrastructure.   None of the administrators of the DoD AJPO
initiatives could ever do as well.  They never had the funding, the
entrepreneurial leadership, nor the experience to make AJPO really
strong and vital.   Some intitiatives, in the mid-Nineties, including
an idiotic Ad campaign, simply evoked derisive chuckles.

Now that Ada must stand on its own, newer initiatives are emerging
that can make it a viable choice for certain classes of software
development.  CLAW, GWindows, GtkAda, and even JEWL open
new avenues for people who want to do GUI programming.  This
was never Ada's strong suit before, but it can be now.   Development
environments from companies such as Green Hills demonstrate how
one can integrate Ada into mainstream development projects and
provide serious interoperability opportunities for Ada.   The new
product from ACT,  GPS, promises to open up new frontiers for
Ada as a language for new kinds of development.   The George
libraries, along with other resuable component libaries can
make Ada attractive for a larger range of applications.

Is it too late?   I often ask myself this question.   With the decision
to abandon Ada for JSF (a wrong decision in my opinion),  along
with the increasing use of Java instead of C, C++, or Ada for
educational venues it will be a mighty struggle for Ada to make
a comeback.   The decision to abandon support for JGNAT
demonstrates one of the serious problems with Ada.   This
decision is reminsicent of the "bodice ripper" phrase, "seduced
and abandoned."   Just as many of us in the educational community
were becoming excited by the opportunities for JGNAT, began
projects using it, got thesis students enthused about it, had
other professors asking about it, it vanished.

If Ada is to succeed, we must stop promising what we cannot
deliver, and deliver what we do promise.   Products that are
under-funded, under-supported, and potentially doomed do
not inspire confidence.   No one wants to commit to a language
or development environment with a short lifespan.   For Ada
to succeed, those of us who produce products and services
must be ready to support those products and services for as
long as our customers need them.    Those companies who are
telling their clients that they are abandoning Ada are not doing
it any good.  At the recent Embedded Systems Conference,
Green Hills made it clear that Ada was being good for them and
they unashamedly sang its praises to anyone who wanted to know
about it.   Certain other companies, one whose fortunes were
built on Ada, seemed intent on hiding any knowledge about its
Ada products or history with Ada.   I found myself directing
people to visit the Green Hills booth which I saw as Ada friendly.

It's Sunday afternoon, Mother's Day, and I should be doing other
things with my day.  Instead, I got caught up in this rant.
My apologies.

Richard Riehle







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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it   collapsed and died)
  2003-05-11 20:12                                               ` Richard Riehle
@ 2003-05-11 20:24                                                 ` Hyman Rosen
  0 siblings, 0 replies; 186+ messages in thread
From: Hyman Rosen @ 2003-05-11 20:24 UTC (permalink / raw)


Richard Riehle wrote:
> It was not the language that was un-usable, but the
> implementations often fell short of what was necessary
> for a given platform.

Over in the C++ newsgroups people like to kid Andrei Alexandrescu
for being the only person in the world who can make a living writing
C++ libraries that no compiler in existence can compile.




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-10  2:44                               ` John R. Strohm
@ 2003-05-11 20:59                                 ` Robert I. Eachus
  2003-05-11 22:24                                   ` Shayne Wissler
  2003-05-13  3:15                                 ` Dr Chaos
  1 sibling, 1 reply; 186+ messages in thread
From: Robert I. Eachus @ 2003-05-11 20:59 UTC (permalink / raw)


John R. Strohm wrote:

 > It only takes one such error in safety-critical code to kill someone.
 >  (To the best of my knowledge, the actual code error behind the
 > Therac-25 fatalities has never been explained.  I would not be at all
 >  surprised to learn that it was a buffer indexing problem that could
 > have been caught automatically by a type-safe language used
 > properly.)

I can't let that comment about Therac-25 pass unchallenged.  Nancy
Leveson has a very complete write-up on the Therac-25 problems.
The link http://sunnyday.mit.edu/therac-25.html will let you choose 
between PDF and Postscript versions.  The paper is 49 pages long, and I 
quail at trying to describe all the safety problems found in much less 
text. However, at least two specific software errors that could--and 
did--kill patients were found and connected with specific Therac-25 
overdose incidents.  Other cases could be from one or the other of these 
bugs, or several dozen other problems, but there is insufficient data to 
be certain.

The two bugs identified with particular patient deaths were one where, 
if the operator to edited the settings and hit P (for procede) within 8 
seconds after an error message, some key settings were not rechecked. 
In the other, a semaphore was incremented instead of being set to a 
specific value.  The semaphore was one byte long, and the code involved 
periodically checked settings.  If you hit the right key (I think it was 
B this time) just after the semaphore rolled over, some checks were in 
effect bypassed.

However, the particular software bugs that were actually determined to
have killed patients were a minor part of the entire Therac-25 debacle.
The real problem was that the system as a whole--hardware and 
software--was so buggy, and documentation and manufacturer support were 
so poor, that operators were used to ignoring software error codes and 
hardware "glitches."  I'd have to re-read the entire report to be sure, 
but I think that in all but one case of a patient overdose, the operator 
continued operation after some error message appeared.

As far as I am concerned, once I read that there was an error message,
that indicated the dosage was too high or too low, and that if it was
too high the displayed dosage was too low, I sort of gave up.  I don't
even want to think about Pointy-Haired Bosses and safety-critical
software beyond that.  I might be tempted to go on a shooting rampage.

Nancy's report is practically a catalog of every type of design,
management and process error you can make in building a safety-critical
system.  Using Ada might have helped, at least with those two bugs, but 
the real necessity was a safety-critical development process.





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 18:52                         ` Robert I. Eachus
  2003-05-11 20:11                           ` Hyman Rosen
@ 2003-05-11 21:07                           ` John R. Strohm
  2003-05-12  0:49                             ` Robert I. Eachus
  2003-05-13  3:21                           ` Dr Chaos
  2 siblings, 1 reply; 186+ messages in thread
From: John R. Strohm @ 2003-05-11 21:07 UTC (permalink / raw)


X-A-Notice: References line has been trimed due to 512 byte limitation
Abuse-Reports-To: abuse at airmail.net to report improper postings
NNTP-Proxy-Relay: library2.airnews.net
NNTP-Posting-Time: Sun, 11 May 2003 16:15:20 -0500 (CDT)
NNTP-Posting-Host: ![-nV1k-WWi2kke (Encoded at Airnews!)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

"Robert I. Eachus" <rieachus@attbi.com> wrote in message
news:3EBE9BD4.1050008@attbi.com...
> Wesley Groleau wrote:
> >
> >> I don't know where this notion arose that a "super-strong"
> >> type system is just for preventing bugs. I know that in C++
> >
> >
> > I didn't say that it was only for preventing bugs.
> > I said it's a crock that it requires programmers
> > to do a lot of allegedly unnecessary workarounds.
> >
> > For me, preventing bugs is the second biggest benefit
> > of Ada's type system.  The bigger one is that it
> > allows you to define things in terms of your
> > abstraction instead of your implementation.
>
> I think my first deep insight into the implications of Ada programming
> came in 1983, just after Ada 83 became an ANSI standard.  I told someone
> working on our (Ada) compiler: "No, in Ada you model the problem space,
> not the solution space."  I then excused myself for a minute to write it
> on my office whiteboard.
>
> The reasons this works so well are twofold.  First it makes code much
> more understandable to the reader--and therefore logic bugs are much
> more obvious.  But the second and more powerful reason is that
> requirements change.  If your abstraction model is close to the "real"
> world problem space, then changing requirements have no effect on most
> of the code.
>
> My favorite example is a program I wrote in a few hours to demonstrate
> the "right" way to generate random permutations in Ada.  The main loop
> of the program looks like:
>
> for I in 0..Number_of_Hands - 1 loop

There is ABSOLUTELY NO EXCUSE in Ada for the above.  Human beings learn to
count starting at "one", not "zero".

  for I in 1..Number_of_Hands loop


>          Text_IO.New_Page;
> -- Print header
>      --  Put_Line calls to output Board number, Dealer and
>      --  Vulnerability omitted.
>      Shuffle(Deck, Gen);
>      Deal;
>
> -- Print hands.
>     --  More Put_Line calls with arguments like Cards(North, Spades)
>     --  omitted.
>    end loop;
>
> The type declarations are also very closely bound to the problem space,
> a deck of cards:
>
>    type Suits is (Spades, Hearts, Diamonds, Clubs);
>    type Ranks is (Ace, King, Queen, Jack, Ten, Nine, Eight, Seven,
>                  Six, Five, Four, Three, Deuce);
>    ...
>    type Card is record
>      Suit: Suits;
>      Rank: Ranks;
>    end record;
>
>    type Card_Array is array (Natural range <>) of Card;
>
>    Deck: Card_Array(0..51);

Same comment.

   Deck: Card_Array(1..52);

> It is really, really hard to have bugs in code that is as unsubtle as
> that.  And even if the universe changes, the changes are pretty
> localized.  For example, it would take just a few minutes to change the
> code to deal Pinochle hands, or even to switch to a Tarot deck.

Actually, with a Tarot deck, it would be a bit harder.  You have the four
different suits, and the various numbered cards, but you also have the
various special cards (e.g., the Fool, the Tower, Death...) that have to be
handled separately.





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 20:11                           ` Hyman Rosen
@ 2003-05-11 21:09                             ` John R. Strohm
  2003-05-11 23:43                               ` Hyman Rosen
  2003-05-11 21:57                             ` Robert I. Eachus
                                               ` (3 subsequent siblings)
  4 siblings, 1 reply; 186+ messages in thread
From: John R. Strohm @ 2003-05-11 21:09 UTC (permalink / raw)


X-A-Notice: References line has been trimed due to 512 byte limitation
Abuse-Reports-To: abuse at airmail.net to report improper postings
NNTP-Proxy-Relay: library2.airnews.net
NNTP-Posting-Time: Sun, 11 May 2003 16:15:21 -0500 (CDT)
NNTP-Posting-Host: ![-nV1k-WWi2kke (Encoded at Airnews!)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106


"Hyman Rosen" <hyrosen@mail.com> wrote in message
news:T7yva.16129$rV2.4345@nwrdny01.gnilink.net...
> Robert I. Eachus wrote:
> >     Shuffle(Deck, Gen);
> >
> > It is really, really hard to have bugs in code that is as unsubtle as
> > that.  And even if the universe changes, the changes are pretty
> > localized.  For example, it would take just a few minutes to change the
> > code to deal Pinochle hands, or even to switch to a Tarot deck.
>
> I think this is a perfect example of the blind spot of Ada programmers.
> You are so enamored of enumerations and perfectly indexed arrays and
> lack of buffer overflows that you will probably miss the most likely
> and subtle bug of this kind of code, which is that the Shuffle routine
> fails to produce each possible permutation with uniform probability!

Let's see, are you saying we shouldn't eliminate the simple problems because
we can't eliminate the hard problems at the same time?

The obvious end consequent of that argument is that we should all be
programming in absolute binary.





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 20:11                           ` Hyman Rosen
  2003-05-11 21:09                             ` John R. Strohm
@ 2003-05-11 21:57                             ` Robert I. Eachus
  2003-05-12  0:06                               ` Hyman Rosen
  2003-05-11 23:33                             ` Wesley Groleau
                                               ` (2 subsequent siblings)
  4 siblings, 1 reply; 186+ messages in thread
From: Robert I. Eachus @ 2003-05-11 21:57 UTC (permalink / raw)


Robert I. Eachus wrote:

 > My favorite example is a program I wrote in a few hours to 
demonstrate > the "right" way to generate random permutations in Ada.

Hyman Rosen wrote:
> I think this is a perfect example of the blind spot of Ada programmers.
> You are so enamored of enumerations and perfectly indexed arrays and
> lack of buffer overflows that you will probably miss the most likely
> and subtle bug of this kind of code, which is that the Shuffle routine
> fails to produce each possible permutation with uniform probability!

Did you read what I wrote, really?  Should I have included the notes in 
the Shufflling routine which showed why this particular method of 
generation permutations was unbiased?  Okay done:

    procedure Shuffling (List : in out List_Type;
                         Gen  : in     Generator) is
-- a routine for producing permutations of a list of elements.  Note
-- that this method is unbiased for any independent sequence.  (For
-- any two cards the possibility that they will be in a particular
-- order is exactly 1/2, this can be extended by iteration to show
-- that each sequence has a probablity of 1/N!   Note that for large
-- lists of elements not all permutations will be generated.  There
-- are N! permutations of a list of N values, and this may be much
-- greater than the number of generator states.  Note also that the
-- actual number of different possible permutations generated from
-- one starting seed is k/GCD(N,k) for a generator with k states.

       List_Copy : constant List_Type := List;

       type Rec is
          record
             Index : Index_Type;
             Rand  : Float;
          end record;

       type Rec_Array is array (Index_Type range <>) of Rec;

       Temp : Rec_Array(List'Range);

       function "<" (L, R: Rec) return Boolean is
       begin return L.Rand < R.Rand; end "<";

       procedure Sort is new Sorting(Rec, Index_Type, Rec_Array, "<");

     begin
        for I in Temp'Range loop
           Temp(I) := (I, NFR.Random(Gen));
        end loop;

        Sort(Temp);  --  Sort based on value of random number

        --  Now rearrange List based on the order of indices in Temp
        for I in List'Range loop
           List(I) := List_Copy(Temp(I).Index);
        end loop;
     end Shuffling;

Again, no subtlety present or wanted.

Note that for Ada, the generator you get from Ada.Numerics.Float_Random 
will usually have more that 2^32 states.  If it is the one I wrote that 
is in Gnat, the GCD mentioned will be one, unless N has a factor that is 
one of two five digit primes. Oh, and this is the body of a generic 
where Element_Type, List_Type, and Index_Type are generic parameters. 
Okay? No?

Well if you really need a longer period generator, write me.  The other 
alternative is to combine two generators with independent seeds and 
periods.  Adding typical [0..1) generators and if >1, subtracting 1 
works just fine unless one of the generators is biased.  In fact, for 
most tests of randomness, you get more random behavior than either 
generator alone.







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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-10 17:27                         ` soft-eng
  2003-05-11  1:36                           ` John R. Strohm
@ 2003-05-11 22:13                           ` Robert I. Eachus
  2003-05-12 13:51                             ` soft-eng
  1 sibling, 1 reply; 186+ messages in thread
From: Robert I. Eachus @ 2003-05-11 22:13 UTC (permalink / raw)


soft-eng wrote:

> Y2K impact was overestimated!

I normally don't respond to trolls, but this was too much.  Go get a 
list of the banks in business in 1995.  Doesn't have to be complete, for 
example it could be a list of all banks with federal charters.  Now look 
at the same list for the year 2000.  Over 90% of the banks from your 
first list will have disappeared, and not due to name changes.

The Y2K crisis was underestimated for over a decade, then it started 
getting the attention it deserved.  The result was a lot of bank mergers 
to reduce the cost of the software work required.  In the area where I 
live, one bank, St. Mary's Bank and a couple of credit unions survived. 
  All the rest eventually merged into other banks.  (In case you care, 
Bank of New Hampshire was one of those that moved into the area by 
buying other banks.  I had one checking account which went through five 
banks and another that went through four during this period, as banks 
were swallowed by bigger banks, then merged again and again.)





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 20:59                                 ` Robert I. Eachus
@ 2003-05-11 22:24                                   ` Shayne Wissler
  0 siblings, 0 replies; 186+ messages in thread
From: Shayne Wissler @ 2003-05-11 22:24 UTC (permalink / raw)



"Robert I. Eachus" <rieachus@attbi.com> wrote in message
news:3EBEB9AE.2060704@attbi.com...

> Nancy's report is practically a catalog of every type of design,
> management and process error you can make in building a safety-critical
> system.  Using Ada might have helped, at least with those two bugs, but
> the real necessity was a safety-critical development process.

Clearly the way this machine was developed was very poor. But what should
have prevented these accidents was the judgement of the people buying the
machines. It was very clear from the report that these Therac-25's were
extremely buggy, that part of the operator's standard procedure was hacks to
work around the glitches. I mean, the thing was worse than Windows 3.1.

The machine did not function as designed, nor as any reasonable person would
expect. Yet the hospital staff still purchased and used the machines. Now if
this machine were something used for a relatively safe procedure, like
writing a document, and all that you were going to lose was your work since
your last save, that would be one thing. But these hospitals were putting
their patient's lives on the line. Any hint of a flawed machine should have
resulted in taking them out of service. But they had much more than a hint.


Shayne Wissler






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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 20:11                           ` Hyman Rosen
  2003-05-11 21:09                             ` John R. Strohm
  2003-05-11 21:57                             ` Robert I. Eachus
@ 2003-05-11 23:33                             ` Wesley Groleau
  2003-05-11 23:51                               ` Hyman Rosen
       [not found]                               ` <bqj3p-t23.ln1@beastie.ix.netcom.com>
  2003-05-11 23:50                             ` Bill Findlay
  2003-05-12  8:18                             ` Preben Randhol
  4 siblings, 2 replies; 186+ messages in thread
From: Wesley Groleau @ 2003-05-11 23:33 UTC (permalink / raw)



> I think this is a perfect example of the blind spot of Ada programmers.
> You are so enamored of enumerations and perfectly indexed arrays and
> lack of buffer overflows that you will probably miss the most likely
> and subtle bug of this kind of code, which is that the Shuffle routine
> fails to produce each possible permutation with uniform probability!

Hyman, your posts are generally rational,
even when we disagree.  But you must have
had a brain fart on this one.  Robert's
post contained not even a hint of the
implementation of the Shuffloe routine,
so there is NO WAY you could have either
tested it or analyzed it to justify your
claim that it is not random.

On top of that, a shuffle by human hands
probably does not produce each possible
permutation with uniform probability!




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 21:09                             ` John R. Strohm
@ 2003-05-11 23:43                               ` Hyman Rosen
  2003-05-11 23:54                                 ` Bill Findlay
                                                   ` (2 more replies)
  0 siblings, 3 replies; 186+ messages in thread
From: Hyman Rosen @ 2003-05-11 23:43 UTC (permalink / raw)


John R. Strohm wrote:
> Let's see, are you saying we shouldn't eliminate the simple problems because
> we can't eliminate the hard problems at the same time?

No. But there very often seems to be a lack of acknowledgement of the
hard problems. The impression I get from the Ada folks very often is
that Ada will give you error-free code, or at the very least, errors
will be detected and reported.




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 20:11                           ` Hyman Rosen
                                               ` (2 preceding siblings ...)
  2003-05-11 23:33                             ` Wesley Groleau
@ 2003-05-11 23:50                             ` Bill Findlay
  2003-05-12  8:18                             ` Preben Randhol
  4 siblings, 0 replies; 186+ messages in thread
From: Bill Findlay @ 2003-05-11 23:50 UTC (permalink / raw)


On 11/5/03 21:11, in article T7yva.16129$rV2.4345@nwrdny01.gnilink.net,
"Hyman Rosen" <hyrosen@mail.com> wrote:

> Robert I. Eachus wrote:
>>     Shuffle(Deck, Gen);
>> 
>> It is really, really hard to have bugs in code that is as unsubtle as
>> that.  And even if the universe changes, the changes are pretty
>> localized.  For example, it would take just a few minutes to change the
>> code to deal Pinochle hands, or even to switch to a Tarot deck.
> 
> I think this is a perfect example of the blind spot of Ada programmers.
> You are so enamored of enumerations and perfectly indexed arrays and
> lack of buffer overflows that you will probably miss the most likely
> and subtle bug of this kind of code, which is that the Shuffle routine
> fails to produce each possible permutation with uniform probability!
> 

Hyman, this really is not up to your usual standard.

Are you suggesting that programmers who carry the additional burdens of
having to simulate enumerations by themselves, ensure perfect indexing by
themselves, and check by themselves for buffer overflows, are somehow *more*
likely to get the algorithm correct?

Come off it!

-- 
Bill-Findlay chez blue-yonder.co.uk ("-" => "")





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 23:33                             ` Wesley Groleau
@ 2003-05-11 23:51                               ` Hyman Rosen
  2003-05-12  8:40                                 ` Preben Randhol
       [not found]                               ` <bqj3p-t23.ln1@beastie.ix.netcom.com>
  1 sibling, 1 reply; 186+ messages in thread
From: Hyman Rosen @ 2003-05-11 23:51 UTC (permalink / raw)


Wesley Groleau wrote:
> so there is NO WAY you could have either
> tested it or analyzed it to justify your
> claim that it is not random.

I was speaking to the general Ada programmer, not to Robert specifically.
And it's well known that subtle errors can lurk in dealing with random
numbers, and those are the kinds of errors that have nothing to do with
the automatic checks that Ada and type safety gives you, so I found it
pertinent that that part of the code was left out.

> On top of that, a shuffle by human hands
> probably does not produce each possible
> permutation with uniform probability!

And there are people who believe they can take advantage of that.
On the other hand, a shuffle by human hands takes place far less
often than a shuffle by computer, and a shuffle by human hands is
not algorithmic, so there are compensatory effects.




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 23:43                               ` Hyman Rosen
@ 2003-05-11 23:54                                 ` Bill Findlay
  2003-05-12 17:23                                 ` Mike Silva
  2003-05-12 18:28                                 ` Larry Kilgallen
  2 siblings, 0 replies; 186+ messages in thread
From: Bill Findlay @ 2003-05-11 23:54 UTC (permalink / raw)


On 12/5/03 00:43, in article ReBva.27$hX1.18@nwrdny01.gnilink.net, "Hyman
Rosen" <hyrosen@mail.com> wrote:

> John R. Strohm wrote:
>> Let's see, are you saying we shouldn't eliminate the simple problems because
>> we can't eliminate the hard problems at the same time?
> 
> No. But there very often seems to be a lack of acknowledgement of the
> hard problems. The impression I get from the Ada folks very often is
> that Ada will give you error-free code, or at the very least, errors
> will be detected and reported.

Hyman, this a straw man; and you know it.

-- 
Bill-Findlay chez blue-yonder.co.uk ("-" => "")





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 21:57                             ` Robert I. Eachus
@ 2003-05-12  0:06                               ` Hyman Rosen
  2003-05-12  1:04                                 ` Robert I. Eachus
  2003-05-12  3:53                                 ` Wesley Groleau
  0 siblings, 2 replies; 186+ messages in thread
From: Hyman Rosen @ 2003-05-12  0:06 UTC (permalink / raw)


Robert I. Eachus wrote:
> Did you read what I wrote, really?

Sure.

> Should I have included the notes in the Shufflling routine which
 > showed why this particular method of generation permutations was
 > unbiased?  Okay done:

Okay, thanks. Since not all Ada programmers are the author of random
number generators for Ada compilers, you should agree that this is an
issue that can be overlooked, and could produce incorrect results that
would not be caught by Ada language facilities. An impression I often
get from Ada proponents is that the errors that Ada catches are the
(only) ones that matter.

And by the way...
 > type Suits is (...);
 > type Ranks is (...);
 > Deck: Card_Array(0..51);

What's up with that 51? Shouldn't that be a calculation based on the
Suits'Last'Pos and Ranks'Last'Pos?




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 18:52                           ` Jim Rogers
@ 2003-05-12  0:47                             ` Dave Thompson
  2003-05-14  3:25                               ` Robert I. Eachus
  0 siblings, 1 reply; 186+ messages in thread
From: Dave Thompson @ 2003-05-12  0:47 UTC (permalink / raw)


On 9 May 2003 11:52:31 -0700, jimmaureenrogers@worldnet.att.net (Jim
Rogers) wrote:
[snip]
> The most convenient feature when dealing with arrays is
> Ada's ability to efficiently deal with array bounds 
> checking. 
> 
> For example, if I define an Ada string with a length
> of 10 characters:
> 
>    Name : String(1..10);
> 
> I can then perform I/O using that string object and
> never need to worry about array bounds violations.
> 
> Ada.Text_Io.Get_Line(Item => Name, Last => Count);
[snip]
> In C I would need to do something like the following:
>    char name[11];
> 
>    scanf("%.10s", name);
> 
Not quite.  Ada Get_Line is much closer to C fgets, 
although it does store the newline character (if it fits) 
and you must often deal with removing it, and it does 
not return the length explicitly (you must strlen for it).

> The point here is that I must hardcode the size limit
> into the scanf format string. If I change the size of
> the array then I must also change the scanf format 
> string.
> 
For fgets the length is a separate argument and so can 
and almost always should be computed as sizeof(buf) 
without hardcoding *if* buf is local or global, but not if 
passed as a parameter/dummy/formal because C 
doesn't have true array parameters only pointers 
that don't carry size information.

*scanf %s reads only up to whitespace, not a whole line, 
making it more like a nonstandard Get_Token.  Even if 
you make it %limit[^\n] (any characters except newline) 
it doesn't 'eat' the newline, and just adding a %*c in 
the same call won't work if the %[ read nothing (failed).
You can in simple cases hack in a #define'd length using 
preprocessor stringize (and string literal concatenation) 
or in general compute the format string at runtime, but 
neither is as convenient as even passing the bound explicitly 
to fgets,  much less automatically as in Ada.

> Unfortunately, array bounds violations are still a common
> failure mode in C programs. The techniques for avoiding 
> array bounds violations are well known. Unfortunately
> they are not used as frequently as one would like.
> 
Concur, and with the rest [snipped].

- David.Thompson1 at worldnet.att.net



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 21:07                           ` John R. Strohm
@ 2003-05-12  0:49                             ` Robert I. Eachus
  2003-05-12 18:23                               ` Stephen Leake
  2003-05-13  2:19                               ` John R. Strohm
  0 siblings, 2 replies; 186+ messages in thread
From: Robert I. Eachus @ 2003-05-12  0:49 UTC (permalink / raw)


John R. Strohm wrote:

 >>for I in 0..Number_of_Hands - 1 loop
 >
> There is ABSOLUTELY NO EXCUSE in Ada for the above.  Human beings learn to
> count starting at "one", not "zero".

>>   Deck: Card_Array(0..51); 
> Same comment.

Well, excuse me!  I did not write that because I am a closet C 
programmer.  I wrote that in both cases because those values are used in 
  mod operations, the deck when initializing cards, the Number_of_Hands 
in determining vulnerability and dealer.  In both cases, I could either 
have expressions like  (I-1) mod 13 + 1, or I mod 13.  Guess which I chose.

>  Actually, with a Tarot deck, it would be a bit harder.  You have the four
> different suits, and the various numbered cards, but you also have the
> various special cards (e.g., the Fool, the Tower, Death...) that have to be
> handled separately.

Not that much, at least with the Tarot decks I have used.  They have 22 
Major Arcana and four suits of 14 cards in the Minor Arcana for a total 
of 78 cards.  It would be pretty easy to have six suits of thirteen 
cards and special names for the cards in two of them (including the four 
Pages from the Minor Arcana).  Or you could just generate the names in 
the Minor Arcana, and fill in the Major Arcana last.  Since the names 
are assigned to the cards once, and from then on printed/displayed, it 
would take very little additional code.  A little more difficult would 
be adding a bit for reversed, and flipping it randomly during shuffling. 
  Hardest part would be remembering the names of the Major Arcana, but 
what else is Google for: http://www.byzant.com/tarot/structuremajor.asp ;-)




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-12  0:06                               ` Hyman Rosen
@ 2003-05-12  1:04                                 ` Robert I. Eachus
  2003-05-12  3:53                                 ` Wesley Groleau
  1 sibling, 0 replies; 186+ messages in thread
From: Robert I. Eachus @ 2003-05-12  1:04 UTC (permalink / raw)


Hyman Rosen wrote:

> Okay, thanks. Since not all Ada programmers are the author of random
> number generators for Ada compilers, you should agree that this is an
> issue that can be overlooked, and could produce incorrect results that
> would not be caught by Ada language facilities.

It was just that I had stated that the only reason for writing this 
program was to use it to explain the rationale for generating 
permutations this way.

> And by the way...
>  > type Suits is (...);
>  > type Ranks is (...);
>  > Deck: Card_Array(0..51);
> 
> What's up with that 51? Shouldn't that be a calculation based on the
> Suits'Last'Pos and Ranks'Last'Pos?

Good, question, I think the answer is a judgement call.  I could have 
written:

    Deck: Card_Array(0..(Suits'Last'Pos+1)*(Ranks'Last'Pos+1)-1);

But I think the way I chose was more obviously correct, and easier to 
maintain, even if someone wanted to change the code to play Pinochle.






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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-12  0:06                               ` Hyman Rosen
  2003-05-12  1:04                                 ` Robert I. Eachus
@ 2003-05-12  3:53                                 ` Wesley Groleau
  1 sibling, 0 replies; 186+ messages in thread
From: Wesley Groleau @ 2003-05-12  3:53 UTC (permalink / raw)



> would not be caught by Ada language facilities. An impression I often
> get from Ada proponents is that the errors that Ada catches are the
> (only) ones that matter.

Oh, bull.  Numerous people in c.l.a. have often said
that one can write bad code in any language.  Our
irritation with a certain large subset of C programmers
is their insistence that "any decent programmer" can
avoid the errors Ada prevents--while they continue
to fail to avoid those errors.




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
       [not found]                               ` <bqj3p-t23.ln1@beastie.ix.netcom.com>
@ 2003-05-12  5:04                                 ` Wesley Groleau
  0 siblings, 0 replies; 186+ messages in thread
From: Wesley Groleau @ 2003-05-12  5:04 UTC (permalink / raw)


Dennis Lee Bieber wrote:
> Wesley Groleau fed this fish to the penguins on Sunday 11 May 2003 
>>On top of that, a shuffle by human hands
>>probably does not produce each possible
>>permutation with uniform probability!
>
>         In truth -- performing 8 perfect riffle shuffles on a standard deck 
> actually returns it to the original ordering.

What percent of people are capable of doing even
two "perfect" shuffles in a row?

Nevertheless, even the imperfect ones are unlikely
to "produce each possible permutation with perfect probability!

comp.lang.alliteration ?




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-10 17:17                               ` soft-eng
@ 2003-05-12  8:06                                 ` Preben Randhol
  2003-05-12 13:48                                   ` soft-eng
  0 siblings, 1 reply; 186+ messages in thread
From: Preben Randhol @ 2003-05-12  8:06 UTC (permalink / raw)


soft-eng wrote:
> Hyman Rosen <hyrosen@mail.com> wrote in message news:<1052495061.43545@master.nyc.kbcfp.com>...
>> soft-eng wrote:
>> > That should be "in tribute to CLU".
>> 
>> Well, *I* write it in tribute to Ada, regardless of whether
>> it has its origins in a different language.
> 
> Oh!  That's all right then -- I misread that as you not having
> any clu about the source of generics in Ada!!

I'm starting to see that you don't have a clue about Ada.

-- 
Preben Randhol                    http://www.pvv.org/~randhol/



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-10 17:35                         ` soft-eng
@ 2003-05-12  8:16                           ` Preben Randhol
  0 siblings, 0 replies; 186+ messages in thread
From: Preben Randhol @ 2003-05-12  8:16 UTC (permalink / raw)


soft-eng wrote:
> Preben Randhol <randhol+abuse@pvv.org> wrote in message news:<slrnbbpe3n.3o1.randhol+abuse@kiuk0152.chembio.ntnu.no>...

> Imagine his surprise when he slowly progresses to serious
> programming, and starts to discover that all of his logic
> errors will continue to stay logic errors, Ada or no Ada.
> And the ultimate solution for those logic errors will
> come from -- horrors, fallible humans.

How stupid is it possible to be? I have not at all said one cannot make
logical errors in Ada or any other language nor that Ada prevents them.
But perhaps a self-proclaimed "expert" [*] like yourself do not grasp
the advantage of having a language which helps reduces the number of
non-logical errors (syntactic, range errors etc...) to a minimum in
stead of expecting that the programmer discover all those themself. Just
take a look at the state of software security and you will find most
problems lies in buffer overflows for instance.

> Of course, for freshmen programmers whose biggest problem is
> getting the types right, Ada is clearly useful.  No doubts
> about that.  Also for those who are never going to
> progress to any programming that requires something more
> complex than getting the types right.

Oh and how is C better than Ada when it comes limiting logical errors or
maintaining large complex systems?

*Plonk*

[*] The mere fact that you don't even use your real name, screams
teenager.
-- 
Preben Randhol                    http://www.pvv.org/~randhol/



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 20:11                           ` Hyman Rosen
                                               ` (3 preceding siblings ...)
  2003-05-11 23:50                             ` Bill Findlay
@ 2003-05-12  8:18                             ` Preben Randhol
  4 siblings, 0 replies; 186+ messages in thread
From: Preben Randhol @ 2003-05-12  8:18 UTC (permalink / raw)


Hyman Rosen wrote:
> I think this is a perfect example of the blind spot of Ada programmers.
> You are so enamored of enumerations and perfectly indexed arrays and
> lack of buffer overflows that you will probably miss the most likely
> and subtle bug of this kind of code, which is that the Shuffle routine
> fails to produce each possible permutation with uniform probability!

Well while you are busy finding the former bugs in your software we have
time to work on the latter.

-- 
Preben Randhol                    http://www.pvv.org/~randhol/



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 23:51                               ` Hyman Rosen
@ 2003-05-12  8:40                                 ` Preben Randhol
  0 siblings, 0 replies; 186+ messages in thread
From: Preben Randhol @ 2003-05-12  8:40 UTC (permalink / raw)


Hyman Rosen wrote:
> 
> I was speaking to the general Ada programmer, not to Robert specifically.

Well you can just as well address your speech to the general C/C++
programmer that he should not only look for the simple bugs, but also
work out the hard ones.

I think it is only C/C++ programmer who think that when Ada programmer
say Ada removes bugs they mean all bugs. On the other hand saying that
Ada programmer are incapable of seeing the bugs in their software, can
also only be just cheap shots at getting ahead in the debate? At any
rate there is a logical bug in the reasoning.

-- 
Preben Randhol                    http://www.pvv.org/~randhol/



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why  it collapsed and died)
  2003-05-10  4:57                                                 ` Tim Ottinger
  2003-05-11 19:24                                                   ` Robert I. Eachus
@ 2003-05-12  9:51                                                   ` Leif Roar Moldskred
  1 sibling, 0 replies; 186+ messages in thread
From: Leif Roar Moldskred @ 2003-05-12  9:51 UTC (permalink / raw)


Tim Ottinger <TOttinge@indy.rr.com> writes:

> But if you try to intimidate Ada guys, they'll let you know that
> their data types and generics can beat up your data types and
> templates.

And, of course, chances are good that their customers are quite
capable of beating up your customers.

-- 
Leif Roar Moldskred



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 23:41                                             ` Dr Chaos
@ 2003-05-12 13:43                                               ` soft-eng
  2003-05-13  3:25                                                 ` Dr Chaos
  2003-05-13 10:36                                               ` Larry Kilgallen
       [not found]                                               ` <9fa75d42.03051205Followup-To: comp.lang.ada <zhA3ybPlX6cW@eisner.encompasserve.org>
  2 siblings, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-05-12 13:43 UTC (permalink / raw)


Dr Chaos <mbkennelSPAMBEGONE@NOSPAMyahoo.com> wrote in message news:<slrnbbof6r.6ep.mbkennelSPAMBEGONE@lyapunov.ucsd.edu>...

> Here is one key example.  VMS didn't have a shell where actual
> ordinary users could write programs which functioned like the built in
> ones.  It was "RUN MY_USER_PROGRAM" versus the huge hairball of "SHOW
> THIS/THAT" or "SET THIS TO THAT".
> 
> If you wanted to have your own software work like that it was a huge
> rigamarole poring through one of the 20 or 30 orange covered
> notebooks.
> 
> Unix had argc and argv, and a simple library that you didn't even
> need to use if you didn't want to.
> 
> It was like Alexander cutting the Gordian knot. 
> 
> DCL was completely cognitively opaque.  What exactly was it doing, what
> programs is it running when?
> 
> Unix was dumb, and smart at the same time.
> 
> Simply: 
> 
>       Unix *felt* like freedom.  
>       VMS didn't.
> 

A lot of people felt the same way about C vs Pascal/Ada style languages!

Of course, today's C, C++, Java etc don't have type-checking
problems like early C, which may have led to my perception that 
type-checking simply is NOT a problem in modern software development.
But come to think of it, at one point it was.  Even so,
C *felt* like freedom.

Because the strong type-checking of today's C-family languages
has evolved rather than been dictated, it has had to retain
that freedom.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-12  8:06                                 ` Preben Randhol
@ 2003-05-12 13:48                                   ` soft-eng
  2003-05-12 14:33                                     ` Preben Randhol
  0 siblings, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-05-12 13:48 UTC (permalink / raw)


Preben Randhol <randhol+abuse@pvv.org> wrote in message news:<slrnbbulf5.mi7.randhol+abuse@kiuk0152.chembio.ntnu.no>...
> soft-eng wrote:
> > Hyman Rosen <hyrosen@mail.com> wrote in message news:<1052495061.43545@master.nyc.kbcfp.com>...
> >> soft-eng wrote:
> >> > That should be "in tribute to CLU".
> >> 
> >> Well, *I* write it in tribute to Ada, regardless of whether
> >> it has its origins in a different language.
> > 
> > Oh!  That's all right then -- I misread that as you not having
> > any clu about the source of generics in Ada!!
> 
> I'm starting to see that you don't have a clue about Ada.

Are you disagreeing that the source of generics
in Ada was CLU?



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 22:13                           ` Robert I. Eachus
@ 2003-05-12 13:51                             ` soft-eng
  0 siblings, 0 replies; 186+ messages in thread
From: soft-eng @ 2003-05-12 13:51 UTC (permalink / raw)


"Robert I. Eachus" <rieachus@attbi.com> wrote in message news:<3EBECAF3.4010509@attbi.com>...
> soft-eng wrote:
> 
> > Y2K impact was overestimated!
> 
> I normally don't respond to trolls, but this was too much.  Go get a 
> list of the banks in business in 1995.  Doesn't have to be complete, for 
> example it could be a list of all banks with federal charters.  Now look 
> at the same list for the year 2000.  Over 90% of the banks from your 
> first list will have disappeared, and not due to name changes.
> 
> The Y2K crisis was underestimated for over a decade, then it started 
> getting the attention it deserved.  The result was a lot of bank mergers 
> to reduce the cost of the software work required.  In the area where I 
> live, one bank, St. Mary's Bank and a couple of credit unions survived. 
>   All the rest eventually merged into other banks.  (In case you care, 
> Bank of New Hampshire was one of those that moved into the area by 
> buying other banks.  I had one checking account which went through five 
> banks and another that went through four during this period, as banks 
> were swallowed by bigger banks, then merged again and again.)

I thought banks merged due to economic issues -- if any
single merger was related to Y2K, it sure wasn't publicized.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-12 13:48                                   ` soft-eng
@ 2003-05-12 14:33                                     ` Preben Randhol
  0 siblings, 0 replies; 186+ messages in thread
From: Preben Randhol @ 2003-05-12 14:33 UTC (permalink / raw)


soft-eng wrote:
> Are you disagreeing that the source of generics
> in Ada was CLU?

Nope

-- 
Preben Randhol                    http://www.pvv.org/~randhol/



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 23:43                               ` Hyman Rosen
  2003-05-11 23:54                                 ` Bill Findlay
@ 2003-05-12 17:23                                 ` Mike Silva
  2003-05-12 18:20                                   ` Stephen Leake
  2003-05-13 11:42                                   ` Marin David Condic
  2003-05-12 18:28                                 ` Larry Kilgallen
  2 siblings, 2 replies; 186+ messages in thread
From: Mike Silva @ 2003-05-12 17:23 UTC (permalink / raw)


Hyman Rosen <hyrosen@mail.com> wrote in message news:<ReBva.27$hX1.18@nwrdny01.gnilink.net>...
> John R. Strohm wrote:
> > Let's see, are you saying we shouldn't eliminate the simple problems because
> > we can't eliminate the hard problems at the same time?
> 
> No. But there very often seems to be a lack of acknowledgement of the
> hard problems. The impression I get from the Ada folks very often is
> that Ada will give you error-free code, or at the very least, errors
> will be detected and reported.

OK, let's just all get ourselves on record.  I'll start:

I, an Ada programmer of sound mind and body, acknowledge that there
are hard problems that Ada does not catch.  I further acknowledge that
Ada will not catch each and every error which I am capable of
committing.  Lastly, I acknowledge that there are many problem types
which Ada is much more competent than I am to catch, and that by using
Ada I subject myself to shorter hours at work and more domestic
tranquility at home, and further that I rarely get to have the best
debugging war stories in the company lunchroom.

Mike



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-12 17:23                                 ` Mike Silva
@ 2003-05-12 18:20                                   ` Stephen Leake
  2003-05-13 11:42                                   ` Marin David Condic
  1 sibling, 0 replies; 186+ messages in thread
From: Stephen Leake @ 2003-05-12 18:20 UTC (permalink / raw)


snarflemike@yahoo.com (Mike Silva) writes:

> OK, let's just all get ourselves on record.  I'll start:
> 
> I, an Ada programmer of sound mind and body, acknowledge that there
> are hard problems that Ada does not catch.  I further acknowledge that
> Ada will not catch each and every error which I am capable of
> committing.  Lastly, I acknowledge that there are many problem types
> which Ada is much more competent than I am to catch, and that by using
> Ada I subject myself to shorter hours at work and more domestic
> tranquility at home, and further that I rarely get to have the best
> debugging war stories in the company lunchroom.

Me too :).

-- 
-- Stephe



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-12  0:49                             ` Robert I. Eachus
@ 2003-05-12 18:23                               ` Stephen Leake
  2003-05-14  5:00                                 ` Robert I. Eachus
  2003-05-13  2:19                               ` John R. Strohm
  1 sibling, 1 reply; 186+ messages in thread
From: Stephen Leake @ 2003-05-12 18:23 UTC (permalink / raw)


"Robert I. Eachus" <rieachus@attbi.com> writes:

> John R. Strohm wrote:
> 
>  >>for I in 0..Number_of_Hands - 1 loop
>  >
> > There is ABSOLUTELY NO EXCUSE in Ada for the above.  Human beings learn to
> > count starting at "one", not "zero".
> 
> >>   Deck: Card_Array(0..51);
> > Same comment.
> 
> Well, excuse me!  I did not write that because I am a closet C
> programmer.  I wrote that in both cases because those values are used
> in mod operations, the deck when initializing cards, the
> Number_of_Hands in determining vulnerability and dealer.  In both
> cases, I could either have expressions like  (I-1) mod 13 + 1, or I
> mod 13.  Guess which I chose.

Ok. But now you are in the solution space, not the problem space :).

Even professors get to be a little inconsistent :).

Perhaps you should write:

function Mod (I : in Card_Index_Type) return Card_Index_Type;

which does what you want.

-- 
-- Stephe



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 23:43                               ` Hyman Rosen
  2003-05-11 23:54                                 ` Bill Findlay
  2003-05-12 17:23                                 ` Mike Silva
@ 2003-05-12 18:28                                 ` Larry Kilgallen
  2 siblings, 0 replies; 186+ messages in thread
From: Larry Kilgallen @ 2003-05-12 18:28 UTC (permalink / raw)


In article <ubry881tb.fsf@nasa.gov>, Stephen Leake <Stephe.Leake@nasa.gov> writes:
> snarflemike@yahoo.com (Mike Silva) writes:
> 
>> OK, let's just all get ourselves on record.  I'll start:
>> 
>> I, an Ada programmer of sound mind and body, acknowledge that there
>> are hard problems that Ada does not catch.  I further acknowledge that
>> Ada will not catch each and every error which I am capable of
>> committing.  Lastly, I acknowledge that there are many problem types
>> which Ada is much more competent than I am to catch, and that by using
>> Ada I subject myself to shorter hours at work and more domestic
>> tranquility at home, and further that I rarely get to have the best
>> debugging war stories in the company lunchroom.
> 
> Me too :).

Me three.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-12  0:49                             ` Robert I. Eachus
  2003-05-12 18:23                               ` Stephen Leake
@ 2003-05-13  2:19                               ` John R. Strohm
  1 sibling, 0 replies; 186+ messages in thread
From: John R. Strohm @ 2003-05-13  2:19 UTC (permalink / raw)


X-A-Notice: References line has been trimed due to 512 byte limitation
Abuse-Reports-To: abuse at airmail.net to report improper postings
NNTP-Proxy-Relay: library2.airnews.net
NNTP-Posting-Time: Mon, 12 May 2003 21:28:17 -0500 (CDT)
NNTP-Posting-Host: !Zm:G1k-VJhXs^b (Encoded at Airnews!)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106


"Robert I. Eachus" <rieachus@attbi.com> wrote in message
news:3EBEEFA0.8060008@attbi.com...
> John R. Strohm wrote:
>
>  >>for I in 0..Number_of_Hands - 1 loop
>  >
> > There is ABSOLUTELY NO EXCUSE in Ada for the above.  Human beings learn
to
> > count starting at "one", not "zero".
>
> >>   Deck: Card_Array(0..51);
> > Same comment.
>
> Well, excuse me!  I did not write that because I am a closet C
> programmer.  I wrote that in both cases because those values are used in
>   mod operations, the deck when initializing cards, the Number_of_Hands
> in determining vulnerability and dealer.  In both cases, I could either
> have expressions like  (I-1) mod 13 + 1, or I mod 13.  Guess which I
chose.

Actually, this one is a bit worse than it appears.  You are assuming that
#(suits)*#(cards in suit) = #(Card_Array).  Change the definition of suits
or cards, to e.g. add a new suit, or maybe add a new denomination, and you
have to remember to change the magic number that represents the number of
elements in the Cartesian product of the two sets.





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-10  2:44                               ` John R. Strohm
  2003-05-11 20:59                                 ` Robert I. Eachus
@ 2003-05-13  3:15                                 ` Dr Chaos
  2003-05-13 14:29                                   ` Robert Spooner
  1 sibling, 1 reply; 186+ messages in thread
From: Dr Chaos @ 2003-05-13  3:15 UTC (permalink / raw)


On Fri, 9 May 2003 21:44:29 -0500, John R. Strohm <strohm@airmail.net> wrote:
> It only takes one such error in commercial code to create a buffer overrun
> vulnerability.  Haven't we seen enough of those?  (Was it Edsger Dijkstra
> who compared testing with subscript checking enabled and running production
> with it disabled to sailing in the harbor with a life jacket and then taking
> the jacket off when you ventured out onto the open ocean?  Maybe it was Tony
> Hoare.  I've sailed on the Pacific, in 10-foot seas as I recall; I have a
> LOT of respect for open ocean.)

But in practical reality bounds checking is usually not a life vest on
the open ocean.  It's an automatic box that sqwacks, "Danger Will
Robinson, Drowning Alert!!!" when the hull is 3/4ths submerged.


Not that I have a problem with it---I hate programming without it



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-11 18:52                         ` Robert I. Eachus
  2003-05-11 20:11                           ` Hyman Rosen
  2003-05-11 21:07                           ` John R. Strohm
@ 2003-05-13  3:21                           ` Dr Chaos
  2 siblings, 0 replies; 186+ messages in thread
From: Dr Chaos @ 2003-05-13  3:21 UTC (permalink / raw)


On Sun, 11 May 2003 18:52:05 GMT, Robert I. Eachus <rieachus@attbi.com> wrote:
> Wesley Groleau wrote:
>> 
>>> I don't know where this notion arose that a "super-strong"
>>> type system is just for preventing bugs. I know that in C++
>> 
>> 
>> I didn't say that it was only for preventing bugs.
>> I said it's a crock that it requires programmers
>> to do a lot of allegedly unnecessary workarounds.
>> 
>> For me, preventing bugs is the second biggest benefit
>> of Ada's type system.  The bigger one is that it
>> allows you to define things in terms of your
>> abstraction instead of your implementation.
> 
> I think my first deep insight into the implications of Ada programming 
> came in 1983, just after Ada 83 became an ANSI standard.  I told someone 
> working on our (Ada) compiler: "No, in Ada you model the problem space, 
> not the solution space."  I then excused myself for a minute to write it 
> on my office whiteboard.

That's nice, but I can model an eigenvalue problem space just fine.

Doesn't do squat to finding a numerically stable algorithmic solver. 




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-12 13:43                                               ` soft-eng
@ 2003-05-13  3:25                                                 ` Dr Chaos
  2003-05-13 17:30                                                   ` soft-eng
  0 siblings, 1 reply; 186+ messages in thread
From: Dr Chaos @ 2003-05-13  3:25 UTC (permalink / raw)


On 12 May 2003 06:43:34 -0700, soft-eng <softeng3456@netscape.net> wrote:
> Dr Chaos <mbkennelSPAMBEGONE@NOSPAMyahoo.com> wrote in message news:<slrnbbof6r.6ep.mbkennelSPAMBEGONE@lyapunov.ucsd.edu>...
> 
>> Here is one key example.  VMS didn't have a shell where actual
>> ordinary users could write programs which functioned like the built in
>> ones.  It was "RUN MY_USER_PROGRAM" versus the huge hairball of "SHOW
>> THIS/THAT" or "SET THIS TO THAT".
>> 
>> If you wanted to have your own software work like that it was a huge
>> rigamarole poring through one of the 20 or 30 orange covered
>> notebooks.
>> 
>> Unix had argc and argv, and a simple library that you didn't even
>> need to use if you didn't want to.
>> 
>> It was like Alexander cutting the Gordian knot. 
>> 
>> DCL was completely cognitively opaque.  What exactly was it doing, what
>> programs is it running when?
>> 
>> Unix was dumb, and smart at the same time.
>> 
>> Simply: 
>> 
>>       Unix *felt* like freedom.  
>>       VMS didn't.
>> 
> 
> A lot of people felt the same way about C vs Pascal/Ada style languages!

With Pascal they were right: it is too constraining.

With Ada they were wrong.

>Even so,
> C *felt* like freedom.

Compared to Pascal--which was only intended as a pedagogical language---it was.

Pascal was not the only other language ever invented. 

> Because the strong type-checking of today's C-family languages
> has evolved rather than been dictated, it has had to retain
> that freedom.

that's a nice way of saying it's full of cruft. 



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-09 23:41                                             ` Dr Chaos
  2003-05-12 13:43                                               ` soft-eng
@ 2003-05-13 10:36                                               ` Larry Kilgallen
       [not found]                                               ` <9fa75d42.03051205Followup-To: comp.lang.ada <zhA3ybPlX6cW@eisner.encompasserve.org>
  2 siblings, 0 replies; 186+ messages in thread
From: Larry Kilgallen @ 2003-05-13 10:36 UTC (permalink / raw)


In article <slrnbc0pdt.1o8.mbkennelSPAMBEGONE@lyapunov.ucsd.edu>, Dr Chaos <mbkennelSPAMBEGONE@NOSPAMyahoo.com> writes:
> On 12 May 2003 06:43:34 -0700, soft-eng <softeng3456@netscape.net> wrote:
>> Dr Chaos <mbkennelSPAMBEGONE@NOSPAMyahoo.com> wrote in message news:<slrnbbof6r.6ep.mbkennelSPAMBEGONE@lyapunov.ucsd.edu>...
>> 
>>> Here is one key example.  VMS didn't have a shell where actual
>>> ordinary users could write programs which functioned like the built in
>>> ones.  It was "RUN MY_USER_PROGRAM" versus the huge hairball of "SHOW
>>> THIS/THAT" or "SET THIS TO THAT".

It is too bad you missed the SET COMMAND documentation, but that is not
really our fault, is it.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-12 17:23                                 ` Mike Silva
  2003-05-12 18:20                                   ` Stephen Leake
@ 2003-05-13 11:42                                   ` Marin David Condic
  2003-05-15 18:18                                     ` Robert I. Eachus
  1 sibling, 1 reply; 186+ messages in thread
From: Marin David Condic @ 2003-05-13 11:42 UTC (permalink / raw)


I agree and would add this personal observation: In one job incarnation I
programmed in Ada for 10 years and NOT ONCE did I ever have to turn on the
debugger.(O.K. Maybe an occasional Put_Line statement, but NO DEBUGGER!) I
left to join another company that had its main product in MSVC++. The
debugger instantly became a WAY OF LIFE.

Granted, this is anecdotal and may have a lot to do with issues of style,
etc., but I doubt I am the only one with such a story. I also wouldn't
suggest that Ada compilers should not provide debuggers or that they are
never necessary. I would only claim that I have seen far less need for
debuggers with Ada than with C or C++

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

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

    "Going cold turkey isn't as delicious as it sounds."
        -- H. Simpson
======================================================================

Mike Silva <snarflemike@yahoo.com> wrote in message
news:20619edc.0305120923.1ccfa3be@posting.google.com...
>
> OK, let's just all get ourselves on record.  I'll start:
>
> I, an Ada programmer of sound mind and body, acknowledge that there
> are hard problems that Ada does not catch.  I further acknowledge that
> Ada will not catch each and every error which I am capable of
> committing.  Lastly, I acknowledge that there are many problem types
> which Ada is much more competent than I am to catch, and that by using
> Ada I subject myself to shorter hours at work and more domestic
> tranquility at home, and further that I rarely get to have the best
> debugging war stories in the company lunchroom.
>
> Mike





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-13  3:15                                 ` Dr Chaos
@ 2003-05-13 14:29                                   ` Robert Spooner
  2003-05-13 14:46                                     ` James S. Rogers
  0 siblings, 1 reply; 186+ messages in thread
From: Robert Spooner @ 2003-05-13 14:29 UTC (permalink / raw)
  To: Dr Chaos



Dr Chaos wrote:
> On Fri, 9 May 2003 21:44:29 -0500, John R. Strohm <strohm@airmail.net> wrote:
> 
> 
> But in practical reality bounds checking is usually not a life vest on
> the open ocean.  It's an automatic box that sqwacks, "Danger Will
> Robinson, Drowning Alert!!!" when the hull is 3/4ths submerged.
> 
> 
> Not that I have a problem with it---I hate programming without it

Actually, bounds checking tells you to fix the leak before you leave the 
harbor.
Bob
-- 
                             Robert L. Spooner
                      Registered Professional Engineer
                        Associate Research Engineer
                   Intelligent Control Systems Department

          Applied Research Laboratory        Phone: (814) 863-4120
          The Pennsylvania State University  FAX:   (814) 863-7841
          P. O. Box 30
          State College, PA 16804-0030       rls19@psu.edu




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-13 14:29                                   ` Robert Spooner
@ 2003-05-13 14:46                                     ` James S. Rogers
  0 siblings, 0 replies; 186+ messages in thread
From: James S. Rogers @ 2003-05-13 14:46 UTC (permalink / raw)


"Robert Spooner" <rls19@psu.edu> wrote in message
news:3EC10141.7070000@psu.edu...
>
>
> Dr Chaos wrote:
> > On Fri, 9 May 2003 21:44:29 -0500, John R. Strohm <strohm@airmail.net>
wrote:
> >
> >
> > But in practical reality bounds checking is usually not a life vest on
> > the open ocean.  It's an automatic box that sqwacks, "Danger Will
> > Robinson, Drowning Alert!!!" when the hull is 3/4ths submerged.
> >
> >
> > Not that I have a problem with it---I hate programming without it
>
> Actually, bounds checking tells you to fix the leak before you leave the
> harbor.

In theory only.

In practice, the only way to detect bounds checking errors in C is to
either carefully inspect the code for all such errors, or test test test
test.
Of those two choices code inspection is the most efficient solution.
In either case there is a strong likelyhood that you will miss one or two
subtle conditions that cause array bounds violations.

Using a language with array bounds checking built in means that
detection is automatic at run time. Using the Ada approach, where
you must clearly define the array index range to the compiler, most
bounds violations are caught at compile time.

With Ada you fix the leak before leaving the ship yard.

Jim Rogers





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-13  3:25                                                 ` Dr Chaos
@ 2003-05-13 17:30                                                   ` soft-eng
  2003-05-13 22:19                                                     ` Dr Chaos
  0 siblings, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-05-13 17:30 UTC (permalink / raw)


Dr Chaos <mbkennelSPAMBEGONE@NOSPAMyahoo.com> wrote in message news:<slrnbc0pdt.1o8.mbkennelSPAMBEGONE@lyapunov.ucsd.edu>...

> > Because the strong type-checking of today's C-family languages
> > has evolved rather than been dictated, it has had to retain
> > that freedom.
> 
> that's a nice way of saying it's full of cruft.

So should we assume what you said earlier about Unix,
was a nice way of saying it's full of cruft?



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
       [not found]                                               ` <9fa75d42.03051205Followup-To: comp.lang.ada <zhA3ybPlX6cW@eisner.encompasserve.org>
@ 2003-05-13 20:53                                                 ` Simon Wright
  0 siblings, 0 replies; 186+ messages in thread
From: Simon Wright @ 2003-05-13 20:53 UTC (permalink / raw)


Kilgallen@SpamCop.net (Larry Kilgallen) writes:

> In article <slrnbc0pdt.1o8.mbkennelSPAMBEGONE@lyapunov.ucsd.edu>, Dr Chaos <mbkennelSPAMBEGONE@NOSPAMyahoo.com> writes:
> > On 12 May 2003 06:43:34 -0700, soft-eng <softeng3456@netscape.net> wrote:
> >> Dr Chaos <mbkennelSPAMBEGONE@NOSPAMyahoo.com> wrote in message news:<slrnbbof6r.6ep.mbkennelSPAMBEGONE@lyapunov.ucsd.edu>...
> >> 
> >>> Here is one key example.  VMS didn't have a shell where actual
> >>> ordinary users could write programs which functioned like the built in
> >>> ones.  It was "RUN MY_USER_PROGRAM" versus the huge hairball of "SHOW
> >>> THIS/THAT" or "SET THIS TO THAT".
> 
> It is too bad you missed the SET COMMAND documentation, but that is not
> really our fault, is it.

Most of my work used the "foreign command" feature (and continues to
do so, last updated in 1985 I think! That was a mix of Fortran,
Pascal, Macro & DCL ...)



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-13 17:30                                                   ` soft-eng
@ 2003-05-13 22:19                                                     ` Dr Chaos
  2003-05-14 12:53                                                       ` soft-eng
  0 siblings, 1 reply; 186+ messages in thread
From: Dr Chaos @ 2003-05-13 22:19 UTC (permalink / raw)


On 13 May 2003 10:30:08 -0700, soft-eng <softeng3456@netscape.net> wrote:
> Dr Chaos <mbkennelSPAMBEGONE@NOSPAMyahoo.com> wrote in message news:<slrnbc0pdt.1o8.mbkennelSPAMBEGONE@lyapunov.ucsd.edu>...
> 
>> > Because the strong type-checking of today's C-family languages
>> > has evolved rather than been dictated, it has had to retain
>> > that freedom.
>> 
>> that's a nice way of saying it's full of cruft.
> 
> So should we assume what you said earlier about Unix,
> was a nice way of saying it's full of cruft?

well it is, but I think it's aged and evolved somewhat
better than C, except for the fact that you can STILL only
really call system facilities except by parsing and calling
literal C-language files. 

Those things about Unix which were intentionally designed
in as a major important concept (inodes!) are still great.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-12  0:47                             ` Dave Thompson
@ 2003-05-14  3:25                               ` Robert I. Eachus
  2003-05-14  5:19                                 ` Preben Randhol
  2003-05-22  6:30                                 ` Dave Thompson
  0 siblings, 2 replies; 186+ messages in thread
From: Robert I. Eachus @ 2003-05-14  3:25 UTC (permalink / raw)


Dave Thompson wrote:

> Not quite.  Ada Get_Line is much closer to C fgets, 
> although it does store the newline character (if it fits) 
> and you must often deal with removing it, and it does 
> not return the length explicitly (you must strlen for it).

There are three errors here.  The first is a category error.  The 
description of Ada.Text_IO.Get was just to show that in Ada, you can 
never have a buffer overflow error.  (Unless of course you go very far 
out of your way to specifically program one.  It can be done, but many 
Ada programmer don't know how, and most Ada programmers would consider 
going out of your way to construct an Ada program that had a potential 
buffer overflow not as a challenge, but as a kind of pornography.

The second error is technical. If an Ada program copies a newline 
character as part of a Get, that is an error.  If the type of the text 
file was incorrectly specified, for example as one where LF (linefeed) 
is the representation of end of line, instead of CR LF, then you will 
read a CR character.  This occasionally used to happen when people 
ported files between Windows and Unix.  I think now thought that all Ada 
compilers accept any combination of CR and LF as end of line, while 
using the appropriate end of line marker for that system when writing 
text files.

Finally, in Ada the only cases where you need to call strlen is when 
converting a C or C++ string to an Ada String.  In Ada the name of the 
length of the string named Foo is Foo'Length.  But it is an explict 
property of the string, just like Foo'First and Foo'Last.  (Most Ada 
compilers only store two of the three attributes as part of the 
representation of a dynamic string. (A string whose length is not known 
at compile time.)  But that is an implementation detail.

The whole point here is that an Ada programmer never worries about the 
length of a string or the any of the implicit checking that needs to be 
explicit in C.  In fact in Ada 95 there are several library packages 
defined to make it easier to create string objects with different 
properties.  The objects of the standard String type have their 
attributes determined when the object is created.  The values of the 
String type can be of any size or bounds.  (Well subject to 
X'Last-X'First+1 = X'Length.)  However there is an explicit type 
Ada.Strings.Unbounded.Unbounded_String, which can store different length 
strings. (Yes, you can rename it if you want to use it. ;-) This is 
handy if you want to create "ragged" arrays of strings, or to  have a 
library level string object whose length changes.

There is also a Bounded_String type which corresponds to the PL/I char * 
varying, or what most C programmers thing that buffers are like.  (But 
assigning to long a string to a Bounded_String will cause an error. If 
you don't know what the limit should be, or can't figure out how to 
handle the exception, use Unbounded_String instead.)





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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-12 18:23                               ` Stephen Leake
@ 2003-05-14  5:00                                 ` Robert I. Eachus
  0 siblings, 0 replies; 186+ messages in thread
From: Robert I. Eachus @ 2003-05-14  5:00 UTC (permalink / raw)


Stephen Leake wrote:

> Ok. But now you are in the solution space, not the problem space :).
> Even professors get to be a little inconsistent :). 
> Perhaps you should write: 
> function Mod (I : in Card_Index_Type) return Card_Index_Type;
> which does what you want.

First of all I would have to define:

    function "Mod" (I : Card_Index_Type) return Card_Index_Type;

But I found the existing "mod" operator to be perfectly fine.  However, 
what you are missing is the deeper truth that for enties that have this 
sort of behavior are best represented as modular types.  If I had been 
able to write the program in Ada 95--this was written while working on 
the Ada 9X standard--I could have written:

type Card_Index_Type is mod 52;

Deck: array (Card_Index_Type) of Card;

Would that make you happier?






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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-14  3:25                               ` Robert I. Eachus
@ 2003-05-14  5:19                                 ` Preben Randhol
  2003-05-22  6:30                                 ` Dave Thompson
  1 sibling, 0 replies; 186+ messages in thread
From: Preben Randhol @ 2003-05-14  5:19 UTC (permalink / raw)


Robert I. Eachus wrote:
> There are three errors here.  The first is a category error.  The 
> description of Ada.Text_IO.Get was just to show that in Ada, you can 
> never have a buffer overflow error.  (Unless of course you go very far 
> out of your way to specifically program one.  It can be done, but many 
> Ada programmer don't know how, and most Ada programmers would consider 
> going out of your way to construct an Ada program that had a potential 
> buffer overflow not as a challenge, but as a kind of pornography.

Excellent quote :-)

-- 
Preben Randhol                    http://www.pvv.org/~randhol/



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-13 22:19                                                     ` Dr Chaos
@ 2003-05-14 12:53                                                       ` soft-eng
  2003-05-14 14:55                                                         ` Preben Randhol
  0 siblings, 1 reply; 186+ messages in thread
From: soft-eng @ 2003-05-14 12:53 UTC (permalink / raw)


Dr Chaos <mbkennelSPAMBEGONE@NOSPAMyahoo.com> wrote in message news:<slrnbc2rr1.djv.mbkennelSPAMBEGONE@lyapunov.ucsd.edu>...
> On 13 May 2003 10:30:08 -0700, soft-eng <softeng3456@netscape.net> wrote:
> > Dr Chaos <mbkennelSPAMBEGONE@NOSPAMyahoo.com> wrote in message news:<slrnbc0pdt.1o8.mbkennelSPAMBEGONE@lyapunov.ucsd.edu>...
> > 
> >> > Because the strong type-checking of today's C-family languages
> >> > has evolved rather than been dictated, it has had to retain
> >> > that freedom.
> >> 
> >> that's a nice way of saying it's full of cruft.
> > 
> > So should we assume what you said earlier about Unix,
> > was a nice way of saying it's full of cruft?
> 
> well it is, but I think it's aged and evolved somewhat
> better than C, except for the fact that you can STILL only
> really call system facilities except by parsing and calling
> literal C-language files. 
> 
> Those things about Unix which were intentionally designed
> in as a major important concept (inodes!) are still great.

I liked both Unix and C, but I see it very differently.

Unix, once the forefront of operating system thought,
is now obsolete.  It has not evolved at all.
It is merely being kept alive as a zombie
by Linux and GNU.

C is the one that's evolved into C++, C#, Java.



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-14 12:53                                                       ` soft-eng
@ 2003-05-14 14:55                                                         ` Preben Randhol
  2003-05-14 22:56                                                           ` Thant Tessman
  0 siblings, 1 reply; 186+ messages in thread
From: Preben Randhol @ 2003-05-14 14:55 UTC (permalink / raw)


soft-eng wrote:
> Unix, once the forefront of operating system thought,
> is now obsolete. 

I bet your real name is Steve Ballmer.

-- 
Preben Randhol                    http://www.pvv.org/~randhol/



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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-14 14:55                                                         ` Preben Randhol
@ 2003-05-14 22:56                                                           ` Thant Tessman
  0 siblings, 0 replies; 186+ messages in thread
From: Thant Tessman @ 2003-05-14 22:56 UTC (permalink / raw)


Preben Randhol wrote:
> soft-eng wrote:
> 
>>Unix, once the forefront of operating system thought,
>>is now obsolete. 
> 
> 
> I bet your real name is Steve Ballmer.
> 

He he! It's the only explanation for such an absurd statement. Unix was 
never the forefront, and the only popular alternative is worse!

-thant




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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-13 11:42                                   ` Marin David Condic
@ 2003-05-15 18:18                                     ` Robert I. Eachus
  0 siblings, 0 replies; 186+ messages in thread
From: Robert I. Eachus @ 2003-05-15 18:18 UTC (permalink / raw)


Marin David Condic wrote:
> I agree and would add this personal observation: In one job incarnation I
> programmed in Ada for 10 years and NOT ONCE did I ever have to turn on the
> debugger.(O.K. Maybe an occasional Put_Line statement, but NO DEBUGGER!) I
> left to join another company that had its main product in MSVC++. The
> debugger instantly became a WAY OF LIFE.
> 
> Granted, this is anecdotal and may have a lot to do with issues of style,
> etc., but I doubt I am the only one with such a story. I also wouldn't
> suggest that Ada compilers should not provide debuggers or that they are
> never necessary. I would only claim that I have seen far less need for
> debuggers with Ada than with C or C++

I certainly agree.  I was thinking that I could probably count the 
number of times I have used a debugger with Ada on the fingers of one 
hand, and that included development work on several Ada compilers during 
the past 20+ years.  Sticking in Put_Lines, at least in my case probably 
doesn't count.  Because I do a lot of simulation and random number 
generation work, the Put_Line statements are often part of the original 
code for validation purposes, then turned off via pragma Debug for 
normal use.






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

* Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)
  2003-05-14  3:25                               ` Robert I. Eachus
  2003-05-14  5:19                                 ` Preben Randhol
@ 2003-05-22  6:30                                 ` Dave Thompson
  1 sibling, 0 replies; 186+ messages in thread
From: Dave Thompson @ 2003-05-22  6:30 UTC (permalink / raw)


On Wed, 14 May 2003 03:25:03 GMT, "Robert I. Eachus"
<rieachus@attbi.com> wrote:

> Dave Thompson wrote:
> 
> > Not quite.  Ada Get_Line is much closer to C fgets, 
> > although it does store the newline character (if it fits) 
> > and you must often deal with removing it, and it does 
> > not return the length explicitly (you must strlen for it).
> 
Apparently my antecedent wasn't clear, sorry.

> There are three errors here.  The first is a category error.  The 
> description of Ada.Text_IO.Get was just to show that in Ada, you can 
> never have a buffer overflow error.  (Unless of course you go very far 
> out of your way to specifically program one.  It can be done, but many 
> Ada programmer don't know how, and most Ada programmers would consider 
> going out of your way to construct an Ada program that had a potential 
> buffer overflow not as a challenge, but as a kind of pornography.
> 
Yes, Ada protects against overrun unless deliberately and
inconveniently overridden, as I agreed in a part you didn't quote.
And I did and do agree that was the important point.

> The second error is technical. If an Ada program copies a newline 
> character as part of a Get, that is an error.  If the type of the text 
> file was incorrectly specified, for example as one where LF (linefeed) 
> is the representation of end of line, instead of CR LF, then you will 
> read a CR character.  This occasionally used to happen when people 
> ported files between Windows and Unix.  I think now thought that all Ada 
> compilers accept any combination of CR and LF as end of line, while 
> using the appropriate end of line marker for that system when writing 
> text files.
> 
Other way.  Ada Get_Line does not store anything for end-of-line, 
assuming it is recognized correctly as you allude to.  If it matters 
whether you got a complete line, and it usually does, you must 
determine by whether the count hit the limit.  C fgets *does* 
store the (single, but otherwise implementation-defined) character
'\n' for a recognized (perhaps implementation-dependent) end-of-line.
In the fairly common case you don't want the \n in your string, 
you have to explicitly delete it, or exclude from a copy operation.

> Finally, in Ada the only cases where you need to call strlen is when 
> converting a C or C++ string to an Ada String.  In Ada the name of the 
> length of the string named Foo is Foo'Length.  But it is an explict 
> property of the string, just like Foo'First and Foo'Last.  (Most Ada 
> compilers only store two of the three attributes as part of the 
> representation of a dynamic string. (A string whose length is not known 
> at compile time.)  But that is an implementation detail.
> 
Again I meant C:  fgets does not return the length of the read data 
explicitly (nor is it an attribute of the buffer variable) so *if* you
need the length, which is not always, you must call strlen (or equal).
Agree that in Ada you don't need to do that except for C  interfacing
in which case the canonical way is Interfaces.C.Strings.Value which
actually does strlen but type-safely; or some weird I/O.

> The whole point here is that an Ada programmer never worries about the 
> length of a string or the any of the implicit checking that needs to be 
> explicit in C.  In fact in Ada 95 [Bounded_String and Unbounded_String]

Agreed.  I was only correcting and somewhat expanding your example.

- David.Thompson1 at worldnet.att.net



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

end of thread, other threads:[~2003-05-22  6:30 UTC | newest]

Thread overview: 186+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-25 14:26 Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died) Lionel.DRAGHI
  -- strict thread matches above, loose matches on Subject: below --
2003-05-02  9:53 Lionel.DRAGHI
2003-04-23 12:24 the Ada mandate, and why it collapsed and died (was): 64 bit addressing and OOP soft-eng
2003-04-23 17:18 ` tmoran
2003-04-24 12:46   ` soft-eng
2003-04-24 13:04     ` Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died) Jacob Sparre Andersen
2003-04-24 17:50       ` soft-eng
2003-04-24 18:37         ` tmoran
2003-04-24 19:11         ` Robert Spooner
2003-04-25 13:01           ` soft-eng
2003-04-25 14:02             ` Larry Kilgallen
2003-04-24 20:10         ` Larry Kilgallen
2003-04-25 17:22           ` soft-eng
2003-04-25 18:24             ` Chad R. Meiners
2003-04-24 23:30         ` Kaz Kylheku
2003-04-27  1:53           ` Frank J. Lhota
2003-04-25  7:46         ` Dmitry A. Kazakov
2003-04-30  3:09         ` Will
2003-04-30  6:13           ` John R. Strohm
2003-04-30 12:31             ` Will
2003-04-30 17:17               ` Chad R. Meiners
2003-05-01  3:37                 ` Will
2003-05-01  3:56                   ` Chad R. Meiners
2003-05-01 12:21                   ` Marin David Condic
2003-05-01 15:16                     ` Wesley Groleau
2003-05-02  4:15                     ` Will
2003-05-02 13:57                       ` Chad R. Meiners
2003-05-02 16:15                         ` Mark
2003-05-03  3:13                         ` Will
2003-05-03  4:24                           ` Chad R. Meiners
     [not found]               ` <fhm6o-3u2.ln1@beastie.ix.netcom.com>
2003-05-01 15:53                 ` Robert A Duff
2003-05-02  1:17               ` Richard Riehle
2003-04-30 16:35             ` Kaz Kylheku
2003-04-30 17:22               ` Frank J. Lhota
2003-05-01 19:03                 ` Kaz Kylheku
2003-05-02  8:26                   ` Dmitry A. Kazakov
2003-04-30 20:15               ` John R. Strohm
2003-05-01 14:21                 ` soft-eng
2003-05-01 15:22                   ` Wesley Groleau
2003-05-01 15:56                     ` Hyman Rosen
2003-05-02  3:15                       ` James S. Rogers
2003-05-02  3:24                       ` Wesley Groleau
2003-05-11 18:52                         ` Robert I. Eachus
2003-05-11 20:11                           ` Hyman Rosen
2003-05-11 21:09                             ` John R. Strohm
2003-05-11 23:43                               ` Hyman Rosen
2003-05-11 23:54                                 ` Bill Findlay
2003-05-12 17:23                                 ` Mike Silva
2003-05-12 18:20                                   ` Stephen Leake
2003-05-13 11:42                                   ` Marin David Condic
2003-05-15 18:18                                     ` Robert I. Eachus
2003-05-12 18:28                                 ` Larry Kilgallen
2003-05-11 21:57                             ` Robert I. Eachus
2003-05-12  0:06                               ` Hyman Rosen
2003-05-12  1:04                                 ` Robert I. Eachus
2003-05-12  3:53                                 ` Wesley Groleau
2003-05-11 23:33                             ` Wesley Groleau
2003-05-11 23:51                               ` Hyman Rosen
2003-05-12  8:40                                 ` Preben Randhol
     [not found]                               ` <bqj3p-t23.ln1@beastie.ix.netcom.com>
2003-05-12  5:04                                 ` Wesley Groleau
2003-05-11 23:50                             ` Bill Findlay
2003-05-12  8:18                             ` Preben Randhol
2003-05-11 21:07                           ` John R. Strohm
2003-05-12  0:49                             ` Robert I. Eachus
2003-05-12 18:23                               ` Stephen Leake
2003-05-14  5:00                                 ` Robert I. Eachus
2003-05-13  2:19                               ` John R. Strohm
2003-05-13  3:21                           ` Dr Chaos
2003-05-01 18:35                   ` Marc A. Criley
2003-05-01 20:49                     ` Robert A Duff
2003-05-02  1:27                     ` soft-eng
2003-05-02  3:05                       ` John R. Strohm
2003-05-02 13:07                         ` soft-eng
2003-05-02 13:14                           ` Martin Dowie
2003-05-02 14:23                           ` Chad R. Meiners
2003-05-02 17:27                           ` Richard Riehle
2003-05-02 21:20                           ` Tom Welsh
2003-05-04 13:09                             ` Bill Findlay
2003-05-03  4:09                           ` Dr Chaos
2003-05-02  3:30                       ` James S. Rogers
2003-05-02 13:16                         ` soft-eng
2003-05-02 14:28                           ` Chad R. Meiners
2003-05-02 17:35                           ` Richard Riehle
2003-05-02 21:23                           ` Tom Welsh
2003-05-02 22:18                           ` Jim Rogers
2003-05-03  4:07                             ` Dr Chaos
2003-05-06 13:21                             ` soft-eng
2003-05-06 19:03                               ` Jim Rogers
2003-05-07 13:04                                 ` soft-eng
2003-05-07 14:05                                   ` Preben Randhol
2003-05-07 17:29                                     ` soft-eng
2003-05-07 19:37                                       ` Mark Thornton
2003-05-08 13:48                                         ` soft-eng
2003-05-08 15:46                                           ` Thant Tessman
2003-05-09  3:37                                             ` Wesley Groleau
2003-05-09  7:23                                               ` Marshall Spight
2003-05-09 13:14                                                 ` soft-eng
2003-05-09 12:31                                               ` soft-eng
2003-05-10  4:57                                                 ` Tim Ottinger
2003-05-11 19:24                                                   ` Robert I. Eachus
2003-05-12  9:51                                                   ` Leif Roar Moldskred
2003-05-09 15:09                                               ` Thant Tessman
2003-05-07 22:58                                       ` Dr Chaos
2003-05-08 14:06                                         ` soft-eng
2003-05-08 17:57                                           ` Dr Chaos
2003-05-08 18:20                                           ` tmoran
2003-05-09 13:22                                             ` soft-eng
2003-05-11 20:12                                               ` Richard Riehle
2003-05-11 20:24                                                 ` Hyman Rosen
2003-05-08 23:16                                           ` John R. Strohm
2003-05-09 12:24                                             ` soft-eng
2003-05-09 16:03                                               ` John R. Strohm
2003-05-09 16:28                                                 ` John R. Strohm
2003-05-09 23:45                                                   ` soft-eng
2003-05-10  2:32                                                     ` John R. Strohm
2003-05-10  4:24                                                   ` Jim Weirich
2003-05-08 12:29                                       ` Marin David Condic
2003-05-08 20:22                                         ` soft-eng
2003-05-08 21:33                                           ` Robert A Duff
2003-05-08 23:21                                           ` John R. Strohm
2003-05-09  8:30                                           ` Tom Welsh
2003-05-09 13:18                                             ` soft-eng
2003-05-09 15:01                                               ` Tom Welsh
2003-05-09 23:41                                             ` Dr Chaos
2003-05-12 13:43                                               ` soft-eng
2003-05-13  3:25                                                 ` Dr Chaos
2003-05-13 17:30                                                   ` soft-eng
2003-05-13 22:19                                                     ` Dr Chaos
2003-05-14 12:53                                                       ` soft-eng
2003-05-14 14:55                                                         ` Preben Randhol
2003-05-14 22:56                                                           ` Thant Tessman
2003-05-13 10:36                                               ` Larry Kilgallen
     [not found]                                               ` <9fa75d42.03051205Followup-To: comp.lang.ada <zhA3ybPlX6cW@eisner.encompasserve.org>
2003-05-13 20:53                                                 ` Simon Wright
2003-05-08 14:34                                       ` Preben Randhol
2003-05-08 17:58                                         ` Dr Chaos
2003-05-07 16:33                                   ` Wesley Groleau
2003-05-07 18:48                                   ` Jim Rogers
2003-05-07 19:09                                   ` Gautier
2003-05-07 22:45                                   ` Dr Chaos
2003-05-02 12:57                       ` Marc A. Criley
2003-05-02 18:55                         ` Hyman Rosen
2003-05-09 14:57                           ` soft-eng
2003-05-09 15:44                             ` Hyman Rosen
2003-05-10 17:17                               ` soft-eng
2003-05-12  8:06                                 ` Preben Randhol
2003-05-12 13:48                                   ` soft-eng
2003-05-12 14:33                                     ` Preben Randhol
2003-05-08  5:14                       ` Gautier
2003-05-09 14:12                         ` soft-eng
2003-05-09 14:33                           ` Vinzent Hoefler
2003-05-09 14:38                           ` Frank J. Lhota
2003-05-09 16:09                           ` John R. Strohm
2003-05-09 23:49                             ` soft-eng
2003-05-10  2:44                               ` John R. Strohm
2003-05-11 20:59                                 ` Robert I. Eachus
2003-05-11 22:24                                   ` Shayne Wissler
2003-05-13  3:15                                 ` Dr Chaos
2003-05-13 14:29                                   ` Robert Spooner
2003-05-13 14:46                                     ` James S. Rogers
2003-05-10 10:49                               ` Dale Stanbrough
2003-05-09 16:23                           ` Wesley Groleau
2003-05-09 18:52                           ` Jim Rogers
2003-05-12  0:47                             ` Dave Thompson
2003-05-14  3:25                               ` Robert I. Eachus
2003-05-14  5:19                                 ` Preben Randhol
2003-05-22  6:30                                 ` Dave Thompson
2003-05-09 19:27                           ` Marc A. Criley
2003-05-10 14:09                             ` Marin David Condic
2003-05-10 17:37                               ` soft-eng
2003-05-10 18:00                                 ` Vinzent Hoefler
2003-05-09 22:32                           ` Gautier
2003-05-01 19:29                   ` Gautier
2003-05-09 13:36                     ` soft-eng
2003-05-09 16:14                       ` John R. Strohm
2003-05-09 17:46                       ` soft-eng
2003-05-10  8:40                         ` Preben Randhol
2003-05-10  8:30                       ` Preben Randhol
2003-05-10 17:35                         ` soft-eng
2003-05-12  8:16                           ` Preben Randhol
2003-05-01 19:44                   ` Dr Chaos
2003-05-02 12:29                   ` Marin David Condic
2003-05-09 17:37                     ` soft-eng
2003-05-10  6:56                       ` Tom Welsh
2003-05-10 14:51                         ` Marin David Condic
2003-05-10 17:27                         ` soft-eng
2003-05-11  1:36                           ` John R. Strohm
2003-05-11 22:13                           ` Robert I. Eachus
2003-05-12 13:51                             ` soft-eng
2003-05-10 14:36                       ` Marin David Condic

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