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.

SatanicNotMessianic , in Programming: The Horror Game

TFW when all of your bugs are like cockroaches that run away from the light but hide in the dark where you can’t see them.

tsonfeir , in Programming: The Horror Game
@tsonfeir@lemm.ee avatar

Coincidentally, there are writing (as in fiction, not code) apps just like this.

chemical_cutthroat , in Programming: The Horror Game
@chemical_cutthroat@lemmy.world avatar

This is a blessing. You won’t have to look at the spaghetti the last dev left behind.

zemja , in WDYM your terminal isn't a test suite?

Can somebody please tell me what history -c is?

akdas , (edited )

It lets you clear the bash command history, either completely or selectively. Here’s the GNU docs for the history builtin: www.gnu.org/…/Bash-History-Builtins.html#index-hi…

(I’m not too familiar, someone else can clarify: is this available outside bash?)

What’s interesting to me is the -a option, which lets you “flush” the history for the current session without ending the session. I can see that being useful!

survivalmachine ,

history displays a list of all commands you have run on the terminal since the history list was last cleared. It is invaluable for referring back to a big complex command or set of commands you ran at some point in the past. The -c flag clears that history.

zemja ,

Fuck, I just cleared my history.

umbrella ,
@umbrella@lemmy.ml avatar

dont you also need history -w to save it?

on ubuntu -c doesnt actually clear it unless you also use -w

survivalmachine ,

Yes, my comment only applies to the shell history in memory. -c clears history immediately, but you can still reload it from disk if you haven’t overwritten that with -w. If you tend to close your terminal windows frequently and rely on the history feature between sessions, it would benefit you to learn about the intricacies of the on-disk copy of history and how its affected by writes, appends, clears, crashes, etc. I tend to leave my terminal windows open a long time and copy any complex commands out to my PKM if I need to save them for future sessions, so I generally try not to rely on .bash_history, but it has saved my bacon on more than one occasion.

caseyweederman ,

What does it do again?

survivalmachine ,

🤣

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.

agent_flounder , in Devotion to duty
@agent_flounder@lemmy.world avatar

Die Hard: Five Nines

abbadon420 , 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

docAvid ,

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

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 ,
@Kerb@discuss.tchncs.de avatar

the best part is the version with the flags -al

Aatube ,
@Aatube@kbin.social avatar

you mean -Flacked

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.

Aatube ,
@Aatube@kbin.social avatar

I'm sure there's an asciicast of this beautiful steamroll somewhere...

janabuggs , in ifn't

I’m struggling to understand if this is true or ifn’t true

nickwitha_k , in The Perfect Solution

Quick! Make this a library, then encourage its widespread use. Nothing could go wrong. Who’s that behind me? No, one. No. It’s absolutely not node.js.

rimjob_rainer , in ifn't

Why not just ifnot? Same count of characters but an o instead of a possibly problematic single quote.

KmlSlmk64 ,
@KmlSlmk64@lemmy.world avatar

If someone really wanted to add it, probably the best would be to use unless

JoshuaEN ,

I really liked having unless in Ruby; a ! can be easy to miss, while unless made it clear without needing to write out != true.

HexAndSquare ,

It’s also cool when you do unless(!condition). I particularly like this.

Ferk , (edited )
@Ferk@kbin.social avatar

Yes... how is "reducing exclamation marks" a good thing when you do it by adding a ' (not to be confused with , ´,or’` ..which are all different characters).

Does this rely on the assumption that everyone uses a US QWERTY keyboard where ! happens to be slightly more inconvenient than typing '?

Ookami38 ,

I think it’s just capitalizing on a trend to add n’t to otherwise noy contractions, to make them into contractions. Contractionn’ts, if you will

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.

Anticorp , in Sometimes things do go your way
  • The bug is from a library
  • There are 5 dozen related bugs on GitHub
  • The last commit to the library was 3 years ago
bigboismith ,
  • Library is a read-only repo
  • last commit was 10 years ago
csm10495 , in ifn't
@csm10495@sh.itjust.works avatar

Imagine the regex needed to highlight code with that extra single quote.

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

With ahit like that its not microsoft java its now microsoft javascript

ohlaph ,

That’s Typescript…

Hexbear2 , in ifn't

This is the biggest comp sci innovation in !decades

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