Why Ada Is the Language You Want to Be Programming Your Systems With
121–130 of 330 posts
Re: Why Ada Is the Language You Want to Be Programming Your Systems With
#122Earlier quoted context omitted.
> given the built-in "succeed or die" macros that simplify code at the cost of reliability Most of those are linted for, so you can use them to speed development but still be aware that they shouldn't be there in production code.
These points are around language design and implementation; linting is an additional set of tools outside the scope of the language itself. Whether it should or shouldn't be in production, following Ada's rules it wouldn't be allowed in the code in the first place.
That said, they are configurable, so I see your point - they are more permissive than what Ada allows
OTOH, I believe you can turn lint warnings into hard errors for only production, allow for fast development but programmatically disallowing them from reaching production. But again, thats configurable.
Re: Why Ada Is the Language You Want to Be Programming Your Systems With
#123Earlier quoted context omitted.
> ore attention provided to things like Wasm than there is to things like embedded use cases for example. Things might be better, but last time I checked rust's compiler was a lot slower than C and the binaries were several times bigger. That last one is a big deal for embedded.
You can get Rust binaries just as small; the smallest known one was 145 bytes. Some defaults were recently adjusted to make them smaller by default too. https://github.com/tormol/tiny-rust-executable
Re: Why Ada Is the Language You Want to Be Programming Your Systems With
#124There is some overlap in the use cases between Ada-in-the-mainstream (which seems to be what the article is suggesting) and Rust. The existence of Rust will make it even harder for Ada to break out of its existing domains. Both seem to have good ecosystems, but quite different. Ada has more high-assurance tooling and practices. Rust has more in terms of packaging and general-purpose high level libraries. With Ada, it…
Having a big ecosystem of libraries is not even close to a big concern when developing critical applications like what Ada seems to be used for.
Do people think part of missile software includes “npm install wordpad”?
Re: Why Ada Is the Language You Want to Be Programming Your Systems With
#125This article was a decent introduction, I suppose. I've been learning Ada for about a year now, and I quite like it. It's larger than the previously largest language I know, Common Lisp, but I like the focus on reliability and whatnot; it's a language that has many facilities programs need, but you don't need to use otherwise; it's also segmented well, unlike Common Lisp, but there's advantages to both methods. There…
> As I like to write, Ada is used in critical systems such as ballistic missiles and trains, whereas Rust is used in Firefox. You mean to say that Ada is good for much simpler, easier, smaller-scope projects?
(I am neither a Rust nor an Ada user.)
Re: Why Ada Is the Language You Want to Be Programming Your Systems With
#126This article promotes a popular misconception of the programming situation for defense projects in the 1970s. There may have been "hundreds of specialized programming languages" in existence that could be used, but just a handful actually predominated. Most aeronautical projects were done in JOVIAL. I've talked about this history with engineers from the 1960s-70s. They did not regard the introduction of Ada as a good…
Welp, there's my rabbit hole for the week. I've never heard of JOVIAL before, and it looks like there's lot of interesting stuff here. Thank you!
Unfortunately I was laid off before I got to write very much of it, but it seemed like a neat (if cumbersome and old fashioned) language.
Information about it is pretty hard to find, and there's no open source or free compilers that I know of, but here are some links I had saved.
A 1980s style tutorial:
https://apps.dtic.mil/dtic/tr/fulltext/u2/a142780.pdf
The mil-spec:
http://everyspec.com/MIL-STD/MIL-STD-1500-1599/download.php?...
An explanation of how it came to be:
Re: Why Ada Is the Language You Want to Be Programming Your Systems With
#127Earlier quoted context omitted.
Because they overlap almost entiely in use case?
From my own analysis, about a year ago, I do not believe this to be true. Rust is memory safe, but it does not offer the type system that Ada does. The type system is where a large portion of Ada's safety comes from. They're both tackling software/system safety, but from different directions and to different ends. Additionally, modern Ada (after the introduction of SPARK, what 15 years ago now?) offers even more safe…
> SPARK builds on the strengths of Ada to provide even more guarantees statically rather than dynamically. As summarized in the following table, Ada provides strict syntax and strong typing at compile time plus dynamic checking of run-time errors and program contracts. SPARK allows such checking to be performed statically. In addition, it enforces the use of a safer language subset and detects data flow errors statically.
Contract programming:
- Ada: dynamic
- SPARK: dynamic / static
Run-time errors:
- Ada: dynamic
- SPARK: dynamic / static
Data flow errors:
- Ada: -
- SPARK: static
Strong typing:
- Ada: static
- SPARK: static
Safer language subset:
- Ada: -
- SPARK: static
Strict clear syntax:
- Ada: static
- SPARK: static
---
Additionally, safe pointers in SPARK: https://blog.adacore.com/using-pointers-in-spark and https://arxiv.org/abs/1710.07047.
---
Cryptographic library in SPARK 2014: https://github.com/Componolit/libsparkcrypto.
> libsparkcrypto is a formally verified implementation of several widely used cryptographic algorithms using the SPARK 2014 programming language and toolset. For the complete library proofs of the absence of run-time errors like type range violations, division by zero and numerical overflows are available. Some of its subprograms include proofs of partial correctness.
---
Ada/SPARK is excellent for real-time and safety-critical software: https://www.rcs.ei.tum.de/fileadmin/tueircs/www/becker/spark... to give you some ideas. It may be a bit outdated in some regards, though, for example: "Next version of SPARK 2014 under development (pointers!).". It is already done! :)
Re: Why Ada Is the Language You Want to Be Programming Your Systems With
#128Earlier quoted context omitted.
bluejekyll does chastise the author for not including their favorite programming language and I don't think that's a legitimate criticism at all. Yes, most systems programming is done in C and C++. Some people even use Rust, I've heard. Doesn't mean that an article has to draw comparisons to these languages. In fact, almost every article comparing programming languages inevitably does a poor job at it because the aut…
If the article had a title of, "Ada is a great language for embedded", then great. But it's implying that Ada is the only language that exists today that can accomplish this task, and that's just not true. Rust is merely one example, and the best I know. And the tooling of these modern languages perhaps are better reasons to use them than Ada. But yes, perhaps I was too critical, it's mainly the title that is a littl…
1) The article is on Hackaday, a website for hardware hacking enthusiasts. Most programming articles on the site are geared toward low-level and embedded systems programming.
2) The end of the introduction section of the article ends with the line: "Ada might also be the right choice for your next embedded project."
3) The last section of the article "WHERE TO GO FROM HERE" points the reader to a related article about how to get started with Ada on a PicoRV32 RISC-V core, a small processor typically used in FPGA and ASIC designs, not the usual fare for desktop, server-side, or web programming.
Ada was designed for safety-critical, military-grade embedded systems programming. It excels in that domain and while it CAN be used for operating system and application programming, it requires a bit more effort than other programming languages because of the difference in idiomatic approaches and the built-in APIs.
Re: Why Ada Is the Language You Want to Be Programming Your Systems With
#129Earlier quoted context omitted.
You can get Rust binaries just as small; the smallest known one was 145 bytes. Some defaults were recently adjusted to make them smaller by default too. https://github.com/tormol/tiny-rust-executable
Nobody wants to play with their compiler to get a small binary. Languages are typically judged by their defaults. If rust can produce small binaries, then it must produce small binaries.
Re: Why Ada Is the Language You Want to Be Programming Your Systems With
#130Earlier quoted context omitted.
Seems like "the next big thing" has existed in the tech world from the start. I remember using Ada 95 in university, after learning C++, Java and Python in other projects. It worked very well for concurrent processes, but it was so basic as a developer experience. In C++ (98 I think) I needed to build length dynamic arrays, in Ada 95 I had to build dynamic length strings .
> in Ada 95 I had to build dynamic length strings. Ada95 did have dynamic strings, they were provided by Ada.Strings.Unbounded package.