Ada: The Next Generation

I think there should be a new language that does what Elixir did to Erlang but for Ada. That would perhaps make it more popular, but also shut down Rust once and for all so we don't end up with a SJW language.

Other urls found in this thread:

adaic.org/learn/materials/
ada-auth.org/standards/ada2x.html
rosettacode.org/wiki/Sockets#Ada
youtube.com/watch?v=W3YJeoYgozw
www2.adacore.com/gap-static/GNAT_Book/html/rts/s-fileio__adb.htm
www2.adacore.com/gap-static/GNAT_Book/html/rts/i-cstrea__ads.htm#41_20
twitter.com/NSFWRedditGif

what exactly did elixir to erlang and what should be done to ada?

a coc obviously

No, leave ada alone. Skills ruin languages.

Shills

LOL!

They made the syntax more like ruby. With ada though, a lot of thought went into the syntax to reduce human errors, so a shitty ruby facelift would be an abomination.

This one's so irredeemably ignorant he's even unintentionally shilling for a completely different ADA.

thatsthejoke.png
the real with the OP: jpeg artifacts in a .png

Does ada provide the same memory safety that rust does?

How many rocket failures have C++ buffer overflows caused? Zero. Ada on the other hand has crashed a 500 million dollar rocket which says something about it's """"safety"""". Pure meme. Submarines are switching to C++. and have been for a decade. The F35 was programmed in C++. No one would touch anything avionics related with it in the current century. Fucking Ada cucks are the worst. Ada is a shit meme. Your language a shit. Get out

also

I'll agree that the F35 is an amazing example of good coding. pfft.

I've only tried writing a few simple programs in Ada, and already it looks like it has the old Erlang problem. Which is: it has surpassingly excellent documentation, if you know where it is and how to consult it. If you're used to searching the entire web and usually getting a relevant stackoverflow post, then you're fucked.

There are two types of programming languages, ones that crash rockets, and ones that crash before they even get off the ground. How's that billion dollar overbudget hang glider coming along btw

The name is already taken care of: Ada++

Someone design the logo, I'm working on AdaOnRails.

What Ada needs is some cleaning up of historical cruft, more implicit parallelism, a few improvements to the standard library, and improvements on ways to use the heap. Mostly evolutionary stuff.


Yes, and far more safety in other aspects that rust ignores, eg subtyping, contracts.

Here's your (you), dumb FUDfags.

They are switching to C++ for a larger pool to hire from. Not many know or want to know Ada.

Which is shortsighted foolishness. Just put Ada on the pile of things a new employee needs to learn when they get hired. It's always said that to be in the tech industry you need to keep learning stuff. Doing this would add maybe a week or two worth of dev time at the start and save who knows how much dev/debug time at the end.

It's nearly impossible to find a good programmer, let alone a good programmer at an esoteric language that wasn't very good.

What language are you describing? PHP? This is an Ada thread.

It wasn't a great language.

Again, what language are you talking about? Latin? This is an Ada thread.

Learning material:
adaic.org/learn/materials/
Drafts for Ada 202x:
ada-auth.org/standards/ada2x.html

I do low-level networking. Show me how to do the equivalent of this in Ada:

sockaddr_storage errorSocket; char errorPacket[IP_MAXPACKET]; struct iovec msgIovec; (void) memset(&msgIovec, 0, sizeof(msgIovec)); msgIovec.iov_base = errorPacket; msgIovec.iov_len = sizeof(errorPacket); struct msghdr msghdr; (void) memset(&msghdr, 0, sizeof(msghdr)); msghdr.msg_name = &errorSocket; msghdr.msg_namelen = sizeof(errorSocket); msghdr.msg_iov = &msgIovec; msghdr.msg_iovlen = 1; char controlBuffer[64 * 1024]; msghdr.msg_control = controlBuffer; msghdr.msg_controllen = sizeof(controlBuffer); ssize_t errorBytesRead; errorBytesRead = recvmsg(sock, &msghdr, MSG_ERRQUEUE);

Or shut the fuck up about it.

And yes, this is a real example as digging around in unauthenticated ICMP responses to VPN traffic is really dangerous and is what I'm looking at using Rust for in the future. Speed doesn't matter as they're rare packets, they just need to be processed safely as anyone anywhere can get them into my code.

