1080
submitted 2 months ago by [email protected] to c/[email protected]

Please dont take this seriously guys its just a dumb meme I haven't written a single line of code in half of these languages

top 50 comments
sorted by: hot top controversial new old
[-] [email protected] 137 points 2 months ago

Every programming language has it's place.

JavaScript's place is in hell.

[-] [email protected] 53 points 2 months ago

I used to think Javascript was hell when I barely used it. Now I have to build with it regularly and... once in a while I'm just right about things.

[-] [email protected] 24 points 2 months ago

Ever wanted to be somewhere inbetween java and JavaScript?

Yeah, that's Groovy. Only it's the wrong groove

load more comments (3 replies)
[-] [email protected] 109 points 2 months ago* (last edited 2 months ago)

Latex: Problem --> \def\please@#1#2#3#4{\e@kill#2#3{\me#1}#4@now} -->

[-] [email protected] 61 points 2 months ago

Accurate. LaTeX is great, it makes you feel like you have superpowers compared to "office suite"-style software. But every once in a while you just run into some bullshit that feels like it's stuck in 1985 and it completely breaks your flow. I remember wanting to make a longtable where text in the "date" column would be rotated by 90 degrees to leave more horizontal room for the other columns. It took me two rotateboxes, a phantom, a vspace, a hspace and 40 minutes of my life to get the alignment right. Would probably have taken a duckduckgo search and three clicks in Libreoffice.

load more comments (15 replies)
[-] [email protected] 22 points 2 months ago

I got way too excited Lemmy parsed LaTeX for a second

load more comments (1 replies)
load more comments (1 replies)
[-] [email protected] 109 points 2 months ago

PHP: Problem -> real_solution_for_real_this_time() (real_solution_i_swear() is unsafe and deprecated)

[-] [email protected] 25 points 2 months ago

Eh, your statement is accurate for PHP4 and still relevant up to PHP5.2... We're on PHP8.3 now and PHP8.0 is now out of security updates. I know it's trend to hate on PHP but you've got to at least update your materials to var-vars... it's like knocking node for having substr() and substring().

load more comments (1 replies)
load more comments (3 replies)
[-] [email protected] 103 points 2 months ago

missing the stage of C where it's all incomprehensible bitfucking with comments like "this works, i do not know why it works, do not touch this"

[-] [email protected] 37 points 2 months ago

Real fast inverse square root algorithm hours

[-] [email protected] 18 points 2 months ago

That one is not that complicated if you don't think about the math. It's basically just if we interpret the float as int and add a magic number we have a good estimation.

From what I remember at least, it's been a little while since I implemented it.

load more comments (3 replies)
load more comments (4 replies)
[-] [email protected] 91 points 2 months ago* (last edited 2 months ago)

Perl:

Problem -> $ @ % <=> <> =()= => ; qw() ])} select(undef, undef, undef, 0.25) =~ tr/.?\w\sREg3xfr0mhe|l/foo/g; $|++ &homebrewedFunction(%$ref, $_ , @_ ) -> solution

Source: I mainly code in perl. I like it, but I'll be the first to admit that it's not a beautiful language.

I was about to make an entry for lisp here, but I don't have enough parentheses to draw the path to the solution.

[-] [email protected] 37 points 2 months ago* (last edited 2 months ago)

https://www.foo.be/docs/tpj/issues/vol4_4/tpj0404-0015.html

The Perl Poetry Contest - The Perl Journal, Winter 1999

#!/usr/bin/perl
#
# asylum.pl
# by Harl

close (youreyes);
bind (yourself, fast);

while ($narcosis) {
   exists $to($calm);
   not calm;
}

accept the, anesthesia;
seek the, $granted, $asylum'
and wait;

stat ically;

unlink and listen (in, $complicity);

for (a, little) {
   system ("sync hronicity");
}

[-] [email protected] 23 points 2 months ago

Perl is write-only code. Larry Wall raised a monkey's paw and asked for a language that works the way programmers want. So most Perl is the first thing someone tried, unfiltered by rigid syntax putting your thoughts in order, compiler warnings bringing side effects to mind, or even names forcing you to decide what a variable is. An uncommented Perl script is raw brain patterns displayed as ASCII.

Thank god it runs like crap. We'd be in so much trouble if it was fast. Optimized C isn't exactly gorgeous, but any project that compiles proves someone looked at the code more than once.

load more comments (5 replies)
load more comments (8 replies)
[-] [email protected] 86 points 2 months ago

C: "Segmentation fault."

Where?

C: 🤷🏻

[-] [email protected] 53 points 2 months ago

