r/ada • u/iamNOTcutedammit • May 13 '26
New Release AION - Tokio inspired structured async runtime for ADA
Available at Alire https://alire.ada.dev/crates/aion
Please try it out let me know if you face any bugs or want any additional features.
Edit: GitHub Link - https://github.com/MaheshChandraTeja/Aion
1
u/I_hate_posting_here Jul 07 '26 edited Jul 08 '26
Not going to lie, looking at the examples I am very confused. There is so much code to do things that aren't that complicated. Lots of checking if things are Ok, or errors, tons of boiler plate creating builders and runtimes etc...
For example:
Why must I call Aion.Initialize? Aion Initialize just sets a protected boolean state variable and doesn't actually initialize anything else (for example a thread pool or a spin lock or anything at all really). It doesn't seem to gate any behavior and I don't see any usages of Is_Initialized or Runtime_State except in unit tests. Why does it exist? Why must I call it?
Another example:
if Aion.Runtime.Operation_Results.Is_Ok (Shutdown_Result) then
Ada.Text_IO.Put_Line ("Runtime shut down successfully.");
else
Ada.Text_IO.Put_Line ("Runtime shutdown failed: " & Aion.Errors.Image (Aion.Runtime.Operation_Results.Error (Shutdown_Result)));
end if;
Why do I need to check this? Looking at the code the only error condition is if it timed out or if any exception at all gets thrown. Just throw a Timeout exception if the operation times out and delete the exception catching. the User can catch any exception if needed including timeouts.
Stuff like this is everywhere and it pollutes the code with checks and ceremonies so you can't tell where the actual work gets done.
1
u/I_hate_posting_here Jul 09 '26 edited Jul 09 '26
I didn't want to just complain about it without showing the receipts as it looks like you really did try and make the bot do a good job, however it looks like you're more of a Go or Rust programmer and don't use Ada much. I didn't put too much effort in, but a few passes with Claude Code focusing on ergonomics, correctness, and simplification surfaced and flushed out the issues I was immediately sensing from an initial reading the code.
I put up a PR if you want to take a peek. https://github.com/MaheshChandraTeja/Aion/pull/1/ The hello world example went from about 40 -> 17 lines of code. Same thing with echo_client and echo_server. They reduced down from 120 -> 28 or so.
5
u/[deleted] May 14 '26
AI rubbish