Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mprovost
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
mprovost
1y ago
Yes well, the pipefail option configures bash to do the opposite of its usual behaviour.
32.
▲
by
mprovost
1y ago
They've updated the ReCaptcha website, but it used to say: "Every time our CAPTCHAs are solved, that human effort helps digitize text, annotate images, and build machine learning datasets." https://web.archive.org&
33.
▲
by
mprovost
1y ago
In other shells, the status of the pipeline is the exit status of the last process, so in this case that would be head which exits with 0.
34.
▲
by
mprovost
1y ago
Google at least uses captchas to gather training data for computer vision ML models. That's why they show pictures of stop lights and buses and motorcycles - so they can train self-driving cars.
35.
▲
by
mprovost
1y ago
Handling SIGINT (ctrl-c) with child processes is tricky, but a more pervasive problem for Rust CLI programs is handling SIGPIPE. For historical reasons the compiler adds a signal handler before calling main() which ignores SIGPIPE. It means
36.
▲
by
mprovost
1y ago
I expect that Americans spend more time in their basements than people in most other countries (other than Canada). The kind of furnished basement that teenagers hang out in from That 70's Show isn't common elsewhere.
37.
▲
by
mprovost
1y ago
Sure, at some point you have to let the abstraction leak. At the time Sun designed NFS, you could basically count on the fact that the server was some Solaris machine capable of multiple years of uptime on your LAN. Filesystems never made t
38.
▲
by
mprovost
1y ago
The designers of NFS chose to make a distributed system emulate a highly consistent and available system (a hard drive), which was (and is) a reasonable tradeoff. It didn't require every existing tool, such as ls, to deal with things l
39.
▲
by
mprovost
1y ago
There's a long history of "directory editor" programs going back to (at least) 1974, which predates emacs. It's not surprising that there are many examples of convergent evolution. https://invisible-island.net
40.
▲
by
mprovost
1y ago
Two relevant quotes from writers who could not be more different: “I would rather be governed by the first 2,000 people in the Boston telephone directory than by the 2,000 faculty members of Harvard University.” - William F Buckley Jr “Anyo
41.
▲
by
mprovost
1y ago
Thanks that actually looks really good! Part of the challenge with some of the crates is that they're great for advanced use but there's so much magic going on with derive macros, which a new Rust programmer won't be familiar
42.
▲
by
mprovost
1y ago
Yes 4 has been out for a while but I was caught in the time when it went from v2 (2020) to v3 (2021) to v4 (2022). I made the mistake of rewriting all the chapters from using 2 to 3, which was quickly deprecated for 4.
43.
▲
by
mprovost
1y ago
I chose clap as the argument parsing crate for my book on Rust CLI programming and it's been my biggest regret. Folk sometimes complain that Rust itself is a moving target but I haven't found that to be the case at all. On the oth
44.
▲
by
mprovost
1y ago
Bill Atkinson, inventor of Atkinson dithering! https://en.wikipedia.org/wiki/Atkinson_dithering
45.
▲
by
mprovost
1y ago
Yes, modern software terminals have to emulate how the control key operated on ancient hardware terminals because unix baked that behaviour in.
46.
▲
by
mprovost
1y ago
Hmm my Lisp Machine has control, meta, super, and hyper but no alt!
47.
▲
by
mprovost
1y ago
On terminals, the control key masked off the 6th and 7th bits of the 8-bit value sent by the letter key. That's a bitwise AND with octal 037, or in decimal subtracting 96 from the lower case key value. This happens in the terminal (or
48.
▲
by
mprovost
1y ago
You can disagree with his conclusions but I don't think his understanding of small models is up for debate. This is the person who created micrograd/makemore/nanoGPT and who has produced a ton of educational materials showing
49.
▲
by
mprovost
1y ago
Why the hate? It's a genuine question. When you rewrite something, you need to justify the effort somehow. The GNU coreutils started out as "the BSD utilities, but with the GPL!".
50.
▲
by
mprovost
1y ago
Bash isn't the Bourne shell (sh)! It's a replacement (Bourne Again Shell). But it's interesting that the replacement has become so entrenched that folk assume that it was the original.
51.
▲
by
mprovost
1y ago
The GNU utils were a replacement for the BSD utils which were a replacement for the original AT&T utils. Every replacement added new functionality and improvements, and every time someone complained that they didn't stick closer to
52.
▲
by
mprovost
1y ago
I have a strong memory from the start of my career, when I had a job setting up Solaris systems and there was a whispered rumour that one of the senior admins could read core files. To the rest of us, they were just junk that the system cre
53.
▲
by
mprovost
1y ago
One approach that I don't see often enough is to focus on learning a subset of the language first. For example, in my own book on Rust, I skip teaching lifetimes. It's not necessary to write functions with lifetimes to build quite
54.
▲
by
mprovost
1y ago
Dotted zeros remind me of the BIOS screen on an old monochrome Compaq luggable. Good times.
55.
▲
by
mprovost
1y ago
For some applications it feels like half the signal of whether you're qualified is whether the CV is set in Computer Modern, ie was produced via LaTeX.
56.
▲
by
mprovost
2y ago
Apparently some computers still aren't able to crack the simplest encryption schemes.
57.
▲
by
mprovost
2y ago
I found it! Section 48.3 "A Scratchpad on Your Screen" from the first edition. https://web.deu.edu.tr/doc/oreily/unix/upt/ch48_03.htm
58.
▲
by
mprovost
2y ago
Yes that's it: "cat > /dev/null". Or you can even skip running cat and just "> /dev/null". You exit by typing ctrl-d which sends an EOF (and then sends all the output to /dev/null
59.
▲
by
mprovost
2y ago
The OG drill book (Unix Power Tools) had a tip for quick note taking - redirect to /dev/null. For the past 25 years I pretty much always have a terminal window open with a shell redirecting to /dev/null so I can copy and
60.
▲
by
mprovost
2y ago
History substitution with "!" goes back to Bill Joy's csh, 1979.
More ›