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.

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 ,

🤣

aluminium , in Fitbit Clock Face

You can connect to a vscode server on a Galaxy Watch, just sayin’

some_guy , in Fitbit Clock Face

You’ve got the hour hand and the minute hand… they’re right there. What’s wrong? /s

TBooneChickens , in When you forget to set a boundary conditions in your logic

To be fair, they probably meant “this year, you reached 915 days with us”

420stalin69 ,

You do not gotta give it to them

backhdlp , in This is what being a Redditor does to your life
@backhdlp@lemmy.blahaj.zone avatar

Me when I don’t know at how many changes I should commit (the previous commit changed 2 characters):

QuazarOmega ,

For real, or when you should make the first and second commit.
Or worse, when you’re too focused and start making a ton of changes, then you realize you haven’t committed anything. Discovering I can stage ranges has made me fall for this way too many times, because I think I’ll easily just go back and extract one atomic change at a time later (spoiler: it won’t be easy ( ; ´ Д `))

pkill ,

as soon as you realize you can’t easily contain your commit message within a 50-character conventional message (or slightly more if you wand to be more specific about the scope)

NovaPrime , in 4 billion if statements
@NovaPrime@lemmy.ml avatar

Andreas is a maniac

CJOtheReal , in We're not the same! (period)

I don’t open it because there is more comment than code…

autokludge ,
@autokludge@programming.dev avatar

\README.md

CJOtheReal ,

Nah fuck that, thats bloat.

QuazarOmega ,

Ah, another professional documentation writer, greetings!

syd , in Manager: This task only takes 30 minutes. Why did it take you the whole day?
@syd@lemy.lol avatar

I’m using Copilot for it right now. It works on half of the cases.

mdurell ,

That’s about 300% better than my average!

BolexForSoup , (edited ) in It's that time of the year again!
@BolexForSoup@kbin.social avatar

He sees you when you’re bashing

He’s hacked your VPN

jballs ,
@jballs@sh.itjust.works avatar

He knows you’re not in the sudoers file

So he’ll report your ass again

Masimatutu ,
@Masimatutu@mander.xyz avatar
jballs ,
@jballs@sh.itjust.works avatar

I’ll be damned if that’s not the most relevant xkcd that I’ve ever seen.

LUHG_HANI , in Programmer tries to explain binary search to the police
@LUHG_HANI@lemmy.world avatar

This sparked something magical OP.

The_Picard_Maneuver OP ,
@The_Picard_Maneuver@startrek.website avatar

And I had worried about it being a picture of text.

DroneRights , in Programmer tries to explain binary search to the police

I was in exactly this situation. My bike was stolen, there was CCTV, they said it would take hours to go through the time during which it was stolen.

captain_aggravated ,
@captain_aggravated@sh.itjust.works avatar

“Can I have a copy of the recording?”

DroneRights ,

That’s what I said, and they said no

NoneYa , in Dev rule

But we’re still flying for now!!

wit , in Bill is a pro grammer

Code should be self documenting.

JohnDClay ,

But you should also comment it, things obvious to you aren’t obvious to even future you.

gornius ,

General rule of thumb: Comments say why is it here, not what it does. Code itself should describe what it does.

Sylvartas ,

But then you write code in the real world and find out that you have to write some ass backwards code every other day because of deadlines, backwards compatibility or whatever, and suddenly you realize that despite your best efforts, code cannot always be self documenting.

Source: me.

executivechimp ,
@executivechimp@discuss.tchncs.de avatar

should

Sylvartas ,

In a vacuum, sure. On a real project of substantial size with more than one programmer, I’m afraid it quickly becomes a “cannot”

teft , in Me trying to fix a complex bug that's not important
@teft@startrek.website avatar

How some people are in comments. Always gotta get that one last comment in the chain in.

ErKaf ,

I disagree

teft ,
@teft@startrek.website avatar

Yeah? Well, you know, that’s just like, your opinion, man.

QuazarOmega ,

Yes.
aaf(1)

ErKaf ,

No

Blamemeta ,

YES!

Isoprenoid ,
ErKaf ,

I will never let it go!

Isoprenoid ,
ErKaf ,

Story of my life

Isoprenoid ,

Is there actually a limit to how far a comment thread can go?

ErKaf ,

I don’t think so.

general_kitten ,

it just continues forever until the ui either fails or doesnt

ErKaf ,

Or until someone of us here stops commenting

Isoprenoid ,
ErKaf ,

Two reply from two people at the exact same time. Do I need to answer both of you to win now?

Btw really nice meme.

bellsDoSing ,

Nah, one is enough. ^^ Curiosity got the better of me thinking about how squished the UI might end up looking.

ErKaf ,

Thanks for allowing me to only write one comment all the time.

Isoprenoid ,

Yeah, one comment keeps it simple. We’re just stress testing.

https://programming.dev/pictrs/image/f989fca0-6edf-4b37-96af-e772e7b5faaf.jpeg

philm ,

We’re in the third rainbow, keep building more stripes lol

ErKaf ,

No worrys. I will never stop.

philm ,

And we’re about to enter the fourth rainbow dimension in the next comment…

emptyother ,
@emptyother@programming.dev avatar

Y’all done yet?

ErKaf ,

No!

Isoprenoid ,
bellsDoSing ,

Oh, it’s still going!

ErKaf ,

Of course!

bellsDoSing ,

Alright, looks like 40% filled up on my screen atm.

philm ,

Rookie numbers, it’s probably 15% on my screen, There’s space for a lot more rainbows

ErKaf ,

My screen is used 50% now on my Fairphone 3+

bellsDoSing ,

I hope we’re all talking about portrait orientation. Oh boy, filling it up in landscape mode seems a daunting task. °!°

ErKaf ,

In my App landscape is the same because it makes splitscreen between the Post and the comment section. So the comments are the same width.

bellsDoSing ,

I see, somehow completely forgot that apps might be different. In browser version in landscape (I just noticed) there’s also the right sidebar, which reserves some space. So it wouldn’t even have to go all the way.

ErKaf ,

It’s getting really tight here.

philm ,

Plenty of space for me still (browser version on desktop)

ErKaf ,

Yea the moment I have no space here anymore I have to switch to desktop.

philm ,

Let’s start the sixth rainbow!

ErKaf ,

Leeeeets goooo

bellsDoSing ,

Nice, bit over half way point here.

philm ,

I just calculated exact subpixel accuracy, for me it’s exactly 20.5̅9̅5̅5̅3̅3̅4̅9̅8̅7̅5̅9̅3̅0̅5̅2̅1̅0̅9̅1̅8̅1̅1̅4̅1̅4̅3̅9̅2̅0̅ % that is still missing to fill the whole comment body with rainbows, way to go!

ErKaf ,

Thats not accurate anymore because of my reply. Recalculate please.

bellsDoSing ,

I do wonder if there’s a hard limit at some point regarding “nested replies”…

ErKaf ,

I don’t think so.

philm ,

We’re at 22.8̅2̅8̅7̅8̅4̅1̅1̅9̅1̅0̅6̅6̅9̅9̅7̅5̅1̅8̅6̅1̅0̅4̅2̅1̅8̅3̅6̅2̅2̅% slowly gaining rainbow ground

ErKaf ,

Niiiiiiiiiiiicccccccce. Leeeeeets write MORRRE comments.

philm ,

SUUUUUUUUURE!!!11 I"M oN ITTTTTTTT

bellsDoSing ,

One takeaway from this surely is that such deeply nested endeavours sure are easily missed.

ErKaf ,

ey

bellsDoSing ,

Ha, for sure I missed the other comment…

ErKaf ,

So we can continue now.

bellsDoSing ,

Alright, second season, here we go!

ErKaf ,

Well first a quick PREVIOUSLY ON PROGRAMMER HUMOR: “How some people are in comments. Always gotta get that one last comment in the chain in.”

bellsDoSing ,

Right, that’s how it all started.

I just unfolded everthing. Seems we are on the 8th rainbow. Almost looks like on my phone, while in potrait mode, 10 rainbows will likely have it filled up.

ErKaf ,

On mobile, I’m already unable to reply to you.

bellsDoSing ,

Oh wow, even if you put it in landscape? In either case, lemmy’s web interface hides a lot of context by default when answering via the “messages” notifcation. So in a sense, with that one could reply endlessly. Then again, that’s not part of our experiment I’d say.

ErKaf ,

With my App I do not have more space in landscape because I will see the post and comment section at the same time in split screen mode.

bellsDoSing ,

I see. 9th rainbow, here we go.

ErKaf ,

9 in a very small number imo

bellsDoSing ,

Kinda, but that’s “rainbows”.

Status quo (your comment): 8 x 7 + 1 = 57 sure is bunch of stripes.

ErKaf ,

On Desktop, we aren’t even at 50% yet, tho.

bellsDoSing ,

Oh boy… can’t promise you that I will last that long. I know it sounds pathetic, but is replying to one’s own comment an option (just for stress testing)?

ErKaf ,

GOOOOOOOOD!!!

bellsDoSing ,

Let the streak continue…

ErKaf ,

Two reply from two people at the exact same time. Do I need to answer both of you to win now?

footfaults , in GoOn
@footfaults@hexbear.net avatar

0.0.0.0/0

::

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