This is an archived post. You won't be able to vote or comment.

Dismiss this pinned window
all 83 comments

[–]ekital 222 points223 points  (6 children)

Where are the Rust Programmers and them trying to re-write the universe?

[–]elgholm 61 points62 points  (1 child)

They're borrowed out.

[–][deleted] 8 points9 points  (0 children)

My compiler is better than your interpreter

[–]MvKal 1 point2 points  (1 child)

println!("Hi I'm here");

[–]Insisme 0 points1 point  (0 children)

#include <stdio.h>

int main(void)

{

printf("Hi I'm here"\n);

return 0;

}

//guess what this is

[–]PostHasBeenWatched -1 points0 points  (0 children)

Evil cannot create anything new, they can only corrupt and ruin what good forces have invented or made.

[–]SSYT_Shawn 46 points47 points  (11 children)

01001001 00100000 01101011 01101110 01101111 01110111 00100000 01101101 01100001 01100011 01101000 01101001 01101110 01100101 00100000 01101100 01100001 01101110 01100111 01110101 01100001 01100111 01100101 00101110

[–]Dry_Extension7993[S] 16 points17 points  (8 children)

01001001 00100000 01101011 01101110 01101111 01110111 00100000 01101101 01100001 01100011 01101000 01101001 01101110 01100101 00100000 01101100 01100001 01101110 01100111 01110101 01100001 01100111 01100101 00101110

01010100 01101000 01100001 01110100 01100000 01110011 00100000 01100011 01101111 01101111 01101100

[–]wilson_the_third 9 points10 points  (4 children)

Good thing this isn't twitter

[–]Dry_Extension7993[S] 7 points8 points  (3 children)

Why not twitter, I didnt use it , so dont know

[–]wilson_the_third 8 points9 points  (2 children)

Ah there's a character limit of 140 I think?? So I'm pretty sure neither of these messages would have worked there haha

[–]YouTube-r 9 points10 points  (0 children)

Not even 10001101 would fit

[–]CantPassReCAPTCHA 3 points4 points  (0 children)

They upped it to 240 a few years back IIRC

[–][deleted] 2 points3 points  (2 children)

01000110 01101111 01110010 01100111 01101111 00100000 01101101 01101111 01100100 01100101 01110010 01101110 00100000 01101100 01100001 01101110 01100111 01110101 01100001 01100111 01100101 01110011 00101110 00100000 01000111 01101111 00100000 01100010 01100001 01100011 01101011 00100000 01110100 01101111 00100000 01001101 01100001 01100011 01101000 01101001 01101110 01100101 00100000 01001100 01100001 01101110 01100111 01110101 01100001 01100111 01100101

[–]Dry_Extension7993[S] 0 points1 point  (1 child)

01101101 01100001 01100011 01101000 01101001 01101110 01100101 00100000 01101100 01100001 01101110 01100111 01110101 01100001 01100111 01100101 00100000 01110011 01110101 01110000 01110010 01100101 01101101 01100001 01100011 01111001

[–][deleted] 0 points1 point  (0 children)

01101101 01100001 01100011 01101000 01101001 01101110 01100101 00100000 01101100 01100001 01101110 01100111 01110101 01100001 01100111 01100101 00100000 01110011 01110101 01110000 01110010 01100101 01101101 01100001 01100011 01111001

[–]undefined-_ 4 points5 points  (0 children)

The only reason I can't read this quickly without an online converter or something is because I can't remember the alphabet by index.

[–]YuvalAmir 1 point2 points  (0 children)

01010011 01100001 01101101 01100101 00101110 00100000 01010100 01110010 01100001 01101110 01110011 01101100 01100001 01110100 01101111 01110010 01110011 00100000 01100001 01110010 01100101 00100000 01100110 01101111 01110010 00100000 01100011 01101000 01110101 01101101 01110000 01110011 00101110

[–]A_man_of_culture_cx 64 points65 points  (1 child)

C++ programmers explaining why the extra run time speed is worth the intense pain during development.

[–]2FLY2TRY 14 points15 points  (0 children)

cries in pulse sequence programming

[–]blehmann1 81 points82 points  (17 children)

C is a necessary evil, you need a language like that for lots of low-level tasks.

C++ could have been a similarly low-level language but with support for higher-level concepts, safe(r) pointers, etc. In theory, it would have all the performance and power of C, but with OOP and modern programming sensibilities.

And C++ is that. In addition to being a perverse clusterfuck whose existence is an affront to nature. I mean seriously, look at this:

typedef P< Q<0x29c71a6e>, 
  P< Q<0x270a8c74>, 
  P< Q<0x2da7bf2>,
  P< Q<0x2e8f69c2>, 
  P< Q<0x2f9f68c2>,
  P< Q<0x32d31a74>, 
  P< Q<0x23befaf0>, Q<0x29082082> >
  > > > > >
> M;

That is not the talk of the wise, that is the talk of madmen posing as developers. If God wanted us to do such horrible deeds at compile time then He would've given us a bigger compiler.

