Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ubernostrum
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
31.
▲
by
ubernostrum
8y ago
Python was already strongly typed long before Python 3. Python does not have static typing as a built-in part of the language. It has had the ability to annotate arguments and returns of functions/methods since 3.0, a standard-librar
32.
▲
by
ubernostrum
8y ago
It's difficult to say for certain that the Ivies are actually that high in terms of academic quality. There's a history of people literally tweaking evaluation and ranking criteria until they get the Ivies to come out at the top.
33.
▲
by
ubernostrum
8y ago
Facebook appears to have designed their system in such a way that permissions were not granular enough to do things like "Spotify can only post certain types of messages". Instead it had to be "Spotify has full read/writ
34.
▲
by
ubernostrum
8y ago
This was borrowed straight from Django's process; our technical board gets re-elected every release cycle. It's a pretty low-traffic and low-turnover group in Django. I've done it four releases in a row, for example. When the
35.
▲
by
ubernostrum
8y ago
The new Python model is pretty similar to what Django has been using for years (and even admits that it copy/pasted significant chunks of text from our model). I didn't realize how grim things were! I've served on Django'
36.
▲
by
ubernostrum
8y ago
There is one other thing that could break, but it would be a weird one. Which is hard to explain in prose, so here's some example code: class SomeMetaClass: def __new__(name, bases, attrs): pass class Som
37.
▲
by
ubernostrum
8y ago
Mangling of double-underscore names isn't there to provide access control like in Java or C++. Mangling of double-underscore names is explicitly documented as existing "to avoid name clashes of names with names defined by subclass
38.
▲
by
ubernostrum
8y ago
probably needs written in C because built-in types are closed "Everything is an object" does not necessarily imply "all objects are always infinitely monkeypatchable at all times". It also doesn't necessarily impl
39.
▲
by
ubernostrum
8y ago
No easy way to remove the package. "pip uninstall" has been around as long as pip has. Theoretically, it can upgrade the version but the user mostly don't. In practice, people deploy to a virtualenv that gets recreated on
40.
▲
by
ubernostrum
8y ago
Easy for simple code for middle schoolers. For grownups with large codebases to develop and maintain, it's not optimal. Yes, like the tiny puny baby middle-school children who built microscopic useless toy "programs" (not e
41.
▲
by
ubernostrum
8y ago
I regularly wish python required some sort type indication for function parameters As others pointed out, Python has optional type annotations and has had them since 3.0. They're static-only (you don't get runtime type checking
42.
▲
by
ubernostrum
8y ago
I've read The Pragmatic Programmer on a 10 hour flight and I fell asleep 2 or 3 times, because it was freaking boring. Either you already knew that the things it recommended were good ideas and were doing them, or you haven't ye
43.
▲
by
ubernostrum
8y ago
I've always treated 538's forecasts as meaning nothing more or less than "We have a model, we fed the current data into it and ran N simulations of the event, and in X% of those simulations, this was the result". Which,
44.
▲
by
ubernostrum
8y ago
The counterpoint is that if we were more eager to ditch theories as soon as they fail to explain absolutely everything in the universe, we'd have tossed Newton's laws in the early 1800s because they didn't accurately predict
45.
▲
by
ubernostrum
8y ago
The Perl doc mostly refers back to suggestions from UAX#31, along with specific notes from UTR#36 and UTS#39. The suggestion it cares most about from UAX#31 is to restrict to scripts that actually are in use (i.e., don't let people nam
46.
▲
by
ubernostrum
8y ago
Not quite. Reject any mixed-script confusable (and for certain types of inputs, like email addresses, validate sub-components separately -- someone might get to choose their local-part but not their domain). For strings which aren't mi
47.
▲
by
ubernostrum
8y ago
The rejection of XID_Start/XID_Continue linked from the Rust issue is not, as far as I can tell, due to "weird" issues -- it's because the sets of characters with those properties can change over time as Unicode adds mor
48.
▲
by
ubernostrum
8y ago
I think it's useful, if you feel it's a burden to have to interoperate with a codebase using non-ASCII identifiers, to consider how literally every person in the world whose native language is non-ASCII must have felt being forced
49.
▲
by
ubernostrum
8y ago
If you take the position that every codebase everywhere must be available to and understood by every programmer everywhere, sure, you have to settle on a common language. Luckily, I don't think anybody takes that position, or at least
50.
▲
by
ubernostrum
8y ago
Unicode in identifiers is an exceptionally bad idea Unicode identifiers can be perfectly well-defined, and many languages have them. The general idea is an identifier can start with any character that has derived property XID_Start, and t
51.
▲
by
ubernostrum
8y ago
My editor understands when to indent in Python, and often when to dedent. When it doesn't know to dedent, I just hit Backspace on the next line to close the indented block. I understand it's a matter of taste, but I don't und
52.
▲
by
ubernostrum
8y ago
The exact error you're going to get in a modern Python is: TypeError: 'type' object is not subscriptable That's because "list" refers to the class object, which is not an instance of list; it's an
53.
▲
by
ubernostrum
8y ago
Suppose you want to indicate that a particular variable is a list of int. You might write "list[int]" to indicate that. But try that in a Python interpreter and you'll get an error -- "list[int]" attempts to subscri
54.
▲
by
ubernostrum
8y ago
Is there an actual dummy class called `typing.Any` that will magically pass a type comparison against any other Python object? There is an object called "typing.Any". It's a singleton, immutable, un-subclassable sentinel
55.
▲
by
ubernostrum
8y ago
The analogy to stolen goods is useful. Generally, if you receive stolen goods, there are two possibilities: you knew they were stolen (read: a prosecutor can convince a jury you knew), in which case you lose the goods and get prosecuted.
56.
▲
by
ubernostrum
8y ago
Given that playing video games competitively for a living is possible through large prize pools in quite a few games, and that South Korea has historically been a powerhouse of gaming, it seems not at all surprising to me that they'd t
57.
▲
by
ubernostrum
8y ago
As someone who used to speak decent French, you will never convince me that the language is rational with respect to numbers. The sometimes-decimal/sometimes-vigesimal thing still makes my head spin all these years later when I hear nu
58.
▲
by
ubernostrum
8y ago
One would think that a metric country would adopt "k"/kilo as the indicator for thousands and "m"/mega for millions. Still I suppose it's better than sussing out whether someone is British and using "
59.
▲
by
ubernostrum
8y ago
Airlines have also had to do special training courses to teach pilots not to get over-reliant on automation. Tesla's "autopilot" seems to fall in that category of being just enough automation that it gets people complacent, b
60.
▲
by
ubernostrum
8y ago
As someone else who's run a lot of interviews including tech exercises (as much as I hate the typical way they're done, I haven't been able to eliminate them everywhere I've worked), I have the same experience as the par
More ›