this post was submitted on 21 Jan 2024
786 points (93.4% liked)

Programmer Humor

32410 readers
521 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] JohnnyCanuck@lemmy.ca 133 points 9 months ago (4 children)

What language was that jpeg compression written in?

[–] VieuxQueb@lemmy.ca 86 points 9 months ago (2 children)

You ever heard of lossless compression? Well they developed lossfull anti compression, it compresses and decompresses the images so many times that the added artifacts create a larger file than original ! Impressive ain't it?

[–] lseif@sopuli.xyz 25 points 9 months ago (1 children)
load more comments (1 replies)
load more comments (1 replies)
[–] billwashere@lemmy.world 21 points 9 months ago (1 children)
[–] jaybone@lemmy.world 16 points 9 months ago

YOU WERE NEVER MEANT TO ACCESS STARCH DIRECTLY

load more comments (2 replies)
[–] IndiBrony@lemmy.world 90 points 9 months ago* (last edited 9 months ago) (5 children)

Fools haven't even written it well! Translated:

STOP WRITING

  • MEMORY WAS NEVER SUPPOSED TO BE AESSED DIRETLY

  • YEARS OF PROGRAMMING yet STILL ODE IS STILL WRITTEN with memory vulnerabilities

  • Wanted to aess memory diretly anyway? We had a tool for that: It was alled "ASSEMBLY"

  • "Yes please give me NULL of something. Please give me *&* of it" - Statements dreamed up by the utterly deranged

LOOK at what Programmers have been demanding your Respet for all this time, with all of the omputers we built for them

(These are REAL programs, written by REAL Programmers):

???? ???????? ????????????

They have played us for absolute fools

[–] FrostyCaveman@lemm.ee 23 points 9 months ago* (last edited 9 months ago) (1 children)

LUV ‘ODE

LUV LINUX

‘ATE WINDOWS

‘ATE ‘LOSED SOURCE

SIMPLE AS

load more comments (1 replies)
[–] lseif@sopuli.xyz 15 points 9 months ago

what does this omment even say??? i ant see it

[–] BassaForte@lemmy.world 10 points 9 months ago

Respet earned.

load more comments (2 replies)
[–] NotMelon@lemmy.world 50 points 9 months ago (4 children)

Let's rewrite Linux kernel in Python

[–] CaptainProton@lemmy.world 21 points 9 months ago (5 children)

Nobody's built a supercomputer powerful enough to run a python version of even Linux Lite Edition.

[–] WhiskyTangoFoxtrot@lemmy.world 28 points 9 months ago

Redstone it is, then.

load more comments (4 replies)
[–] Jordan_U@lemmy.ml 19 points 9 months ago* (last edited 9 months ago) (2 children)

Fun fact!

The Asahi Linux drivers for the Apple M1 GPU were originally written in Python: https://asahilinux.org/2022/11/tales-of-the-m1-gpu/

GPU drivers in Python?!

Since getting all these structures right is critical for the GPU to work and the firmware to not crash, I needed a way of quickly experimenting with them while I reverse engineered things. Thankfully, the Asahi Linux project already has a tool for this: The m1n1 Python framework! Since I was already writing a GPU tracer for the m1n1 hypervisor and filling out structure definitions in Python, I decided to just flip it on its head and start writing a Python GPU kernel driver, using the same structure definitions. Python is great for this, since it is very easy to iterate with! Even better, it can already talk the basic RTKit protocols and parse crash logs, and I improved the tools for that so I could see exactly what the firmware was doing when it crashes. This is all done by running scripts on a development machine which connects to the M1 machine via USB, so you can easily reboot it every time you want to test something and the test cycle is very fast!

load more comments (2 replies)
[–] sag@lemm.ee 14 points 9 months ago (1 children)
load more comments (1 replies)
load more comments (1 replies)
[–] backhdlp@iusearchlinux.fyi 44 points 9 months ago (4 children)

Does anyone even know what Windows is written in?

[–] entropicdrift@lemmy.sdf.org 93 points 9 months ago (2 children)

Originally Windows was written in assembly and ran on top of DOS, but since Windows 2000 and XP, it's been exclusively running on the NT kernel, which is written primarily in C, with some C++ in there as well.

The actual userspace is mostly C++ and C#.

[–] astrsk@kbin.social 16 points 9 months ago (1 children)

And basically the entirety of dotnet 6 forward is spans. It’s all spans. All the way down.

load more comments (1 replies)
[–] cypherix93@lemmy.world 33 points 9 months ago (2 children)
[–] backhdlp@iusearchlinux.fyi 10 points 9 months ago (1 children)
load more comments (1 replies)
load more comments (1 replies)
[–] wreckedcarzz@lemmy.world 16 points 9 months ago (1 children)

Well, you know those claims that Java runs on 18 trillion devices? How do you think they got there, hmmmmm?

load more comments (1 replies)
[–] RubberElectrons@lemmy.world 44 points 9 months ago* (last edited 9 months ago) (2 children)

I really like C because I can just get to the heart of an action and make it happen without much surrounding code.

I could make classes and blah blah blah if I want to make a large, complex program but I'd rather write several small, simple to grok programs which pass information around so each program can do its one simple thing, quickly and easily. Chain the small programs together with bash or something, and bingo, you've got a modular high speed system.

I'm not a programmer, actually a mechanical engineer. But the Unix philosophy of simple, modular tools is great, provided one properly checks and sanitizes inputs.

[–] macaroni1556@lemmy.ca 10 points 9 months ago (6 children)

What you're describing sounds like Python. Not really C's strong suit.

If you haven't checked it out yet, you certainly should!

load more comments (6 replies)
load more comments (1 replies)
[–] MeanEYE@lemmy.world 38 points 9 months ago (10 children)

Just use brainfuck for everything. The entry barrier for the programming industry needs to be higher anyway.

load more comments (10 replies)
[–] Ethanol@pawb.social 30 points 9 months ago (11 children)

But what if I want a union struct to quickly interpret floats as ints and vice versa! I need my C hacks!

load more comments (11 replies)
[–] circuitfarmer@lemmy.sdf.org 27 points 9 months ago (1 children)

Computers are so fast now, we should just write everything in BASIC anyway

[–] macaroni1556@lemmy.ca 29 points 9 months ago

Welcome to the world of JavaScript

[–] mlg@lemmy.world 26 points 9 months ago

Python laughing nervously: "haha yeah... we shouldn't write in C, amirite guys?"

[–] MeanEYE@lemmy.world 24 points 9 months ago (4 children)

Do people still think, after all this time and so many different languages, that there will be one language to rule them all? I mean technically you can drive nails with a rock, but you don't see a carpenter using one. Right tool for the job. Always was, always will be.

[–] qaz@lemmy.world 33 points 9 months ago

Of course there is, it’s Rust

/s

load more comments (3 replies)
[–] zaphod@sopuli.xyz 24 points 9 months ago

Imagine having anyone tell you how to access your memory.

[–] slembcke@lemmy.ml 23 points 9 months ago (3 children)

I enjoy the selection bias in the comments for these sorts of posts. >_< There's a few people saying "I kinda like C", a few saying "use Python instead", and a whole lot saying "Rust is my lord and savior". Completely disjoint from the real world usage of the languages for whatever practical, pragmatic, or ideological measures they are used for.

load more comments (3 replies)
[–] mindbleach@sh.itjust.works 18 points 9 months ago (1 children)

Yesterday I tried using an honest-to-god pointer pointer pointer, and I think the compiler refused on moral grounds.

load more comments (1 replies)
[–] redcalcium@lemmy.institute 17 points 9 months ago (1 children)

There first version of sudo rewrite in Rust has been released last year: https://www.memorysafety.org/blog/sudo-first-stable-release/

load more comments (1 replies)
[–] pineapplelover@lemm.ee 17 points 9 months ago (1 children)

I think Linux is even written in C

[–] dohpaz42@lemmy.world 13 points 9 months ago (1 children)

And Linux was never meant to access memory directly. Boom. Roasted.

[–] davel@lemmy.ml 14 points 9 months ago

fry Still not sure if you’re high or trolling.

[–] Massahud@programming.dev 13 points 9 months ago (5 children)
load more comments (5 replies)
[–] NocturnalMorning@lemmy.world 13 points 9 months ago (11 children)

C is meant for embedded stuff. #changemymind

[–] davel@lemmy.ml 14 points 9 months ago* (last edited 9 months ago) (9 children)
[–] dohpaz42@lemmy.world 17 points 9 months ago (2 children)

That article is incomplete. Nowhere do I see JavaScript listed.

[–] davel@lemmy.ml 15 points 9 months ago* (last edited 9 months ago)

😂

node-os is a full operating system built on top of the linux kernel

load more comments (1 replies)
load more comments (8 replies)
load more comments (10 replies)
[–] Thcdenton@lemmy.world 11 points 9 months ago (1 children)

C is fun. Thats why I use it :P

load more comments (1 replies)
[–] Sonotsugipaa@lemmy.dbzer0.com 10 points 9 months ago (7 children)
load more comments (7 replies)
load more comments
view more: next ›