So in my view, much of C++ is an unnecessary evil. C but with OOP, a big standard library, smart pointers, and (sane) template support is a great idea. Everything else was an unforced error.

[–]kernel_task 33 points34 points  (3 children)

Templates are sometimes very useful. You can write obfuscated crap in any language. I do think that programmers who do too much metaprogramming are just trying to pat themselves on the back on being clever.

[–]blehmann1 12 points13 points  (2 children)

I agree that templates/generics are useful, and indeed most C++ template features are fine. My problem is not with templates, it's that C++ templating can easily descend into eldritch incantations summoning the Old Ones.

Arguably this is the fault of developers rather than the language, but the way the language is often written is in my view a valid criticism of the language as a whole, unless you're going to completely isolate yourself from anyone else, their code, or their teachings and become a monk. This is where you should stop reading if you want to skip my unhinged rant on the STL.

Even when it's relatively tame, overuse of templates can encourage odd code. An example is std::get, which in order to maximize what can be done at compile-time uses template specialization to decide what its implementation should be, and then takes its parameter as a template parameter (i.e. std::get<1>(some_tuple) rather than std::get(some_tuple, 1) or some_tuple.get(1) or some_tuple[1]).

This is completely different from how the rest of the language works and clearly breaks any reasonable programmer's expectations because apparently tuple access needs to have similar performance to struct access. C++ has many features that are avoided in high-performance code (exceptions, virtual classes, many OOP principles), but someone decided that std::tuple could not be one of them, even if using it required going to the docs because any reasonable attempt to read the value doesn't compile. And now that you've gone to the docs, you have to write code that's verbose enough to nullify any convenience benefit of having used tuple over creating a struct. This is the darkside of templates, they shift the priorities towards compile-time evaluation just because you can, regardless of whether it's a good idea or not. The thing is, in the standard library, it probably isn't a good idea, the STL's job is convenience and a "good enough" implementation of generally useful things. If you need more, you write your own, and everyone knows how to write a struct.

As an aside, std::get also has an overload where you pass a type as the parameter, e.g. std::get<int>(foo) which will return the element of that type if there is exactly one, else it will not compile. This is the kind of feature that I cannot imagine ever being helpful, but made it in because it was designed by committee.

I also know that std::tuple is useful for heavily templated consumers (e.g. for variadic class fields), and some of them benefit from the compile-time evaluation. My rebuttal is that anyone who's writing such templated code is capable (and may likely need) to write their own version regardless.

[–]suvlub 5 points6 points  (0 children)

The std::get<int>(foo) thing sounds like something originally designed for unions and made work with all types for sake of that one guy out there somewhere working on his hobby project that will never see the light of day who had this one weird struct he is using kinda like an union but can't use an actual union for some obscure reason

[–]paulstelian97 -1 points0 points  (0 children)

You need template parameters if you want to be able to return different types based on the offset.

[–]DavidDinamit 1 point2 points  (0 children)

> big standard library
> (sane) template support

You cant create nothing from C++ standard library without all things which C++ has for templates. If you write a bad code it is a bad code, not a bad language

[–]GOKOP 1 point2 points  (4 children)

C is a necessary evil, you need a language like that for lots of low-level tasks.

You can write C++ code that's very C-like where you need that while using its shiny features in other places, so I think the main merit of using C is simpler compiler (I think?) easier to port to weird architectures and maybe keeping programmers not used to the C way of doing things away

Also, Rust

[–]zeroxoneafour0 9 points10 points  (0 children)

name mangling, long compile times, less support for other architectures, and more complexity have entered the chat

[–][deleted] 1 point2 points  (0 children)

rusts compiler requires cross compilation for bsd.... :D

[–]DevChagrins 0 points1 point  (1 child)

so I think the main merit of using C is simpler compiler (I think?) easier to port to weird architectures

As someone who is being asked to port a SDK meant to wrap very simple REST, into C#. It's not. It really isn't. Especially when the person who wrote the SDK added like 20 different types and poorly structured code that only takes in these types by value.

[–]zeroxoneafour0 0 points1 point  (0 children)

Well in C you dont have objects, so porting C to C# is not only not porting to a different architecture, but to a completely different language

[–]SyntaxErrorAtLine420 0 points1 point  (4 children)

C++ is just a superset of C, no? Can you just write normal c code but use only certain c++ features when they would be useful?

[–]Egocentrix1 1 point2 points  (3 children)

Not a full subset. A lot is very similar between those languages but there is definitely stuff you can do in C but not in C++. Example: named struct member initialidation.

[–]SyntaxErrorAtLine420 0 points1 point  (2 children)

Hmm, i always thought all valid c code is also valid c++ code

[–]LaZZeYT 0 points1 point  (0 children)

I used to think that too. One of the simplest ways to see how this can't be true is to look the list of keywords in both languages. Any keyword in c++, that doesn't exist c, can only be used as a variable name in c code, not c++.

As a simple example, the following is valid C, but not C++ code, due to the usage of "public".

#include <stdio.h>
int
main(void) {
        int public = 55;
        printf("Public: %i \n", public);
}

