New releases of Ada Web Application et al.

By Stephane Carrez

To celebrate the France's victory at World Cup, and also because I've not made new releases for a long time, several new releases are available for several Ada projects.

Read more
To add a comment, you must be connected. Login to add a comment

Writing an Ada programmer's guide with Dynamo, Pandoc and Read the Docs

By Stephane Carrez

Writing and maintaining documentation is always a pain for a developer. Most of the time, the documentation is not updated after some changes are made in the code and the documentation becomes out of date. What is described here is not a miracle but it helps in promoting to have an accurate documentation together with the implementation.

Read more
To add a comment, you must be connected. Login to add a comment

Generating a REST Ada client with OpenAPI and Swagger Codegen

By Stephane Carrez

The OpenAPI initiative aims at defining a standard for the specification of REST API. The OpenAPI Specification (OAS) defines a programming language-agnostic interface to describe a REST API. The Swagger Codegen generator supports more than 28 different languages (including Ada) and it is able to read an OpenAPI document and generate either the documentation or the client and server REST code for several target languages.

Read more
To add a comment, you must be connected. Login to add a comment

Using the Gnome and KDE Secret Service API in Ada

By Stephane Carrez

The Gnome and KDE desktop environments have designed a shared service API to allow applications to protect, retrieve and manage their secret data such as passwords and private keys. The Secret Service API defines the mechanisms and operations that can be used by applications to use the service.

Read more
To add a comment, you must be connected. Login to add a comment

Rest API Benchmark comparison between Ada and Java

By Stephane Carrez 3 comments

Arcadius Ahouansou from Menelic.com made an interesting benchmark to compare several Java Web servers: Java REST API Benchmark: Tomcat vs Jetty vs Grizzly vs Undertow, Round 3. His benchmark is not as broad as the TechEmpower Benchmark but it has the merit to be simple to understand and it can be executed very easily by everyone. I decided to make a similar benchmark for Ada Web servers with the same REST API so that it would be possible to compare Ada and Java implementations.

Read more
3 comments
To add a comment, you must be connected. Login to add a comment

Atlas 1.0.0 the Ada Web Application demonstrator available as Docker image

By Stephane Carrez

Atlas is a small application intended to show various features provided by the Ada Web Application framework.

Read more
To add a comment, you must be connected. Login to add a comment

Simple UDP Echo Server on STM32F746

By Stephane Carrez

Writing a simple UDP server in Ada for a STM32F746 ARM controller is now easy with the use of the Ada Embedded Network stack. The article describes through a simple UDP echo server the different steps for the implementation of an UDP server.

Read more
To add a comment, you must be connected. Login to add a comment

Ethernet Traffic Monitor on a STM32F746

By Stephane Carrez

EtherScope is a monitoring tool that analyzes the Ethernet traffic. It runs on a STM32F746 board, reads the Ethernet packets, do some real-time analysis and displays the results on the 480x272 touch panel.

Read more
To add a comment, you must be connected. Login to add a comment

Using the Ada Embedded Network STM32 Ethernet Driver

By Stephane Carrez

The Ada Embedded Network is a small IPv4 network stack intended to run on STM32F746 or equivalent devices. This network stack is implemented in Ada 2012 and its architecture has been inspired by the BSD network architecture described in the book "TCP/IP Illustrated, Volume 2, The Implementation" by Gary R. Wright and W. Richard Stevens.

This article discusses the Ethernet Driver design and implementation. The IP protocol layer part will be explained in a next article.

Read more
To add a comment, you must be connected. Login to add a comment

Using the Ada Wiki Engine

By Stephane Carrez

The Ada Wiki Engine is a small Ada library that parses a Wiki text in several Wiki syntax such as MediaWiki, Creole, Markdown and renders the result either in HTML, text or into another Wiki format.

Read more
To add a comment, you must be connected. Login to add a comment

GCC 6.1 Ada Compiler From Scratch

By Stephane Carrez

GCC 6.1 release has been announced recently by Jakub Jelinek and it is now time to build a new Ada compiler with it. The process to do that is not complex but contains a few pitfalls.

Read more
To add a comment, you must be connected. Login to add a comment

New releases for Ada Util, Ada EL, Ada Security, Ada Database Objects, Ada Server Faces, Dynamo

By Stephane Carrez

A new release is available for several Ada projects.

