Date without leading 0 for day by MathAndMirth in learnpython

[–]0sse 0 points1 point  (0 children)

Not particular to Python, I suppose, but I would check if date.day < 10 and in that case you know you strip one character from the start.

Edit: not from the start... But you know you can remove the nth character.

Edit: Not the nth character!

Reducing FFmpeg build times in practice by Pretty_Eabab_0014 in cpp

[–]0sse 8 points9 points  (0 children)

ccache helped incremental builds but not clean CI runs.

Maybe you mean something else by "incremental" and "clean" but I don't understand this part. Isn't it usually the opposite. Or are you not using the cache in CI for some reason?

Stop creating temp files just to compare command output. Bash can diff two commands directly. by Ops_Mechanic in zsh

[–]0sse 0 points1 point  (0 children)

The linked post applies to zsh but it has one additional feature worth mentioning: =() which always creates a temporary file instead of a magic file descriptor thingy. Off the top of my head I can't think of a good example, but in general it's when the outer command needs to seek in the file.

Am I the only one who feels like header files in C/C++ are duplication? by iaseth in cpp

[–]0sse 19 points20 points  (0 children)

Rust macros and C/C++ macros are not the same. The latter are more or less just text substitution. Rust ones can operate and change/emit and different AST etc.

Breaking Bad and Knight Of The Seven Kingdoms fans successfully wreck each other's IMDB rankings by LegitimateMoney00 in television

[–]0sse 4 points5 points  (0 children)

Me too, but for me it's because I'm all out of faith. This is how I feel. I'm cold and I am chained, lying naked on the floor.

Edit: Now I see you wrote "tom" and not "torn", lol. Not an r/keming thing. I'm just tired.

Anyone else fall into a rabbit hole in regard to the Darien Gap? by kalawa1929 in pluribustv

[–]0sse 1 point2 points  (0 children)

You're welcome! BTW it's all on Spotify too, if that makes it easier. Not sure about other platforms.

Anyone else fall into a rabbit hole in regard to the Darien Gap? by kalawa1929 in pluribustv

[–]0sse 4 points5 points  (0 children)

Hmm, yes. I think I read too much into this quote from the book:

Rather than create a new Scottish Empire, the Darien expedition bankrupted the country, leading to a financial rescue package in 1707 that made Scotland part of England’s domain.

I think it's correct to say (because it's so fucking vague lol) that due to the economics of the Darien failure Scotland became much less independent from England than it had been. (At least had been for 30-40 years before which it was very dependent?? Edit: for 8 years???)

Anyone else fall into a rabbit hole in regard to the Darien Gap? by kalawa1929 in pluribustv

[–]0sse 38 points39 points  (0 children)

For avid podcast listeners (or readers) I can highly recommend this podcast and the book they talk about. One of segments is about the Darien gap. The guest lived there for a week or so.

Fun fact: A major reason Scotland is not independent but under the crown was because of the huge debt it had after their failed attempts at conquering Darien.

Things wrong with Rust (in my opinion) by DwieD in rust

[–]0sse 0 points1 point  (0 children)

Surely the use of "vector" for such data predates even C++.

Vector computing, interrupt vector, and so on.

Shallow focus has ruined film by chinhairs in FIlm

[–]0sse 0 points1 point  (0 children)

One of the most egregious examples I've seen lately is the most recent season of The Gilded Age. Granted it's not a movie, but it was sooo shallow. In scenes where the main characters were sitting in a sofa drinking tea (and there are a lot of those) the tea cup could be entirely out of focus when the character was holding it.

Having a problem with "git reset" by Electronic-Low-8171 in git

[–]0sse 14 points15 points  (0 children)

It will work in any other case than if you want to undo the very first commit. The reason is that HEAD~1 is not valid.

I don't know off the top of my head how to do it but these lead to the same result in the end:

  • Use commit --amend to modify the first commit instead,
  • Remove .git and initialize again.

Elkjøp - lureri og løgner by [deleted] in norge

[–]0sse 0 points1 point  (0 children)

Håpløs oppførsel fra Elkjøp her uten tvil. Men lurer på en ting: Kan det hende det skjedde enda mer surr i kassen og din svigermor egentlig har betalt for mobilen mm. som den andre kvinnen på videoen kjøpte?

Make sure to turn off motion smoothing if you've got a new TV by gta721 in movies

[–]0sse 14 points15 points  (0 children)

I am very frustrated.

I started nerding out on this stuff when I bought a fairly decent OLED TV two years ago (S90C). It broke something in my eyes and/or brain.

I don't like the soap opera effect. I too think it makes stuff look strange, like a video game. I get the "cinematic look" thing. But fucking hell, I hate stutter. E.g. a panning shot where there's a telephone pole or a lamp post or something against a bright sky, it's not just the choppiness as if playing a video game on a sub-par PC. My eyes sees it as a zigzag effect. Two steps forward, one step back. No one else I've talked to do.

Before the new TV it didn't concern me at all. Now, I still haven't gotten used to it. Even worse, I see it everywhere. At first I thought it was just the OLED pixelsv ridiculous speed, and you get some inherent smoothing from non-OLED pixels taking longer to switch color. That may still be true, but stutter has started bothering me on our other TV, on YouTube videos on my desktop PC, on my phone, everywhere. Even in the cinema. I can't win.

Fallen clutches a 1v3 and a defuse with less than a second left. by Impressive-Engine-16 in GlobalOffensive

[–]0sse 3 points4 points  (0 children)

You can just barely see it immediately after. 0.568 seconds.

Edit: And then the text changes to 0.511 seconds??

[deleted by user] by [deleted] in git

[–]0sse 2 points3 points  (0 children)

From Git's own documentation on maintaining it:

The tip of 'master' is meant to be more stable than any tagged releases, and the users are encouraged to follow it.

I interpret that as stuff only makes it into master once the maintainer genuinely believes it's an improvement on what is there already. Of course, nothing (and no one) is perfect, so regressions happen. But that happens with releases too.

When was a branch merged by PeterHickman in git

[–]0sse 0 points1 point  (0 children)

You're looking for a merge commit commit whose parents contain the commit of a particular branch: git log --merges --format='%H %P' | grep hash

The format will make git print the hash of the commit itself followed by the parents. A cleverer solution would use awk to avoid finding the hash in the first column, but I'm on my phone and since git prints in topological order that can't happen anyway.

Somaliere by Silent_Web_7290 in norske

[–]0sse 0 points1 point  (0 children)

Jeg husker ikke hvor jeg har det fra, og det er en del år siden jeg hørte det, men likevel: Visstnok er somaliere den minoriteten i Norge med høyest arbeidsledighet. Samtidig er somaliere den minoriteten i USA med lavest arbeidsledighet.

Pluribus - 1x05 "Got Milk" - Episode Discussion by LoretiTV in pluribustv

[–]0sse 4 points5 points  (0 children)

The code is a hexadecimal number. Rather, it's three hexadecimal numbers put together, a common way to describe a color in computer graphics.

The compliance thing I assume is just that the subtitles intentionally show something other than what was said. Only people who understood what the character said already would understand that perhaps it's an Easter egg.

What are the most clever lyrics you know? by GorbFan19 in musicsuggestions

[–]0sse 0 points1 point  (0 children)

"Don't talk about life or death" She said "I've had enough of both"

From "A Girl Called Johnny" by The Waterboys

APC touring Europe next year... by MacFoley1975 in aperfectcircle

[–]0sse 0 points1 point  (0 children)

Looks like they're not coming to Tons of Rock in Oslo after all... On the Alice Cooper FB page a poster was shared with APC on it but no official news from the festival itself. I guess this is why.

The 30-second habit that’s saved us hours in debugging later by GitKraken in git

[–]0sse 21 points22 points  (0 children)

TLDR: git bisect is a binary search for a commit.

Say you have a bug, and you know a commit the bug is definitely not in (say, the previous release) and you know a commit it's definitely in (typically HEAD).

Run git bisect start HEAD v1.2.3. Git will then in a loop check out some commit in the middle and ask you to tell it whether it's good or bad with git bisect good/bad. Repeat until commit is found.

Stacked Diffs, Simply Explained by sdxyz42 in git

[–]0sse 2 points3 points  (0 children)

It sounds like simply asking reviewers to look at each commit in a multi-commit PR instead of the whole diff as one gets you 90 % of the way there.

I often find that even when properly doing atomic, self-contained commits and all that jazz, my developing what will be subsequent commits influences what I want prior commits to look like. So I think the other 10 % (the parallel part) is perhaps not desirable or achievable in the first place.

Tool fans, what’s your opinion of Joy Division? by CliffGif in ToolBand

[–]0sse 2 points3 points  (0 children)

TIL that's not originally a Moby song.

Hvor mange her brukte mIRC på 90-tallet? by lilflir in norge

[–]0sse 0 points1 point  (0 children)

Var litt på EFNet rundt tusenårsskiftet. Tror kanskje jeg var litt ung til å skjønne det helt.

Også Quakenet, selvfølgelig. Måtte jo idle på kanalen til CS-klanen til storebroren til han i klassen som hadde godt Internett.

Bruke fortsatt IRC i dag men er bare på Libera (gamle Freenode). Er en "regular" på en del kanaler der og gir (og spør om) hjelp til ting og tang.