Live data from Hacker News

Ada: a C Developer's Perspective

methodsandtools.com

21–30 of 157 posts

Re: Ada: a C Developer's Perspective

#21
post #17

"Code should be easy to write, easy to read, easy to maintain, and most importantly, it should be reliable". Ada is not easy to write. Perl is easy to write (but not easy to read or maintain). When I was student, Ada was the main language at my school. It was used the first year to teach algorithms and the second year to teach parallelism. During the first year, I have also learned C by myself for curiosity. After th…

K&R, please.

Re: Ada: a C Developer's Perspective

#22
post #19
post #10

Earlier quoted context omitted.

For C++, I'm reasonably happy with CMake and the Jetbrains CLion IDE. CMake makes it relatively painless to wrap multi-platform dependencies without having to explicitly know whether they come from a Unix package manager or from Windows DLLs.

The problem is that it does not manage and version dependencies for you. Say I start a new C++ project where I want - say - use ZeroMQ and also Folly to parse JSON. Where do I start? Should I install ZeroMQ and its headers globally? What if the version changes? Will it conflict with other system libraries? Well, better start using Docker. What if the version I need is not in the Ubuntu repositories yet? I need to add…

To paraphrase JWZ...

"Some people, when confronted with a dependency problem, think 'I know, I'll use Docker.' Now they have two problems."

Unfortunately there's no single answer. Static libraries vs. dynamic? Global install or packages from a repo? Everything depends on the degree of control you have over the deployment environment.

Re: Ada: a C Developer's Perspective

#24
post #5

It's such a pity these days there is no modern tool chain/workflow for Ada (or C++ for that matter). I mean, a package manager, a build tool with integrated dependencies. As far as I know, there is very little open source software for Ada. It's a shame, because I feel like the language would become more mainstream, if only better tooling was easily available.

I believe you are looking for http://conan.io + cmake + any number of IDEs (VS, QtCreator, CLion, KDevelop, Eclipse, Vim) all of which will integrate with cmake perfectly.

Re: Ada: a C Developer's Perspective

#25
post #8

Earlier quoted context omitted.

On early PCs, Pascal and C were pretty much tied in popularity. Both were free to implement, and small enough that you could make a fast compiler on a typical PC with only 256-640 kB RAM. C won because it was more flexible and was chosen by Microsoft, but Pascal definitely had a strong following (it was the original Mac's API language, and on PC it was a major contender thanks to the nice and fast Turbo Pascal IDE).…

Ada is the F14. Expensive, works well, but ya really just don't need it most of the time.

So what's the F/A-18?

Re: Ada: a C Developer's Perspective

#26
post #16

Ada caught my attention recently. I am just curious - how is Ada job market? Any jobs other than military projects?

It's also used in other embedded systems. Based on public talks, Thales (https://en.wikipedia.org/wiki/Thales_Group) seems to be using it a lot internally, and not everything they do is military.

Here's a CubeSat operating system written in SPARK/Ada: http://www.cubesatlab.org/CubedOS.jsp

Re: Ada: a C Developer's Perspective

#27
post #3

I am going to be that guy and say: Poorly compressed JPEG images for text examples?

Every time I see that shit I think, "Man, I'm glad we learned how stupid that is." but then immediately after I realize that people are still doing it all the time, because I think that same thought all the time. People are so STUPID! "Oh my god breeze, you are so rude, just because people programming critical infrastructure systems literally can't copy and paste things doesn't mean they're stupid!" -- Stupid people'…

I get emails all the time where people use word or powerpoint documents with just one single image pasted inside, instead of attaching it to the email or sending it in HTML format.

Re: Ada: a C Developer's Perspective

#28

I had a strange internship topics involving Ada. I tried to run a huge program (a simple stdio wrapper around a huge library actually) on an Android machine (Android 2.3, ARM). At that time, the only ADA compiler for ARM was available on BSD so I had used a Windows machine for development and a OpenBSD laptop for compiling the wrapper. The subtyping feature I love the most. You see the benefit when you need to call a…

For this specific benefit, named parameters are arguably at least as useful, such as in Swift and Objective-C.

     [someObject doSomethingWithLatitude:55.0 longitude:0.0];

Re: Ada: a C Developer's Perspective

#29

I had a strange internship topics involving Ada. I tried to run a huge program (a simple stdio wrapper around a huge library actually) on an Android machine (Android 2.3, ARM). At that time, the only ADA compiler for ARM was available on BSD so I had used a Windows machine for development and a OpenBSD laptop for compiling the wrapper. The subtyping feature I love the most. You see the benefit when you need to call a…

> The subtyping feature I love the most.

I only have very little experience with Ada, but being able to define a type whose values are integers in the range, say, 1 .. 7, to represent days of a week was an eye opener.

Re: Ada: a C Developer's Perspective

#30
post #22
post #19

Earlier quoted context omitted.

The problem is that it does not manage and version dependencies for you. Say I start a new C++ project where I want - say - use ZeroMQ and also Folly to parse JSON. Where do I start? Should I install ZeroMQ and its headers globally? What if the version changes? Will it conflict with other system libraries? Well, better start using Docker. What if the version I need is not in the Ubuntu repositories yet? I need to add…

To paraphrase JWZ... "Some people, when confronted with a dependency problem, think 'I know, I'll use Docker.' Now they have two problems." Unfortunately there's no single answer. Static libraries vs. dynamic? Global install or packages from a repo? Everything depends on the degree of control you have over the deployment environment.

Yeah, I know, I don't want to use docker. The problem is that C and C++ offer no real option in this camp. I'd be happy with anything that resolves and download dependencies, builds them locally (using CMake?) and adds the correct headers and library dir configurations to my project. But I could not find anything that really works
Post reply on HN