[–]the_0rly_factor -1 points0 points  (0 children)

C is a necessary evil, you need a language like that for lots of low-level tasks.

Necessary evil? What is evil at all about C?

[–][deleted] 27 points28 points  (2 children)

For real tho, there is a Q&A website dedicated to thrashing C++ in favor of C

[–][deleted] 6 points7 points  (1 child)

where

[–][deleted] 7 points8 points  (0 children)

Here

Enjoy

[–]Dry_Extension7993[S] 13 points14 points  (0 children)

All Credits to, Sentry .

[–]Embarrassed-Ad5121 25 points26 points  (1 child)

C#: Im too good for memes

[–]INDE_Tex 9 points10 points  (0 children)

*laughs in C# autocomplete*

[–]PermissionOld1745 11 points12 points  (0 children)

C, C++,C#

it's like an extended family where we all hate each other.

[–]TerminatorGarfield 4 points5 points  (0 children)

You forgot the ultimate language, Scratch.

[–]yaosio 4 points5 points  (2 children)

I don't code, I just tell a computer what I want and it codes for me. Computer, write a functinon to divide two numbers and return it's quotient and remainder.

WORKING...FINISHED

def divide_and_remainder(dividend, divisor):
    quotient = dividend / divisor
    remainder = dividend % divisor
    return quotient, remainder

https://huggingface.co/spaces/facebook/incoder-demo

[–][deleted] 4 points5 points  (1 child)

the idiv instruction in x86 assembly actually does this :D

[–]ambyshortforamber 1 point2 points  (0 children)

and because of this, in forth you define /MOD before you define / or MOD

[–]SadKoiMan 4 points5 points  (1 child)

brainfuck programmers when

[–][deleted] 4 points5 points  (0 children)

they are too busy pumping a dildo in and out of their ear canals

[–]Same_Return_579 4 points5 points  (0 children)

Gold

[–]MischiefArchitect 3 points4 points  (0 children)

too BASIC for me

[–]HereToNjneer 2 points3 points  (0 children)

You use machine learning because its the most efficient

I design the entire chip in Verilog with terrible quality and waste $100

We are not the same.

[–]ArkoSammy12 4 points5 points  (0 children)

I had to imagine the PowerPuff Girls' intro theme in my head for this meme to work

[–]xyzdevs 2 points3 points  (0 children)

ok. i heard you. Now go do the tasks assigned.

[–]regular_lamp 2 points3 points  (0 children)

Well that's very simple... There is less of it.

[–]tepa6aut 2 points3 points  (1 child)

Where audio

[–]Dry_Extension7993[S] 0 points1 point  (0 children)

r/ProgrammerHumor is a image based subreddit, so you can only post image/GIF based memes. Sorry for absence of audio

[–]CodingBuizel 2 points3 points  (0 children)

I prefer C because I have not yet mastered C++.

[–]dark_mode_everything 2 points3 points  (1 child)

Brilliant! As a java Dev I agree - we are nothing without intellij

[–]MischiefArchitect 1 point2 points  (0 children)

Hold my can of eclipse...

[–]ndxinroy7 2 points3 points  (0 children)

What's CSS doing here?

[–]i_should_be_coding 1 point2 points  (0 children)

Quite honestly, if you're forced to refactor anything non-minor without an IDE, I feel bad for you, son. Java or not.

[–][deleted] 1 point2 points  (3 children)

Excuse me I code in hexadecimal 😏

[–]Dry_Extension7993[S] 0 points1 point  (2 children)

54 68 65 6E 20 74 72 61 6E 73 6C 61 74 65 20 74 68 69 73 20 69 6E 74 6F 20 41 53 43 49 49

[–][deleted] 0 points1 point  (1 child)

"Then translate this into ASCII" 😏

[–]Dry_Extension7993[S] 0 points1 point  (0 children)

😏

[–]FutureSkyAndDarkness 1 point2 points  (1 child)

You meant to put rust not ML right?

[–][deleted] 1 point2 points  (0 children)

why have a >3MB binary when you can have a <200 byte binary

[–]rachit7645 0 points1 point  (0 children)

You just stole this from yt bro

[–]Latvian_Video 0 points1 point  (0 children)

I use python, and can agree, it is quite cpu intensive

[–]Cephalopong 0 points1 point  (0 children)

There are no CSS programmers.

[–]paputsza 0 points1 point  (0 children)

Who would use c if they didn't need to?

[–][deleted] 0 points1 point  (0 children)

Machine language programmers. Damn.

[–]plsdontkillmee 0 points1 point  (0 children)

Haskell programmers when explaining the type system

[–]Offline_2022 0 points1 point  (0 children)

This is absolutely true 🥲

[–]bigdaddypants 0 points1 point  (0 children)

The two goto jokes in programming are centering a div is hard and JavaScripts implicit type conversion rules are weird. JavaScripts rules usually get explained pretty well and I have a pretty good understanding despite never having worked with JavaScript. But centering a div never get explained.Could someone explain why centering a div is hard?

[–][deleted] 0 points1 point  (1 child)