Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
zachmu
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
zachmu
2y ago
The Oasis is a great device with one fatal flaw: battery life. For some reason they nerfed the battery relative to the paperwhite so it lasts about a week instead of about a month. Probably won't bother a lot of people but it really bo
32.
▲
by
zachmu
2y ago
Looks like the Clara Color doesn't have physical buttons? https://us.kobobooks.com/collections/ereaders/products/kobo-... Kobo changes their lineup constantly though, the Libra 2 I have (with physical bu
33.
▲
by
zachmu
2y ago
I got the die to settle on an edge in the corner of the playfield, which triggered a re-roll. Is this actually simulating a d20 with physics?
34.
▲
by
zachmu
2y ago
Nice try but "basket" is obviously not a real word
35.
▲
by
zachmu
2y ago
This reminds me of a twitter thread I read a few years ago making this prediction: https://www.tinygnomes.com/qwiki.cgi?mode=previewSynd&uuid=B... We had already known from autopsies that neural density in certain brain
36.
▲
by
zachmu
2y ago
Yes, it is the same situation. No, we don't tend to use unique names for errors. The idiom is just too strong. This is somewhat mitigated by consistent consecutive error handling, meaning you always immediately dispatch an error on the
37.
▲
by
zachmu
2y ago
err has the same problem as ok, it's true. It's a messy, kind of embarrassing spot in the language and idioms, not something to celebrate.
38.
▲
by
zachmu
2y ago
This article has a hilariously defensive tone. The reality is that the vast majority of error handling in go is to do one of two things 1) pass it up the stack 2) wrap it and pass it up the stack The fact that you must do this explicitly i
39.
▲
by
zachmu
2y ago
My whole point is that following the convention basically guarantees shadowing in many contexts. That's bad.
40.
▲
by
zachmu
2y ago
You can get that by implementing an error type, or otherwise constructing a new error every time one is returned. But doing this adds to the cost of returning the error. This is how we use most errors in our code base. But we tend to not tr
41.
▲
by
zachmu
2y ago
It has also become somewhat common to use io.EOF to signal the end of iteration, like the reader libraries do.
42.
▲
by
zachmu
2y ago
The problem is error wrapping. Somebody deeper in the stack can break your equality check.
43.
▲
by
zachmu
2y ago
There is a link in the blog to a public gist, it's just a single file you can download and run.
44.
▲
by
zachmu
2y ago
That's pretty cool, I'll try to remember to post a follow up when this makes it into a release.
45.
▲
by
zachmu
2y ago
Our database is within spitting distance of MySQL's raw performance and getting faster all the time. Certainly there are some applications where that will not be fast enough. That didn't prevent MySQL from becoming the worlds most
46.
▲
by
zachmu
2y ago
My main argument against this practice isn't performance, it is that it makes error handling more difficult to write, review, and maintain. Treating errors as opaque and passing them up the stack in the general case is automatic and tr
47.
▲
by
zachmu
2y ago
This is true. We have in the past eliminated sentinel errors and gotten measurable gains from doing so, but this is mostly because our errors were both common (occurring several times on every request) and expensive to construct. The direct
48.
▲
by
zachmu
2y ago
Corrections and new title are now live. Thank you for your forbearance.
49.
▲
by
zachmu
2y ago
That's interesting, because I ran the benchmarks on that version of Go.
50.
▲
by
zachmu
2y ago
That's the BenchmarkFoundErrorsIsNilCheck variation, and it eliminates the performance penalty on the happy path. Still just as bad on the error path.
51.
▲
by
zachmu
2y ago
You'll never get those 4 nanoseconds of your life back though
52.
▲
by
zachmu
2y ago
Agree to disagree here. And yes, this article is a follow-up to the linked one. The last section of the blog has a discussion of aesthetic and philosophical concerns around using errors for control flow. I'm against it, for the reasons
53.
▲
by
zachmu
2y ago
Blog author here with a regretful correction. This result is not accurate, mea culpa. The headline should read: errors.Is() is 500% slower. Basically: the critical functions in the benchmark are small enough they were being inlined by the c
54.
▲
by
zachmu
2y ago
Ah to have been born in the Era of Good Feeling
55.
▲
by
zachmu
2y ago
If Microsoft thinks I'm going to let Windows store screenshots of my work every second indefinitely with their current approach to online identity and privacy, they are nuts.
56.
▲
by
zachmu
2y ago
I think of it more as a general observation: the people who maintain open source projects that must deal with the public must have thick skin, or they won't last. Acknowledging that there are and will always be assholes like the email
57.
▲
by
zachmu
2y ago
Microsoft cramming more and more ads in their OS could be the push we need to finally achieve the year of the Linux desktop
58.
▲
by
zachmu
2y ago
I will admit I'm just repeating their claim unskeptically :)
59.
▲
by
zachmu
2y ago
Very cool company, now involved in solving 10% of reported crime in the US. They use DoltDB to version control their machine learning feature store: https://www.dolthub.com/blog/2024-03-07-dolt-flock/
60.
▲
by
zachmu
2y ago
You can just say: I don't know. I don't know why Tesla is pursuing layoffs, or this particular layoff strategy. And because I don't know, I don't have a strong opinion about it one way or the other. That's all "
More ›