There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

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

lordmauve , in ifn't

Python already has this.

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

cap () {

}
nocap () {

}

runner_g ,

nocap(frfr){

}

fnmain , in Imagine

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

fnmain ,
peopleproblems , in The Perfect Solution

oh Jesus

did this come full circle?

we used python to query chatgpt to decide if a number is even or odd and return true or false?

Ephera ,

True or false or null.

Mathematicians didn’t know it yet, but numbers can now be even, odd or neither.

dan ,
@dan@upvote.au avatar

True or false or null.

Ah, yes, a three-state boolean.

lars ,
Natanael ,

Non integers certainly aren’t even or odd, so yes?

Ephera ,

Yeah, I’m chalking that up to Python’s untypedness. I was going to write “integers”, but technically that function takes a “num”, whatever that is.

For all we know, it could be a string, asking ChatGPT to hack the government. Is that even? Probably no. Or None. Or T-Rex. Without reading the entire function, we don’t know that it’s not returning T-Rex.

Thankfully, it doesn’t matter. Just stick the result into an if-else, then False and None will land you in the else-branch. And both True and our Truthiness-Rex will land you in the if-branch. Just as Guido intended.

…this rant brought to you by trauma.

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

I shan’t!

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

I can’t even

vlad76 , in ifn't
@vlad76@lemmy.sdf.org avatar

What’s wrong with “else”

NekkoDroid ,
@NekkoDroid@programming.dev avatar

It’s not ifn’t

SpaceNoodle ,

*it’sn’t

felbane ,

I’dn’t’ve said it like that.

Scubus ,

Perchance

NocturnalMorning ,

^This

OP raises a valid point

Darkassassin07 ,
@Darkassassin07@lemmy.ca avatar

if(condition) {#block never used} else {#actually do a thing}

Vs

ifn’t(condition) {#actually do a thing}

Vs

if!(condition) {#actually do a thing}

gandalf_der_12te ,

vs

if (not condition) {#actually do a thing}

MNByChoice ,

Cannot start a statement with else. One can with ifn’t. There is a new thing where we don’t branch (which is a separate discussion).

Or am I missing the joke…

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?

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.

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.

max , in ifn't

;-;

kromem , in The Perfect Solution

Inefficient solution.

You should simplify it to just ask the model if the last bit of the binary representation of the integer is a 1 or a 0.

Natanael ,

They don’t process inputs as binary (they use clusters of symbols, i.e. letter groups) so that’s not guaranteed to work

kromem ,

r/woosh

Natanael ,

I did realize that too was a joke, still wanted to point that out

kromem ,

Well, in the sake of pointing things out, GPT-4 can actually correctly answer the prompt, because it arrives at it in the opposite direction. It can tell the integer is even or odd and knows that even or odd integers in binary end in 0 or 1 respectively.

AeonFelis ,

You can ask it if the last digit is odd or even, then.

aMockTie , in DO NOT MERGE

Why did they submit this as a pull request in the first place? Just commit it to a WIP branch until it’s ready to merge. Am I missing something?

brisk ,

Probably to get some other benefitof the PR system, such as CI tests

leds OP ,

Does gerrit have a draft state? In azure devops you can mark PR as draft , won’t trigger any builds but you can still start them manually

beeng ,

manually

This is probably why the dev created a PR, less clicks

sf1tzp ,

I don’t remember if it did when I used it. Our convention was to -2 your own change until it was ready to go 😅

DrJenkem ,
@DrJenkem@lemmy.blugatch.tube avatar

It’s been a while since I’ve worked with AOSP, but I had always understood it to be some weird shit with Google’s internal processes. The “do not merge” commits are all over the AOSP, or at least they used to be.

NotSteve_ ,

I do this often. It’s useful if you want to send it to your coworker for some early feedback or as others have said, have the CI run

AcesFullOfKings , in The Perfect Solution

deleted_by_author

  • Loading...
  • rimu ,
    @rimu@piefed.social avatar

    gpt3.5 is faster though. You can tell they really thought about performance while writing this code because they used 3.5 instead. /s

    fartsparkles ,

    3.5e was so much better than 4e tho /d20

    fl42v , in ifn't

    This has to be illegal. I mean, it’s basically suicide incitement (or whatever is the phrase for it)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines