this post was submitted on 21 Jan 2024
9 points (90.9% liked)

Programmer Humor

32469 readers
449 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
(page 2) 40 comments
sorted by: hot top controversial new old
[–] [email protected] 0 points 9 months ago* (last edited 9 months ago) (1 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.

[–] [email protected] 0 points 9 months ago (1 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 (1 replies)
[–] [email protected] 0 points 9 months ago (1 children)

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

[–] [email protected] 0 points 9 months ago (7 children)

You can't, C have strict aliasing.

load more comments (7 replies)
[–] [email protected] 0 points 9 months ago (1 children)

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

[–] [email protected] 0 points 9 months ago

Welcome to the world of JavaScript

[–] [email protected] 0 points 9 months ago

C is okay with good tooling. I wish it was possible to mix C and Rust code in the same project. I could be wrong but last I looked C code will have to sit outside in a library or something and called externally from Rust.

[–] [email protected] 1 points 9 months ago* (last edited 9 months ago) (2 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

[–] [email protected] 1 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)
[–] [email protected] 1 points 9 months ago

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

[–] [email protected] 0 points 9 months ago (1 children)

C is meant for embedded stuff. #changemymind

[–] [email protected] 0 points 9 months ago* (last edited 9 months ago) (1 children)
[–] [email protected] 0 points 9 months ago (1 children)

Ease of access to the underlying hardware in your programming language is only ever needed for embedded programming in the current year. Change my mind.

[–] [email protected] 0 points 9 months ago* (last edited 9 months ago)

Every operating system running on bare metal needs access to the hardware. And if not on bare metal, it needs access to the virtual hardware.

[–] [email protected] 0 points 9 months ago

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

[–] [email protected] 0 points 9 months ago (1 children)

I think Linux is even written in C

[–] [email protected] 0 points 9 months ago

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

[–] [email protected] 0 points 9 months ago

Imagine having anyone tell you how to access your memory.

[–] [email protected] 1 points 9 months ago (2 children)

What language was that jpeg compression written in?

[–] [email protected] 1 points 9 months ago (1 children)
[–] [email protected] 1 points 9 months ago

YOU WERE NEVER MEANT TO ACCESS STARCH DIRECTLY

[–] [email protected] 3 points 9 months ago (1 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?

[–] [email protected] 2 points 9 months ago

we do live in the future

[–] [email protected] 0 points 9 months ago (3 children)

Does anyone even know what Windows is written in?

[–] [email protected] 0 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?

[–] [email protected] 0 points 9 months ago

Windows actually came with a Java runtime for a short while. Then Microsoft got sued, the Java VM was killed, and C# was created (which looks, feels, and behaves very similar to Java) as an alternative.

Just imagine what would've happened if Microsoft and Sun worked together. Java would be in everything on Windows now, not just as a basis for modded Minecraft.

[–] [email protected] 1 points 9 months ago (1 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#.

[–] [email protected] 0 points 9 months ago (1 children)

Microsoft is quickly writing more and more Rust code these days. They rolled out Rust kernel components even before Linux, and their efforts actually include rewrites rather than making the API available to developers.

There's decades of code in Windows, but the successful conversion for DirectWrite font parsing is probably a sign of things to come. MS seems to even be porting some COM modules to Rust, which would be the last thing I would start to port (so many pointer pointers!).

[–] [email protected] 0 points 9 months ago (1 children)

True! Their embrace of Rust is certainly heartening to see.

Let's just hope they don't follow it up with the other two E's in their typical playbook.

[–] [email protected] 0 points 9 months ago (6 children)

Please do go ahead and name the last open standard that Microsoft intentionally destroyed.

EEE is the fucking boogeyman on Lemmy. You just mention it's name and a bunch of nerds shit their pants and upvote.

load more comments (6 replies)
[–] [email protected] 0 points 9 months ago (2 children)
[–] [email protected] 0 points 9 months ago

yeah but which craft?

[–] [email protected] 0 points 9 months ago (1 children)
[–] [email protected] 0 points 9 months ago

C or C++ usually

[–] [email protected] 0 points 9 months ago (2 children)
[–] [email protected] 0 points 9 months ago
[–] [email protected] 0 points 9 months ago (1 children)

I think I saw online that Windows was written in C++

[–] [email protected] 0 points 9 months ago (2 children)

C++, but a very ugly and oldschool dialect of it.

[–] [email protected] 0 points 9 months ago

Yes, you already said C++, no need to repeat yourself :P

[–] [email protected] 0 points 9 months ago* (last edited 9 months ago) (2 children)

Well... I love C, just the semplicity of the syntax and low level aspect of it makes it the only language you need. F*ck high level languages

load more comments (2 replies)
load more comments
view more: ‹ prev next ›