Is Ada worth learning for a hobbiest C/C++ programmer who doesn't intend to LARP as a DoD contractor?

Is Ada worth learning for a hobbiest C/C++ programmer who doesn't intend to LARP as a DoD contractor?
Where's the best place to start?

Other urls found in this thread:

0x0.st/sGEm.pdf
blog.stephenwolfram.com/2015/12/untangling-the-tale-of-ada-lovelace/
youtube.com/watch?v=Qg0pO9VG1J8&t=0s&index=2&list=LLOC7qHXMYZe-w1737_Vv7Yg
ada-auth.org/standards/rm12_w_tc1/html/RM-9-7-4.html
iuma.ulpgc.es/users/jmiranda/gnat-rts/node42.htm#SECTION001223000000000000000
twitter.com/NSFWRedditImage

Why would you want to learn Ada if you're not LARPing as a DoD contractor?

Read the book by John Barnes - Programming in Ada 2012. It's a great language. Very cool and legal.

Thanks. I looked around for a while and finally found a PDF because my local library system is bereft of CS books.
0x0.st/sGEm.pdf

I've got a few C projects for work, some of them inherited from p. terrible codebases. I'd like to use Ada for some of them. My thoughts went more or less as follows:
yeah, that works...
that'd probably still be acceptable, but I don't like C++ and I'm not willing to invest the amount of time and effort into it that it'd take for a simple one-screen application to not commit some trivial mistake that makes it silently 50x times as expensive as it looks.
with a GC? No. Not for this stuff.
wow vaporlang is p. cool user but I can't help noticing that there's no real documentation and that there are several breaking changes planned in the core syntax of the language.
after spending a year in deep meditation, I can finally say that I'm somewhat competent at curing cancer but... nobody is ever going to be able to read this code and I don't want the next maintainer of these projects to just instantly rewrite them.
the community is way too hostile towards and exclusive of people like me. I just wouldn't feel safe if I ever attended a Rust conference, you know?
OK.
gnatpp means not having to care about formatting.
Words_Like_This are impossible to type without RSI but they're very pleasant on the eyes and with a tiny bit of setup you can only ever type words-like-this.
actually the language as a whole is crazy easy to read. The only problem I've run into is that all the names are in one namespace so you can run into situations like

oh yeah, and Ada has Erlang-style message-passing between concurrent processes. Wild.

too bad its named after a thot that never programmed

she's not so bad. She was an aristocrat that was into math and had some friends. She was far too ahead of her time to have any significant influence on computing, and with in light she's not a bad choice of name for a language that was too verbose and too big with too much of a stdlib at release, when now it's a lot less remarkable in all respects (because other languages have grown).
as a feminist hero she's ridiculous, but feminism is ridiculous. As a real woman she might've been right up your alley.

Mate, she even shared her source code; you can view it in a museum. Just because bluehairs of today have marred her image by association, it doesn't mean you have to denigrate her. She came from very good stock, had copious wealth, an education and was surrounded by the intellectuals of her day, it's not a surprise that she smart.

is correct. Ada Lovelace has been (mis)appropriated by modern feminists for their own ends, but that doesn't change the fact that she was the real deal when it came to understanding and programming Babbage's machines.
blog.stephenwolfram.com/2015/12/untangling-the-tale-of-ada-lovelace/

...
good read.

AdaCore liked videos youtube.com/watch?v=Qg0pO9VG1J8&t=0s&index=2&list=LLOC7qHXMYZe-w1737_Vv7Yg

...

Often you get some low level intern or quota hire responsible for their social-media doing this without anyone important knowing. In a similar instance, I noticed a project retweeting some antifa articles, and when I emailed the head guy about it, he seemed genuinely apologetic and cleaned it up.

Can SNL get anything right?

Attached: wrong.png (1548x872, 1.7M)

Not 100% correct, she did program. It's just she programmed for an imaginary machine she herself came up with. To this day nobody actually built a working copy of the Analytical Engine to test her "programs".

Why don't you take a gander at the article here , and read it all, because you clearly don't know what you're talking about.

...

Having trouble getting into Ada. There are so many niggling little details about the syntax. Very confusing. Does anyone have a cheat sheet on 2012 syntax I could use?

I started learning Ada from "Introduction to Ada Programming" and then "Programming in Ada 2012" by Barnes. I made a few mistakes with parameter declarations (putting a , instead of a ;) and with type declarations (do I need "new"? etc.) but overall I haven't had much trouble with syntax. And especially not with the 2012 syntax, isn't it just "with", replacing 2005 pragmas?

Do you have a pdf by any chance?

Some reasons to learn Ada are the type system, the tasks, and the block structure. Ada has Algol-style block structure, not only for subprograms like Pascal, but for everything in the language, including packages, generics, tasks, and types. Each recursive call to Nested creates a new type T1 with its own instance of the Test procedure which captures a separate value of N. A lot of languages have some kind of block structure, but most of them don't take it as far as Ada does. The entire design of Ada and its safety mechanism is based on block structure and nesting levels.

with Ada.Text_IO;use Ada.Text_IO;procedure Classes is package P is type T is tagged null record; procedure Test (Name : String; X : T); end P; package body P is procedure Test (Name : String; X : T) is begin Put_Line(Name & " is a T."); end Test; end P; use P; procedure Nested(N : Positive; X, Y : T'Class) is type T1 is new T with null record; overriding procedure Test (Name : String; X : T1) is begin Put_Line(Name & " is a T1 with N =" & Positive'Image(N) & "."); end Test; Z : T1; begin Test("X", X); Test("Y", Y); Test("Z", Z); Put_Line(""); if N < 4 then Nested(N + 1, Y, Z); end if; end Nested; X : T;begin Nested(1, X, X);end Classes;

Does anyone know a GC-less language where I can easily terminate threads that are waiting on blocking I/O (i.e. getline)? I was bitten by this in my C program and the only way to do it (pthread_kill then watch for EINTR and do your thing) is just vomit inducing.

This stuff is so dirty that I'm seriously considering doing a TCL extension to libflac and libao instead of going further.

To be more precise, the problem is that I don't want blocking I/O (so you get an easy thread sleep) but I want a cancellation point.

You could use select, implementing your own readline.

Ada has a much easier way to do this. A few modifications to the example would do what you want and it doesn't even need explicit threads.

ada-auth.org/standards/rm12_w_tc1/html/RM-9-7-4.html

with Ada.Text_IO;use Ada.Text_IO;procedure Input_Test isbegin select delay 5.0; Put_Line("No input detected!"); then abort declare S : String := Get_Line; begin Put_Line("Received string from user: " & S); end; end select;end Input_Test;

Ada didn't invent nonblocking I/O and polling. That just means a single fcntl in my code. It's just that I want my cake and eat it (blocking I/O with the low CPU usage due to sleeping but still interruptible).

pipe + select

There is no non-blocking I/O or polling there. Get_Line is blocking I/O and on GNAT on Linux a signal aborts the code if it does not complete in time.

iuma.ulpgc.es/users/jmiranda/gnat-rts/node42.htm#SECTION001223000000000000000