While I'm at it, I'd like to see this in Ada:
for(struct cmsghdr *cmsghdr = CMSG_FIRSTHDR(&msghdr); cmsghdr != 0; cmsghdr = CMSG_NXTHDR(&msghdr, cmsghdr)) {...}

Well aren't you a collossal faggot.


Oh look, another completely out of context code fragment, this time using all sorts of C brain damage. Does your faggotry ever end?

Just as I thought, you can't write a single line of Ada.

Mechanical translation of a small code fragment with zero context from one language to another gives zero useful information. You would know this if you were a good programmer.

...

what did he mean by this?

I mean, for fuck's sake, take for example. With the absolute nothing of contextual information you've given to go on, the equivalent Ada could be as simple as:
for Header of Message_Header_List loop...end loop;
With null checking and other assurances handled elsewhere with aspects. See what I mean?

It's the most basic example of accessing the socket error queue you nodev LARPing faggots.

ok kid

Why are you pretending to know or care about Ada, a demonstrably dead language? Are you really that butthurt about the existence of Rust and all it's shills?

The only line in that code you could potentially struggle to duplicate is sockaddr_storage errorSocket; for obvious reasons

The reason I'm asking them is I've already tried it and realized that Ada has pretty much nothing in the way of a proper sockets layer. Rust however, does.

feels good

Well what's this then faggot?
rosettacode.org/wiki/Sockets#Ada


Fuck you. Aside from the lack of context there's a ton of unnecessary error-prone fucking about in that code snippet that wouldn't be necessary in a non-shit language. In Ada it could be as simple as:
declare Message_Header : Header;begin Receive_Message (Socket, Message_Header, Error_Queue);end;

Rust is full of faggotry, but the constant low-level bit manipulation that I'm doing on completely untrusted packets is terrifying. The product that segment's from has I'd guess 50k LoC of pure packet grinding and is for secure networks. Constant pointer manipulations, buffer tests, and sketchy libraries like ROHC. I'm willing to put up with some faggotry in several locations that are the highest risk if I can easily mix another language in with my C++ and it has a proper sockets interface. Rust seems like it will work and I'm planning to try soon.

It's garbage. It's too high level and prevents writing the code I posted above. I need a real sockets layer.
dohoho, you have no idea, user. That was the EASY part of that code. The hard part is in the loop I didn't paste. And yes, it's all necessary.

...

...

fn main() { println!("Kill yourself!"); }

Stay mad.
Want to be madder? I'm making a little over $200k/yr.

No. Pointless crap like that is how you get errors. High level with input checking and appropriate aspects to encode the desired behaviour in contracts is how you completely eliminate errors.

Great, now I want to see a drawing of a horny Ada Lovelace :/

how much pussy do you get though?

I'm married. Pussy is readily available. Sometimes.

LOL. the whole point of marriage is that pussy is _always_ available

Feel free to show me how you'd dig through an IPv6 "packet" (which could be completely adversarial nonsense) which is supposedly an ICMP response with an IP header and UDP encapsulated SCTP (which could be truncated at any point even in the best of cases) to find the chunk's tuple to know who to deliver the MTU response to using your nice clean high level approach.
I'll spoil it for you: you're going to have a LOT of error cases to detect and handle. That's just how it is. No one does this shit for you. It's a perfect candidate for a language with checked pointers and no GC.

Spoken like someone who isn't married.

true. but that doesnt make what i said wrong.

Btw, this is why wireshark moved to lua for dissectors. It's just too dangerous.

When I see all these already old languages that makes rust obsolete what was the point of making rust ?

Lots of error cases, none of which will be helped in the slightest by checked pointers. You're just blindly drinking the Rust koolaid at this point.


SJW control, NIH syndrome and general myopia.

lua worked for wireshark. There's the proof you're a moron.

You should read the report on the Ariane 5 crash. It is true that there was an 64-float to 16-bit int explicitly unsafe conversion in the code, but that's not the full story of the failure. Doing real world work is more complicated than software. Drawing the conclusion that the Ada language was at fault, demonstrate a failure to use rational thought.

The F-35 is coded in C, C++ and Ada83 (from F-22). I'm also sure that you already know that Lockheed Martin choose C/C++ for practical reasons and not technical.

Developing for safety is a discipline not a language. If you don't know how to develop safe code, I won't trust your code even if you use a "safe" language.

youtube.com/watch?v=W3YJeoYgozw

ITT:

proposed:

The objective truth is that any functionality C can do, can be achieved in an easier, more comprehensible, less error-prone way with Ada.

