❌ About FreshRSS

Normal view

There are new articles available, click to refresh the page.
Before yesterdayNews from the Ada programming language world

Alire - inability to install some packages from the repository

I am currently learning to program in Ada and I use Alire to set up my projects. As part of my testing, I occasionally install a crate and investigate it, I found a bug with Honki_tonks_zivilisationen:


Create exists, if I try to find it using the web interface I am successful:




However, I don't see the game in the Linux command line:

$ alr search --crates Honki_tonks_zivilisationen

No hits

$ alr search --crates Honki

No hits

$ alr search --crates honki

No hits

$ alr search --crates stefan

No hits

Another crate, e.g. Eagle lander, is OK:

$ alr search --crates eagle

eagle_lander Apollo 11 lunar lander simulator

Using the command to display all available Alire packages I also don't see it.

alr search --list --full

I am using Arch Linux with Alire 1.2.2 version.

Can I ask to check if I am making a mistake somewhere? Alire is a great tool like Cargo and I would like to use it in my teaching and in the future for all projects.

submitted by /u/Krouzici_orel
[link] [comments]

Gprbuild and working with variables and source files in UTF-8

I am currently learning Ada. I am a developer from Czech Republic and with modern languages (Python, Java, Rust) it is not a problem to use UTF-8 characters in variable names and files. I assumed that the Ada language does not offer this possibility, but I found a very nicely written article by Maxim Reznik, who solved the same problem with Russian alphabet characters:


For example, if I have a source file named:




and content (where I test both Russian and Czech alphabet characters):


with Ada.Wide_Text_IO;

procedure Kroužící_orel is

Привет : constant Wide_String := "Привет";

Kroužící_opeřenec : constant Wide_String := "Kroužící opeřenec";


Ada.Wide_Text_IO.Put_Line (Привет);

Ada.Wide_Text_IO.Put_Line (Kroužící_opeřenec);

end Kroužící_orel;


I can compile it using the command:


gnatmake -gnatWu kroužící_orel.adb




gnatmake -gnatWu -gnatiw kroužící_orel.adb


However, if I create a GPR project with the following directory structure:



/src - kroužící_orel.adb



where the file kroužící_orel.gpr contains:


project Kroužící_orel is

for Source_Dirs use ("src");

for Object_Dir use "obj";

for Main use ("kroužící_orel.adb");

package Compiler is

for Switches ("ada") use ("-gnatWu");

for Switches ("ada") use ("-gnatiw");

end Compiler;

end Kroužící_orel;


I get an error messages:


gprbuild kroužící_orel.gpr

kroužící_orel.gpr" is not a valid path name for a project file

kroužící_orel.gpr:1:14: illegal character

kroužící_orel.gpr:1:16: illegal character

kroužící_orel.gpr:1:19: illegal character

kroužící_orel.gpr:1:20: unknown variable "_Orel"

kroužící_orel.gpr:12:10: illegal character

kroužící_orel.gpr:12:11: expected "krouUe5"

gprbuild: "kroužící_orel.gpr" processing failed


If I rename the files kroužící_orel.adb and kroužící_orel.gpr to krouzici_orel.adb and krouzici_orel.gpr (here I change the directives Project, for Main use and end to Krouzici_orel), the translation with gprbuild is OK.

All in all, the only problem gprbuild has is when trying to translate source files in UTF-8 encoding. Would any of the more experienced Ada developers have a suggestion for a solution? I like to use the Czech language in my test applications, but on the other hand it's not something I can't live without.

submitted by /u/Krouzici_orel
[link] [comments]

Translation and possible adaptation of the book Learning Ada 2012 by writing simple games

Have a nice morning,

I've been interested in the Ada language for a while now, and I've decided to focus on it a lot more. I have a basic experience with Python, but Ada has impressed me with its nice readability and static control.

I've tried Adacore's tutorials and browsed the available books, for a beginning developer I find David C Levy's book Learning Ada 2012 by writing simple games ideal. I live in the Czech Republic and I would like to translate this book into Czech, or adapt it for a modern take on the language (using Alire, replacing AdaGIDE with the more modern Gnat Studio or VSCode etc.). I was thinking of translating and editing along with learning the language from the book.

However, I don't have contact details for the author to ask if translation and possible editing is possible, although I have tried to find it on the internet.

Isn't there anyone here on the forum who could provide it for me? I wouldn't want to infringe copyright.

Thank you very much in advance and goodbye for now

Ludek Stastny

Czech Republic

submitted by /u/Krouzici_orel
[link] [comments]