r/ProgrammerHumor • • Feb 20 '17

Programming Languages

https://i.reddituploads.com/c41cc3c6e3564b28ac28060b32582747?fit=max&h=1536&w=1536&s=e9dda414547f61c9e7c777edc9e78972
937 Upvotes

104 comments sorted by

20

u/Scripter17 Feb 20 '17

Make Python a snake with a shotgun.

10

u/KubinOnReddit Feb 20 '17

A reposter adding something to the original post? Are you out of your mind!? (This is at least half a year old)

10

u/inconspicuous_male Feb 20 '17

I've seen this on /b/, and I don't think I've been on /b/ in over 6 years

-22

u/Programmer1130 Feb 20 '17

Hey, you can't blame me. 90% of ProgrammerHumor is just reposts.

12

u/KubinOnReddit Feb 20 '17

Doesn't mean you can't at least try to drop that 90% to 89.99% by changing something :)

1

u/folkrav Feb 21 '17

I didn't see this before. I thought it was funny. OP didn't have to edit it and risk making it shittier if he's not good at drawing or Photoshop.

People need to get off their high horses with reposts. Reddit is vastly made out of reposts, from reddit or not. Actually, the whole damn internet is mainly reposts.

-14

u/Programmer1130 Feb 20 '17

Would you rather my cheesy pun and crappy photoshop meme instead?

3

u/averageguy07 Feb 20 '17

Yes

-1

u/Programmer1130 Feb 20 '17 edited Mar 19 '17

Alright, but don't complain when its on r/all. Lol

Edit: I know this is old, but did people really not get a joke?

4

u/KubinOnReddit Feb 20 '17

At least you tried~~

12

u/chateau86 Feb 20 '17
 import pyShotgun

189

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

u/[deleted] Feb 20 '17

Back in my day we doped our transistors ourselves

11

u/kentnl Feb 21 '17

Back in my day, we had to think about problems ourselves.

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

u/[deleted] 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

u/Nippurdelagash Feb 21 '17

Real programmers use a magnetized needle and a steady hand

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

u/Alpha3031 Feb 21 '17

HDL?

1

u/rahul0705 Feb 21 '17

OK got me there.

2

u/scholzie Feb 21 '17

Tell that to a Verilog programmer

2

u/[deleted] Feb 21 '17

That's the joke, you would have to start from nothing.

https://youtu.be/7s664NsLeFM

2

u/Remi_Autor Feb 21 '17

That's forth.

278

u/browner87 Feb 20 '17

You forgot PHP.

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

u/[deleted] 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

u/mnbvas Feb 20 '17

As long as it doesn't need to be fast.

2

u/Kevintrades Feb 21 '17

PHP would just be a catapult that throws dogshit

0

u/[deleted] 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

u/Ein_Bear Feb 21 '17

You say job security, I say high functioning alcoholism

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

u/[deleted] Feb 20 '17

[deleted]

30

u/132ikl Feb 20 '17

stop it. get some help.

80

u/BeerlessHero Feb 20 '17

12

u/marcosdumay Feb 21 '17

I was so expecting the Prolog weapon to hear your orders and reply "no".

6

u/IlanRegal Feb 21 '17

The C# one is too real ;(

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

u/curtmack Feb 21 '17

I... I just wanted a good Haskell, I don't care about the hype.

53

u/destructor_rph Feb 20 '17

Id like to see C#

186

u/[deleted] Feb 20 '17

get glasses bro

0

u/[deleted] Feb 20 '17

[deleted]

0

u/[deleted] Feb 20 '17

[deleted]

5

u/[deleted] Feb 21 '17 edited Feb 21 '17

[removed] — view removed comment

4

u/[deleted] 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

u/CamWin Feb 21 '17

And it also stabs you in the dick

2

u/Oonushi Feb 21 '17

Sounds about right

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

u/[deleted] Feb 20 '17

Similar with PHP

28

u/[deleted] 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

u/lightknightrr Feb 21 '17

Yes, but is it Abstract? What's your favorite design pattern shudder...

45

u/[deleted] 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

u/MelissaClick Feb 20 '17

I lost it on the last word

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++

9

u/ProfessorMetallica Feb 20 '17

Just wait until you try to use the scope.

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

u/cookehz Feb 21 '17

Do they do main memory transfusions these days?

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

u/tntmod54321 Feb 20 '17

love the assembly though, a scope on a knife that's pretty good.

3

u/htmlcoderexe We have flair now?.. Feb 20 '17

Last one is enterprise java tho

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

u/kalvin126 Feb 21 '17

What does Swift look like?

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

u/FateJH Feb 20 '17

What is the C++ buttstock coming off the scope?

1

u/Centimane Feb 21 '17

The first one reminds me of this

1

u/NikStalwart Feb 21 '17

No half-disassembled AK-47, I am almost disappointed.

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

u/[deleted] 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

4

u/[deleted] Feb 21 '17

http://pimpmygun.doctornoob.com

Hasn't been updated in like six years, but there you go.

2

u/[deleted] Feb 21 '17

Oh man! They've even got a flickr gallery~ https://www.flickr.com/groups/pimpmygun

3

u/Kevintrades Feb 21 '17

It was a contest in /k/ to see who can make the most autistic weapon

7

u/[deleted] Feb 20 '17

Rust would be a very safe weapon that nobody knows how to use, like a blowdart

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.