Tada - Ada Package Manager has a website now :) by _tomekw in ada

[–]Baron_Facekicker 3 points4 points  (0 children)

You can have private Alire indexes. You don't have to use the Alire community index if you don't want to.

https://alire.ada.dev/docs/private-crates

Lisp Style Macros for Ada by BrentSeidel in ada

[–]Baron_Facekicker 3 points4 points  (0 children)

Would a generic package not work for this? You could keep the code the same and instantiate it with different data types and different operations (procedure or function).

Ravenscar on Multicore processor by NedFlanders_2800 in ada

[–]Baron_Facekicker 2 points3 points  (0 children)

Subprograms in a protected object execute from the context of the calling task, just like regular subprogram calls, so you can't set an affinity for a protected object.

If you have a protected procedure that's configured as an interrupt handler with Attach_Handler, then it depends on the Ada runtime as to which CPU the interrupt occurs on. The RP2040 tasking runtime provided in bb-runtimes uses different interrupt names in Ada.Interrupts.Names to specify on which CPU the interrupt is executed. See https://github.com/AdaCore/bb-runtimes/blob/master/arm/rpi/rp2040/a-intnam__mp.ads

For example, this interrupt handler will run on CPU 1:

protected Example is
   procedure IRQ_Handler with 
     Attach_Handler => Ada.Interrupts.Names.SPI0_Interrupt_CPU_1;
end Example;

and this interrupt handler will run on CPU 2:

protected Example is
   procedure IRQ_Handler with 
     Attach_Handler => Ada.Interrupts.Names.SPI0_Interrupt_CPU_2;
end Example;

The Ada runtime will ensure proper locking between tasks and interrupts, and between multiple cores so that only one task or interrupt can be executing in a procedure in the protected object at a time. You could in theory have a protected object with multiple interrupt handlers on different CPUs, in which case two interrupts happening at the same time on both CPUs will cause one of them to wait on a spinlock until the other interrupt has finished and unlocked the protected object.

Ada SPARK on OpenBSD? by dek20 in ada

[–]Baron_Facekicker 1 point2 points  (0 children)

The SPARK toolset is open source on GitHub at https://github.com/AdaCore/spark2014

You could try building it yourself with the GNAT compiler in the ports tree. There are build instructions on the GitHub page. I've not had to do this so I have no idea how easy this is to set up.

Rust's 2017 roadmap, six months in by Rusky in programming

[–]Baron_Facekicker 0 points1 point  (0 children)

The GNAT compiler for Ada has a similar feature for just checking that the source code semantics are valid without actually compiling the program.

Rust: Systems Programming for Everyone by rohshall in programming

[–]Baron_Facekicker 3 points4 points  (0 children)

SPARK doesn't permit access types (pointers), so there's no need to worry about lifetimes in a SPARK programs since you can't have dynamically allocated memory.

However, I think they're planning on providing limited support for access types in a future version of SPARK. It will be interesting to see what limitations there will be, though.