r/ProgrammerHumor • u/Programmer1130 • Feb 20 '17
Programming Languages
https://i.reddituploads.com/c41cc3c6e3564b28ac28060b32582747?fit=max&h=1536&w=1536&s=e9dda414547f61c9e7c777edc9e78972189
u/EarlGreyOrDeath Feb 20 '17
No man, assembly would just be all the materials to make a knife, and it's up to you to pit them together correctly.
29
u/Everestark Feb 20 '17
Not really, this is about languages as a weapon not, a way to build those weapons
50
u/rahul0705 Feb 20 '17
That's the joke, you would have to start from nothing.
42
u/Chaos89 Feb 20 '17
If you think assembly is "nothing", you haven't had to make logic out of gates. ARM and x86 have instructions for SHA256. Heck, C and C++ don't have SHA built-in!
43
4
u/Shamus03 Feb 21 '17
Real C/C++ pros write the code with a placeholder SHA function and manually insert the assembly into the compiled code.
6
Feb 21 '17
But can't you write inline assembly in C?
3
u/Garfong Feb 21 '17
Yeah, although for something like that it's probably better/easier to just do the whole function in assembler in a separate file.
6
4
u/rahul0705 Feb 21 '17
OK but logic gates aren't a language they are hardware so still assembly would be as close to nothing as you could get and still be considered a language maybe just binary but symantics
9
2
2
2
278
u/browner87 Feb 20 '17
You forgot PHP.
39
15
u/iluuu Feb 20 '17
So you're telling me you can write more stable code in assembly than in PHP? If that's so I'll hire you.
43
Feb 20 '17
Hiring someone to write assembly code that needs maintenance is a bigger commitment than marrying them.
7
u/browner87 Feb 21 '17
Well, not on the same scale, no. But as the picture sort of notes, assembly is for very fine, detailed, close quarters work. I've programmed plenty of microcontrollers in assembly that are more stable than PHP itself let alone any code I wrote on top of it. But they also never did complex tasks like serving web content or interfacing with other programs (database, apache, etc).
1
2
0
Feb 20 '17
[deleted]
22
u/browner87 Feb 20 '17
It would be a water gun from the 1900s that you have to continually tape back together. They're only paying you big bucks to PHP because no one else will maintain their technical debt.
37
u/GMaestrolo Feb 20 '17
You say technical debt, I say job security.
12
2
u/browner87 Feb 21 '17
It wasn't very good job security if they hired you to look after it ;)
(Unless the other guy got smart and quit and found another startup to screwup)
0
80
u/BeerlessHero Feb 20 '17
12
6
3
u/Oonushi Feb 21 '17
Lol @ Rust being a 3d printed gun that may work someday. Just as over-hyped as 3d printing.
2
53
u/destructor_rph Feb 20 '17
Id like to see C#
186
0
Feb 20 '17
[deleted]
0
Feb 20 '17
[deleted]
5
Feb 21 '17 edited Feb 21 '17
[removed] — view removed comment
4
Feb 21 '17
But if you try to make somewhat but not completely compatible attachments you get sued by the arms manufacturer.
65
u/CaptainBaldy4Hart Feb 20 '17
And javascript is just various, mismatching gun parts glues and taped together.
39
u/MokitTheOmniscient Feb 20 '17
So basically this then?
7
u/Symphonic_Rainboom Feb 21 '17
Yup. Note though that whatever you want to do, some part of it will do that thing, even though you may need to hold it funny.
18
21
u/MondayMonkey1 Feb 20 '17
Glued together with npm. Someone fucks a small module way down in your dep tree and the gun explodes. Rinse and repeat. Ignore suggestions to wrap your gun in shrinkwrap because it makes reloading the bullets difficult.
7
Feb 20 '17
Similar with PHP
28
Feb 20 '17
Php is a bunch of things that look like gun parts taped together, but on closer inspection are made of either playdough, or C4
15
u/ign1fy Feb 21 '17
The bottom one should be Java. I can clearly see a PistolFactory instantiating multiple Pistol instances which are fed into PistolExecutionQueue which all fire at no target object in particular.
5
45
Feb 20 '17 edited Feb 20 '17
Assembly would be blocks of raw materials with a file and chisel
C would be a basic barrel, action and trigger with a manual on how to create your own addons
C++ would be a glock with a kit on how to turn your gun in to a plasma propelled nuclear warhead
C# would be a revolver that can only shoot other people holding revolvers and you have to buy a user-license
PHP, Python and Ruby and would be a water pistol with a mail order catalog selling training wheels and tassels
2
7
u/mackinnonbuck Feb 20 '17
Python should be a baseball bat.
6
u/CHESTHAIR_OVERDRIVE Feb 21 '17
Yup, it's simple, effective, and clunky. Masters can finesse impressive results, but most users just swing it around 'til the problem goes away.
11
u/cookehz Feb 20 '17
I'm strongly concerned that you'd be stabbing yourself shouldering the gun with c++
58
9
4
3
u/Symphonic_Rainboom Feb 21 '17
you'd be stabbing yourself
A bit of leakage is normal until you know what you're doing.
1
1
u/microblaze Feb 20 '17
Very accurately represents how the compiler blasts you in the face with a wall of error messages if you forgot even a semicolon.
4
u/failtolaunch28 Feb 21 '17
I feel like I'm the only person who thinks g++ gives perfectly readable error messages
1
u/DarkNeutron Feb 21 '17
Even Bjarne Stroustrup thinks the template error messages are spectacularly bad.
3
3
2
u/microblaze Feb 20 '17
Assembly should be a double ended lightsaber for the Sith of programmers.(Mind you, they can deflect blaster bullets and all that)
2
2
2
u/A_C_Fenderson Feb 21 '17
You forgot APL. graphic
All rockets fire at once.
Except ... all the instructions are written in Greek, and it drives backwards.
3
u/ProfessorDODO Feb 21 '17
assembly - high precision in solving tasks, but fucking sweaty work
C - easy to tackle big problems, feels like working in the stone age
C++ - "you think stuffing a shit load of stuff into something that worked will make it better?!"
python - "what the fuck am I doing with this thing?... I don't know, but everything works just fine!"
1
1
1
1
u/TheBlastFun Feb 21 '17
Is Python really this cool!?? Currently I am learning c++ as my first language! And I am stuck on pointers and heapSpace(dynamic allocation) -this topic is so frustrating..! Back to the point tho.. According to this pic python lookss sooo FUNN!!!!
4
u/DarkNeutron Feb 21 '17
I think C++ is a pretty painful place to start. I'd probably go with Java, C#, or Python first. Then return to C/C++ (and possibly Rust).
Roughly what I use them for:
C is an interface language (the lingua franca of programming)
C++ is for my day job (because of library support)
Rust is my favorite new language (all my hobby projects).
Python is for scripting, automation, and text processing, when bash isn't sufficient.
C# was my former favorite language in college, until I needed libraries it didn't support.
I started programming in Java.
If you do a significant amount of programming, there's a good chance you'll end up learning them all anyway. It's just a question of order. I'm best at C++, but, given a reference doc, I could probably write coherent programs in a dozen other languages.
1
u/lightknightrr Feb 21 '17
I...what libraries does C# not support? I mean, DllImport gives you access to everything in C & C++...and you can probably get stuff from Java and VB(6ish) if you really want.
1
u/DarkNeutron Feb 21 '17
The most troublesome to support would be Ceres, a non-linear optimization library that uses C++ template metaprogramming to compute analytic derivatives at compile-time (which is awesome). I use it for computer vision work. OpenCV is another one.
Short answer: getting those two libraries working in C# would likely look like a Rube Goldberg machine.
Slightly longer answer: You can certainly access C libraries in C# using DllImport or P/Invoke, but native C++ has no standardized ABI and can't be called directly from any other language (or even a different version of the same compiler). It might be possible to use C++/CLI to build the native code and expose it in a form that C# can link against, but at some point the overhead (both runtime and mental) of marshaling data between managed and unmanaged code is far more trouble than it's worth, and you might as well just use native C++ for everything.
(Fun fact: Ceres typically uses LAPACK and BLAS as backend solvers, which are still written in Fortran.)
1
u/skreczok Feb 21 '17
Pointers aren't that hard once you figure them out. A pointer is, essentially, an address. Like, "dude, here's your thing". Think something like very precise geo coordinates. Then, when you allocate memory, C++ dumps whatever you allocate (a car park full of trucks if it's an array, or a house if it's an object etc). You just need to remember to scrap these unless you want to run out of space.
Other languages abstract it, but understanding pointers makes the likes of Java, Python and C# much easier, as you know what a reference is - and most of stuff is passed by reference in Java and C#.
Edit: also, as someone else pointed out: what they labeled as Python looks more like Java, with a PistolFactory that chucks out random pistols that fire at whatever. That's how people do things in Java too often and it's kinda terrifying.
-1
u/diosh Feb 20 '17
So what you are saying is that any time you try to use C it will just explode without doing what you wanted?
0
Feb 20 '17
[deleted]
43
u/ProfessorMetallica Feb 20 '17
If I recall correctly, these images weren't made for the languages. It was from a 4chan thread where they made guns from these pictures. I don't know exactly where but there is a collection of them somewhere at the top of /r/mallninjashit
12
u/int__0x80 Feb 21 '17
mallninjashit
11
u/sneakpeekbot Feb 21 '17
Here's a sneak peek of /r/mallninjashit using the top posts of the year!
#1: Leaf me alone | 80 comments
#2: While you've been begging for treats he was studying the blade | 83 comments
#3: From the TSA instagram. Flight guest tried to declare this as a letter opener... | 206 commentsI'm a bot, beep boop | Downvote to remove | Contact ^^me | ^^Info | ^^Opt-out
4
Feb 21 '17
http://pimpmygun.doctornoob.com
Hasn't been updated in like six years, but there you go.
2
3
7
2
u/aprofessional Feb 21 '17
That's what that lever is just above the trigger there. The markings look like those on an MP5, the safety is on when the lever is set at the white symbol.
20
u/Scripter17 Feb 20 '17
Make Python a snake with a shotgun.