programmer_humor

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

abbadon420, (edited ) in Guthib

I also like the sl command for linux: github.com/mtoyoda/sl

https://raw.githubusercontent.com/mtoyoda/sl/master/demo.gif

The animation takes ages and you can’t cancel it XD

idunnololz, (edited )
@idunnololz@lemmy.world avatar

IIRC the train travels at a constant speed so you can make it faster by resizing your terminal so it’s narrower. Thus the train has a shorter distance to travel and the animation length is reduced.

abbadon420,

TIL

user224,
@user224@lemmy.sdf.org avatar

echo ‘while true; do sl; done’ >> ~/.bashrc

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

the best part is the version with the flags -al

Kerb,
@Kerb@discuss.tchncs.de avatar

you can actuall stop it by pressing ctrl-z and running bg

joyjoy,

The average bash user doesn’t know how to do that.

docAvid,

And it has a whole set of options based on common ls options. Classic and brilliant.

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.

magnus, in Guthib

What, no websocket-based realtime statistics for number of total, daily and hourly mistypings?

huaris, in The classic font size exploit

These services empower you to quickly recognize fonts you might want to license or download for free. Once identified, you can visit font platforms like font script to acquire the fonts.

TankieTanuki, (edited ) in What you are according to you fav language

Can some nerd tell me what the rightmost two on the bottom row are?

Edit: Didn’t notice how old this post was.

sag,
@sag@lemy.lol avatar

Second last on bottom row is swift use to build mac or ios software.

Corbin, in The Perfect Solution

Don’t use OpenAI’s outdated tools. Also, don’t rely on prompt engineering to force the output to conform. Instead, use a local LLM and something like jsonformer or parserllm which can provably output well-formed/parseable text.

lledrtx,

Agree this is better but neither of them actually seem “provable” though?

Corbin,

I’ll be informal to boost your intuition. You know how a parser can reject invalid inputs? Parsers can be generated from grammars, so we can think of the grammars themselves as rejecting invalid inputs too. When we use a grammar for generation, every generated output will be a valid input when parsed, because the grammar can’t build any invalid sentences (by definition!)

For example, suppose we want to generate a JSON object. The grammar for JSON objects starts with an opening curly brace “{”. This means that every parser which accepts JSON objects (and rejects everything else) must start by accepting “{”. So, our generator must start by emitting a “{” as well. Since our language-modeling generators work over probability distributions, this can be accomplished by setting the probability of every token which doesn’t start with “{” to zero.

leds, in DO NOT MERGE

But thanks for keeping my phone up to date, it is appreciated ♥

infinitevalence,
@infinitevalence@discuss.online avatar

Same, I run 3 devices all on Lineage and its great. Who know that you could still get updates and support for a device from 10 years ago, suck on that apple.

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

It’s just kind of sucks that updates consistently breaks banking apps and other stuff relying of passing safetynet. Every time I update I have to do the Magisk workaround again which is really annoying.

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,

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, (edited )
@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

voight, in DO NOT MERGE
@voight@hexbear.net avatar
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}

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…

the_of_and_a_to, in ifn't

I like “unless” in Ruby

JPDev,

unlessn’t

Goun,

I’m sorry, I hate the “unless” so much

NotSteve_,

At one of my first jobs, I was tasked to rewrite a bunch of legacy Perl scripts in Python and the unless lines always made me trip up. I don’t know why but it really messed with my mental flow when reading Perl code

marcos,

The Perl version of it is even greater!

EnderMB,

I haven’t written any Ruby for years, but I still praise it in every conversation I have regarding programming languages. It’s basically a much simpler Python, with some design ideas that are both beautiful and deeply strange.

OskarAxolotl,

Ruby was designed to evoke joy and they absolutely succeeded. Usually, programming is mostly a means to an end to me. But using Ruby just feels so amazing, it’s almost impossible to even describe to somebody who has never used it before.

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

reminds me of #ifndef instead of #if !defined(…)

OpenStars, in ifn't
@OpenStars@startrek.website avatar

Please God let this be a humorous post that somehow does not also find a way to manage to come true…

lurch, in ifn't

i assume “ifnot” wasn’t edgy enough and makes inferior noises on custom mechanical keyboards? /s

fl42v, (edited ) 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
  • programmer_humor@programming.dev
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #