Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
glyph
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
glyph
1y ago
I appreciate your commitment to being open to the possibility of being surprised. And I do wish I _could_ find a context in which I could be comfortable doing this type of personal experiment. But, I do remain confident in my own particular
2.
▲
by
glyph
1y ago
I haven't personally tried the specific tool that you have, but I have tried a variety of other tools and have had pretty negative experiences with them. I have received a lot of feedback telling me that if I tried out an agentic tool
3.
▲
by
glyph
3y ago
Martin writes on Mastodon: “So apparently dang and the HN crowd are so upset I wrote some messages for HN visitors to our website, that they now banned my home IP address ”
4.
▲
HN bans Hector Martin’s home IP address
(social.treehouse.systems)
39 points
by
glyph
3y ago
|
24 comments
5.
▲
by
glyph
3y ago
Also, if you really want a "fancy checksum" for verifying package installs, there's already a better feature in pip that actually works and is well-supported: https://pip.pypa.io/en/stable/topics
6.
▲
by
glyph
3y ago
There are other efforts underway to mitigate these threats (which could be subject to their own critiques, but let's not get into that here) but PGP has had 20 years to prove its utility in this area and it has resoundingly proved that
7.
▲
by
glyph
4y ago
why do you think you can't define `__aenter__` and `__aexit__` on a dataclass?
8.
▲
by
glyph
5y ago
To start with, the non-`@dataclass` version here doesn't tell you what types `name` and `age` are (interesting that it's an int, I would have guessed float!). So right off the bat, not only have you had to type every name 3 times
9.
▲
by
glyph
5y ago
Not that attrs or dataclasses has particularly significant attack surface, but when considering stdlib vs. 3rd-party you also have to consider the amount of maintenance and the release cadence. Attrs can release every few months if the rat
10.
▲
by
glyph
5y ago
To the runtime-validation point; our team used attrs with runtime validation enforced everywhere (we even wrote our own wrapper to make it always use validation, with no boilerplate) and this ended up being a massive performance hit, to
11.
▲
by
glyph
5y ago
This is why consensus is a collection . Sometimes dialectical analysis is good; thesis, antithesis, synthesis is a tried and true formula that often works. But not always! Sometimes one side is just horseshit that gets mindlessly repeated
12.
▲
by
glyph
6y ago
The results of the poll are in, and 59.6% of the 699 respondents said that they're either using it already or will be using it within the year. This isn't necessarily a representative sample, my followers are probably on the more
13.
▲
by
glyph
6y ago
This made me curious, so I’m taking a poll. https://twitter.com/glyph/status/1372640855807250432?s=21
14.
▲
by
glyph
6y ago
Just speaking for myself here, I didn’t realize the power of static typing for years and years because the main languages I used with “static types” were C-style; i.e. type checking without null checking. I was vaguely aware of “better” sys
15.
▲
by
glyph
6y ago
Mypy itself uses this extensively; it was developed because typechecking itself was getting too slow. So it’s seen some practical real-world use. It’s not a panacea (heck, it’s barely documented) but it’s an appealing option if you have som
16.
▲
by
glyph
6y ago
The post isn't about performance, and is aimed at people using Python for whatever reason, so, sure, retrofit away. That said, if you care about the performance improvements that typing can give you with Mypy, you might want to look he
17.
▲
by
glyph
6y ago
No.
18.
▲
by
glyph
6y ago
There’s no error in the original example; in Python, the ability to participate in inheritance diamonds with arbitrary other classes is a feature which must be explicitly documented and maintained. James Knight wrote a really good piece on
19.
▲
by
glyph
6y ago
The reason the crypto module was using this particular deprecated feature is that it hasn't been updated at all in 8 years. The OP should have dropped it because it's unmaintained, and a maintained replacement has existed for a
20.
▲
by
glyph
10y ago
It's not an "in-joke". It follows conventions set by the Python language: - "def" instead of "define" - "cls" instead of "Class" - "sys" instead of "system" - "
21.
▲
by
glyph
10y ago
And, thanks for the P.S. Always nice to see people enjoy my work :)
22.
▲
by
glyph
10y ago
The same problem does not apply. I understand that spooky action-at-a-distance magic can really ruin a codebase's maintainability. But what you've developed here is not a judicious appreciation of its danger and its power, but a
23.
▲
by
glyph
10y ago
Dictionaries are not for fixed fields. if you have a dict, it maps something to something else. You should be able to add and remove values. Objects, on the other hand, are supposed to have specific fields of specific types, because their
24.
▲
by
glyph
10y ago
Why not? It's aggressively tested and benchmarked to ensure its correct and its performance impact is as close to zero as possible. (It's pretty close.)
25.
▲
by
glyph
10y ago
None of this is a problem with attrs. Serialize however you like. >>> import attr >>> >>> @attr.s ... class Thing(object): ... a = attr.ib() ... b = attr.ib() ... .
26.
▲
by
glyph
11y ago
Can you elaborate? What makes it a "huge dependency to maintain"? Is there anything that the Twisted project can do to make it easier? If this is actually a problem I'd really like to hear from users on the Twisted mailing
27.
▲
by
glyph
11y ago
Thanks for your considered reply. HN decided my reply was too long to post here, so instead it's on my blog: https://glyph.twistedmatrix.com/2016/01/stop-working-so-hard...
28.
▲
by
glyph
11y ago
The Guardian: > Research shows that shorter work weeks are just as effective. John Carmack: > I feel like longer work weeks are more effective. Does anyone else see the problem with this? Of course, pop-sci writing is often terrib
29.
▲
by
glyph
11y ago
It is a myth though, regardless of whether you, personally, believe it to be or not. It's based almost entirely on a very old study, conducted in a very limited environment, cited by Fred Brooks in “The Mythical Man Month” and then ta
30.
▲
by
glyph
11y ago
Previously at Apple, currently at Rackspace :-). (Thank you for your kind words.)
More ›