Beliebte Suchanfragen
//

In love with Ada

10.4.2016 | 3 minutes of reading time

Anyone out there remembering the Ada programming language? In this blog post, I’m going to give you a short introduction to Ada, the history of its name and some of the current occurrences in pop culture.

Hello World in Ada

To compile our first Ada program, we need to install the GNAT – the GNU compiler for Ada. On Ubuntu this can be done with

1sudo apt-get install gnat-4.8

On other OS, you may have to use other package managers.

Our hello world program hello.adb

1with Ada.Text_IO; 
2use Ada.Text_IO;
3 
4procedure Hello is
5begin
6  Put_Line ("Hello, world!");
7end Hello;

… can be compiled and linked with

1$ gnatmake hello.adb
2gcc-4.8 -c hello.adb
3gnatbind -x hello.ali
4gnatlink hello.ali

This will result in an executable hello in the same directory. Running it will finally print out the desired message:

1./hello
2Hello, world!

As you can see, Ada looks a little bit like Pascal and is indeed based on it. The full syntax can be found in the lastest reference manual . Some of the main features are exceptions and built-in concurreny handling. The IDE for Ada development is GPS – the GNAT Programming Studio.

A brief history of Ada

The Ada programming language was built in the late 1970s by the US DoD (Department of Defense) in order to consolidate the huge amont of different programming languages used there. It is named after Augusta Ada King, Countess of Lovelace, better knows as Ada Lovelace , an English mathematician from the 19th century. This woman is said to be the first programmer ever, or at least she worked on an algorithm for Babbage’s analytic engine , some kind of mechanical device for performing simple (from our point of view) computations. Her achievements made her an iconic person and the name Ada has several occurrences in modern culture.

Ada in Pop Culture

The godfathers of cyperpunk, William Gibson and Bruce Sterling, picked up the topic in their novel The Difference Engine which more or less etashblised a whole new genre called steampunk . Of course, Ada does appear in that story.

Being a big fan of Lego, I really like this to-be set: Lovelace & Babbage .

It features two minifigures Ada Lovelace and Charles Babbage and of course the analytical machine which is designed to house a small computer like a Raspberry Pi .

The name Ada often occurs in computer games. The last recent occurrences I know of are in Ingress and Fallout 4.

Ingress is an augmented reality game played on mobile devices. Two factions battle against each other for so-called portals, locations inside the real world. You can capture enemy portals be attacking them. The ADA Refactor is one of the most powerful weapons.

The RPG Fallout 4 is set in a post-apocalyptic world where the player wanders the wasteland and fights for survival. There is a modifiable robot companion called Ada . My version looks like this:

There’s another robot called Lady Lovelace . Both are clear references to the real-world Ada.

If you are aware of any further recent Ada occurrences, please let me know.

share post

//

More articles in this subject area

Discover exciting further topics and let the codecentric world inspire you.

//

Gemeinsam bessere Projekte umsetzen.

Wir helfen deinem Unternehmen.

Du stehst vor einer großen IT-Herausforderung? Wir sorgen für eine maßgeschneiderte Unterstützung. Informiere dich jetzt.

Hilf uns, noch besser zu werden.

Wir sind immer auf der Suche nach neuen Talenten. Auch für dich ist die passende Stelle dabei.