Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
onox
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
onox
4y ago
I do not know the exact rationale of the Alire devs, but Ada already uses (since 83) the word "package" to indicate a module or namespace, so calling dependencies a "crate" seems to avoid confusion with an Ada "pack
2.
▲
by
onox
4y 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.
3.
▲
by
onox
4y ago
Title page with legal info has been added!
4.
▲
by
onox
4y 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
5.
▲
by
onox
4y 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
6.
▲
by
onox
4y 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
7.
▲
by
onox
5y 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
8.
▲
by
onox
5y ago
You can use git pull with the --allow-unrelated-histories option.
9.
▲
by
onox
5y ago
Sorry, but I disagree. Maybe in the 80s when developers were all yelling while coding :p Does this look like cobol to you? type GUID_String is new String (1 .. 32) with Dynamic_Predicate => (for all C of GUID_String => C in
10.
▲
by
onox
5y ago
If you want to avoid vulnerabilities and have fun with proving that your code is functionally correct, try the Ada/SPARK interactive tutorials at [1] :) [1] https://learn.adacore.com/courses/intro-to-spark/cha
11.
▲
by
onox
5y ago
I've been using ReScript for a few months now. So far I mostly like it, but it takes some time to get used to it. The error messages can be confusing though so I try not to depend too much on type inference. The other downside is that
12.
▲
by
onox
5y ago
I'm writing a game engine [1], including a replacement for GLFW/SDL with support for gamepad rumble/motion/battery/LED (only for Wayland/Linux atm) [1] https://github.com/onox/orka
13.
▲
by
onox
5y ago
You can just do `apt install gnat` or `pacman -S gcc-ada` for free :)
14.
▲
by
onox
5y ago
Recently I've used ReScript + esbuild for a completely webpack-free experience with just a small node_modules folder
15.
▲
by
onox
5y ago
https://web.dev/content-visibility/ has a nice blog post about "content-visibility" and "contain".
16.
▲
by
onox
5y ago
> Are you allowed to drive around in self built vehicles in Europe? Or did they convince all countries they cross to give them a special permit? The car has been inspected by the RDW (Dutch vehicle authority) [1] and given a vehicle regi
17.
▲
by
onox
5y ago
It seems you can already write kernel modules in Ada: https://github.com/alkhimey/Ada_Kernel_Module_Framework . Obviously it comes with a boatload of restrictions [1], so no tasking, RAII, exception propagation, or dyna
18.
▲
by
onox
5y ago
> * Ada has pointer arithmetic, you can overflow buffers or read out of bounds. Not true. Arrays have bounds and those are checked. However, you can do arithmetic with the type ptrdiff_t of the package Interfaces.C.Pointers. You can also
19.
▲
by
onox
5y ago
To anyone who has a Linux distro and wants to try Ada (2012 on some): Debian/Ubuntu: sudo apt install gnat gprbuild Arch Linux: sudo pacman -S gcc-ada (get gprbuild from the AUR) NixOS: https://github.com/fluffynukeit&#
20.
▲
by
onox
5y ago
SPARK2014 is just a tool (gnatprove), which you don't distribute to others (would be rather pointless). Compiling can be done with gnat from your Linux distro, which usually has the Runtime Library Exception.
21.
▲
by
onox
5y ago
The C interoperability of Ada is very good, you can import/export functions and specify whether records (structs) and arrays must have a C convention. I use it often to access libc and Linux kernel functions/syscalls [1][2]. [1]
22.
▲
by
onox
5y ago
Couldn't you add the Bit_Order and Scalar_Storage_Order attributes (or aspects in Ada 2012) to your records/arrays? Or did Scalar_Storage_Order not exist at the time?
23.
▲
by
onox
6y ago
C libraries/applications like these, which have many memory and logic bugs, should be written in SPARK. It can fully prove that your code is correct. The latest version of the SPARK tools can also handle ownership of pointers [1] (scro
24.
▲
by
onox
6y ago
What are good reasons to choose Go? If I need a language for non-scripting tasks, I would choose Ada, which is very easy to read, has a nice type system and generics, performance, and you could statically compile everything if you wanted.
25.
▲
by
onox
6y ago
Ada's type system allows you to separate the high-level specification of a type (which models a problem) and its low-level representation (size, alignment, bit/byte order, etc.). The language also requires explicit conversions for