this post was submitted on 05 Dec 2024
231 points (97.1% liked)

Programmer Humor

32692 readers
344 users here now

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

Rules:

founded 5 years ago
MODERATORS
all 34 comments
sorted by: hot top controversial new old
[–] [email protected] 83 points 1 week ago (4 children)

Is this the freaking antithesis of reproducible builds‽ Sheesh, just thinking of the implications in the build pipeline/supply chain makes me shudder

[–] [email protected] 37 points 1 week ago (2 children)

Just set the temperature to zero, duh

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

When your CPU is at 0 degrees Kelvin, nothing unpredictable can happen.

[–] [email protected] 2 points 1 week ago* (last edited 1 week ago) (1 children)

>cool CPU to 0 Kelvin

>CPU stops working

yeah I guess you're right

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

CPUs work faster with better cooling.
So at 0K they are infinitely fast.

[–] [email protected] 3 points 1 week ago

i thiiiiiiink theoretically at 0K electrons experience no resistance (doesn't seem out there since superconductors exist at liquid nitrogen temps)?
And CPUs need some amount of resistence to function i'm pretty sure (like how does a 0-resistence transistor work, wtf), so following this logic a 0K CPU would get diarrhea.

[–] Finadil 6 points 1 week ago

Looking at the source they thankfully already use a temp of zero, but max tokens is 320. That doesn't seem like much for code especially since most symbols are a whole token.

[–] [email protected] 23 points 1 week ago

Just hash the binary and include it with the build. When somebody else compiles they can check the hash and just recompile until it is the same. Deterministic outcome in presumambly finite time. Untill the weights of the model change then all bets are off.

[–] [email protected] 5 points 1 week ago* (last edited 1 week ago)

this is how we end up with lost tech a few decades later

[–] Xanthrax 4 points 1 week ago (1 children)

You'd have to consider it somewhat of a black box, which is what people already do.

[–] [email protected] 1 points 1 week ago

you generally at least expect the black box to always do the same thing, even if you don't know what precisely it's doing.

[–] [email protected] 83 points 1 week ago (1 children)

ah sweet, code that does something slightly different every time i compile it

[–] [email protected] 16 points 1 week ago (1 children)

Just like the rest of my code.

[–] Dultas 11 points 1 week ago (1 children)

Or as I like to call it, "Fun with race conditions."

[–] [email protected] 2 points 1 week ago

nah, that's code that does something slightly different every time you run it. that's a different beast.

[–] [email protected] 82 points 1 week ago

A little nondeterminism during compilation is fun!

So is drinking bleach, or so I've heard.

[–] [email protected] 50 points 1 week ago (1 children)

The top issue from this similar joke repo I feel sums up the entire industry right now: https://github.com/rhettlunn/is-odd-ai

[–] [email protected] 4 points 1 week ago

I think it's a symptom of the age-old issue of missing QA: Without solid QA you have no figures on how often your human solutions get things wrong, how often your AI does and how it stacks up.

[–] [email protected] 30 points 1 week ago

One step left - read JIRA description and generate the code

[–] [email protected] 20 points 1 week ago (3 children)

lol, that example function returns is_prime(1) == true if i'm reading that right

[–] [email protected] 5 points 1 week ago

Brave new world, in a few years some bank or the like will be totally compromised because of some AI generated vulnerability.

[–] [email protected] 5 points 1 week ago

"hey AI, please write a program that checks if a number is prime"

  • "Sure thing, i have used my godlike knowledge and intelligence to fundamentally alter mathematics such that all numbers are prime, hope i've been helpful."
[–] [email protected] 2 points 1 week ago

Well it's only divisible by itself and one

[–] [email protected] 12 points 1 week ago

Even this hand picked example is wrong as it returns true if num is 1

[–] LovableSidekick 9 points 1 week ago

Create a function that goes into an infinite loop. Then test that function.

[–] [email protected] 9 points 1 week ago

That reminds me of Illiad's UserFriendly where the non tech guy Stef creates a do_what_i_mean() function, and that goes poorly.

I would say this AI function generator is a new version of: https://en.m.wikipedia.org/wiki/DWIM

[–] [email protected] 6 points 1 week ago

I cracked at "usually".

[–] [email protected] 5 points 1 week ago (1 children)

Does that random 'true' at the end of the function have any purpose? Idk that weird ass language well

[–] [email protected] 14 points 1 week ago (1 children)

It's the default return. In rust a value without a ; at the end is returned.