神刀安全网

In Love with Ada

11/04/16 byTobias Trelle

No Comments

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

sudo apt-get install gnat-4.8

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

Our hello world program hello.adb

with Ada.Text_IO;  use Ada.Text_IO;   procedure Hello is begin   Put_Line ("Hello, world!"); end Hello;

… can be compiled and linked with

$ gnatmake hello.adb gcc-4.8 -c hello.adb gnatbind -x hello.ali gnatlink hello.ali

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

./hello Hello, 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 .

In Love with Ada

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 . Please help to make this set real and vote for it!

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

In Love with Ada 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:

In Love with Ada

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.

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » In Love with Ada

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
分享按钮