QtAda version 2.7.4 released

A little over a month ago I wrote about Leonid Dulman’s (PDF) Ada Studio 2011 DVD Collection, and today he follows up with version 2.7.4 of his QtAda library.

QtAda is an Ada-95(05,12) port of the Qt4 graphics library.
Qt version 4.7.3(4.7.4,4.8.0) open source and qt4c.dll(libqt4c.so)
build with Microsoft Visual Studio 2010 for Windows and gcc for
Linux. Packages was tested with gnat gpl 2011 Ada compiler for Windows 32bit and 64bit and Linux x86 Debian 5. It supports GUI, SQL, Multimedia, Web, Netork and many others things.

If you’re interested, there’s a release announcement available at comp.lang.ada.

Before I end this post, I’d like to go on a small rant: If you’ve made an interesting Ada library/program, for which you’re distributing the source code, please consider using some of the excellent source code repositories out there. I want to be able to git clone your project. I want to track the development. I want to be able to easily offer patches and feedback. I don’t want some homegrown website that offers zero tools for community feedback.

My personal favorite is GitHub. Here you get as many source code repositories as you want, Wiki’s, issue/bug tracking and other GitHub users can easily track your project.

Don’t reinvent the wheel. Use the available tools instead, to the benefit of your users, but also to the benefit of Ada in general, as it raises the visibility of Ada programming.

SOCI 3.1.0 released, SOCI-Ada merged

The SOCI database access library by Maciej Sobczak is a beacon of light in the relatively dark waters of Ada based database access libraries. Sure, the library itself is not Ada, but the SOCI crew have made a very nice Ada binding available to us all:

SOCI-Ada is a database access library for Ada. The library itself is a wrapper for the selected functionality of the SOCI library, which is a C++ database access library recognized for its high quality and innovative interface. The SOCI-Ada library offers the following features to the Ada community: Modular design based on dynamic backend loading. Thanks to this feature, new backends implemented within the context of the main SOCI project are immediately available for Ada programmers without any additional work. A large community of C++ users can help ensure that the new backends are well tested in a variety of environments and usage scenarios. Native backends for major database servers ensure optimal performance and minimize configuration overhead and complexity that is usually associated with other database access methods.
Direct support for bulk operations allow to achieve high performance with queries that operate on large data sets. Very liberal open-source license (Boost, accepted by Open Source Initiative) that encourages both commercial and non-commercial use. Easy to use and compact interface.

If you read the documentation, you’ll see that SOCI-Ada is indeed easy to use and very compact. I’ve never been a big fan of embedding SQL in the source code, but for some odd reason I really like the SOCI way. Everything looks clean and neat.

Maciej posted the full release announcement to the comp.lang.ada usenet group.

TclAdaShell 20110925 released

Simon J. Wright took the liberty of releasing version 20110925 of his TclAdaShell (AKA TASH) library while I was away on vacation, so my report on this release is, as so much else, a bit late. Sorry.

TclAdaShell is an Ada binding to Tcl/Tk, as you might’ve guessed already.

This is a maintenance release, with the following changes:

  • The ClientData generics in Tcl.Ada had comments stating that the size of the ClientData formal type must be equal to the size of a C pointer. These have been replaced by assertions that the size of ClientData must not be greater than that of System.Address.
  • The top-level makefile now supports an ‘install’ target which on GNAT-based systems other than Debian installs TASH alongside your compiler (so you don’t need to set ADA_PROJECT_PATH).
  • The setup.tcl script recognises gnatgcc, if present, as the compiler to use for the C compilations required to build the library.
  • The setup.tcl script supports the flag “–nogui”, meaning “perform the setup immediately”.
  • The GPR files have been improved; the result is that the Tcl and Tk libraries will be linked automatically.

You can read the release announcement here and you can jump straight to the TclAdaShell sourceforge.net page. Enjoy!

tinywm-ada and fucked-ada

Once in a blue moon you meet someone who’s special, and I don’t mean special in a short bus way. No, I mean a person who strikes you as one of those few who can pick up a tuba and two weeks later actually play something, or who can build something awesome using nothing but a d20, two cotton socks, some copper string and one glass from an 80’s style pair of sunglasses.

I think R. Tyler Croy is one such special guy.

Within the last couple of days, he’s done two wonderful projects in Ada:

tinywm-ada is an…

…evening experiment to port Nick Welch’s tinywm from C to Ada. Like the original, it uses Xlib as its underlying library.

tinyvm is, as the name implies, a tiny window manager. And believe you me, it really is tiny. Having this is in Ada is both fun and something the rest of us mere mortals can learn from.

But apparently tinywm-ada wasn’t enough for dear old R. Tyler Croy, so he kicked it up a notch and released fucked-ada on the world. Yes, he has gone and made a Brainfuck interpreter in Ada. How awesome is that? Pointless? Yes. Awesome? Also yes. If you want to experience a mental meltdown, then Brainfuck just might be what the doctor ordered.

