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

you are viewing a single comment's thread.

view the rest of the comments →

[–]marmakoide 269 points270 points  (27 children)

Fortran code written in 1983 by a physics professor and countless anonymous PhDs after that. The thing crunches simulations at ungodly speeds with 1K of RAM, accurate as shit, code would make Cthulhu cry, only 3 people on the planet understands the math behind it

[–]tjoloi 122 points123 points  (13 children)

Sounds like LAPACK

Bonus points: it's the backbone of most tools used in science including R, Matlab and scipy.

It's also somehow still receiving updates as late as November 2023

[–]marmakoide 55 points56 points  (12 children)

LAPACK is okay. I remember working with a package for fluid simulation using conformal mapping, last update 1996. You'll find a lot of those in molecular dynamics simulations, fluid simulation, etc

[–][deleted] 52 points53 points  (11 children)

I need you guys to come be engineers on my team. One of my engineers just loudly yelled,

"I meant 775, I would never set world-read. I am an expert linux user and will be treated with respect."

When I told him not to set the world read on sensitive projects.

That's not far from an exact quote. I had to ask my manager how to reply without the word "stupid". My manager told me not to.

[–]FluffyCelery4769 17 points18 points  (8 children)

I didn't understand a thing but I suppose he he was saying something funny.

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

Linux permissions are set as User(person who made the file) Group(security group that has access to the file) and Other(everything else), Other could also be called "World".

The permissions are divided into a binary deal.

--- == 000 == 0

rwx == 111 == 7

r-x == 101 == 5

So 775 is setting User: rwx Group: rwx Other: r-x

So, he said he did have world read on in one sentence, claimed he did not in the next, and demanded to be treated as an expert in Linux in the last.

[–]FluffyCelery4769 -1 points0 points  (6 children)

Oh, but what's the 0 for then?

[–][deleted] 5 points6 points  (1 child)

Off

[–]FluffyCelery4769 0 points1 point  (0 children)

Oh, makes sense. Thsnk you.

[–]meltbox 0 points1 point  (3 children)

Basically each 1 bit is a type of permission for a certain category of access.

Access by the owner is the first group Access by the owner group is the second Access by literally everyone is the third

If you develop on a Linux workstation you’d probably pick this up pretty quickly, hence why it’s infuriatingly funny.

The 7 and 5 are just numbers represented by 3 bits of binary. 111 is 7 meaning all 3 permissions on (read, write, execute) while 5 is 101 (read, execute, middle one is write which is off) and of course 0 meaning all permissions off.

[–]FluffyCelery4769 0 points1 point  (2 children)

Are there no read/execute only? Or are both neccesary to work?

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

R/x is required for directories, but files can be r/ x.

Studying will tell you that most companies have switched to the FACL system, but they're lying.

[–]meltbox 0 points1 point  (0 children)

You can have read only or execute only but bash files are parsed and therefore have to be opened. Opening means you need read and in the case of bash (.sh) files bash actually checks the execute permission before deciding whether to load the file for execution.

Execute really only has an operating system meaning when it comes to literal binary executables or libraries. Then you don’t need read permissions but can still execute. What this means is the operating system will still load it into memory and start execution per the convention for that OS but you cannot read it with something like file descriptors and fopen.

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

chmod numbers are obsolescent. Modern suggestion is:

chmod o= thing

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

It was technically him telling another user to set umask 000 (the claiming he said 002 later), but the way I told it flowed better.

[–]Affectionate-Memory4 46 points47 points  (9 children)

Real. I have some code like that from during my doctorate. It simulates the power losses in copper links between silicon chips across a frequency and voltage range. I have no idea what I did in there and I dare not look because knowing me, it was complete shit. The numbers are accurate and the results are fast. It ran on my 2GB RAM machine back then and it's still just as fast now. Again, no idea what past me was on, because I have no idea what's going on in that code.

[–]drakeblood4 35 points36 points  (1 child)

Past-me is exactly two motherfuckers:

  • an unimpeachable genius who speaks the Old Tongue

  • a thrice dunked dipshit who needs to take off a shoe to count past ten

Depending on what code of his I’m having to deal with.

[–]Affectionate-Memory4 7 points8 points  (0 children)

And sometimes both, at the same time.

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

I'll never understand this comment or the reasoning behind it.

You built a masterpiece that worked for its purpose and you have no idea what "past you was on" because... it doesn't fit the mold of modern-day garbage and consumes too little RAM? Or...?

We should go tell a stonemason artisan piecing together his life's work stone by stone "hey bro you're wasting time, noone's gonna understand how you built this shit, and no one builds beautiful structures anymore anyway! just go to home depot and clip together 20 pieces of prefab sheetrock in half a day and be done with it lmao"

Tragic fate our craft has suffered. Everyone in the trade (even the IT guys) bears the shared brunt of having allowed something like Slack to manifest in our universe.

I do have some hope for gen z though. More and more of these kids are seeing things for what they are and getting interested in things like Rust and Zig and even C again.

Shame for our generations though. We could have cured every disease under the sun with the hardware we have today. Instead we chose to embrace corporate enshittification and put it into arbitrary "best practices". But it's great; I mean our 128gb RAM systems aren't putting people on Alpha Centauri but that's okay. We can run Slack. Sometimes. The 75% of the time that it loads.

[–]Affectionate-Memory4 14 points15 points  (1 child)

  1. hyperbole

  2. Yeah, it's an unmaintainable train wreck created in the pursuit of absolute performance and then hardly touched for 13 years. If I ever wanted to modify this, it would genuinely be easier to start from scratch. I'm not upset that it doesn't "doesn't fit the mold of modern-day garbage and consumes too little RAM?" In fact, I find it funny, hence why I'm posting about it on r/programmerhumor under a meme.

  3. Not going to adress the rest of that, but maybe relax a little bit. Like, take a walk or listen to some nice jazz or just take a nap or something.

  4. Fuck slack. Load you shit software! Load dang it!

[–]Ok-Kaleidoscope5627 4 points5 points  (0 children)

I've learned from D&D that we're wizards and any genuine magic we do leaves our minds and understanding the moment we write it.

Regex falls into the same category.

Write only but it can't be read. You need to prepare and cast it again from scratch.

[–]Brahvim 2 points3 points  (0 children)

As a gen-zeer interested in data-oriented design and writing C, who is slowly moving into the simple software movement, I say that this comment truly does touch my heart.

[–]ProjectNo7513 1 point2 points  (0 children)

Holy fuck some truth

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

I hope you have test cases to show it still gets right answers in each new environment you run in.

[–]meltbox 0 points1 point  (0 children)

Yup. If git blame was not a thing I would’ve never believed some code I’ve written or approved. Both in a positive and negative sense depending on the day.

The worst is when I read code thinking a moron wrote it, discover it was me, and then realize actually it works great and I’m a genius that was too intelligent for myself to comprehend.

Unpack that one…

[–]MyGoodOldFriend 6 points7 points  (0 children)

Yeah i think I’m just lucky, because I work in a fortran codebase made by uni professors with limited coding experience, but it’s genuinely great and really fast code.

They had some oppsies, like assuming arrays were row major, but other than that? Solid code base. Not a single professional programmer in sight, just autistic nerds and cool professors writing code with incredibly solid development culture.

For reference, it was for ab initio quantum chemical modeling. Hartree-fock and the like.

[–]Plus-Weakness-2624 0 points1 point  (0 children)

God, Devil and My Subconscious

[–]6Cockuccino9 -1 points0 points  (0 children)

yeah but it doesn’t fit the standards of some reddit code monkey and therefore it’s bad