Recent submissions

Comment · 2 months ago
https://brooker.co.za/blog/2022/02/28/retries.html

Seems that retries are good when the error is rare, and bad when the error is common. Typically outages have you transitioning from "everything is fine" to "nothing works", so being able detect that transition early is helpful

Comment · 2 months ago
It's less about "can't afford" and more about "don't want to spend".
Comment · 2 months ago
Did you disable cookies or something? Table of Contents sidebar hides and stays hidden across page loads, browser restarts, etc. Appearance sidebar is the same. Appearance sidebar lets you set the article width as well, with the default being slightly slim, but the wide option being the full browser width.

The only way I can get it to reset is to clear my cookies, so its likely that.

Comment · 10 months ago
But many artists are hallucinating when they envisioned some of their pieces. Who's to say Mozart wasn't on a trip when he created The Marriage of Figaro.
Comment · 1 year ago
If you need to grab a particular struct's version of the data, you can via `opts.BarService.URL` or `opts.FooService.URL`: https://go.dev/play/p/MUSYJhmoC2D

Still worth being careful, but it can be useful when you have a set of common fields that everything of a certain group will have (such as a response object with basic status, debug info, etc. and then additional data based on the particular struct). I don't know why they let you embed multiple layers and multiple objects though. I've never gotten value out of anything but a "here's a single set of common fields struct embedding".

Comment · 1 year ago
There aren’t grid-scale batteries that can handle hundreds of thousands of cycles at an affordable price. If we crack that problem, solar and wind for everything will immediately be the only technology worth deploying for energy in 99% of areas.
Comment · 1 year ago
The appeal back then was being able to get all the shows you wanted on a single platform. Netflix had all of Disney, WB, ABC, CBS, NBC, etc. at one point, including strong original content. Going all in on $10/month for all the TV I wanted to watch was a good deal. Paying $15/month times 5 for a worse experience... not so much.
Comment · 1 year ago
US students are expected to be able to read 104 characters by the end of 6th grade. While Chinese students are expected to be able to read 20k words by that time.

Characters in Chinese can be combined to make more words, and you need around 9k words in English to read a novel and 2k characters in Chinese to read a novel.

Comment · 1 year ago
Current models are lossy databases at this point. Carmack looks like he might be trying to get logical reasoning to work (learning something abstract in one context and applying it to a similar context). That is something that would advance the field significantly and may be possible with a small team of researchers.
Comment · 1 year ago
> But yes, the equivalent of fnmatch should be a separate module and that could be a dependency of glob.

Interesting, lets look at fnmatch: https://pubs.opengroup.org/onlinepubs/9699919799/functions/f...

Well, fnmatch really does two things, it parses the pattern and then applies that to a string, so really, there should be a "ptnparse" library that handles the pattern matching that fnmatch has a dependency.

Though, thinking it through, the "ptnparse" library is responsible for patterns matching single characters and multiple characters. We should split that up into "singleptn" and "multiptn" libraries that ptnparse can take as dependencies.

Oh, and those flags that fnmatch takes makes fnmatch work in several different ways, let's decompose those into three libraries so that we only have to pull in the matcher we care about: pthmatch, nscmatch, and prdmatch. Then we can compose those libraries based on what we want in fnmatch.

This is perfect, now if we don't care about part of the fnmatch functionality, we don't have to include it!

/s

This decomposition is how we wind up with the notorious leftpad situation. Knowing when to stop decomposing is important. fnmatch is a single function that does less than most syscalls. We can probably bundle that with a few more string functions without actually costing us a ton. Glob matching at a string level probably belongs with all the other string manipulation functions in the average "strings" library.

Importantly, my suggestion that fnmatch belongs in a "strings" library does align with your suggestion that fnmatch shouldn't be locked into a "glob" library that also includes the filesystem traversal components.

Comment · 1 year ago
You know what’s more fun than having a bad junior write crap code while you point out their mistakes? Writing good code yourself.
Comment · 1 year ago
None of those listed jobs is actually unskilled labor. Driving a big truck around narrow roads is a skill most don’t have, doing it at speed and running up and down to actually move the heavy packages is a skill most don’t have. Assembling furniture is a skill most don’t have, especially with complex engineered wood products that will break if stressed wrong. Handymen is literally just a collection of skilled labor jobs rolled into one guy that can handle small home improvement projects like carpentry, masonry, plumbing, and electrical. These are specialized jobs that have wrongly been labeled “un-skilled” or “semi-skilled” as if knowledge work is the only skill of value…
Comment · 1 year ago
Sure, but the argument is still that the smartphones aren’t the root cause. It’s the transactional nature of the thing. Can’t fail students because money would go down, so keep passing them as they get better equipped to ignore you and have reduced requirements to get a passing grade.

The thing that’s changed is how much the transactional nature favors the lazy students, not the smartphones specifically.

The reason the argument is so bad that “it’s the smartphones” is because that implies an easy solution that is external to the academic system, when the root cause is internal to the system.

Comment · 1 year ago
Const only saves you most of the time if you have a “const” all the way down the type structure. If I have a type Foo with a field that is a pointer to a mutable value, instantiating a Const Foo just means I’m always pointing at the same mutable value, not that I have an unchangeable Foo.

Const support in languages never makes all modifications to data accessed through the variable locked out, just the top level, which makes it much more difficult to ensure that the assumptions about immutability hold without constantly doing deep copies or having to double and triple check that your Const definitions are correct.

Const often leads to a false sense of security.

Comment · 1 year ago
Google wants Firefox to remain viable (or at least one other browser) so that they can avoid monopoly issues with Chrome. If they pay Firefox to keep Google as default search engine, they keep 80% of the money they’d get by having those users use Chrome, and they keep the other browser alive, but not enough to really keep up with Chrome’s feature set.

That’s the most likely bet they are making, similar to Apple/Android or Safari/Chrome. Spending a minor fraction of your revenue to avoid anti-trust probably makes sense for them.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton