HNHacker News
TopNewBestAskShowJobs

anameaname

155 karma · joined November 16, 2017

submissionscomments
anameaname··on Error handling in Upspin
Pike is totally wrong here, and trying to explain his way out of a poorly thought out error type.

> In contrast, a stack trace-like error is worse in both respects. The user does not have the context to understand the stack trace, and an implementer shown a stack trace is denied the information that could be presented if the server-side error was passed to the client.

Absolutely not. The stack is useful to the implementer, the error message is useful to the user. You include both. Want it on both sides? Send it to both sides. Turning a stack trace into a string and propagating it around is not so expensive, and incredibly useful.

Here's a common error I see in Go: "os: file does not exist". What file doesn't exist? Upspin fixes that oversight, but the very next thing to ask is who wants that file? Without the stack trace you'll never know why /tmp/dfgsdfg was needed and who couldn't find it.

> For those cases where stack traces would be helpful, we allow the errors package to be built with the "debug" tag

Ever have those times where a binary is acting wonky, and once in a blue moon raises an unusual error? You can't just rebuild the binary and deploy it to 10,000 machines to debug it. It needs to be on all the time.

It is unbelievable the mental hoops the Go implementers jump through to explain how their anemic error type is actually better.

anameaname··on Upcoming HDMI 2.1 Features
At these kinds of speeds, why would we use it for just video? We could make server interconnects extremely fast.
anameaname··on Woman with Transplanted Uterus Gives Birth, the First in the U.S
> Because her blood and the blood of the baby mix, she carries cells from the baby for many years afterwards.

This is not true. If the baby had AB blood and the mother had A, then the baby's blood cells would be attacked by the mother's.

anameaname··on Most popular Python packages now support Python 3
Agreed. I think the reason is because the programming mindset for data science is different than for normal software engineering. In data science, you write a program, find the answer, write your paper, and throw the program away. Python fits this usage pattern very well.
anameaname··on Data structures and algorithms practice problems and their solutions
Some of these answers are not great, and wouldn't stand up to interview scrutiny. For example, the "Check if linked list is palindrome or not" problem says copying the list would be too expensive. The proposed answer (recursion) some how avoids this.

The solution is technically right, but it's making a copy of the list too. The intuition is wrong.

anameaname··on Linus Torvalds: “Do No Harm”
A thought experiment that comes up in Kernel design classes is what should happen if the OS was running the flight-control software for an Airplane you are on? If there was a bug in the kernel, perhaps a double free or a memory leak, what should happen?

A panic would result in the airplane falling to certain doom. But if it were to keep running, it may be a security vulnerability. Being absolutist in either direction of the discussion will lead to absurd scenarios where you would make the wrong decision.

anameaname··on Bayesian ranking of items with up and downvotes or 5 star ratings (2015)
Not a statistician, but this still seems flawed. The pretend votes need to be related to the person seeing the list of items. These normally come from the population (i.e. if you were ranking Netflix, the pretend votes would be the sum of all votes that exist for every movie, grouped by star count). This makes sense, because if you had no other information, your guess would just be the average of all the existing ratings.

The problem is that the pretend votes need to be culled in order to be predictive. Otherwise they dominate in the arithmetic. They need to be more specific to the user looking at the ranking. Continuing with the Netflix example, if a user was looking for scary movies, the pretend votes need to come from the corpus of all scary movies, rather than all movies that exist.

Here's the problem, there doesn't seem to be a good way to narrow the pretend votes. Worse, there isn't a good way to combine the two. If the pretend votes came from two sources, its not clear what to do. For example, if the user is from California, the California pretend votes (priors?) need to be combined with the scary movie pretend votes.

How can we add pretend votes without justifying where they came from?

anameaname··on Towards Linux Kernel Memory Safety
Source for those interested: https://github.com/torvalds/linux/blob/master/lib/refcount.c

I'm kind of surprised that the authors went with compare-and-exchange for their ref count, rather than get-and-increment. Even if the counter does overflow, it's usually detectable, and reversible. This is true even in the face of concurrent updates. The benefit is that there is only one atomic operation in the fast path.

← PreviousPage 2 of 2