Never lose your progression with Pasta! Read more

by Gautier de Montmollin

If you clean your browser's Local Storage data, or change browser or machine, you'll lose your progression in the game. That should not happen (again)!

So, on your next Pasta! session, rush to the small "avatar" icon, shown here by a blue arrow.

Then, copy your Player Code into a safe place. For instance, send it in a mail to yourself.

That's all!

By the way, you may want to change your nickname...

LEA 0.66 Read more

by Gautier de Montmollin

Added "auto-repair" feature (tool icon in the compiler message box).

Of course you can do a bit more, with the HAC [1] compiler embedded in the LEA [2] editor, than just "Hello World".
Here, a screenshot with the amazing Ackermann recursive function.

The LEA project is available here.

[1] HAC Ada Compiler
[2] Lightweight Editor for Ada

AKT a tool to store and protect your sensitive information Read more

by Java 2 Ada

AKT stores information in secure wallets and protects the stored information by encrypting the content with different keys. AKT can be used to safely store passwords, credentials, bank accounts, documents and even directories.

Wallets are protected by a master key using AES-256 and the wallet master key is protected by a user password or a user GPG encrypted key. The wallet defines up to 7 slots that identify a password key that is able to unlock the master key. To open a wallet, it is necessary to unlock one of these 7 slots by providing the correct password. Wallet key slots are protected by the user's password and the PBKDF2-HMAC-256 algorithm, a random salt, a random counter and they are encrypted using AES-256.


Values stored in the wallet are protected by their own encryption keys using AES-256. A wallet can contain another wallet which is then protected by its own encryption keys and passwords (with 7 independent slots). Because the child wallet has its own master key, it is necessary to known the primary password and the child password to unlock the parent wallet first and then the child wallet.

The data is organized in 4K blocks whose primary content is encrypted either by the wallet master key or by the entry keys. The data block is signed by using HMAC-256. A data block can contain several values but each of them is protected by its own encryption key. Each value is also signed using HMAC-256.

The keystore uses several encryption keys at different levels to protect the content. A document stored in the keystore is split in data fragment and each data fragment is encrypted by using its own key. The data fragments are stored in specific data blocks so that they are physically separated from the encryption keys.

The data fragment encryption keys are stored in the directory blocks and they are encrypted by using a specific directory key.


For example, a 10K document will be split in 3 data fragments, each of them encrypted by their own AES-256 key. A 5K document will be encrypted with two AES-256 keys, one for the two data fragments. All these keys are protected by the wallet data key key. The directory part of the wallet which describes entries in the wallet is also encrypted by another wallet key: the directory key.

The tool allows to separate the data blocks which contain data fragments from other blocks. This allows to keep the wallet keys separate from the data. It is then possible to export the data blocks, which are encrypted in AES-256-CBC, to the Cloud without exposing the keys used for encryption.

If you want to know more about the implementation, have a look at the Ada Keystore Implementation chapter.

Using AKT

akt is the command line tool that you can use to protect and store your documents. It contains several commands:

  • create: create the keystore
  • edit: edit the value with an external editor
  • get: get a value from the keystore
  • help: print some help
  • list: list values of the keystore
  • remove: remove values from the keystore
  • set: insert or update a value in the keystore

To create the secure file, use the following command and enter your secure password (it is recommended to use a long and complex password):

  akt create secure.akt

You may also protect the keystore by using your GPG key. In that case, you can use the --gpg option and specify one or several GPG key ids. Using GPG is probably the best method to protect your akt files.

  akt create secure.akt --gpg 0xFC15CA870BE470F9

At this step, the secure file is created and it can only be opened by providing the password you entered. To add something, use:

  akt set secure.akt bank.password 012345

To store a file, use the following command:

  akt store secure.akt contract.doc

If you want to retrieve a value, you can use one of:

  akt get secure.akt bank.password
  akt extract secure.akt contract.doc

You can also use the akt command together with the tar command to create secure backups. You can create the compressed tar file, pipe the result to the akt command to store the content in the wallet.

  tar czf - dir-to-backup | akt store secure.akt -- backup.tar.gz

To extract the backup you can use the extract command and feed the result to the tar command as follows:

  akt extract secure.akt -- backup.tar.gz | tar xzf -

Using Ada Keystore

The Ada Keystore is the Ada 2012 library that is behind AKT. It should be quite easy to integrate the library in an existing Ada application to protect for example some sensitive configuration file. The Keystore is the main package that provides operations to store information in secure wallets and protect the stored information by encrypting the content. To use it, add the following with clause at beginning of your GNAT project:

  with "keystoreada";

To create a keystore you will first declare a Wallet_File instance. You will also need a password that will be used to protect the wallet master key.

with Keystore.Files;
  WS   : Keystore.Files.Wallet_File;
  Pass : Keystore.Secret := Keystore.Create ("There was no choice but to be pioneers");

You can then create the keystore file by using the Create operation:

  WS.Create ("secure.akt", Pass);

Values stored in the wallet are protected by their own encryption keys using AES-256. The encryption key is generated when the value is added to the wallet by using the Add operation.

  WS.Add ("Grace Hopper", "If it's a good idea, go ahead and do it.");

The Get function allows to retrieve the value. The value is decrypted only when the Get operation is called.

  Citation : constant String := WS.Get ("Grace Hopper");

The Delete procedure can be used to remove the value. When the value is removed, the encryption key and the data are erased.

  WS.Delete ("Grace Hopper");

Getting AKT

You can get AKT by using the Ubuntu 18.04 binary packages. You can do this by running:

wget -O - | sudo apt-key add -
sudo add-apt-repository "deb bionic main"
sudo apt-get install akt

For other platforms, you have to get it from the sources. Install the GNAT Ada compiler, either the FSF version or the GNAT GPL version and then, run the following commands:

git clone --recursive
cd ada-keystore
./configure --disable-nls
make build install

You can browse the documentation online: Ada Keystore Guide.

Summary of open-source projects - July 2018 Read more

by Gautier de Montmollin

Here is a list of projects I participate to on SourceForge. Click on the links below for details.
Some projects have GitHub mirrors too.
  • Ada Bar Codes
  • Ada PDF Writer - a standalone, portable package for producing dynamically PDF documents
  • AZip - a free, portable Zip Archive Manager
  • CBSG - the Corporate Bullshit Generator
  • Engine_3D
  • Excel Writer - a standalone, portable Ada package for producing Excel spreadsheets
  • GID - Generic Image Decoder
  • GLOBE_3D
  • GWindows / GNAVI - the GNU Ada Visual Interface
  • GNOGA - the GNU Omnificent GUI for Ada
  • HAC - HAC Ada Compiler
  • Ini file manager - a standalone, portable Ada package for configuration files
  • LEA - Lightweight Editor for Ada
  • Mathpaqs - collection of mathematical, 100% portable, packages in Ada
  • P2Ada - Pascal to Ada translator
  • TeXCAD - a program for drawing or retouching {picture}s in LaTeX
  • Wasabee - a Web browser with safety focus
  • Zip-Ada - a standalone, portable Ada library for .zip archives

Oh, and one more project which is not open-source, but based on the GNOGA framework listed above:

New GitHub mirrors Read more

by Gautier de Montmollin

New GitHub mirrors, for open-source projects I'm administrator or developer of, are located here.
Please ignore the old mirrors that relied on svn2github. If you see "svn2github" somewhere on a repository address, it's the old one → trash it!

You can find the same projects on SourceForge too, here.

The projects are...

ada-bar-codesAda Bar Codes: bar code (1D and 2D) generator in pure Ada

Ada PDF Writer: a standalone, portable package for producing dynamically PDF documents
AZip: a free, portable Zip Archive Manager
The Corporate Bullshit Generator
Engine_3D: a real-time, pure software, 3D engine for DOS-talgics. Abandoned project, but perhaps there are some interesting bits in the code... See GLOBE_3D for newer stuff !
Excel Writer: a standalone, portable Ada package for producing Excel spreadsheets
GID (Generic Image Decoder): a standalone, portable generic Ada package for decoding images
GLOBE_3D: a real-time 3D Engine written in Ada
GWindows: GUI framework for MS Windows
HAC Ada Compiler: an experimental Ada compiler, fully in Ada
Ini file manager: a standalone, portable Ada package for configuration files
Language Popularity Index: an automated version of the TIOBE index. Project is inactive at the moment, but perhaps there are some interesting bits in the code...
LEA is a Lightweight Editor for Ada
Mathpaqs: a collection of mathematical packages in pure Ada
Pascal to Ada translator
TeXCAD: a simple LaTeX {picture} drawing tool
Wasabee: a Web browser with safety focus
Zip-Ada: a standalone, portable Ada library for .zip archives

The Corporate Bullshit Generator - Business Agility Edition Read more

by Gautier de Montmollin

