Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kaoD
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
52 ms
·
751.
▲
by
kaoD
8y ago
> Java has checked exceptions (which honestly is more like error-return) and the innerException property is used extensively to hold the "real" exception and, of course, it's type is just "Exception". Yeah, well,
752.
▲
by
kaoD
8y ago
You like implicit. I don't. I don't think we can discuss deeper than that.
753.
▲
by
kaoD
8y ago
> With Option types, there is a need for boilerplate unwrapping code in almost every place where you want to use the value. Disagree, in my favorite language you just add "?" to the possibly-erroring function et voilá, error pr
754.
▲
by
kaoD
8y ago
> what happens if one of your inner-inner-inner functions returns null when the docs say it shouldn't? My choice of language wouldn't have the concept of "null". If it somehow returns an Option type... well, the docs
755.
▲
by
kaoD
8y ago
> All you need to know is what exceptions you can handle Ah, so that's "all" I need to know! And that's what typed errors do.
756.
▲
by
kaoD
8y ago
> So if you have a potential call chain of dozens of methods, your error return includes every single possibility? Mostly yes, usually as a sum type. Pattern matching is your friend. > the errors are massaged Why would I take the extr
757.
▲
by
kaoD
8y ago
> If you're arguing that you could just look at the file-open code to see the errors it returns, couldn't the same apply for seeing which exceptions are thrown? No, because then you have to look at every function inside there.
758.
▲
by
kaoD
8y ago
> Now how is that any different from raising an exception? Exception bubbling is implicit. There's no way to know which exceptions can be thrown from a function just by looking at its code, nor looking at the called-functions code.
759.
▲
by
kaoD
8y ago
> URLs aren't uniformly routable from either end What do you mean?
760.
▲
by
kaoD
8y ago
Are you teaching game networking to Glenn Fiedler? You probably learnt it from him, or someone who read his articles! Now seriously: client side prediction is not magic and it always introduces its own problems, like getting killed after ge
761.
▲
by
kaoD
8y ago
Definitely, it crossed my mind, I just have not had enough time to write an minimal bug example unfortunately :/ In this case I think the problem is `setState` is inside my `useEffect` and I'm using its dependencies array as a sor
762.
▲
by
kaoD
8y ago
I've toyed with hooks for a few hours and, even if I understand why they're focusing on teaching the basic pitfalls (dependencies arrays mostly), I don't think they're the most confusing part (as long as you know how clo
763.
▲
by
kaoD
8y ago
My data is empty, even though I'm not that paranoid about privacy (but I do take some care). This specific API seems pretty innocuous. They're not doing black magic, it's just aggregating data that people willingly put out th
764.
▲
by
kaoD
8y ago
> Seriously, though, how do the two browsers find each other without a STUN server? SDP offers and answers include local IPs, so if you relay them manually they can connect to each other if they're on the same local network. Unfortu
765.
▲
by
kaoD
8y ago
Isn't that just ad-hoc typing? What's the point of naming based on types, instead of just declaring types so they can be programmatically analyzed by your tools?
766.
▲
by
kaoD
8y ago
> When your immediate reply is to dismiss the dominant rust crypto library in 2016 as being understandably bad because the development ended in 2016, you're suggesting that the year (and before) was some kind of dark age for rust. I
767.
▲
by
kaoD
8y ago
> The fact that you can build complex interface logic and bundle it into a function that can then be extended and composed is a huge leap forward. Unless you already used HOCs (in the Recompose sense). Every single blog post is obsessed
768.
▲
by
kaoD
8y ago
What's wrong with MIT?
769.
▲
by
kaoD
8y ago
SEO happened.
770.
▲
by
kaoD
8y ago
As a non-user I'm curious, what kind of negative effects? If you don't mind sharing.
771.
▲
by
kaoD
8y ago
> cod blackout is significantly better mechanically, and just as much of a 'milsim.' I beg to differ. It has a pretty arcadey gunplay (well... it's CoD). Nowhere near close to PUBG's ballistics. It's pretty much
772.
▲
by
kaoD
8y ago
> I'm also sure it's still a mess. Definitely not. Bugs are not a common occurrence currently, while they were present in every single gaming session I had, even for the last year. Give it a try, the game is in a great state.
773.
▲
by
kaoD
8y ago
I'd like to add gun mechanics. PUBG has the best gunplay I've ever played. For me PUBG fights are thrilling, like I was there getting shot at, while Fortnite's (or any other game for that matter) are plain old arcadey. I disl
774.
▲
by
kaoD
8y ago
R as in repeat? REPL makes sense if you read it as "read-eval-print loop" (loop being the noun, not another verb).
775.
▲
by
kaoD
8y ago
"this" isn't bound in functional components because there's nothing to bind it to.
776.
▲
by
kaoD
8y ago
I don't see how this refutes anything. You cannot experience being asleep, but what you experience is waking up, having been asleep. I find this consistent with the fact that approximately 100% of the time I experience is me being awak
777.
▲
by
kaoD
8y ago
And that's why you should use a thoroughly tested implementation instead of implementing a bug-ridden ad-hoc square wheel. "Whoopsies, I forgot to ban some state transitions" won't happen if all you're writing is a
778.
▲
by
kaoD
8y ago
If you're truly paranoid, TOTP and HOTP are absurdly easy to implement if you've got an HMAC primitive: https://en.wikipedia.org/wiki/HMAC-based_One-time_Password_a... https://en.wikipedia.org/
779.
▲
by
kaoD
8y ago
I pretty much agree with that thread's replies, not much to add. I didn't know VLAs though (they didn't exist back in the day when I used C). Even though you still have no growable buffers/reallocation (AFAICT), I conced
780.
▲
by
kaoD
8y ago
This is not garbage collection because these are stack (or statically) allocated. The "garbage" in "GC" are heap allocations. If we ignore the heap in C it doesn't make it a GC'd language because the concept of
More ›