Read more
To add a comment, you must be connected. Login to add a comment

Using Ada LZMA to compress and decompress LZMA files

By Stephane Carrez

liblzma is a public domain general-purpose data compression library with a zlib-like API. liblzma is part of XZ Utils which includes a gzip-like command line tool named xz and some other tools. XZ Utils is developed and maintained by Lasse Collin. Major parts of liblzma are based on Igor Pavlov's public domain LZMA SDK. The Ada LZMA library provides an Ada05 thin binding for the liblzma library and it allows to use all the operations provided by the compression and decompression library.

Read more
To add a comment, you must be connected. Login to add a comment

Using MAT the Memory Analysis Tool

By Stephane Carrez

MAT is a memory analysis tool that monitors calls to malloc, realloc and free calls. It works with a small shared library libmat.so that is loaded into the program with the LD_PRELOAD dynamic linker feature (See the ld.so(8) man page). The library overrides the malloc, realloc and free function to monitor calls to these functions. It then writes or sends probe events which contain enough information for mat to tell what, when, where and by whom the memory allocation was done.

Read more
To add a comment, you must be connected. Login to add a comment

Ada BFD 1.1.0 is available

By Stephane Carrez

Ada BFD is an Ada binding for the GNU Binutils BFD library. It allows to read binary ELF, COFF files by using the GNU BFD and allows your program to read ELF sections, get access to the symbol table and use the disassembler.

Read more
To add a comment, you must be connected. Login to add a comment

NetBSD 6.1.5 upgrade

By Stephane Carrez

Once every year I try to upgrade one of my virtual machine which is running NetBSD. This description is a short reminder for the major steps for the upgrade process.

System upgrade

The NetBSD system is upgraded by using the following command:

poseidon$ sudo sysupgrade auto ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-6.1/i386

During the upgrade it will ask whether some system files have to be replaced, merged or kept unmodified.

GCC Ada Package Upgrade

The GCC Ada compiler is now based on GCC 4.9. I did the upgrade by using the following command:

poseidon$ sudo pkg_add -uu gcc-aux-20140422nb3 pkg_add: Warning: package `gcc-aux-20140422nb3' was built for a platform: pkg_add: NetBSD/i386 6.0 (pkg) vs. NetBSD/i386 6.1.4 (this host)

The gprbuild package must also be upgrade:

poseidon$ sudo pkg_add -u gprbuild-aux-20130416 pkg_add: Warning: package `gprbuild-aux-20130416' was built for a platform: pkg_add: NetBSD/i386 6.0 (pkg) vs. NetBSD/i386 6.1.4 (this host) pkg_add: Warning: package `gnat_util-20140422' was built for a platform: pkg_add: NetBSD/i386 6.0 (pkg) vs. NetBSD/i386 6.1.4 (this host)

And because I also use some other packages such as xmlada, the following package is also upgrade:

