13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions
comment 5y ago · link · parent
People talk about themselves because conversations can be intimate - they're a two way street where both parties are sharing and relating.
comment 5y ago · link · parent
comment 5y ago · link · parent
Or a custom Vec that has a lower maximum bound, at which point you can start doing things like integer encoding/ pointer swizzling.
comment 5y ago · link · parent
comment 5y ago · link · parent
I feel like that's not quite true. The server could notice it's over-worked and start telling clients to back off or otherwise to try another system. At this point the clients can make the call to either back off or terminate the connection. The server can increase its "back off for N ms" until it finally has to terminate connections.
It requires a bit of extra coordination, but not much.
Also, even without such a system, forcing a reconnect when a new instance starts up/ periodically still reduces connection load a ton. If you force reconnects every minute, and you have 10/rps, that's 1 reconnect per 600 calls.
I guess in theory a load balancer is the most information to make these decisions, so really you'd want it to be aware of 'back off' requests from the server. One way of doing this might be something with health checks? Dunno.
comment 5y ago · link · parent
I seriously question these benchmarks.
comment 5y ago · link · parent
> The answer is: “it depends”. It depends how your or others' code uses Person. If two pieces of code, running concurrently, update Person.name at the same time - your app will crash
Damn, I honestly forget what it's like to program with threads in languages that let this happen.
comment 5y ago · link · parent
This is totally untrue? Pyre adds completely new notions like taint analysis, pytype adds a totally different inference system - the type systems are not compatible and it has nothing to do with implementation of PEPs.
The difference with C is that all of the other linters and analyzers are on top of the base type system, they don't replace it. In the case of Python the only standard part is where the annotations go and how they get resolved at runtime, it's otherwise completely up to the type system implementation to determine what's what, and all 3 of them do so in very different ways.
This is like if clang/gcc had totally different behaviors for `auto` in C++, but really it's not even comparable.
comment 5y ago · link · parent
Lack of recursive types has been a major deal breaker for me. If you have a class Foo that can construct a class Bar, and a class Bar that can construct a class Foo, you can't express that in mypy without Any-Generics.
To me, at this point, mypy is barely a linter, it's more of a "this helps my IDE autocomplete faster", and definitely not a type system.