comp.lang.ada
 help / color / mirror / Atom feed
* Ada folks need to talk to C++ folks more
@ 2012-07-30 19:45 wrp
  2012-07-30 20:34 ` Simon Wright
  2012-07-31  0:59 ` Nasser M. Abbasi
  0 siblings, 2 replies; 10+ messages in thread
From: wrp @ 2012-07-30 19:45 UTC (permalink / raw)


As I learn Ada, I have also been reading about C++ to better
understand by contrast the capabilities and design issues. You can't
spend much time listening to C++ coders without noticing that a lot of
them really don't like the language. Their rants generally go like,
"Even though we hate C++, we need feature X, and since no other
language has it, we're stuck." Generally, the only remotely plausible
alternatives they see are C# and Java.

Well, I think most of time, feature X is actually in Ada. The trouble
is, I never see Ada mentioned in these discussions. I hope here to
prompt people to contribute to these C++ discussions, if not to
promote Ada, then at least to educate C++ users on alternatives.

To get an idea of the kind of complaints people make, this page has a
lot of quotes from famous coders about C++:

http://gigamonkeys.wordpress.com/2009/10/16/coders-c-plus-plus/

Getting to discussion about specifics, this blog post drew a lot of
comments from the game industry:

http://www.rachelslabnotes.com/2009/10/the-hidden-cost-of-c/

The gist of the comments is that only C++ has the combination of:
    1. Support for both programming in the large and low-level
control. (Ada has)
    2. Powerful tool support. (Is GNAT good enough?)
    3. Extensive useful libraries. (Depends on the field, but how
close is Ada?)

A recent discussion on undefined behavior with exceptions would have
benefitted a lot from description of the Ada approach:

http://www.250bpm.com/blog:4



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

* Re: Ada folks need to talk to C++ folks more
  2012-07-30 19:45 Ada folks need to talk to C++ folks more wrp
@ 2012-07-30 20:34 ` Simon Wright
  2012-07-31  0:10   ` wrp
  2012-07-31  0:59 ` Nasser M. Abbasi
  1 sibling, 1 reply; 10+ messages in thread
From: Simon Wright @ 2012-07-30 20:34 UTC (permalink / raw)


wrp <i3text@gmail.com> writes:

> A recent discussion on undefined behavior with exceptions would have
> benefitted a lot from description of the Ada approach:
>
> http://www.250bpm.com/blog:4

You get the impression that the author's model of how to use exceptions
is somehow broken; I think he'd (mis)use exceptions the same way in Ada!



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

* Re: Ada folks need to talk to C++ folks more
  2012-07-30 20:34 ` Simon Wright
@ 2012-07-31  0:10   ` wrp
  0 siblings, 0 replies; 10+ messages in thread
From: wrp @ 2012-07-31  0:10 UTC (permalink / raw)


On Jul 30, 1:34 pm, Simon Wright <si...@pushface.org> wrote:
> wrp <i3t...@gmail.com> writes:
> >http://www.250bpm.com/blog:4
>
> You get the impression that the author's model of how to use exceptions
> is somehow broken; I think he'd (mis)use exceptions the same way in Ada!

That leads to the question of how many "language" issues are really
"coder" issues.



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

* Re: Ada folks need to talk to C++ folks more
  2012-07-30 19:45 Ada folks need to talk to C++ folks more wrp
  2012-07-30 20:34 ` Simon Wright
@ 2012-07-31  0:59 ` Nasser M. Abbasi
  2012-07-31  6:08   ` wrp
  1 sibling, 1 reply; 10+ messages in thread
From: Nasser M. Abbasi @ 2012-07-31  0:59 UTC (permalink / raw)


On 7/30/2012 2:45 PM, wrp wrote:

>
> The gist of the comments is that only C++ has the combination of:
>      1. Support for both programming in the large and low-level
> control. (Ada has)
>      2. Powerful tool support. (Is GNAT good enough?)
>      3. Extensive useful libraries. (Depends on the field, but how
> close is Ada?)
>

In the area of computation and numerics, it is not even close.

C++ is used so much in this area now, even more than Fortran it seems.

There are numerical libraries for anything you want in C++. Check
for starter

   http://en.wikipedia.org/wiki/List_of_numerical_libraries

Also from C++, one can call C very easily, so all
the C numerical libraries are there for C++, and there is
tons of those libraries around.

I once send mail to the authors of the numerical recipes book
asking them when will there be an Ada version. I actually got a
reply back on this, I remember it was just a polite standard reply
that there are looking at it, and this was many years ago, in the 90's
I think, and we know there is no Ada version of numerical recipes
and will never be. No market for it.

I myself would rather be shot dead alive than use C/C++ for
numerical work (I just hate pointers !) but C++ is very popular
in this area.

--Nasser



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

* Re: Ada folks need to talk to C++ folks more
  2012-07-31  0:59 ` Nasser M. Abbasi
@ 2012-07-31  6:08   ` wrp
  2012-07-31  7:37     ` Nasser M. Abbasi
  2012-07-31  9:34     ` Georg Bauhaus
  0 siblings, 2 replies; 10+ messages in thread
From: wrp @ 2012-07-31  6:08 UTC (permalink / raw)


On Jul 30, 5:59 pm, "Nasser M. Abbasi" <n...@12000.org> wrote:
> On 7/30/2012 2:45 PM, wrp wrote:
> In the area of computation and numerics, it is not even close.
> C++ is used so much in this area now, even more than Fortran it seems.

Having looked at Fortran 2003, I don't understand why C++ gets used so
much in physics. This is one area where I wouldn't try to convert
anyone from C++ to Ada, since I think they should be using Fortran.

No, I wouldn't promote Ada where the focus is entirely on numerics. As
described in _Scientific Ada_ (Ford, 1986), the Numerical Algorithms
Group took a serious look at Ada in the 1980s, but found it lacking
and evidently decided to stay with Fortran and C. Later versions of
Ada addressed some of their issues, but as far as I can tell Fortran
is still the best choice.

Ada might be suitable where there is less demand for exotic
capability. I thought about quantitative finance. My impression is
that the choice of C++ is not given a lot of thought; it's just
popular and fast. I've briefly looked at the literature for quants and
didn't see much call for the extensive libraries you see for C++.

Another possibility is computer graphics. The language is certainly
suitable; it just needs good libraries. There are a few projects and I
wonder what would be required to get something production quality.
With good graphics support, maybe Ada would be ready to support game
engine development.



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

* Re: Ada folks need to talk to C++ folks more
  2012-07-31  6:08   ` wrp
@ 2012-07-31  7:37     ` Nasser M. Abbasi
  2012-07-31 18:29       ` wrp
  2012-07-31  9:34     ` Georg Bauhaus
  1 sibling, 1 reply; 10+ messages in thread
From: Nasser M. Abbasi @ 2012-07-31  7:37 UTC (permalink / raw)


On 7/31/2012 1:08 AM, wrp wrote:

>
> Another possibility is computer graphics. The language is certainly
> suitable; it just needs good libraries. There are a few projects and I
> wonder what would be required to get something production quality.
> With good graphics support, maybe Ada would be ready to support game
> engine development.
>

In Ada there is an openGL binding, GLOBE_3D http://globe3d.sourceforge.net/,
and GTK Ada for making window/menus (download from GNAT/libre web site).

For Fortran there is also an OPEN GL binding. I actually just updated
my page with Fortran examples using openGL (linked them all static,
for linux, so any one can download the binary and run it, no
libraries are needed since it is all static linked), here it
is at my Fortran page

http://12000.org/my_notes/faq/fortran/index.htm

it is also a thin binding to OPENGL. There is also a GTK
fortran project started a year ago or so, but the Ada GTK binding
seems to be more advanced/complete.

--Nasser



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

* Re: Ada folks need to talk to C++ folks more
  2012-07-31  6:08   ` wrp
  2012-07-31  7:37     ` Nasser M. Abbasi
@ 2012-07-31  9:34     ` Georg Bauhaus
  2012-07-31 18:37       ` wrp
  2012-07-31 19:05       ` phone.john.kern
  1 sibling, 2 replies; 10+ messages in thread
From: Georg Bauhaus @ 2012-07-31  9:34 UTC (permalink / raw)


On 31.07.12 08:08, wrp wrote:
> With good graphics support, maybe Ada would be ready to support game
> engine development.


A an engine for new hardware?

I.e., build computers that are especially good for playing
games, so cheap and easy to program that it becomes disruptive?
Maybe Ravenscar like profiles might be interesting, except that
a character/object/whatever would have to be allowed to die.
Who is going to finance so vague an idea?

An engine for existing hardware?

XBox is by Microsoft. Dark matter. I don't think they would do
more than just emborg a few good bits they happen to see in Ada,
and then continue to use their own compiler technology.
If they haven't already done so.

Sony? I heard they have dropped the idea of specialized
hardware facing both a lack of knowledgeable programmers
("Too difficult to program!") and a short life cycle of
CPUs making standard CPUs and standard graphics processors
capable enough. OTS components will mean relatively lower cost.
And even if not, Ada is only beginning to get run-time systems
tailored to these types of computers, AFAIK.

Nevertheless, some types of real-time communication
are said to be easier to express in Ada. Is there much use
of consensus protocols in game engines? If so, are they
better with Ada?

Apple's hardware. Perhaps one could use SofCheck's (now AdaCore's)
compiler and write the thing in Ada, using compiler output (C and
also C++) as input to the compilers that Apple suggests one
should use. Will current Ada tasking support programmers, though?
If there is no Ada RTS that has tasking employ Apple's
Grand Central Dispatch, won't this create a schism between
types of concurrent objects?



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

* Re: Ada folks need to talk to C++ folks more
  2012-07-31  7:37     ` Nasser M. Abbasi
