programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

xmunk, in ifn't

Still not as good as whence

fartsparkles,

Is this a reference to something because I’d love to read it if you have a time to share.

xx3rawr,

Woah. I did a quick google and it’s not just a meme, but actually used in some major lang’s libraries.

jjjalljs,

This is one of those “modern Google/search sucks” moments because I couldn’t immediately find examples of it in a programming language.

xx3rawr,

I actually used DDG and most I’ve seen, they’re just used as arguments for functions notably in C and Python

LeFrog, (edited )
@LeFrog@discuss.tchncs.de avatar

It is used in ksh korn shell to see what executable responds to a command:

superuser.com/a/351995

Edit: Oh, what a rabbit hole: Why not use “which”? What to use then?

SubArcticTundra, (edited )
@SubArcticTundra@lemmy.ml avatar

Legislation (which feels similar to programming languages sometimes) seems to have some keywords of its own. I remember seeing a lot of Whereas … and Having regard to ….

ryannathans, in DO NOT MERGE

There are a LOT of these in lineage repos. There must be a reason

xia,

Maybe they dont use squash merges, so all the intermediate commits remain on-chain?

MagicShel, in ifn't

Reduce exclamation marks!? Great Scott!!! Is there a shortage of punctuation in the future!?

SubArcticTundra,
@SubArcticTundra@lemmy.ml avatar

All known deposits were depleted

KairuByte,
@KairuByte@lemmy.dbzer0.com avatar

You could have saved two, all you had to do was use the interrobang. You’re a monster.

fsr1967,

Kernighan, what was I thinking?

jaybone,

1.21GB!!!

max, in ifn't

;-;

lung, in ifn't
@lung@lemmy.world avatar

ifn’t(!valid) halp?

Deconceptualist,

I believe that resolves the same as

ain’t!(!untrue)

RagingHungryPanda,

ain’t (nothin)

EmperorHenry, in The Perfect Solution
@EmperorHenry@discuss.tchncs.de avatar

I don’t get this one.

Also, don’t use AI to write code. It’s a trap! It’s just going to steal your idea for the people who own the AI.

xia, in ifn't

“Help’s with readability”? You know what else helps? Not using contractions and introducing an unbalanced single quote.

bdonvr,

If they’d’nt’ve done that, it’d’ve been better. Agreed.

fsr1967,

TIHI

Cwilliams,

they’d’nt’ve

Aside: rip Tom Scott

survivalmachine,

This feels racist against Appalachia. We naturally speak with contractions and are commonly referred to as “unbalanced”.

frezik,

Runs havoc on parsing, too. It’s bad for both humans and robots. I say we ship it.

UnfortunateShort, in DO NOT MERGE

That’s why there are draft merge requests nowadays. Although I kinda miss the “DONT MERGE WE GONNA DIE” comments.

bappity, (edited ) in ifn't
@bappity@lemmy.world avatar

cap () {

}
nocap () {

}

runner_g, (edited )

nocap(frfr){

}

fnmain, in Imagine

Fuck, I kinda wanna make this (for the funny of course)

fnmain,
luciole, in The Perfect Solution
@luciole@beehaw.org avatar

I can’t even

taanegl, in ifn't

I’m just hoping this paves the way to code with Southern dialect


<span style="color:#323232;">iffun is == true
</span><span style="color:#323232;">iffun ain't == false
</span>
timetravel,

May I introduce you to the joys of and creating your own horrible sub language

frezik, (edited )

That reminds me of an old paper about how to create a compilable C program out of old game ROMs. Decompile to assembly. Implement a bunch of #define statements that implement all the ASM statements. Now compile it to a native binary on whatever platform.

Won’t likely be faster or more accurate than regular emulation methods, but it’s a neat idea considering that the source code on all this stuff was lost a long time ago.

luciole, in ifn't
@luciole@beehaw.org avatar

I shan’t!

sneaky_hecker, in DO NOT MERGE
@sneaky_hecker@lemmy.world avatar

Even if it was merged I’d be more concerned how on earth you have infinite Firefox tabs open

lone_faerie,

It’s when you have more than 99 tabs open

DreadPotato,
@DreadPotato@sopuli.xyz avatar

What kind of psychopath has that many tabs open!?

CrypticCoffee,

I take personal offense to that. How do you not?

Kusimulkku,

I close all the tabs regularly. Bookmark for those that I need to save for longer than one session

