13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions
comment 6y ago · link · parent
You end up seeing functions declared within functions so that people can work around this limitation and it is grotesque.
comment 6y ago · link · parent
Maybe I'll just write a proc macro over this lib instead.
* https://github.com/insanitybit/derive_aktor
edit: Is this not on crates-io?
comment 6y ago · link · parent
Sure, no one should need to do that anymore, it's just an example. There are many other cases that are similar, however.
`using` is a language construct, not something that is part of an interface. It also does not prevent close from being called twice.
comment 6y ago · link · parent
Is a '.close()' method being called twice a type error? It is in a language that can express states in the type system.
Is SQL injection a type error? It is when you use refined types in your sql library interface.
The vast, vast majority of errors I run into are errors that, with effort and the right type system, I could turn into type errors.
The point being that asking "would those be type errors?" is a really big question that is, when answered simply, "yes".
comment 6y ago · link · parent
It's nice to see strong progress in such important areas. My post is probably overly critical, but I write Python almost every day, and maintaining a highly-typed library can be demoralizing at times.
comment 6y ago · link · parent
* Third party libraries are still not typed, which sucks
* Inference is weak. Sometimes an 'if' statement narrows accurately, sometimes it doesn't.
* Generics are extremely confusing, moreso than any other typed language I have used. Any Generics are even more confusing.
* Fundamentally, Python is structured such that the concept of interfaces are coupled tightly to implementation of classes, which is severely limiting. As an example, a module A can declare a class, a module B can declare an interface (Protocol), but module B can not implement that interface for A (without modifying A's code).
* Errors from mypy are still very very light. There are very few "Try XYZ to fix it", and it's just a single line of read text that amounts to an assertion.
* Still weak support for JSON (use Dict[str, Any])
* Slowly improving but still not amazing support for Self types
I could go on.
Mypy is awesome but it still feels very immature, and as it should since it's pre 1.0. It does not come close to matching the experience of other languages with static types.
comment 6y ago · link · parent
https://stackoverflow.com/questions/3270680/how-does-python-...
"CPython implementation detail: Objects of different types except numbers are ordered by their type names; objects of the same types that don’t support proper comparison are ordered by their address."
comment 6y ago · link · parent
If you're not familiar with disclosures and communication via H1 maybe this all feels very odd or bad or something, idk. Looks fairly standard to me.
Ultimately, to me, someone found a vulnerability, reported the vuln, and it was remediated within ~3 hours. There was no "breach", unless you consider every H1 report a breach?
Having a repository of vulns is quite a scary thing though. I often wonder, with all of the "wontfix" and "too low impact to care" bugs chained together, how easy is it to own many of these customers?
comment 6y ago · link · parent
My fundamental point is simply that failure is a matter of goals. For startup founders failure is something you are likely going to think about constantly as you ramp up to deciding to quit your job and put your idea out there, and that's a waste of time, and it's due to conflating different failures.
Once you move past that point, and start taking on more responsibilities, your goals have to shift if you're any kind of ethical person. While early employees may be willing to take on a lot of risk, and are fundamentally responsible for the choice to come on, it would be, as you said sociopathic, not to feel any kind of responsibility.
I think, given this statement, we likely agree? But then you criticized the article for being too "Feel good", which I think is a mistake. Yes it is "feel good", but maybe it's hard to understand why you need to frame things that way when you're putting yourself out there like this.
comment 6y ago · link · parent
a) It's not even true. I pointed to a literal policy for this administration, which has been absolutely central to the controversy.
b) Even if it were the case, your issue is with the media, not the protestors. If I find out tomorrow that there's a problem, it is not really important to me that the problem began under X or Y administration, but that it persists under the current one.
c) You claim simultaneously that the media is biased and only covering the topic now, but then somehow blame people for only learning about the issue and caring about it now. Your issue is with the media, and that's fine, but it's not relevant to this at all. If you want to put the media on blast go nuts, this topic has nothing to do with the media or this administration.