well, seeing's believing. The first network-programming example I found for Ada was some ORB shit that required a server. That's like looking for a REST API and finding a SOAP one with very proper XML with its own DTD et al. On the one hand this is very elaborately engineered and I can see how it could be useful. On the other hand it's a dinosaur and I can't do anything serious with it.

kek

Only if you're a betamale. They lose interest if you start providing for them. for free. Just treat them like a girlfriend.

What are you trying to prove? I'm pretty sure everyone realizes that system calls follow a C convention. It is possible Ada provides a safer abstraction for that socket code, but the limiting factor, in any language, is going to be calling into a C library.

you can directly use syscalls, without involving a C library. Linux syscalls, probably all unix syscalls, are not particulary tied to C: you give them addresses and lengths, not C strings, and syscalls tend to have better documentation for their data structures (select() is as bad as it gets - an interface defined with preprocessor macros; fortunately select() also sucks and you never have to use it). Forth has an easier time with syscalls than with the C interface to them, since C changes the return value, populates errno, must be linked in, etc.
Granted it's slightly more of a porting burden, even within the same broad architecture. I've run into cases where a file full of magic numbers is more portable than the simple C programs (i.e. without autoshit) are that I write to generate such files.
And you can still say things about Forth even when it's doing the 'exact same thing' as : Forth would tend to dynamically allocate or use static buffers or defer the question (require caller to manage memory) for those structs and for controlBuffer. Forth might use OOP instead of structs (slight/no overhead to methods vs. normal functions; no overhead to data vs. structs). Forth would probably use exceptions for error handling.
Although there's not any error handling there you know? That C is just setting things up for that recvmsg(). I saw that gnat has some kind of C header parser. Does it not let you populate data structures defined as C structs?

I said system calls follow a "C convention". They're very tied to C conventions of laying out memory. Also I don't think I've seen a language implementation providing assembly for syscalls, and why would they when the libc interface is part of POSIX?

Just went through Ada's IO library implementation, they're calling out to C. I don't know Ada, but it's really clean to read.

IO library
www2.adacore.com/gap-static/GNAT_Book/html/rts/s-fileio__adb.htm

C interfaces
www2.adacore.com/gap-static/GNAT_Book/html/rts/i-cstrea__ads.htm#41_20

Note this part:
-------------------------- -- Standard C functions -- -------------------------- -- The functions selected below are ones that are available in DOS, -- OS/2, UNIX and Xenix (but not necessarily in ANSI C). These are -- very thin interfaces which copy exactly the C headers. For more -- documentation on these functions, see the Microsoft C "Run-Time -- Library Reference" (Microsoft Press, 1990, ISBN 1-55615-225-6), -- which includes useful information on system compatibility.

kys

write it in Python and STFU

for (int i = 0 /* OH NO user WON'T LIKE ME ANYMORE brb kms

What is wrong with assigning in a for loop Rajesh?

the first slot is where you type the letter

fucking americunt

This is, huh, a fucking iterator, right? I mean, are you specifically asking how to hack a feature other languages have had since fucking forever?

Have anyone started working on this yet? GitHub page?

Bump

That the Ada fanclub doesn't realize how awful it is to write real software with it. Not Hello World shit, but actually replace the most dangerous type of code out there - exactly what these languages were supposed to be good at.
As a bonus, if some Ada greybeard drops in and slaps me around with a code example showing I am but a mere mortal, it gives me the knowledge I need to replace that code with Ada.

You should look into the CMSG macros and see the issues I'm getting at, newfriend. The alignment constraints are UNIX black magic and are traditionally a stumbling block for foreign functions and alt languages as the only good way to track them is to have the underlying code in C.

Ahahahahaha. You're a dumb faggot larper, user. Ada is immensely comfy and throwing Cshit iterators around won't change that.

What can Rust developers do to you or the way you think? That's right, nothing. So treat them as the useful idiots they are.

People who throw LARPer around are often LARPers themselves.

What did Elixir do to Erlang?

Updated to Current Year tech woman fashion standards.

Stop this right now! The bluehairs will start using it, and we cannot have that.

Dumb faggot. The equivalent in Ada has already been posted.

Slapped on new syntax but also introduced some additional features. Then created some tools that made building, etc more easy. Perhaps more to it but that is the majority of it. Sort of like Clojure, using the JVM, Elixir use the Erlang VM.