poseidon$ sudo pkg_add -u xmlada-4.4.0.0nb1 pkg_add: Warning: package `xmlada-4.4.0.0nb1' was built for a platform: pkg_add: NetBSD/i386 6.0 (pkg) vs. NetBSD/i386 6.1.4 (this host)

Before running an Ada program compiled by GCC 4.9

The GCC 4.9 Ada compiler works very well but it comes with a specific libgcc_s.so file installed in /usr/pkg/gcc-aux/lib. By default libgcc_s.so is installed on the system in /usr/lib/libgcc_s.so or /usr/pkg/lib/libgcc_s.so and they were compiled by GCC 4.5.3 or GCC 4.6.4.

If you use the wrong libgcc_s.so, the program will almost work except when a exception is raised: none of the exception can be caught and the program terminates as though there was no exception handler.

What happens is that the GCC 4.6 frame unwinder is unable to correctly identify the frames generated by GCC 4.9. The solution is of course to use the correct library and we can do this by setting the following environment variable before starting any program:

poseidon$ export LD_LIBRARY_PATH=/usr/pkg/gcc-aux/lib
To add a comment, you must be connected. Login to add a comment

Extending an ext4 LVM partition

By Stephane Carrez 2 comments

From time to time a disk partition becomes full and it becomes desirable to grow the partition. Since I often don't remember how to do this, I wrote this short description to keep track of how to do it.

Extending the LVM partition

The first step is to extend the size of the LVM partition. This is done easily by using the lvextend (8) command. You just need to specify the amount and the LVM partition. In my case, the vg02-ext volume was using 60G and the +40G command will grow its size to 100G. Note that you can run this command while your file system is mounted (if you grow the size of your LVM partition).

$ sudo lvextend --size +40G /dev/mapper/vg02-ext Extending logical volume ext to 100.00 GiB Logical volume ext successfully resized

Preparing the ext4 filesystem for resize

Before resizing the ext4 filesystem, you must make sure it is not mounted:

$ sudo umount /ext

The file system must be clean and you should run the e2fsck (8) command to check it:

$ sudo e2fsck -f /dev/mapper/vg02-ext e2fsck 1.42 (29-Nov-2011) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/mapper/vg02-ext: 1974269/3932160 files (0.1% non-contiguous), 14942044/15728640 blocks 5.392u 1.476s 0:48.25 14.2% 0+0k 3208184+48io 2pf+0w

Resizing the ext4 filesystem

The last step is to resize the ext4 file system by using the resize2fs (8) command. The command can enlarge or shrink an unmounted file system of type ext2, ext3 or ext4. The command only needs the block device path to operate.

$ sudo resize2fs /dev/mapper/vg02-ext resize2fs 1.42 (29-Nov-2011) Resizing the filesystem on /dev/mapper/vg02-ext to 26214400 (4k) blocks. The filesystem on /dev/mapper/vg02-ext is now 26214400 blocks long.

After the resize, we can re-mount the ext4 partition:

$ sudo mount -a
2 comments
To add a comment, you must be connected. Login to add a comment

Ada BFD 1.0.1 is available

By Stephane Carrez

Ada BFD is an Ada binding for the GNU Binutils BFD library.

It allows to read binary ELF, COFF files by using the GNU BFD and allows your program to read ELF sections, get access to the symbol table and use the disassembler.

The new version fixes build and compilation issues with recent releases of GNU Binutils and it also provides support to build Debian packages.

http://download.vacs.fr/ada-bfd/ada-bfd-1.0.1.tar.gz

To add a comment, you must be connected. Login to add a comment

Ada Web Application 1.0.0 is available

By Stephane Carrez

Ada Web Application is a framework to build web applications.

The new version of AWA provides:

  • New countries plugin to provide country/region/city data models
  • New settings plugin to control application user settings
  • New tags plugin to easily add tags in applications
  • New <awa:tagList> and <awa:tagCloud> components for tag display
  • Add tags to the question and blog plugins
  • Add comments to the blog post

AWA can be downloaded at http://blog.vacs.fr/vacs/download.html

A live demonstration of various features provided by AWA is available at http://demo.vacs.fr/atlas

A small tutorial explains how you can easily setup a project, design the UML model, and use the features provided by the Ada Web Application framework.

To add a comment, you must be connected. Login to add a comment

New releases available for Ada Utility, Ada EL, Ada Security, Ada Server Faces, ADO, Dynamo

By Stephane Carrez

A maintenance release is available for the following Ada packages:

Ada Utility Library: Version 1.7.1

  • Support XmlAda 2014
  • Fixed Get_Week_Start/Get_Week_End when the system timezone is different than the asked timezone

Download: http://download.vacs.fr/ada-util/ada-util-1.7.1.tar.gz

Ada EL: Version 1.5.1

  • Fix minor configuration issue with GNAT 2014

Download: http://download.vacs.fr/ada-el/ada-el-1.5.1.tar.gz

Ada Security: Version 1.1.1

  • Fix minor configuration issue with GNAT 2014

Download: http://download.vacs.fr/ada-security/ada-security-1.1.1.tar.gz

Ada Server Faces: Version 1.0.1

  • Fix minor configuration issue with GNAT 2014
  • Fix concurrent issues in facelet and session cache implementation

Download: http://download.vacs.fr/ada-asf/ada-asf-1.0.1.tar.gz

Ada Database Objects: Version 1.0.1

  • Fix minor configuration issue with GNAT 2014

Download: http://download.vacs.fr/ada-ado/ada-ado-1.0.1.tar.gz

Dynamo: Version 0.7.1

  • Fix minor configuration issue with GNAT 2014

Download: http://download.vacs.fr/dynamo/dynamo-0.7.1.tar.gz

To add a comment, you must be connected. Login to add a comment