DreadPotato, (edited )
@DreadPotato@sopuli.xyz avatar

I bookmark stuff I need at a later time, or will need again, and read the stuff I want to read now and close the tab when I’m done.

Daeraxa,

I got to that once, on mobile I’ve never worked out the rule for when FF opens a new tab vs opening a site in your current tab. They just kind of silently accumulate.

DreadPotato,
@DreadPotato@sopuli.xyz avatar

Yeah it’s a bit weird with FF, I just purge open tabs for unnecessary tabs daily.

loutr,
@loutr@sh.itjust.works avatar

There’s a setting to auto-close tabs after a certain amount of time.

DreadPotato,
@DreadPotato@sopuli.xyz avatar

I like to be in control of what gets closed and when, so nothing gets closed before I bookmark it if need it.

mexicancartel,

“Oh no! What if I need it later”

~ me, more than 99 times

leds,

Yeah that’s the problem I have, started while ago. It opens a new tab instead switching to existing tab.

poplargrove, (edited )

I keep tabs open as a sort of “read page later” list. I never seem to get to reading them though.

DreadPotato,
@DreadPotato@sopuli.xyz avatar

So do I, for a few days. If I haven’t read it by then, I’ll either bookmark for later or just close. I pretty much never have more than 10-15 active tabs ever.

ripcord,

As we know, scientists have not yet discovered any numbers past 99

0x0, in ifn't

I propose a new, more threatening kind of control flow.


<span style="color:#323232;">do {
</span><span style="color:#323232;">  /* something */
</span><span style="color:#323232;">} or else {
</span><span style="color:#323232;">  /* you don't want to find out */
</span><span style="color:#323232;">}
</span>
Strawberry,

this is just a menacing try/catch!

gex,

Some C++ style guides suggest the following naming convention for functions that crash on any error


<span style="color:#323232;">OpenFileOrDie()
</span>
yum13241,

Now what about GZDoom’s GoAwayAndDie();?

xmunk,

PHP has the always wonderful (and perfectly functional) syntax of

logUserIn() or die();

msage,

Or Perl

evatronic,

Where do you think PHP stole it from?

msage,

Bash?

frezik, (edited )

Perl also has unless() for the very purpose in OP, which is a more sensible choice.

Oh, and if you need to reinforce your belief that Perl is a mess, the single-quote character can be used as a package separator instead of “::”. This was set in the 90s when nobody was quite sure of the right syntax for package separators, so it borrowed “::” from C++ and the single quote from Ada (I think).

That means the ifn’t() in OP can be interpreted as calling the t() function on the ifn package.

The “::” separator is vastly preferred, though. Single quotes run havoc on syntax highlighting text editors (since they can also be used for strings). About the only time I’ve seen it used is a joke module, Acme::don’t.

Kissaki,

Personally, I like to call catched exception variables up, so for a rethrow I can throw up;.

Vorthas,
@Vorthas@programming.dev avatar

One of the modules in a project I’m working on is called VulkanOrDie which always makes me crack up when I see it in the compilation messages.

OpenStars,
@OpenStars@startrek.website avatar

It’s funnier when you try to SysCallAndDie() :-P

(that’s a real thing in perl btw - I guess that function didn’t get the memo)

OpenStars,
@OpenStars@startrek.website avatar

You just made me a offer I can’t refuse. I go now to sleep with the fishes…

Mesa,
@Mesa@programming.dev avatar

The better try-catch. More intuitive if you ask me.

moody,

It_would_be_a_shame_if(condition)

rothaine,

<span style="color:#323232;">do {
</span><span style="color:#323232;">  /* something */
</span><span style="color:#323232;">} do hast {
</span><span style="color:#323232;">  /* something */
</span><span style="color:#323232;">}
</span>
0x0,

<span style="color:#323232;">do {
</span><span style="color:#323232;">  /* something */
</span><span style="color:#323232;">} do hast {
</span><span style="color:#323232;">  /* something */
</span><span style="color:#323232;">} do hast mich {
</span><span style="color:#323232;">  /* something */
</span><span style="color:#323232;">}
</span>
jadelord,

It exists, kind of. Python has this construct


<span style="color:#323232;">for item in iterable:
</span><span style="color:#323232;">    ...
</span><span style="color:#323232;">else:
</span><span style="color:#323232;">     ...
</span>

which always puzzles me, since it depends on a break statement execution. I always have to look it up when the else block is executed.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programmer_humor@programming.dev
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #