Recent submissions

Comment · 4 years ago
Comment · 4 years ago
This website is just a community effort to modernize parts of the online resources, because many parts like the current Ada Reference Manual look like they're from the 90s.
Comment · 4 years ago
Title page with legal info has been added!
Comment · 4 years ago
The text at the bottom says "unless otherwise noted". The .md files for the AARM are autogenerated and it seems the legal + foreword pages are missing. These indeed need to be added. The announcement was done by an external person, but nonetheless thanks for bringing it to our attention. The website is still work in progress and is intended to be handed off to the Ada community.
Comment · 4 years ago
Arrays in Ada start at the index based on the index type of the array. You can even use an enumeration type as the index:

    type Day is (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday);
    type Hours is array (Day range <>) of Natural;

    V : Hours (Monday .. Friday);
Which index type you should use depends on the problem that you're trying to model. You can find out the lower/higher end of a type/variable with the 'First and 'Last attributes.

IIRC there's an RFC though to force the lower end of the index to a certain value like 1 or any other number/enum.

Comment · 4 years ago
I had a similar problem last month where I needed to compute some results on multiple datasets (with a little bit of concurrency per dataset). In the end I just ported the code to Ada which makes it very easy to create task hierarchies. You can define variables of task types on the 'stack' and the program leaves the enclosing block when the variables can go out of scope after every task has finished. I can now easily put all cores to maximum use. The list comprehensions in Python became a little bit more verbose though because I had to use an older revision (2012) instead of the new 2022 revision.
Comment · 4 years ago
In Ada you can do something similar:

    delay 0.3;
Or with package Ada.Real_Time:

    delay To_Duration (Milliseconds (300));
Or use `delay until`:

    delay until Clock + Milliseconds (300);
`delay until` is useful in loops because `delay` sleeps at least the given duration, so you get drift. (You call Clock only once and store it in a variable before the loop and then update it adding the time span each iteration)
Comment · 4 years ago
You can use git pull with the --allow-unrelated-histories option.
Comment · 4 years ago
Comment · 4 years ago
Comment · 4 years ago
Comment · 5 years ago
Comment · 5 years ago
You can just do `apt install gnat` or `pacman -S gcc-ada` for free :)
Comment · 5 years ago
Recently I've used ReScript + esbuild for a completely webpack-free experience with just a small node_modules folder
Comment · 5 years ago
https://web.dev/content-visibility/ has a nice blog post about "content-visibility" and "contain".

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton