Here's the actual paper, too: https://journals.plos.org/plosone/article?id=10.1371/journal...
653 karma · joined February 9, 2021
Here's the actual paper, too: https://journals.plos.org/plosone/article?id=10.1371/journal...
Now I have to figure out if there's a way to save all my playlists and notes. Guess I didn't think about the potential downsides of storing all those in a system I don't own.
I just loathe the idea of having a TV that (1) is going to have a smartphone-class SoC built-in that I won't even use for anything and (2) is going to be yet another computing device I don't control.
I begrudgingly tolerate the fact that my PS4 and my phone are computers I don't control, because at least they offer functionality that's useful to me, but I draw the line at smart TVs because they aren't even useful in the first place. I'm just going to use my PS4 for everything on it anyway, but then I'll have have another device where I have to worry about software updates and shitty anti-consumer practices.
/rant
Sometimes I forget to check that my test fails the first time, so I’ll go back and deliberately break the function under test just to see it fail.
Basically, you can select a range of lines using regexes. For example, if I wanted to get the text under one header in a Markdown document, I could write something like this:
sed -n '/^## Overview/,/^#/ { /^#/b; p }' README.md
- The '-n' flag tells sed not to print all matched lines by default.
- '/^## Overview/,/^#/' is a range address that matches all lines from
one starting with "## Overview" to another line starting with "#", inclusive.
- '{ /^#/b; p }' is a command group that's executed for each matched line.
- '/^#/b' uses the 'b' (branch) command to skip lines starting with "#" to
avoid printing the header lines, which are included in the range.
- Finally, 'p' is the print command, which tells sed to print all the other
lines.
That said, I mainly read it because I've always used things like Bash's built-in parameter expansion[1] and regex capability[2] instead of sed, and I mostly think I confirmed that bias. I'll probably turn to sed for certain string manipulations from now on, but I'm not sure I'll be using it a whole lot more often.[0] https://www.gnu.org/software/sed/manual/sed.html#sed-address... [1] https://wiki.bash-hackers.org/syntax/pe [2] https://www.linuxjournal.com/content/bash-regular-expression...
But okay, let's take a closer look at that video. When I saw it in my YouTube recs, I rolled my eyes at the clickbait and skipped over it, but I didn't see how it makes LTT look bad. In fact, I just gave it a fair shot and skimmed through it for myself, and it actually looks like a pretty solid explanation of memory hierarchy and swap space for beginners, packaged in a format that will increase its reach. I don't see what's bullshit about that.
Look, say what you will about clickbait, the unfortunate truth is that it gets views, which channels like LTT need to survive and grow. Linus is on the record saying he hates it, but they've done the tests to confirm that the stupid thumbnails and titles just perform better.
And come on, let's be honest here: How many people are going to click on a video titled "What is swap space?" or "You can use Google Drive for swap space on Linux" or something similarly boring? Even the best explanation in the world isn't going to get traction with a title like that. I looked for comparable videos and it looks like "What is Linux swap?" by Average Linux User (https://youtu.be/0mgefj9ibRE) is the next most-viewed video on the same topic. That video has gotten about 90,000 views since it was posted in 2019. By comparison, the LTT video has averaged about 100,000 views per day in the 16 days since it was posted.
So it looks to me like LTT took a technical topic that most people would never think about, found an angle to make it interesting to random people browsing YouTube, and tricked potentially thousands of people into learning something. What exactly is embarrassing about that?
I'm also very curious to see a source on the "bribes he received from Nvidia/Intel", because I'm not finding anything that looks relevant on Google.
You're totally right that commands like `cat *.txt | grep foo` look right and feel intuitive, but the problem is that it's not actually equivalent to `grep foo *.txt`. With a single input file, it's probably not an issue, but with multiple files the downstream command can't actually see what file it's reading from, so in this example grep can't report filenames with matches and you can't use flags like --include/--exclude based on filenames.
I keep wishing for a Unix-like shell and utilities where `cat *.txt | grep foo` actually works the same as `grep foo *.txt`. PowerShell has pulled this off to some extent, which is cool, but it doesn't quite feel right to me compared to Bash.