comp.lang.ada
 help / color / mirror / Atom feed
* question on GtkAda
@ 2010-12-15  1:57 Nasser M. Abbasi
  2010-12-15  8:46 ` Dmitry A. Kazakov
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Nasser M. Abbasi @ 2010-12-15  1:57 UTC (permalink / raw)


Hello;

The way I understand it, is that GtkAda is a binding (thick) to Gtk+.

On http://libre.adacore.com/libre/tools/gtkada/ it says

"GtkAda supports the latest 2.14 stable releases."

But on http://www.gtk.org/download-linux.html

It says the latest stable release is 2.22

There is a plan to have GTK+ 3.0 sometime,  from what I read,
will this mean GtkAda will be updated to that at some point
as well?

Another question: If someone want to do plotting from Ada, how
would one do that? GtkAda is just for making GUI?

I see there are libraries that uses Gtk+ for plotting, such as
Gtkextra http://gtkextra.sourceforge.net/  and
GtkPlot http://sourceforge.net/projects/gtkplot/ , so, If I
install GtkAda, how would one use these libraries? do I need
to make binding to them as well?

Any one knows of applications using Ada to make plotting and
data visualization using GtkAda? The few apps listed on
the libre web site do not show that.

Are people using GtkAda in any real commercial applications?
It seems GPS is the largest known app which does that?

I am basically looking for a way to make a simple GUI in Ada,
and also be able to generate 2D and 3D plots. Just for trying
something. nothing commercial.

Thanks
--Nasser




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

* Re: question on GtkAda
  2010-12-15  1:57 question on GtkAda Nasser M. Abbasi
@ 2010-12-15  8:46 ` Dmitry A. Kazakov
  2010-12-16  0:15 ` Jerry
  2010-12-16  7:07 ` question on GtkAda Stephen Leake
  2 siblings, 0 replies; 13+ messages in thread
From: Dmitry A. Kazakov @ 2010-12-15  8:46 UTC (permalink / raw)


On Tue, 14 Dec 2010 17:57:14 -0800, Nasser M. Abbasi wrote:

> The way I understand it, is that GtkAda is a binding (thick) to Gtk+.

Rather thin than thick.
 
> On http://libre.adacore.com/libre/tools/gtkada/ it says
> 
> "GtkAda supports the latest 2.14 stable releases."

I am using it with 2.16 and 2.18, maybe 2.22 too, I don't remember all
installations I made.
 
> But on http://www.gtk.org/download-linux.html
> 
> It says the latest stable release is 2.22

I don't think there is any big difference.

> There is a plan to have GTK+ 3.0 sometime,  from what I read,
> will this mean GtkAda will be updated to that at some point
> as well?

That is up to AdaCore. Remember that GtkAda is far from being a complete
bindings. Gtk is nebulous, in fact_ there are various libraries, Gtk, Gdk,
GIO, Glib, Pango etc, which may stand for "Gtk,"  depending on the
interpretation of the term. GtkAda provides different amount of support for
them, from almost full, to none. Some missing parts you can find here:

http://www.dmitry-kazakov.de/ada/gtkada_contributions.htm

> Another question: If someone want to do plotting from Ada, how
> would one do that? GtkAda is just for making GUI?

You can use GtkAda (its Gdk part) for this, I did it more or less
successfully. Though, now there is a far better choice, since Damien
Carbonne made Cairo bindings:

http://sourceforge.net/projects/cairoada/

> I see there are libraries that uses Gtk+ for plotting, such as
> Gtkextra http://gtkextra.sourceforge.net/  and
> GtkPlot http://sourceforge.net/projects/gtkplot/ , so, If I
> install GtkAda, how would one use these libraries? do I need
> to make binding to them as well?

I was using Gdk and am presently using Cairo. Since Gtk is not
multitasking.

I avoid Gtk higher-level primitives, because they would do much non-graphic
work, which could not be moved to an independent task. I hate blocking and
hanging UI.

> Any one knows of applications using Ada to make plotting and
> data visualization using GtkAda?

