[–]▶ No.808748>>810048 >>810074 [Watch Thread][Show All Posts]
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.
▶ No.808752>>808769 >>808783
what exactly did elixir to erlang and what should be done to ada?
▶ No.808769>>809202
▶ No.808774>>808775
No, leave ada alone. Skills ruin languages.
▶ No.808775
▶ No.808780>>808822 >>809036
>another thread by ada LARPers
LOL!
▶ No.808783>>809036
>>808752
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.
▶ No.808822>>808845 >>809036
>>808780
This one's so irredeemably ignorant he's even unintentionally shilling for a completely different ADA.
▶ No.808845
>>808822
thatsthejoke.png
the real with the OP: jpeg artifacts in a .png
▶ No.808846>>809036
Does ada provide the same memory safety that rust does?
▶ No.808848>>808850 >>808851 >>809007 >>809036 >>809153 >>809227
>ada
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
▶ No.808850>>809036
>>808848
also
>the language is garbage and they don't release any of the documentation
>harvest millions of dollars from the army anyway because the language is such shit that anyone that uses it is in constant need of tech support
>the only reason anyone still uses it is because of a contract they signed decades ago that they're waiting for to expire
▶ No.808851
>>808848
>reuse this thing in that thing without asking if it needs to be updated
>this would've been safe to do in C++
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.
▶ No.809007
>>808848
>Ada on the other hand has crashed a 500 million dollar rocket which says something about it's """"safety"""".
>The F35 was programmed in C++.
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
▶ No.809012>>809015
The name is already taken care of: Ada++
▶ No.809015>>810077
>>809012
Someone design the logo, I'm working on AdaOnRails.
▶ No.809036>>809217 >>810077
>>808783
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.
>>808846
Yes, and far more safety in other aspects that rust ignores, eg subtyping, contracts.
>>808780
>>808822
>>808848
>>808850
Here's your (you), dumb FUDfags.
▶ No.809153>>809156
>>808848
They are switching to C++ for a larger pool to hire from. Not many know or want to know Ada.
▶ No.809156>>809157
>>809153
>for a larger pool to hire from
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.
▶ No.809157>>809158
>>809156
It's nearly impossible to find a good programmer, let alone a good programmer at an esoteric language that wasn't very good.
▶ No.809158>>809161
>>809157
>esoteric
>not very good
What language are you describing? PHP? This is an Ada thread.
▶ No.809161>>809164
>>809158
>it was a great language
>that died
It wasn't a great language.
▶ No.809164>>809169
>>809161
>that died
Again, what language are you talking about? Latin? This is an Ada thread.
Learning material:
http://www.adaic.org/learn/materials/
Drafts for Ada 202x:
http://www.ada-auth.org/standards/ada2x.html
▶ No.809169>>809171 >>809174 >>809280 >>809290 >>809351
>>809164
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.
▶ No.809171>>809172 >>809174 >>809351
>>809169
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.
▶ No.809172>>809174 >>809181 >>809349 >>809572
>>809171
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)) {
...
}
▶ No.809174>>809175 >>809180
>>809169
>demands replication of a completely out of context code fragment
Well aren't you a collossal faggot.
>>809171
>what I'm looking at using Rust for in the future
>using Rust for
>Rust
>an unstable memelang that doesn't support contracts and various other features and therefore cannot make serious correctness guarantees
>>809172
Oh look, another completely out of context code fragment, this time using all sorts of C brain damage. Does your faggotry ever end?
▶ No.809175>>809177 >>809181
>>809174
Just as I thought, you can't write a single line of Ada.
▶ No.809177>>809179
>>809175
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.
▶ No.809179
>>809177
>you will never write a single line of Ada
▶ No.809180
>>809174
>rust
>unstable
what did he mean by this?
▶ No.809181>>809182 >>809185
>>809175
I mean, for fuck's sake, take >>809172 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?
▶ No.809182>>809183
>>809181
>With the absolute nothing of contextual information
It's the most basic example of accessing the socket error queue you nodev LARPing faggots.
▶ No.809183>>809185
>>809182
>not instantly recognising a Cshit single line fragment means you're a LARPER
ok kid
▶ No.809184
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?
▶ No.809185>>809186 >>809191
>>809181
>>809183
The only line in that code you could potentially struggle to duplicate is
sockaddr_storage errorSocket;
for obvious reasons
▶ No.809186>>809188 >>809191
>>809185
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.
▶ No.809188>>809193
>>809186
>someone says something not negative about rust and it isnt me
feels good
▶ No.809191>>809193
>>809186
>Ada has nothing in the way of sockets
Well what's this then faggot?
https://rosettacode.org/wiki/Sockets#Ada
>>809185
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;
▶ No.809193>>809195 >>809201
>>809188
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.
>>809191
It's garbage. It's too high level and prevents writing the code I posted above. I need a real sockets layer.
>there's a ton of unnecessary error-prone fucking about in that code snippet
dohoho, you have no idea, anon. 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.
▶ No.809195>>809196
>>809193
>LARPing this hard
▶ No.809196>>809198
>>809195
>the only anon posting code is LARPing
▶ No.809198>>809199
>>809196
>posting some random cshit means he isnt a larper
fn main() { println!("Kill yourself!"); }
▶ No.809199>>809203
>>809198
Stay mad.
Want to be madder? I'm making a little over $200k/yr.
>LARP LARP LARP
▶ No.809201>>809210
>>809193
>hand-setting minutae rather than leaving it to Controlled types and generic Packages is necessary
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.
▶ No.809202
>>808769
Great, now I want to see a drawing of a horny Ada Lovelace :/
▶ No.809203>>809206
>>809199
how much pussy do you get though?
▶ No.809206>>809209 >>809275
>>809203
I'm married. Pussy is readily available. Sometimes.
▶ No.809209>>809211
>>809206
>sometimes
LOL. the whole point of marriage is that pussy is _always_ available
▶ No.809210>>809215 >>809218
>>809201
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.
▶ No.809211>>809214
>>809209
Spoken like someone who isn't married.
▶ No.809214
>>809211
true. but that doesnt make what i said wrong.
▶ No.809215
>>809210
Btw, this is why wireshark moved to lua for dissectors. It's just too dangerous.
▶ No.809217>>809218
>>809036
>Yes, and far more safety in other aspects that rust ignores, eg subtyping, contracts.
When I see all these already old languages that makes rust obsolete what was the point of making rust ?
▶ No.809218>>809220
>>809210
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.
>>809217
SJW control, NIH syndrome and general myopia.
▶ No.809220
>>809218
>none of which will be helped in the slightest by checked pointers
lua worked for wireshark. There's the proof you're a moron.
▶ No.809227
>>808848
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.
▶ No.809241
▶ No.809250>>809256
ITT:
>c: hey can do you do this
>ada: huh wtf is that
>(100 posts of bickering)
proposed:
>c: hey can you do this
>ada: sorry nfi what that is. here's some low level Ada though for comparison
▶ No.809256>>809262
>>809250
The objective truth is that any functionality C can do, can be achieved in an easier, more comprehensible, less error-prone way with Ada.
▶ No.809262
>>809256
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.
▶ No.809275>>809278
>>809206
>he doesn't know women lose all interest in sex once they're married
kek
▶ No.809278
>>809275
Only if you're a betamale. They lose interest if you start providing for them. for free. Just treat them like a girlfriend.
▶ No.809280>>809290 >>809933
>>809169
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.
▶ No.809290>>809294
>>809280
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 >>809169 : 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?
▶ No.809294
>>809290
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?
▶ No.809308
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
https://www2.adacore.com/gap-static/GNAT_Book/html/rts/s-fileio__adb.htm
C interfaces
https://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.
▶ No.809349>>809359 >>809387
>>809172
>assignment in for
kys
▶ No.809351
>>809169
>>809171
>Speed doesn't matter
write it in Python and STFU
▶ No.809359
>>809349
for (int i = 0 /* OH NO ANON WON'T LIKE ME ANYMORE brb kms
▶ No.809387>>809454
>>809349
What is wrong with assigning in a for loop Rajesh?
▶ No.809454
>>809387
the first slot is where you type the letter
fucking americunt
▶ No.809572>>809939
>>809172
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?
▶ No.809843>>809899
Have anyone started working on this yet? GitHub page?
▶ No.809899
▶ No.809933>>810019
>>809280
>What are you trying to prove?
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.
▶ No.809939
>>809572
>This is, huh, a fucking iterator, right?
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.
▶ No.810019>>810070
>>809933
>Ada
>awful to write real software
Ahahahahaha. You're a dumb faggot larper, anon. Ada is immensely comfy and throwing Cshit iterators around won't change that.
▶ No.810048
>>808748 (OP)
>SJW language
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.
▶ No.810070>>810082
>>810019
>still unable to write the equivalent in Ada
People who throw LARPer around are often LARPers themselves.
▶ No.810074>>810269
>>808748 (OP)
What did Elixir do to Erlang?
▶ No.810077>>810079
>>809015
>>809036
>Someone design the logo,
Updated to Current Year tech woman fashion standards.
▶ No.810079
>>810077
Stop this right now! The bluehairs will start using it, and we cannot have that.
▶ No.810082
>>810070
Dumb faggot. The equivalent in Ada has already been posted.
▶ No.810269
>>810074
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.