Stdlib Memes

Posts tagged with Stdlib

Wgsl Code Snippet Posted By Notch (Yes, That Notch)

Wgsl Code Snippet Posted By Notch (Yes, That Notch)
So Notch, the legendary creator of Minecraft, decided to write his own min() and max() functions in WGSL (WebGPU Shading Language) instead of using the built-in ones. And not just once—he wrote them for every possible combination of parameters: 3 args, 4 args, 5 args, 6 args, vec2f, vec3f, vec4f... the full buffet. This is like manually implementing addition for every possible number instead of just using the + operator. The stdlib is right there , Notch. WGSL has native min() and max() functions that work with any number of arguments and vector types. But nope, gotta reinvent the wheel with 15+ function overloads. The best part? He's using his custom functions to implement... more custom functions. It's turtles all the way down. When you've built an empire on procedurally generated blocks, I guess you just can't stop generating things unnecessarily.

Welsh Or C Standard Library Function?

Welsh Or C Standard Library Function?
The C standard library's naming convention is so aggressively vowel-averse that it's genuinely indistinguishable from Welsh place names. Functions like mbsrtowcs (multibyte string to wide character string), strxfrm (string transform), and wcstold (wide character string to long double) look like someone spilled alphabet soup and decided to ship it as production code. The joke here is that both Welsh words and C stdlib functions share the same chaotic energy of consonant clusters that make you question if your keyboard is broken. Try pronouncing mbsrtowcs out loud without summoning an elder god. The C committee really looked at "convert multibyte string to wide character string" and thought "yeah, let's compress that into something that looks like a cat walked across the keyboard." Fun fact: Dennis Ritchie probably saved millions of bytes in documentation by keeping function names short, but at what cost to our sanity?