@ 2012-07-31 18:29       ` wrp
  0 siblings, 0 replies; 10+ messages in thread
From: wrp @ 2012-07-31 18:29 UTC (permalink / raw)


On Jul 31, 12:37 am, "Nasser M. Abbasi" <n...@12000.org> wrote:
> On 7/31/2012 1:08 AM, wrp wrote:
> For Fortran there is also an OPEN GL binding... here it
> is at my Fortran page
>
> http://12000.org/my_notes/faq/fortran/index.htm

Something I was curious about... I've looked at your simulation stuff
before and saw that you already use Fortran (2008?). What is it that
makes you interested in using Ada for this when you already have
Fortran?



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

* Re: Ada folks need to talk to C++ folks more
  2012-07-31  9:34     ` Georg Bauhaus
@ 2012-07-31 18:37       ` wrp
  2012-07-31 19:05       ` phone.john.kern
  1 sibling, 0 replies; 10+ messages in thread
From: wrp @ 2012-07-31 18:37 UTC (permalink / raw)


On Jul 31, 2:34 am, Georg Bauhaus <rm.dash-bauh...@futureapps.de>
wrote:
> On 31.07.12 08:08, wrp wrote:
>
> > With good graphics support, maybe Ada would be ready to support game
> > engine development.
>
> A an engine for new hardware?
>
> An engine for existing hardware?

Although targeting the Xbox and PS3 are important for the biggest
commercial engines, it seems that the majority of projects just focus
on the general computing platforms. An engine built with Ada/gcc
should be a viable choice among these:

http://en.wikipedia.org/wiki/List_of_game_engines



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

* Re: Ada folks need to talk to C++ folks more
  2012-07-31  9:34     ` Georg Bauhaus
  2012-07-31 18:37       ` wrp
@ 2012-07-31 19:05       ` phone.john.kern
  1 sibling, 0 replies; 10+ messages in thread
From: phone.john.kern @ 2012-07-31 19:05 UTC (permalink / raw)


On Tuesday, July 31, 2012 5:34:01 AM UTC-4, Georg Bauhaus wrote:
> On 31.07.12 08:08, wrp wrote:
> 
> > With good graphics support, maybe Ada would be ready to support game
> 
> > engine development.
> 
> 
> 
> 
> 
> A an engine for new hardware?
> 
> 
> 
> I.e., build computers that are especially good for playing
> 
> games, so cheap and easy to program that it becomes disruptive?
> 
> Maybe Ravenscar like profiles might be interesting, except that
> 
> a character/object/whatever would have to be allowed to die.
> 
> Who is going to finance so vague an idea?
> 
> 
> 
> An engine for existing hardware?
> 
> 
> 
> XBox is by Microsoft. Dark matter. I don't think they would do
> 
> more than just emborg a few good bits they happen to see in Ada,
> 
> and then continue to use their own compiler technology.
> 
> If they haven't already done so.
> 
> 
> 
> Sony? I heard they have dropped the idea of specialized
> 
> hardware facing both a lack of knowledgeable programmers
> 
> ("Too difficult to program!") and a short life cycle of
> 
> CPUs making standard CPUs and standard graphics processors
> 
> capable enough. OTS components will mean relatively lower cost.
> 
> And even if not, Ada is only beginning to get run-time systems
> 
> tailored to these types of computers, AFAIK.
> 
> 
> 
> Nevertheless, some types of real-time communication
> 
> are said to be easier to express in Ada. Is there much use
> 
> of consensus protocols in game engines? If so, are they
> 
> better with Ada?
> 
> 
> 
> Apple's hardware. Perhaps one could use SofCheck's (now AdaCore's)
> 
> compiler and write the thing in Ada, using compiler output (C and
> 
> also C++) as input to the compilers that Apple suggests one
> 
> should use. Will current Ada tasking support programmers, though?
> 
> If there is no Ada RTS that has tasking employ Apple's
> 
> Grand Central Dispatch, won't this create a schism between
> 
> types of concurrent objects?

Ouya?

http://www.kickstarter.com/projects/ouya/ouya-a-new-kind-of-video-game-console



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

end of thread, other threads:[~2012-08-07 12:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-30 19:45 Ada folks need to talk to C++ folks more wrp
2012-07-30 20:34 ` Simon Wright
2012-07-31  0:10   ` wrp
2012-07-31  0:59 ` Nasser M. Abbasi
2012-07-31  6:08   ` wrp
2012-07-31  7:37     ` Nasser M. Abbasi
2012-07-31 18:29       ` wrp
2012-07-31  9:34     ` Georg Bauhaus
2012-07-31 18:37       ` wrp
2012-07-31 19:05       ` phone.john.kern

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