Our best-in-class, high-performance digitized business intelligence tool, the Corporate Bullshit Generator, just got a tremendous impulse thanks to no one less than Dilbert himself (see the October 28, 2019, cartoon: Business Agility Influencer) ! Here are a few gems including the new items, that the CBSG produces - by the thousands each second, beating the most talented managers worldwide and beyond !
  • The Global Chief Business Agility Officer (CBAO) influences our business process quality engineering.
  • Business agility and solution orientation empower a sales target by expanding boundaries.
  • The Chief Operations Solutionist (COS) activates a first-mover, state-of-the-art, cross-pollination across the entire spectrum.
  • An insightful say/do ratio strengthens our high-performing customer behavior patterns, whilst a hybridation quickly strengthens the mediators.
  • The Enterprise Chief Business Planning Influencer (CBPI) cost-effectively enforces synchronized assets.
  • The "why" behind visions will be best positioned to enforce our field workforce optimization.
  • Pre-integrated diversification is all about right, awareness-raising, usage-based and holistic data science innovation.
  • Our challenge is not to co-specify our Business Model Innovation (BMI). Our challenge is to call "check-mate" ahead of competition. 

    The Corporate Bullshit Generator - the Crossroads of Data Read more

    by Gautier de Montmollin

    Without fresh data from our fans, the Corporate Bullshit Generator could not stay at the cutting-edge of innovative data-centric business intelligence. Here are two key additions (coming from the same sentence):


    At the crossroads of supply-chain, bandwidth and reorganization, value stream management is all about business acumen.
    At the crossroads of values congruence, brand pyramid and socialization, the key to framework is technical strength.
    At the crossroads of relevance, responsibility and convergence, the General Senior Head of Management Office drives customer-centric co-innovations.



    Flat out, the standard-setters conversate by turning data into transformation processes.
    Actually, an open-door policy transgenerates our outward-looking, skills-based and up-to-the-minute success factors by turning data into superior-quality re-engineering.
    Adjacencies are on track by turning data into long-term, movements-based, rollout plan.
    The science-based action fosters our integrative document; this is why industry market shifts accelerate the analytics-based, hypothesis-driven, top-level and diversified case study by turning data into synergization.
    The product manager potentiates corporate data practices by turning data into trigger events.
    The enablers ignite our accountability by turning data into workforce adjustments.
    The standard-setters differentially right-size pipelines by turning data into business equation.
    As the consumer and commerce landscape continues to evolve, the group targets our frameworks by turning data into convictions.
    The Senior Vice Director of Facilities Management envisioneers scalings by turning data into cross-functional synergies.
    Our sourced say/do ratios influence the game changers by turning data into infrastructure.
    In order to improve, you need to promote advanced-analytics and first-mover support structures by turning data into outstanding issues.
    The stakeholders cost-effectively overcome our problems/difficulties by turning data into mind-blowing core values.
    To remain relevant, the Enterprise Chief Value Added Services Officer (CVASO) filters out our limitations by turning data into predictability.

    Thanks for the input - and enjoy!

    Controlling a Crazyflie Read more

    by Forward in Code

    This is a note on getting set up to work on a Crazyflie 2.0.

    After unpacking, testingand assemblingthe drone, you need to get some software to talk to it.

    Read more »

    Zip-Ada v.55 Read more

    by Gautier de Montmollin

    Changes in v.55:
    • Zip_Streams: ZS_Size_Type is now 64-bit signed, enabling Zip.Create to capture archive size overflows in Zip_32 mode.
    • Zip.Create raises Zip_Capacity_Exceeded when archive creation exceeds the Zip_32 format's capacity: 4GB total size, 65,535 entries.
    • Zip.Create is now using an Ada 2005+'s Containers's Hashed Maps; creation is much faster on Zip archives with many entries.
    • (Tools) ReZip has a new option for working only with its own internal compression algorithms - those provided by Zip.Compress. This option is useful if external tools are not available.
    • New Trained_Compression package: generic streaming encoder-decoder engine with the capability of training the engine with data known in advance, in order to achieve better compression. Not Zip-related.
    • Minimum required Ada version is now Ada 2005 (was Ada 95 before).

    AZip 2.25 Read more

    by Gautier de Montmollin

    AZip 2.25 screenshot - click to enlarge

    • Added buttons for New, Open and Toggle view commands.
    • Cases where Zip format capacity is exhausted are properly handled.
    • Sorting is a bit faster.
    AZip Web site:

    AZip 2.35 Read more

    by Gautier de Montmollin

    New AZip features since v.2.25:
    • Select columns menu entry allows you to select the columns that you find useful to be displayed (v.2.30)
    • Option for a default extraction directory (v.2.31)
    • Drag & Drop from a folder within AZip, to Windows Explorer or to the Desktop (v.2.35)
    • Context menus within AZip (v.2.35)
    Visit AZip home page here.

    Column selection - click to enlarge

    Option for a default extraction directory - click to enlarge

    Context menus with AZip - click to enlarge

    Drag & Drop between GWindows and Windows Explorer Read more

    by Gautier de Montmollin

    This article refers to the programming framework GWindows available here.


    Dragging files into your GWindow window is very easy:
    Have a call to Accept_File_Drag_And_Drop when desired:

       Window.Accept_File_Drag_And_Drop (True);


       procedure On_File_Drop (Window : in out My_Window_Type; File_Names : in Array_Of_File_Names); process the list of dropped file names – that’s it!
    A reason for this simplicity seems to be that the underlying message & event were introduced in Windows versions of the early 90’s, like perhaps 3.0 or 3.1 (did not dig too much into this…). Articles from various points in time of the last 25 years warn that feature will disappear “very soon, perhaps in the next version of Windows”, but as you may have seen all the way through Windows 10, Microsoft fortunately never removes features in Windows API – or do they?


    The reverse operation, dragging things that represent files out of your program’s window is notoriously complicated and poorly documented. Doing it requires complicated stuff of the Windows 95+ era with what seems to be an active connection with Windows explorer – with good chances of crashing the latter, or having at least some interesting delays because you are dragging the mouse pointer over a window or a shortcut representing data located on the other side of the planet. From the programming perspective, some proposed implementations give headaches just by reading the code snippets.

    Fortunately, there is a simple way used by some open-source software. Finally, you can be already happy with the file path indicated by the Windows Explorer window under the mouse cursor, right? Surprisingly, Windows lets you get the handle of any visible window (including buttons, edit boxes, …), and including those of foreign programs! Furthermore, you can get the root ancestor window of a window, then the tree of children, and for each child, their text (for instance button labels, contents of edit boxes, window titles). This technique leads to the knowledge of what kind of window is under the mouse cursor and to the contents of the address bar. If you are interested, you can see the details of the whole hack in the body of GWindows.Application (gwindows-application.adb). Fortunately the dirty stuff is hidden there, and the specification ( gives you access to those information through neat functions with only very innocent types: Integer, Boolean, GString.

       function Get_Window_Text_At_Location (X, Y : Integer) return GString;
       --  Returns the text of the window that contains the point (X, Y).
       --  It can be a window of any application, including the desktop.

       function Get_Window_Class_Name_At_Location (X, Y : Integer) return GString;
       --  Returns the class name of the window that contains the point (X, Y).
       --  It can be a window of any application, including the desktop.

       function Get_Window_Root_Class_Name_At_Location (X, Y : Integer)
          return GString;
       --  Returns the root class name of the window that contains
       --  the point (X, Y).
       --  It can be a window of any application, including the desktop.

       function Is_Desktop_At_Location (X, Y : Integer) return Boolean;

       function Explorer_Path_At_Location (X, Y : Integer) return GString;
       --  Returns the path from a Windows Explorer window (if meaningful),
       --  or the Desktop's path if (X, Y) points to the Desktop.
       --  In any other case, the returned string is empty.

    The code sample, cap_test.adb (in gwindows/samples/mouse/), built seamlessly from the project file gwindows_samples.gpr, will demonstrate those recently added functions.
    You can find a real usage of Explorer_Path_At_Location in the AZip Zip file manager, here:

    Screenshots of cap_test follow:

    The existing GWindows feature: identify a GWindows window (of any app) - click to enlarge

    Here, new GWindows.Application feature: a Windows Explorer is found, its path is given - click to enlarge
    Here, the desktop is under the mouse cursor, so the user's path to it is given - click to enlarge

    GitHub mirrors Read more

    by Gautier de Montmollin

    As promised, here is a list of GitHub clones of Ada open-source projects I'm participating to:
    Public Projects
    GitHub Clones
    Ada Bar Codes
    Ada PDF Writer
    Corporate Bullshit Generator
    Excel Writer
    GNAVI: GNU Ada Visual Interface
    Ini file manager

    UPDATE: the svn2github cloning service seems to be closed now.
    For newer sources, click here, click on "Show More", select a project, then click on "Code".

    Zip-Ada and AZip presentations at FOSDEM 2019 Read more

    by Gautier de Montmollin

    Shrink your Data to (almost) Nothing with Trained Compression

    Presentation is available as PDF and PPT.

    The AZip Archive Manager: a full-Ada Open-Source Portable Application

    Presentation is available as PDF and PPT.

    Click here for the whole list of presentations (8½ hours without break!) in the Ada developer room at FOSDEM 2019.

    Pasta! - Levels 37 to 40 Read more

    by Gautier de Montmollin

    Levels 37 to 40 of Pasta! are now available.
    Enjoy, and try to beat the best score!

    If you like the game, don't forget to "like" it with the Facebook button!






    MacOS Software Development Kit changes Read more

    by Forward in Code

    This post is based on the README from the corresponding Github repository.

    That repository attempts to cope with expected changes in Apple’s approach to software development kits, specifically where to find the system headers (you’d expect /usr/include).

    Read more »

    Coding Guidelines Read more

    by Forward in Code

    Coding_Guide """"""""

    This is a rather self-satisfied document, written in the mid-1990’s, which may still have some relevance.

    Coding Guide

    Purpose and Scope

    While it is hard to make a silk purse out of a sow’s ear (to create good code from a bad design), it is all too easy to do the reverse.

    The principle that clear, readable, understandable source text eases program evolution, adaptation, and maintenance is not dependent on the programming language in which the text is written. The purpose of this document is to indicate those language-independent techniques which can help you to produce source text with these qualities.

    Read more »

    Mojave vs. GCC Read more

    by Forward in Code

    After you've installed Xcode (or, my preference, the Command Line Tools via xcode-select -install) so that you can install and use GNAT, you may expect to be able to compile C code too.

    Mojave may surprise you with

    $ gcc casing.c -o casing
    casing.c:1:10: fatal error: stdio.h: No such file or directory
    1 | #include <stdio.h>
    | ^~~~~~~~~
    compilation terminated.

    The reason, according to this question and its answers, is that Apple's developer tools, in particular the clang compiler, know where to find the include files under /Library/Developer; GCC doesn't (I'm sure it could be made to, but ...) and so we have to add an extra step to install them in the normal place:

    $ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
    installer: Package name is macOS_SDK_headers_for_macOS_10.14
    installer: Installing at base path /
    installer: The install was successful.
    You may need to repeat this after macOS or Command Line Tools (or Xcode) updates.

    Pasta! - Level 34 Read more

    by Gautier de Montmollin

    First of all, ladies and gentlemen, welcome to the newcomer, the fusillone:

    The new pasta makes its first appearance in level 34 of the Pasta! game.

    Caution: it's a Piccante level, which means it's a tough one.
    Here are a few hints about how to tame it.

    • There are lots of moves at start (30), so your fate is (mathematically speaking) quite divergent: perhaps you'll be very lucky quite early, perhaps not at all. Don't give up, and try again!
    • Spot the 4's, the L's and T's early to earn points, even if all this basil is still blocking you (usually the tactic is to get rid of obstacles first)
    • Try to clear as much basil as possible in single moves (like the three fusillone on the bottom left in the picture)
    • Once there is more room on the plate, don't forget the general rule of these kind of games: do matches on the bottom, so you trigger more chain reactions.
    • Remember that there is an infinity of lives in this game, and that you can restart a level at any time either by clicking on the map, but, even easier, by clicking the Reload button!

    As a bonus, here is the development Pasta! server, running from the GNAT Programming Studio (GPS), with level 34 as source code.
    Click to enlarge

    Pasta! - Level 35 Read more

    by Gautier de Montmollin

    Level 35 of Pasta! is easy.

    However you'll notice the redoubtable Antipasta hiding below basil layers.
    Still, they can trigger nice chain reactions...

    Pasta! - level 35
    As a bonus, I've written down how much time it took to build this level.

    • 7 minutes from the sketch on paper to Ada code, using two editors: LEA and GNAT Programming Studio (GPS) including debugging: Ada detects at compile-time bugs like size mismatches or type errors. The only run-time issue was an infinite loop with rows of identical Antipasta. Perhaps it is a bug, or there are really no possible combination without immediate match for the startup board. I did not look into this.
    • 15 minutes testing the first version, which was a bit boring with nine columns and too few pasta sorts - that is, too many pasta of the same kind.
    • After reducing the number of columns from nine to seven and increasing the number of sorts of pasta, it became much funnier.
    • After v2 (2 minutes of testing), came v3 (7 minutes) and a few others (30 minutes in total) with always smaller fine-tuning for the number of rounds, the threshold in points, that corresponds to an easy (but not too easy) level.