Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
groestl
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
41 ms
·
631.
▲
by
groestl
4y ago
I'd not be so sure. Accepting that everything that can fail will fail shaped me as a young developer, and "Exceptional C++" had a huge influence on me. Now my approach for new code I review is this: * Make sure you support pr
632.
▲
by
groestl
4y ago
> What I want is tools that take their last output into consideration and generate new diagrams that are both correct and as similar as possible to the last output they produced. Something I've been struggling with as well. Now it s
633.
▲
by
groestl
4y ago
And presumably, how many talented people don't make it because they lacked their first hit, being squeezed out on the long tail, often sacrificing their wealth and health in the process.
634.
▲
by
groestl
4y ago
> usually mean the program state has become invalid. _some_ part of a program's state has become invalid. Probably a variable on the stack. In web servers, almost always a part that becomes very irrelevant as soon as the current req
635.
▲
by
groestl
4y ago
> Sometimes shutting down every piece of your software if that happens is the correct choice, and sometimes it's so far beyond reasonable that it's ludicrous to argue in favor of "every panic is an abort". Very much t
636.
▲
by
groestl
4y ago
> assuming panics are normal will take you down some paths that make it basically impossible to write reliable software Na, citation needed. Assuming "panics are normal" is just extrapolating from "errors are normal".
637.
▲
by
groestl
4y ago
My favorite is American Wire Gauge: 0, 00, 000, 0000 "This gauge system originated in the number of drawing operations used to produce a given gauge of wire."
638.
▲
by
groestl
4y ago
> I imagine this is wildly different for individuals. It's definitely different if you happen to live in an old European city like Vienna (like I do). There's castles, buildings and places named after people and events from tha
639.
▲
by
groestl
4y ago
Yes, and that's one reason why a static compiled type system helps you maintain code, dependencies and language I'd say.
640.
▲
by
groestl
4y ago
I'm wondering, is there work on how python 3's changes could have been promoted in smoother way?
641.
▲
by
groestl
4y ago
The string/bytes encoding lead to some weird runtime problems in a codebase I maintain (the quality of which is probably not that great to begin with). Also changes in non-statically compiled languages will always be a bit tricky. In g
642.
▲
by
groestl
4y ago
> So at some point only physical contact will be fully reliable But then there are twins, so... The "problem" pre-existed.
643.
▲
by
groestl
4y ago
Mastodon. It's bitcoin for your tweets. You're welcome ^^ (Edit: just for clarification, this is not meant to be serious, hence the ^^, but rather a play on bad analogies in newspapers trying to explain something the writer has no
644.
▲
by
groestl
4y ago
> Building a startup is hard work and it takes time. It's not as easy as they make it seem and it's not for everyone. And, as others have mentioned, it takes a lot of luck. I mention this specifically, because your words seem l
645.
▲
by
groestl
4y ago
Nevertheless, thanks for trying to back it up with data. I'll use your method and look at our code when time allows it, to see if I need to adjust my priors.
646.
▲
by
groestl
4y ago
This actually argues my point, because it seems (ignoring the strange design) only the last case would really exist in business code in another language. (Obviously, without source code access the following is guesswork) The other cases mig
647.
▲
by
groestl
4y ago
I don't think threading is relevant to this. > there are a lot of places where you do handle errors, if they are conceptually a Result Yet, what's conceptually a result lies in the eye of the beholder, and should not be dictate
648.
▲
by
groestl
4y ago
> checked exceptions are semantically almost identical to error-as-value but they do give you a stack trace I completely agree with you on that one. The only thing I'd want to add is that aside from example code, usually you don
649.
▲
by
groestl
4y ago
IMHO, quite often when you're tempted to handle an error, you're either wrong to do so, or in some kind of infrastructure glue code. A request handler, a task executor, a strategy chain, a retry loop, you name it. And this code ne
650.
▲
by
groestl
4y ago
GP might have meant undefined behavior, but specifically mentioned stack overflows and out of bounds array access as unrecoverable errors. These sound brutal, but are in fact all but undefined. Proper handling is expected in the large class
651.
▲
by
groestl
4y ago
My point is that this is in no way different from any other class of errors, _except_ in those cases where it is. It's practical to assume all errors are handled like this, because this catch all needs to exist anyway. And unless you h
652.
▲
by
groestl
4y ago
I agree and would replace my original statment of "It's very hard to write exception safe code in C++" with this.
653.
▲
by
groestl
4y ago
> You say there is no difference between unchecked exceptions and Go's errors Where do I say that? I say that Go programmers, in 99.9% of cases, do manually what exceptions do automatically. In terms of cumbersome, error values are
654.
▲
by
groestl
4y ago
I mean stack overflows or out of memory errors. It might fail one request, but no reason to fail all others.
655.
▲
by
groestl
4y ago
> Unrecoverable errors are things like stack overflows or out of bounds array access. There is no reasonable way to soldier on after this, so the program should just end No, I wholeheartedly disagree with this. It's the equivalent o
656.
▲
by
groestl
4y ago
I indeed like Rust's approach a lot more than Go's. What I like less still is that it gives the impression that it's even possible to define functions that cannot fail. This is not true. One just has to look at how runtimes d
657.
▲
by
groestl
4y ago
You seem to believe options B to D are not available to programmers in languages with exceptions. The real value comes from making option E much more unlikely: ignoring both the result and error value altogether, because you relied on the s
658.
▲
by
groestl
4y ago
99.99% (maybe even more) of game engines is not performance critical code though. I guess the reason was a different one: for exceptions to work you need a sane memory model. It's very hard to write exception safe code in C++. A garbag
659.
▲
by
groestl
4y ago
> where library code can suddenly abort and the author shrugs and says "shoulda read the docs". In see no difference. Except for the fact that you don't have the stacktrace (in Go), and unroll the Stack manually. In any ca
660.
▲
by
groestl
4y ago
There's nothing opaque about having an implicit potential return after every line as well as an implicit additional error result value. Think Go, but without the ceremony.
More ›