http://www.dmitry-kazakov.de/ada/fuzzy_ml.htm

It does a lot of plotting in Gtk (through Gdk).

> Are people using GtkAda in any real commercial applications?
> It seems GPS is the largest known app which does that?

Probably.

> I am basically looking for a way to make a simple GUI in Ada,
> and also be able to generate 2D and 3D plots. Just for trying
> something. nothing commercial.

IMO, the choice is Gdk vs. Cairo. If your plotting is not demanding in
terms of performance, e.g. you aren't going to create an 100 channel
oscilloscope indicating 0.1ms inputs, then Cairo is the first thing to
check. Otherwise, you should evaluate its overhead, and maybe do some parts
in Gdk.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



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

* Re: question on GtkAda
  2010-12-15  1:57 question on GtkAda Nasser M. Abbasi
  2010-12-15  8:46 ` Dmitry A. Kazakov
@ 2010-12-16  0:15 ` Jerry
  2010-12-16  0:58   ` Nasser M. Abbasi
  2010-12-16  7:07 ` question on GtkAda Stephen Leake
  2 siblings, 1 reply; 13+ messages in thread
From: Jerry @ 2010-12-16  0:15 UTC (permalink / raw)


On Dec 14, 6:57 pm, "Nasser M. Abbasi" <n...@12000.org> wrote:
> Hello;
>
>
> Another question: If someone want to do plotting from Ada, how
> would one do that? GtkAda is just for making GUI?
>
> Thanks
> --Nasser

PLplot has Ada bindings and and works with Gtk+ and many other
interactive devices and supports a number of file output formats as
well.

http://plplot.sourceforge.net/

PLplot is widely used and actively developed. It does not write data
to disk before plotting and thus is faster for some applications than
say e.g. Gnuplot.

The mailing list is your friend.

Jerry



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

* Re: question on GtkAda
  2010-12-16  0:15 ` Jerry
@ 2010-12-16  0:58   ` Nasser M. Abbasi
  2010-12-17 23:59     ` Jerry
  2010-12-18 17:57     ` Simon Wright
  0 siblings, 2 replies; 13+ messages in thread
From: Nasser M. Abbasi @ 2010-12-16  0:58 UTC (permalink / raw)


On 12/15/2010 4:15 PM, Jerry wrote:
> On Dec 14, 6:57 pm, "Nasser M. Abbasi"<n...@12000.org>  wrote:
>> Hello;
>>
>>
>> Another question: If someone want to do plotting from Ada, how
>> would one do that? GtkAda is just for making GUI?
>>
>> Thanks
>> --Nasser
>

> PLplot has Ada bindings and and works with Gtk+ and many other
> interactive devices and supports a number of file output formats as
> well.
>
> http://plplot.sourceforge.net/
>
> PLplot is widely used and actively developed. It does not write data
> to disk before plotting and thus is faster for some applications than
> say e.g. Gnuplot.
>
> The mailing list is your friend.
>
> Jerry

Yes, I knew about PlPlot ofcourse, thanks, and looked at it as well as
manyothers.

I wanted ONE library to do both GUI building (i.e. make canvas,
layout button, graphics area, sliders, pop-up menus, etc... on it)
and also do data visualization (plotting 2d, 3d, mesh plots, etc...),
like I can do now easily with Matlab and Mathematica for example.

I did not see that I can build a GUI with plplot? But I saw I
can build a gui with gtk+ but no do plotting.

you say plplot works with gtk+, I am not sure what that means. do you
have examples, screen shots of apps written in gtk+ as GUI using
plplots into a drawing area created by gtk+? I thought it will be
easier to learn one library that 2.

What I am looking for, is there a way in Ada to make a gui, say such
as this example: (this is just a random one I picked on the net,
it uses Matlab GUI and plotting):

http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm

Now, given all the above, for scientific applications, I still
need to be able to access lapack functions from Ada. Ada Annex G
just does not cut it. Very limited. As well as what other small
Ada math libraries I could find.


So far, I could not find full binding to these. There are 100's of
functions there, that has been written over span of more than 30
years or more:

http://www.netlib.org/lapack/release_notes.html

that one would need to call to do any type of scientific
work. Without being able to uses these from Ada, having the
GUI and the plotting will do me no good. I need to have all
the 3 parts (GUI + Plotting + Lapack binding) as a starting
point to even think about using Ada for numerical work.

thanks
--Nasser



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

* Re: question on GtkAda
  2010-12-15  1:57 question on GtkAda Nasser M. Abbasi
  2010-12-15  8:46 ` Dmitry A. Kazakov
  2010-12-16  0:15 ` Jerry
@ 2010-12-16  7:07 ` Stephen Leake
  2010-12-16  7:42   ` Nasser M. Abbasi
  2 siblings, 1 reply; 13+ messages in thread
From: Stephen Leake @ 2010-12-16  7:07 UTC (permalink / raw)


"Nasser M. Abbasi" <nma@12000.org> writes:

> Another question: If someone want to do plotting from Ada, how
> would one do that? GtkAda is just for making GUI?

I use Ada to write a data file, then plot it with gnuplot.

That gives a nice interactive system.

-- 
-- Stephe



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

* Re: question on GtkAda
  2010-12-16  7:07 ` question on GtkAda Stephen Leake
@ 2010-12-16  7:42   ` Nasser M. Abbasi
  2010-12-17  7:13     ` Stephen Leake
  0 siblings, 1 reply; 13+ messages in thread
From: Nasser M. Abbasi @ 2010-12-16  7:42 UTC (permalink / raw)


On 12/15/2010 11:07 PM, Stephen Leake wrote:
> "Nasser M. Abbasi"<nma@12000.org>  writes:
>
>> Another question: If someone want to do plotting from Ada, how
>> would one do that? GtkAda is just for making GUI?
>
> I use Ada to write a data file, then plot it with gnuplot.
>
> That gives a nice interactive system.
>

Yes, this is an option, and I have done that with Fortran.

But I need to be able to plot during run-time. Many times,
I'd like to examine the plot at each step, during debugging,
makes it much easier to have all that integrated.

--Nasser





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

* Re: question on GtkAda
  2010-12-16  7:42   ` Nasser M. Abbasi
@ 2010-12-17  7:13     ` Stephen Leake
  0 siblings, 0 replies; 13+ messages in thread
From: Stephen Leake @ 2010-12-17  7:13 UTC (permalink / raw)


"Nasser M. Abbasi" <nma@12000.org> writes:

> On 12/15/2010 11:07 PM, Stephen Leake wrote:
>> "Nasser M. Abbasi"<nma@12000.org>  writes:
>>
>>> Another question: If someone want to do plotting from Ada, how
>>> would one do that? GtkAda is just for making GUI?
>>
>> I use Ada to write a data file, then plot it with gnuplot.
>>
>> That gives a nice interactive system.
>>
>
> Yes, this is an option, and I have done that with Fortran.
>
> But I need to be able to plot during run-time. Many times,
> I'd like to examine the plot at each step, during debugging,
> makes it much easier to have all that integrated.

Ok, that makes sense.

You _could_ start a gnuplot process from Ada, but I agree a direct plot
API would be better.

It might not be hard to create an Ada binding to the gnuplot library;
that would be useful in general.

-- 
-- Stephe



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

* Re: question on GtkAda
  2010-12-16  0:58   ` Nasser M. Abbasi
@ 2010-12-17 23:59     ` Jerry
  2010-12-18  0:07       ` Nasser M. Abbasi
  2010-12-18 17:57     ` Simon Wright
  1 sibling, 1 reply; 13+ messages in thread
From: Jerry @ 2010-12-17 23:59 UTC (permalink / raw)


On Dec 15, 5:58 pm, "Nasser M. Abbasi" <n...@12000.org> wrote:
> On 12/15/2010 4:15 PM, Jerry wrote:
>
>
>
>
>
> > On Dec 14, 6:57 pm, "Nasser M. Abbasi"<n...@12000.org>  wrote:
> >> Hello;
>
> >> Another question: If someone want to do plotting from Ada, how
> >> would one do that? GtkAda is just for making GUI?
>
> >> Thanks
> >> --Nasser
>
> > PLplot has Ada bindings and and works with Gtk+ and many other
> > interactive devices and supports a number of file output formats as
> > well.
>
> >http://plplot.sourceforge.net/
>
> > PLplot is widely used and actively developed. It does not write data
> > to disk before plotting and thus is faster for some applications than
> > say e.g. Gnuplot.
>
> > The mailing list is your friend.
>
> > Jerry
>
> Yes, I knew about PlPlot ofcourse, thanks, and looked at it as well as
> manyothers.
>
> I wanted ONE library to do both GUI building (i.e. make canvas,
> layout button, graphics area, sliders, pop-up menus, etc... on it)
> and also do data visualization (plotting 2d, 3d, mesh plots, etc...),
> like I can do now easily with Matlab and Mathematica for example.
>
> I did not see that I can build a GUI with plplot? But I saw I
> can build a gui with gtk+ but no do plotting.

I'm actually not familiar with the PLplot-Gtk+ combination--I only
wrote the Ada bindings. I'm sure if you post your question to the
plplot list you will find out very quickly if the PLplot-Gtk+
combination has any synergy with writing GUI's in Gkt+.
>
> you say plplot works with gtk+, I am not sure what that means. do you
> have examples, screen shots of apps written in gtk+ as GUI using
> plplots into a drawing area created by gtk+? I thought it will be
> easier to learn one library that 2.
>
> What I am looking for, is there a way in Ada to make a gui, say such
> as this example: (this is just a random one I picked on the net,
> it uses Matlab GUI and plotting):
>
> http://lims.mech.northwestern.edu/projects/frictioninducedforcefields...
>
> Now, given all the above, for scientific applications, I still
> need to be able to access lapack functions from Ada. Ada Annex G
> just does not cut it. Very limited. As well as what other small
> Ada math libraries I could find.

Yes, Annex G is only a very small part. There has been an effort to
bind Ada to lapack but I'm up to date on it. Google "lapack Ada
binding" and I think you'll find some useful results. Let us know what
you find.

I would also like for there to be an Ada binding to GSL, the Gnu
Scientific Library:
http://www.gnu.org/software/gsl/

Jerry

>
> So far, I could not find full binding to these. There are 100's of
> functions there, that has been written over span of more than 30
> years or more:
>
> http://www.netlib.org/lapack/release_notes.html
>
> that one would need to call to do any type of scientific
> work. Without being able to uses these from Ada, having the
> GUI and the plotting will do me no good. I need to have all
> the 3 parts (GUI + Plotting + Lapack binding) as a starting
> point to even think about using Ada for numerical work.
>
> thanks
> --Nasser




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

* Re: question on GtkAda
  2010-12-17 23:59     ` Jerry
@ 2010-12-18  0:07       ` Nasser M. Abbasi
  0 siblings, 0 replies; 13+ messages in thread
From: Nasser M. Abbasi @ 2010-12-18  0:07 UTC (permalink / raw)


On 12/17/2010 3:59 PM, Jerry wrote:

> Yes, Annex G is only a very small part. There has been an effort to
> bind Ada to lapack but I'm up to date on it. Google "lapack Ada
> binding" and I think you'll find some useful results. Let us know what
> you find.
>
> I would also like for there to be an Ada binding to GSL, the Gnu
> Scientific Library:
> http://www.gnu.org/software/gsl/
>
> Jerry
>

A person was kind enough to send me a link to old GNAT lapack binding,
so I updated my Ada bindings links and added the new link to lapack
binding to it.

http://12000.org/my_notes/ada/index.htm

--Nasser



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

* Re: question on GtkAda
  2010-12-16  0:58   ` Nasser M. Abbasi
  2010-12-17 23:59     ` Jerry
@ 2010-12-18 17:57     ` Simon Wright
  2010-12-20  0:50       ` Ada Annex G (was Re: question on GtkAda) Nasser M. Abbasi
  1 sibling, 1 reply; 13+ messages in thread
From: Simon Wright @ 2010-12-18 17:57 UTC (permalink / raw)


"Nasser M. Abbasi" <nma@12000.org> writes:

> Now, given all the above, for scientific applications, I still
> need to be able to access lapack functions from Ada. Ada Annex G
> just does not cut it. Very limited. As well as what other small
> Ada math libraries I could find.
>
>
> So far, I could not find full binding to these. There are 100's of
> functions there, that has been written over span of more than 30
> years or more:
>
> http://www.netlib.org/lapack/release_notes.html
>
> that one would need to call to do any type of scientific
> work.

As a matter of interest, what main functionality are you missing?
(bearing in mind that many functions come in 4 variants (s, d, c, z) and
that there are many that are optimized for a particular kind of matrix,
eg tridiagonal).



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

* Ada Annex G (was Re: question on GtkAda)
  2010-12-18 17:57     ` Simon Wright
@ 2010-12-20  0:50       ` Nasser M. Abbasi
  2010-12-20 17:32         ` Ada Annex G Simon Wright
  2010-12-21  0:24         ` Ada Annex G (was Re: question on GtkAda) Randy Brukardt
  0 siblings, 2 replies; 13+ messages in thread
From: Nasser M. Abbasi @ 2010-12-20  0:50 UTC (permalink / raw)


On 12/18/2010 9:57 AM, Simon Wright wrote:

> "Nasser M. Abbasi"<nma@12000.org>  writes:
>
>> Now, given all the above, for scientific applications, I still
>> need to be able to access lapack functions from Ada. Ada Annex G
>> just does not cut it. Very limited. As well as what other small
>> Ada math libraries I could find.
>>
>>
>> So far, I could not find full binding to these. There are 100's of
>> functions there, that has been written over span of more than 30
>> years or more:
>>
>> http://www.netlib.org/lapack/release_notes.html
>>
>> that one would need to call to do any type of scientific
>> work.

>
> As a matter of interest, what main functionality are you missing?
> (bearing in mind that many functions come in 4 variants (s, d, c, z) and
> that there are many that are optimized for a particular kind of matrix,
> eg tridiagonal).

Ok, here is what I found. But I preface this by saying that I am
no expert in Ada, nor in linear algebra for that matter, but what
I did is look at the lapack functions, and looked at the AnnexG,
and determined if that lapack function can be implemented
using only functions in the Ada 2005 annexG.

I only looked at the real (single) functions listed here

http://www.netlib.org/lapack/single/

and went only to the first 58 functions (up to where it says
"Available COMPUTATIONAL routines" )

I made a list of the result here (including Matlab and
Mathematica functions).

http://12000.org/my_notes/lapack_analysis/lapack/index.htm

Please correct me if you see any errors, and I will
fix the note above.

Conclusion on Ada:

1) no support complex types Ax=b, only real, but
this does not seem too important. Not sure now.

2) No condition number function

3) NO solver for Constrained Linear Least Squares

4) No Generalized Linear Regression Model

5) No Schur Decomposition

6) No Singular Value Decomposition  (SVD)

7) No generalized Singular Value Decomposition

8) No support for finding Eigenvalues/Eigenvectors for the generalized case.

It is very well possible that some of the missing
functionality above is present is some other Ada
libraries over the net, but I was only looking at the
annex G.  I also, did not try to code any Ada examples
to verify any of the above, I was just looking at the
manual.

It seems to me it would have been more efficient to provide an
"offical" bindings to the most stable known math libraries
out there, than to try to provide this in an Ada standard
library such as the annex? May be a thich binding? But
this is not an easy problem. Whcih libraries? which
versions? who will make such an "official" binding, etc...

--Nasser



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

* Re: Ada Annex G
  2010-12-20  0:50       ` Ada Annex G (was Re: question on GtkAda) Nasser M. Abbasi
@ 2010-12-20 17:32         ` Simon Wright
  2010-12-21  0:24         ` Ada Annex G (was Re: question on GtkAda) Randy Brukardt
  1 sibling, 0 replies; 13+ messages in thread
