Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
hot_gril
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
451.
▲
by
hot_gril
2y ago
GDPR is the dumbest recent law I can think of. Even if a website has no intent to track users, it's way too hard (aka expensive) to tell if you're compliant without slapping on a banner.
452.
▲
by
hot_gril
2y ago
Like I said, the ecosystem is strong. The language's design hasn't aged well, so nowadays any Java code I see in prod has 1-4 annotations above every class and method to get around the limitations of the language. Similar to how s
453.
▲
by
hot_gril
2y ago
Every democratic country in the world with successful elections has voter ID* except for the US, unless I missed one. I don't know if there's some way people were disenfranchised as a result. For the past couple of centuries here,
454.
▲
by
hot_gril
2y ago
It's kinda impossible to give out DL, SSN, etc to so many companies and not have it leak. If these theoretical lawsuits scared companies enough, they might pay some centralized third party to handle the verification for them, but bad t
455.
▲
by
hot_gril
2y ago
Yeah but a mandatory national ID or voter ID isn't what the comment a few up is asking for. Driver's license is an optional form of ID as far as the govt is concerned, but this doesn't stop Uber from requiring it. The state o
456.
▲
by
hot_gril
2y ago
It's safer in a way to guard against these situations, but it seems like they don't intend you to do that often because there are more downsides outweighing it. Proto2 had the "required" feature that had its own issues.
457.
▲
by
hot_gril
2y ago
If both lat and lon are required, you don't need to throw an exception for lat=0. If you want lat=null lon=0.0 to mean something like "latitude is unknown but longitude is known to be 0.0," yeah you need optional or wrapped p
458.
▲
by
hot_gril
2y ago
I can see that. Or the rare situations where I needed 0 vs null, if for some reason that situation was multiplied times 100, I'd start wanting an optional keyword.
459.
▲
by
hot_gril
2y ago
Thanks. I've got a little project that needs to use protobufs, and if my DIY approach of sending either application/octet-stream or application/json turns out to be too sketchy, I'll give Connect a try. Only reason I
460.
▲
by
hot_gril
2y ago
What's the difference between none inches and 0 inches? Might need a concrete example. We deal with space a fair amount and haven't needed many optionals there.
461.
▲
by
hot_gril
2y ago
What about floats made this a problem? We're treating 0.0 specially in some places.
462.
▲
by
hot_gril
2y ago
proto2 required fields were basically unusable for some technical reason I forget, to the point where they're banned where I work, so you had to make everything optional, when in many cases it was unnecessary. Leading to a lot of null
463.
▲
by
hot_gril
2y ago
Autogenerated code in general tends to be unreadable. It's not easy and/or not a priority.
464.
▲
by
hot_gril
2y ago
Yeah, I think it's best to first rethink of null as just, not 0 and not any other number. What that means depends on the context. Tangent: I've seen an antipattern of using enums to describe the "type" of some polymorphi
465.
▲
by
hot_gril
2y ago
Not really one domain in particular, just internal services in general. In many cases, the field is intended to be required in the first place. If not, surprisingly 0 isn't a real answer a lot of the time, so it means none or default:
466.
▲
by
hot_gril
2y ago
I can see that in niche situations, particularly if you have a flat structure and uniform hardware. Cap'n Proto is also a way to do zero-parsing, but it has other costs.
467.
▲
by
hot_gril
2y ago
I agree, there's a lot to gain from getting away from JSON, but gRPC needs HTTP/1 support and better tooling to make that happen.
468.
▲
by
hot_gril
2y ago
Must be comparing to the equivalent JSON-over-HTTP usage.
469.
▲
by
hot_gril
2y ago
Java is on life support as a language, but the ecosystem is strong, that's why it has all these weird features via annotations. And people who use Java are just trying to get stuff done like everyone else.
470.
▲
by
hot_gril
2y ago
In 2018, there was some kind of push towards gRPC internally, but it was since abandoned and reversed among the few who actually switched. They still don't use it internally, only externally in some places.
471.
▲
by
hot_gril
2y ago
gRPC is meant for backend microservices among other things, and it's still painful for that for the reasons the article describes, all of which could've been fixed or avoided. Internally Google doesn't even use gRPC, they use
472.
▲
by
hot_gril
2y ago
Streaming seems like it'd work without too much effort. It'd be less efficient for sure, but it's also not a very common use case.
473.
▲
by
hot_gril
2y ago
It's not the pointers themselves so much as what they're typically used for. How would you do dynamic sizing? Imagine sending just a struct of integer arrays this way, you'd have to either know their sizes ahead of time or ju
474.
▲
by
hot_gril
2y ago
I don't understand why there isn't an HTTP/1 mode for gRPC. Would cover the super common use case of client-to-server calls. Give people who already have your typical JSON-over-HTTP API something that's the same except m
475.
▲
by
hot_gril
2y ago
Won't work if your struct has any pointers in it.
476.
▲
by
hot_gril
2y ago
proto3 added support for optional primitives sorta recently. I've always been happy without them personally, but it was enough of a shock for people used to proto2 that it made sense to add them back.
477.
▲
by
hot_gril
2y ago
I hear this in C++ too since we can't use exceptions here. "Unlike some other toy languages, we don't ignore errors, we handle them head-on." Uh no you don't, in fact it took a lot to make people stop ignoring error
478.
▲
by
hot_gril
2y ago
Nowhere did I suggest one language should rule them all. Golang has advantages like efficiency and greenthreading, but that's not because they omitted async/await and exceptions. I just think that was a mistake. And I do use Golan
479.
▲
by
hot_gril
2y ago
Lots of Golang users told me generics aren't needed until they were added. But let's leave "cult" accusations out of this.
480.
▲
by
hot_gril
2y ago
The point of exceptions is to make it convenient to propagate errors upwards and unlikely that you accidentally ignore an error, as discussed in the other thread. This doesn't magically do your error handling too, but the Golang exampl
More ›