
The OpenBSD Ada Library - verisimilitudes
http://verisimilitudes.net/2019-07-27
======
inamberclad
Ada is my favorite 'almost' language. I'm writing a Kalman filter example in
it right now. Just about every programming error from some large C/C++
codebase wouldn't happen in Ada. It's got manual and automatic memory
management, separate storage pools, packed arrays, arbitrary precision
floating point types, fixed point types, checked integers, generic packages
and functions, tasking, real-time support (how many other languages have a
Delay_Until function in the standard library?)... It's like graphene - it does
everything except get used in the real world (outside of specialized
applications like Aerospace).

A fun thing to do is look for Ada tutorials from after the year 2000. There
aren't many.

~~~
Tomte
Ada is hindered by the compiler situation.

The GCC frontend has always been second-tier at best, and AdaCore is very
expensive (it's technically GPL, but you will never get a copy, except
directly from AdaCore with further contractual restrictions).

They finally released a "Community Edition", but you may only develop Open
Source software with it.

It's a shame. Ada is really nice.

~~~
inamberclad
I thought the GNU version that comes with most distros was under the same
license as the rest of GCC?

~~~
Tomte
Yes, but the GCC frontend is always a few steps behind, big parts of the test
suite are proprietary, the Annexes aren't implemented (AFAIK), and –
(hyperbolically) everybody who gained proficiency with gnat-gcc was hired by
AdaCore.

------
notaplumber
OpenBSD pledge(2) and unveil(2) are relatively easy to create high level
language bindings for, and users have already contributed several in the
community, like this latest one for Ada. In base, OpenBSD only supports C/C++,
however a Perl interface is also included.

[https://man.openbsd.org/man3p/OpenBSD::Pledge.3p](https://man.openbsd.org/man3p/OpenBSD::Pledge.3p)

[https://man.openbsd.org/man3p/OpenBSD::Unveil.3p](https://man.openbsd.org/man3p/OpenBSD::Unveil.3p)

A few bindings are also maintained in ports, for example GHC/Haskell (unix
package) & Node.js (node-pledge) include them out of the box.

For an unofficial list of highlevel language bindings:
[https://gist.github.com/ligurio/f6114bd1df371047dd80ea9b8a55...](https://gist.github.com/ligurio/f6114bd1df371047dd80ea9b8a55c104)

~~~
verisimilitudes
Yes; this was good to ''cut my teeth on'', as it's a rather simple package
and, being so self-contained, I'm actually entirely pleased with its
specification.

>In base, OpenBSD only supports C/C++, however a Perl interface is also
included.

I'm soon going to drop by the OpenBSD mailing list and see if they're
interested in including this in their prepackaged GNAT. It won't harm to ask.

Related to this, I intend to write a binding for Common Lisp, at some point,
although that will be far more arduous, all things considered.

