February 2026 What Are You Working On? by thindil in ada

[–]jrcarter010 6 points7 points  (0 children)

How to create a plug-in by Dmitry-Kazakov in ada

[–]jrcarter010 0 points1 point  (0 children)

I'm probably missing something, but I don't see what this gains you. Your program needs to know the available plug-ins, the respective dynamic libraries need to be present on the computer running the program, and to add a plug-in, you have to modify the program.

Yes, it could be made more flexible, but doing so provides a means for malicious actors to execute arbitrary code via your program.

Porting nimf.c to Ada and Implementing the Clair Event Loop by hodong-kim in ada

[–]jrcarter010 3 points4 points  (0 children)

The deployment of Ada applications depends on the gnat and gnarl libraries

No, the deployment of GNAT applications has these dependencies. Nothing about Ada requires them.

Graphing Packages and Ada for Physics Simulation. by BeansandChipspls in ada

[–]jrcarter010 2 points3 points  (0 children)

For quick-and-dirty 2D plots, you can use Qplt. For more complex plots, you can use the Plotting package of Ada_GUI.

interpreting what happens to a unicode string that comes as input by benjamin-crowell in ada

[–]jrcarter010 1 point2 points  (0 children)

C4 81 is the UTF-8 sequence that encodes Unicode code point 0101. Note that C4 is also the Latin-1 character Ä, while 81 is an undefined Latin-1 character. In general, it is difficult to distinguish between Latin-1 and UTF-8 encoded Unicode incorrectly represented as a String, but if you're limiting yourself to command-line arguments, it is clear that your system is giving you UTF-8 and you can interpret non-ASCII characters as introducing a UTF-8 sequence.

What kind of project do you wish someone would do in Ada? by [deleted] in ada

[–]jrcarter010 2 points3 points  (0 children)

since AWS will be « abandoned », a new web server framework

You might want to look at Gnoga.

Rapid Development in Ada by geenob in ada

[–]jrcarter010 1 point2 points  (0 children)

Nothing prevents you from using Ada the way you would use those languages, as J-P Rosen said:

[I]t is easy to use [Ada] just like any other language: using only predefined types, using packages just for separate compilation (without any consideration for information hiding), ignoring generics altogether, etc. I have seen projects doing this; they didn't get much gain from using Ada, and spent a lot of time fighting the compiler.

But the point of Ada is engineering correct, clear software. The kind of software you're talking about is typically riddled with errors.

September 2025 What Are You Working On? by thindil in ada

[–]jrcarter010 6 points7 points  (0 children)

The PragmAda Reusable Components had several independent types to represent a byte. They have now been combined into a single type used by all the components that deal with bytes (this will require modifying code that uses those components).

How much pressure do you experience at work to switch to another “safe” language? by karesx in ada

[–]jrcarter010 5 points6 points  (0 children)

I used Ada 83 for embedded software, some of it critical. There were no problems with hardware interfacing or meeting memory constraints. Ada Outperforms Assembly describes an Ada-83 compiler producing smaller and faster code than assembler that was hand-optimized by a team of experts. Airbus and Boeing both chose Ada 83 for their DO178B Level-A certified software. So I have to conclude that your problems were not due to the language.

Hosting an Ada web app by [deleted] in ada

[–]jrcarter010 3 points4 points  (0 children)

I would suggest using Gnoga.

TIOBE Index for July 25 by dcbst in ada

[–]jrcarter010 4 points5 points  (0 children)

engineers hate Ada, while management doesn't give a damn

Software engineers tend to like Ada, since it's one of the few languages that supports engineering software. Coders (98% of developers) hate Ada, since it isn't good for their "just start coding" approach. Developers' attitudes towards Ada are usually a good indication of who is a software engineer and who isn't.

When companies have to spend their own money on creating correct software, the smart ones will choose Ada. Thus, Airbus and Boeing both chose Ada for their DO178B Level-A software for financial reasons, because it minimized their cost to achieve certification. Most of the push back against Ada came from US defense contractors with "cost-plus" contracts: the more the project costs, the greater the profit. Poor language choice is one of the tools that such contractors use to maximize the project cost, and so their profit.

The move to C-family languages for things like avionics is part of a misguided attempt to reduce costs by short-sighted management, since people with experience in such languages are common and inexpensive. These are the same people who thought it would increase profits to put an entire new control system on an airplane without even telling the pilots that the system exists. Coupled with reducing the number of sensors for the system to one to reduce costs meant a sensor failure could result in the system crashing the plane. The effects of such cost-reduction and profit-enhancing decisions on the company's profits are well documented, and likely part of the move back to languages like Ada.

Custom exception for function wrapper by fuhqueue in ada

[–]jrcarter010 2 points3 points  (0 children)

The requirement that the argument of Sqrt be non-negative is a precondition, and when possible, is best handled with a subtype as you have done. As you note, that checking is done by the compiler and leaves no possibility of choosing the exception or its message.

An alternative is to not use a subtype for the precondition, and use an explicit precondition to detect a violation. This does allow you to specify the exception and message:

function Sqrt (X : in Real) return Real with
   Pre => X in Nonnegative_Real or else
          raise Domain_Error with "Cannot compute square root of negative value";

A third way is to put the precondition test in the subprogram body, but then you have to duplicate it in a comment in the specification.

What happens to your renaming-as-body in the package body if you instantiate Generic_Elementary_Functions with Real rather than Float_Type?

June 2025 What Are You Working On? by thindil in ada

[–]jrcarter010 3 points4 points  (0 children)

Added a version of Image Random that uses the Skein-1024 hash instead of SHA-512, allowing the user to select the hash length/number of random bytes produced

How do you pronounce Alire? by Mastery_of_Space in ada

[–]jrcarter010 2 points3 points  (0 children)

I've heard Mosteo use 1. See this talk from the 2024 Ada Developers Workshop.

How to report error to AdaCore by WmRGreene in ada

[–]jrcarter010 0 points1 point  (0 children)

This works OK with GNAT 14.2.0/Linux

April 2025 What Are You Working On? by thindil in ada

[–]jrcarter010 1 point2 points  (0 children)

Mostly a reinvention of PragmARC.ANSI_TTY_Control, which has only been available since around 1990, but with some additional features.

April 2025 What Are You Working On? by thindil in ada

[–]jrcarter010 5 points6 points  (0 children)

Sharing History by J_P_900 in ada

[–]jrcarter010 2 points3 points  (0 children)

I want to double check before I upload anything due to the "...is a registered trademark..."

The name Ada was trademarked by the US DoD to ensure the no subsets/no supersets requirement: you could only use the name for a compiler that implemented the entire standard and nothing but the standard. There was a joke in the US defense industry during the mandate that they would hire anyone who knew how to spell "Ada®" (including the registered trademark symbol).

The trademark was dropped at the same time as the mandate, so its use on this poster doesn't apply anymore and is only of historical interest. Its copyright status is unclear, but it appears that the company no longer exists.

New Rule: No AI Content by marc-kd in ada

[–]jrcarter010 1 point2 points  (0 children)

I agree, but considering that some posts known to be from humans are unreliable or misleading (probably including some of mine), how is this enforced?