A Very Interesting Ada Blog

I heard about the Java 2 Ada blog from Marc C., and after having checked it out, I second his initial opinion: “Lotsa neat stuff!”

We’ve got:

Yea, lots of good stuff. The blog is written by Stephane Carrez who is also the author of several interesting Ada projects:

I must admit I’m quite embarrassed about not having found Stephane’s blog and projects earlier, but it does underline the truth in one of my pet pevees: The almost complete lack of links between Ada resources. I’m betting that there’s a heck of a lot more Ada related blogs and resources out there, but they are hard to find because nobody links to them, and they in return link to nobody.

So please people: If you have an Ada related website, setup a links/resources page and link to other Ada sites. Surely you all know at least one URL pointing to another website about Ada programming? Or simply mention other Ada sites in your blog posts. It will make Ada soooo much more visible in the eyes of the search engines.

Well, that was a bit OT. To get back on track, all I have to say is be sure to visit Stephane’s blog. It’s a good place with some interesting stuff. Oh, and don’t forget to link to it, if you have a website of your own.

Deepend – A storage pool for Ada 2005

I’m a bit late to the game with this, but you know what they say: Better late than never.

From the crafty hands of Brad Moore we get a nice Ada binding to the Apache Runtime Pools implementation. Brad calls his binding Deepend.

Deepend is a storage pool with Subpool capabilities for Ada 2005 where all the objects in a subpool can be reclaimed all at once, instead of requiring each object to be individually reclaimed one at a time. Subpools may be completely independent pools, or they may be chained together in order to extend the lifetime of child pools to that of the lifetime of the root parent pool. Deepend is a binding to the Apache Runtime Pools implementation. Rather than deallocate items individually which is error prone and subceptable
to memory leaks and other memory issues, a subpool can be freed all at once automatically when the pool object goes out of scope. In addition, the pool may be reclaimed multiple times before the end of its lifetime through an explicit call to Unchecked_Deallocate.

You can read Brad’s full release announcement here, and in case you’re wondering about the name of the binding, there’s also a nice explanation for that:

  1. A pool has to be pretty deep if it is to have subs floating in it.
  2. Hopefully it can be used to write deependable software.
  3. Hopefully it doesn’t mean this is something the author has gone off of.

Those are, IMHO, all very good reasons. Go check it out.

New Wiki Article: C++ bindings example

A while ago Luis P. Mendes started a thread at comp.lang.ada named Need some light on using Ada or not. One of the questions Luis put forward is:

2. In C++ I can use lots of libraries. I’m thinking on data visualization libraries, for example http://www.graphviz.org/Gallery/undirected/softmaint.html. I’ve read that Ada can use some C bindings. Can I use any C library? Some? Is it easy? I don’t want to drop C++ for Ada to build a project that later has to be rewritten in C++ because of lack of libraries.

Actually, that was a bit more than just one question, but the general gist of it is: Can Ada bind to C/C++.

And of course the answer to this is a resounding “Yes!”.

Later on in the same c.l.a. thread Brian Drummond give an example on how to do this, and it is this example that Luis have added to our Wiki:

C++ bindings example.

I’d like to extent my thanks to Brian Drummond for coming up with the example in the first place, and Luis P. Mendes for bothering to add it to our Wiki. Thanks!

Now all we need is some Ada binding expert to peek it over to make sure the examples are sound.

Arduino Mega 2560 and Attiny13a/Attiny2313 support to AVR-Ada

From the hands of Tero Koskinen we get improved support in AVR-Ada for Arduino Mega 2560 and Attiny13a/Attiny2313:

These changes improve support for Atmega2560, Attiny13a, and Attiny2313 processors. Attiny13a and Attiny2313 are pretty uninteresting, although common, AVR processors. I happen to use them in my projects because they are cheap and that is why I also wanted better support for them.

I micro-blogged about this a few days ago and it was amazing to see how many people clicked on the link. Apparently there’s a HUGE amount of interest for AVR-Ada among identi.ca users.

Programming with GtkAda

Creating programs with graphical user interfaces was not the primary concern when Ada was originally designed, but that doesn’t mean that it’s an impossible task today.

One of the options available is GtkAda, which is a binding to Gtk+.

Now, knowing that you can do graphical user interfaces in Ada is not the same as knowing how, and that is where today’s tutorial comes into the picture:

Programming with GtkAda.

This is a collection of resources and examples related to building a graphical user interface with GtkAda, or as it is said:

This page is for people who are beginners with GtkAda. It is a collection of resources, examples and helpful links. Gadget and Walker are tutorials which take the beginner programmer into the mysteries of widgets. They deal with the creation and use of a Graphical User Interface using buttons with icons and labels.

If you plan on trying your hand at GtkAda, then this is most certainly a good place to start.