From: Simon Wright @ 2010-12-20 17:32 UTC (permalink / raw)


"Nasser M. Abbasi" <nma@12000.org> writes:

> I made a list of the result here (including Matlab and
> Mathematica functions).
>
> http://12000.org/my_notes/lapack_analysis/lapack/index.htm
>
> Please correct me if you see any errors, and I will
> fix the note above.

Annex G includes no support for xGyyyy (symmetric/hermitian matrices
only).

> Conclusion on Ada:
>
> 1) no support complex types Ax=b, only real, but
> this does not seem too important. Not sure now.

Annex G includes support for complex hermitian matrices.

My https://sourceforge.net/projects/gnat-math-extn/ project - so far -
extends Annex G by adding xGEEV support.

> 2) No condition number function
>
> 3) NO solver for Constrained Linear Least Squares
>
> 4) No Generalized Linear Regression Model
>
> 5) No Schur Decomposition
>
> 6) No Singular Value Decomposition  (SVD)
>
> 7) No generalized Singular Value Decomposition
>
> 8) No support for finding Eigenvalues/Eigenvectors for the generalized case.

The next step I had in mind was xGGEV support.

> It seems to me it would have been more efficient to provide an
> "offical" bindings to the most stable known math libraries
> out there, than to try to provide this in an Ada standard
> library such as the annex? May be a thich binding? But
> this is not an easy problem. Whcih libraries? which
> versions? who will make such an "official" binding, etc...

I think it would be unfair to suggest that Annex G was the minimum that
could be got away with, rather it was the minimum that would be really
useful. Certainly it's in the style of a thick binding.



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

* Re: Ada Annex G (was Re: question on GtkAda)
  2010-12-20  0:50       ` Ada Annex G (was Re: question on GtkAda) Nasser M. Abbasi
  2010-12-20 17:32         ` Ada Annex G Simon Wright
@ 2010-12-21  0:24         ` Randy Brukardt
  1 sibling, 0 replies; 13+ messages in thread
From: Randy Brukardt @ 2010-12-21  0:24 UTC (permalink / raw)


"Nasser M. Abbasi" <nma@12000.org> wrote in message 
news:iem99k$58g$1@speranza.aioe.org...
...
> It seems to me it would have been more efficient to provide an
> "offical" bindings to the most stable known math libraries
> out there, than to try to provide this in an Ada standard
> library such as the annex? May be a thich binding? But
> this is not an easy problem. Whcih libraries? which
> versions? who will make such an "official" binding, etc...

Perhaps. But Annex G was an existing Ada standard (it used to be a separate 
standard for Ada 83), and it made sense to clean up the old standard and 
fold into the language standard.

It's unlikely that a "binding" could be formally standardized, because the 
level of description would be insufficient. And experience has proven that 
libraries that aren't in the language standard are much less likely to be 
available with compliers. (The old standard that was turned into Annex G was 
not widely implemented, mostly because hardly anyone knew it existed. I sure 
didn't...)

                                       Randy.





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

end of thread, other threads:[~2010-12-21  0:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-15  1:57 question on GtkAda Nasser M. Abbasi
2010-12-15  8:46 ` Dmitry A. Kazakov
2010-12-16  0:15 ` Jerry
2010-12-16  0:58   ` Nasser M. Abbasi
2010-12-17 23:59     ` Jerry
2010-12-18  0:07       ` Nasser M. Abbasi
2010-12-18 17:57     ` Simon Wright
2010-12-20  0:50       ` Ada Annex G (was Re: question on GtkAda) Nasser M. Abbasi
2010-12-20 17:32         ` Ada Annex G Simon Wright
2010-12-21  0:24         ` Ada Annex G (was Re: question on GtkAda) Randy Brukardt
2010-12-16  7:07 ` question on GtkAda Stephen Leake
2010-12-16  7:42   ` Nasser M. Abbasi
2010-12-17  7:13     ` Stephen Leake

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