Readit News logoReadit News
bobbyi_settv commented on New in Git: switch and restore   banterly.net/2021/07/31/n... · Posted by u/todsacerdoti
kzrdude · 5 years ago
It is unfortunate that:

+ git switch is documented as "EXPERIMENTAL"

+ git --help lists git switch but not git checkout as an important command

This is a documentation inconsistency. It can't be both the canonical interface to use and experimental at the same time.

bobbyi_settv · 5 years ago
It's not just --help.

When you checkout a specific commit and are now in detached HEAD state, you are by default given the message

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -c with the switch command. Example:

      git switch -c <new-branch-name>

    Or undo this operation with:

      git switch -

bobbyi_settv commented on Google broke a conditional statement that verifies passwords on Chrome OS   arstechnica.com/gadgets/2... · Posted by u/stalfosknight
JonathonW · 5 years ago
If you're going for "each line of code should do exactly one thing", you'd probably prefer that as

    if(foo) {
      if(foo->bar) {
        //whatever
      }
    }
separating out the null check and the actual conditional. More lines of code and more nesting, yes, but, if you're trying to strictly adhere to a one thing/one line principle, you probably don't care.

Short-circuit 'or' is a little harder to avoid (if you specifically want the short-circuit behavior), since you'd have to duplicate the code in the body of the if. But that doesn't come up as often IME.

bobbyi_settv · 5 years ago
That technique doesn't work (as well) when you want a single "else" block that is used when either of the conditions is false, which I think is pretty common for this sort of conditional
bobbyi_settv commented on Everything useful I know about kubectl   atomiccommits.io/everythi... · Posted by u/alexhwoods
bobbyi_settv · 5 years ago
How is this command from the page:

  # Lint a Helm chart
  # Good to put in pre-merge checks
  $ helm template . | kubeval -
different/ better than "helm lint" (https://helm.sh/docs/helm/helm_lint/)?

bobbyi_settv commented on A foreign seller has hijacked my Amazon Klein bottle listing   kleinbottle.com/#AMAZON%2... · Posted by u/_Robbie
Qwertious · 5 years ago
Don't buy this guy's klein bottles, they're a scam - they're only THREE dimensional! Such a rip off. How am I supposed to store a ŷ̶̺̎͌͐̿̽̊́̕ŏ̶̗̈́̓̍̎̃͠g̶̝̺̜̜͋̿̚ͅ-̷̧̛̈́̔́s̷̰̀͌́̈́ơ̷̝̭̫͛́͘ẗ̴̹̱̖̥́h̸̡̡͙̻̀o̸̹̘̾̀͗̇̕t̵̗̠̄̽̈́͑ḧ̵̳̰̩̲͈̜͉̝́́͌͐ in this thing?
bobbyi_settv · 5 years ago
Worse, the klein bottles did nothing to remove my black heads
bobbyi_settv commented on Bash PS1 Generator   bashrcgenerator.com/... · Posted by u/nailer
dllthomas · 5 years ago

    function copy_last_command {
        history 1 | sed 's/ [0-9]*  //' | xclip -i
    }
    bind -x '"\C-h":copy_last_command'

bobbyi_settv · 5 years ago
The Mac equivalent of xclip -i is pbcopy
bobbyi_settv commented on What it's like to be cancelled   noahbradley.com/cancelled... · Posted by u/noahbradley
vagrantJin · 5 years ago
Whats the difference between having sex and being a sexual predator?

Do you just make things up as you go?

The frightening thing about "cancel culture" isnt that its new or eye-opening. Its has always existed, sandboxed, in places called school playgrounds. The world have adults has this annoying thing called due process. Filing cases, going to court, giving evidence etc etc.

Now that the playground rules are stating to proliferate into adult spaces, companies - surprisingly - have started to use playground platforms to make -what used to be - adult decisions about who to fire, who to buy from, whose services to use...from a 240 character platform. No due process, no due diligence, nothing. Just tweets.

God bless us all.

bobbyi_settv · 5 years ago
> Whats the difference between having sex and being a sexual predator?

I don't think it's necessary to answer this because "sexual predator" was literally Noah's description of himself and his behavior (in those words) in the apology post that led to Wizards no longer wanting to work with him.

bobbyi_settv commented on Safari 15 on Mac OS, a user interface mess   morrick.me/archives/9368... · Posted by u/freediver
shinycode · 5 years ago
I CMD+R every time and I guess for the amount of time people reload it’s not costly to learn it …
bobbyi_settv · 5 years ago
If I CMD+R on Hacker News, it reloads the page. If I do it on outlook.office.com, it starts drafting a reply to the email I have selected. Reload button does the same thing everywhere.
bobbyi_settv commented on HBO Max accidentally sent an integration email test to users   twitter.com/internetofshi... · Posted by u/minimaxir
spike021 · 5 years ago
Apparently it really was done by an "intern".

>We mistakenly sent out an empty test email to a portion of our HBO Max mailing list this evening. We apologize for the inconvenience, and as the jokes pile in, yes, it was the intern. No, really. And we’re helping them through it.

https://twitter.com/hbomaxhelp/status/1405712235108917249?s=...

bobbyi_settv · 5 years ago
I guess they're going for technically correct since 100% is indeed "a portion"
bobbyi_settv commented on Bear plus snowflake equals polar bear   andysalerno.com/posts/wei... · Posted by u/soopurman
xyzzy_plugh · 5 years ago
> I like squiggle

Go uses "Runes" which is a pretty unambiguous and memorable term.

Though, in Go's case they don't include use of ZWJ, as they're limited to 32-bits.

bobbyi_settv · 5 years ago
It's somewhat ambiguous because Unicode has a code block for actual runes which are not the same as the "runes" you're talking about

https://en.wikipedia.org/wiki/Runic_(Unicode_block)

bobbyi_settv commented on I still like C and strongly dislike C++   codecs.multimedia.cx/2021... · Posted by u/todsacerdoti
bobbyi_settv · 5 years ago
Microsoft's compiler did not support C99 for a long time because they did not really think of it as a C compiler or a C/ C++ compiler; it is a C++ compiler. Its support for C90 was explained as being maintained "for historical reasons" ( https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-an... ), but they had no reason to add support for new standards of a language that was outside the scope of the project.

It's odd for the author to complain about the commingling of C and C++ in compilers and then complain about Microsoft specifically not doing that.

u/bobbyi_settv

KarmaCake day1472June 5, 2013View Original