C: gestures vaguely everywhere

load more comments (1 replies)
[-] [email protected] 33 points 2 months ago

Then you open the core file with GDB and hope the stack is not smashed.

load more comments (1 replies)
[-] [email protected] 17 points 2 months ago

gdb -> where

[-] [email protected] 73 points 2 months ago
[-] [email protected] 62 points 2 months ago

python is like that. someone waay smarter than you have already done this 10 years ago.

[-] [email protected] 25 points 2 months ago

Idk I still like writing my own stuff purely pythonic when I can. Pythons syntax is the most “fun” and “natural” for me so I find it fun. Like doin a sudoku puzzle

load more comments (31 replies)
load more comments (1 replies)
[-] [email protected] 60 points 2 months ago* (last edited 2 months ago)

C# Solution -> .sln

(brought to you by .net gang)

[-] [email protected] 59 points 2 months ago
[-] [email protected] 16 points 2 months ago

Yeah that one got me too. Rust has tons of c libs wrapped in safe rust.

load more comments (5 replies)
load more comments (1 replies)
[-] [email protected] 52 points 2 months ago

C --> segfault --> new problem

[-] [email protected] 37 points 2 months ago* (last edited 2 months ago)

ResizedImage_2024-03-12_22-25-43_1

Sry, the best I can do on mobile

load more comments (2 replies)
[-] [email protected] 50 points 2 months ago

The line between problem and solution for C should be 30 miles long.

[-] [email protected] 29 points 2 months ago

...with 19 bugs 9 of which are exploitable.

[-] [email protected] 19 points 2 months ago

And one bug that one person found once but is not reproducible

[-] [email protected] 18 points 2 months ago

So the developers claim, but the users still encounter it, and the bug report stays open for 22 years ... possibly more.

load more comments (1 replies)
load more comments (2 replies)
[-] [email protected] 48 points 2 months ago

i feel like javascript could also be

Problem -> solution -> 3 days pass -> all dependencies had breaking changes made -> problem

[-] [email protected] 42 points 2 months ago

Python one is accurate. Most of our problems are solved by importing a library and writing the line, librarySolver.importedFunction.SolveMyProblem()

def main(): Print('thanks librarySolver')

load more comments (4 replies)
[-] [email protected] 40 points 2 months ago

for the ones missing the marvelous HTML, I gotchu bro:

<problem />

[-] [email protected] 25 points 2 months ago

Add css, and the problem looks really pretty now

load more comments (1 replies)
load more comments (6 replies)
[-] [email protected] 36 points 2 months ago

Actual C: Problem → Segmentation fault

load more comments (2 replies)
[-] [email protected] 29 points 2 months ago
[-] [email protected] 16 points 2 months ago

I’ve seen this before but don’t accept it myself. There are cases where you just wanted to cat. In this case, maybe to review the problem. Then you want to extend the command. Preserving it in the next commands where you start stacking on pipes is useful since it can be fewer strokes and maintain a habit.

[-] [email protected] 24 points 2 months ago* (last edited 2 months ago)

C:

Problemreturn Solution;

C++:

Problem

const [auto]&& (Problem&& problem) noexcept(noexcept( Solution<Problem>{}(std::forward<Problem>(problem)) )) { return Solution<Problem>{}(std::forward<Problem>(problem)); } -> decltype( Solution<Problem>{}(std::forward<Problem>(problem)) )
load more comments (4 replies)
[-] [email protected] 20 points 2 months ago* (last edited 2 months ago)

It's ironic that the illustration for JavaScript is probably the most realistic and best solution IRL. In the sense that a lot of what problem solving is (which is a big part of software engineer) is breaking a big problem into smaller problems. And you continue doing this until each problem is solvable in a short period of time.

JavaScript sucks though as a language.

[-] [email protected] 19 points 2 months ago

I thought it was a jab at all the NPM packages

load more comments (2 replies)
load more comments (6 replies)
[-] [email protected] 19 points 2 months ago

JS is basically the Hydra from the Greek Mythology.

Though PHP is literally the problem had me lol.

[-] [email protected] 17 points 2 months ago

Java:

Problem -> NullPointerException.

[-] [email protected] 33 points 2 months ago

More like

Problem → new ProblemSolverFactory().createProblemSolver().solveProblem();

[-] [email protected] 18 points 2 months ago

Exactly. And configured by 5000 lines of brittle XML.

load more comments (3 replies)
load more comments (3 replies)
load more comments (1 replies)
load more comments
view more: next ›
this post was submitted on 12 Mar 2024
1080 points (95.8% liked)

Programmer Humor

30944 readers
3705 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS