Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ddfisher
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
ddfisher
10y ago
Don't forget Cython [1]! My understanding is that it's quite useable (though it unfortunately uses a different static type system/syntax than mypy). [1] http://cython.org/
2.
▲
by
ddfisher
10y ago
This is exactly what mypy allows, actually! (Except for speedups -- types currently have no effect on runtime behavior, and it turns out they wouldn't make a big difference anyway.) The hybrid type system concept is called "grad
3.
▲
by
ddfisher
10y ago
Good question! There are separate capitalized types for List, Dict, etc provided as part of the `typing` module in order to let you specify element types. Types are all normal Python expressions, so if you wrote `list[int]` you'd get
4.
▲
by
ddfisher
10y ago
It should work with the Python 3 syntax if you quote your type annotation. I.e. def f() -> "Bar": ... instead of def f() -> Bar: ... (This is normally used for forward references.) This makes it slightly less
5.
▲
by
ddfisher
10y ago
Yeah, you need to write `from typing import List` to get the generic List class that you can parameterize with an item type. As you pointed out, you can use the builtin lowercase-l list without importing anything, but that doesn't all
6.
▲
by
ddfisher
11y ago
This is intended behavior, actually! By default, mypy doesn't type check the interior of functions that don't have any type annotations. This lets you slowly introduce types to a large codebase without having to convert everyt
7.
▲
Who will sell the self-driving car?
(blog.samgerstenzang.com)
2 points
by
ddfisher
13y ago
|
0 comments
8.
▲
Who’s afraid of Jeff Bezos?
(blog.samgerstenzang.com)
87 points
by
ddfisher
13y ago
|
81 comments
9.
▲
by
ddfisher
13y ago
Leeching shouldn't be too much of a problem: the user will upload while they remain on the page (which should be much longer than it took them to download the assets).
10.
▲
by
ddfisher
14y ago
Re-reading, I can see that now. Oops! (I think the paragraph break confused me.)
11.
▲
by
ddfisher
14y ago
While I agree that being skeptical about self-help books is a good thing, I think you made a big mistake in your specific example. I have not looked at "The Feeling Good Handbook" that you linked to, but I am quite familiar its predecess
12.
▲
by
ddfisher
14y ago
I think "the root of all evil" is, in general, not a good choice of phrase. I understand the vehemence with with you speak, but I think it's a bit overly hyperbolic and creates quibbling over the word "all". Saying that religion is the ca
13.
▲
by
ddfisher
14y ago
> Anyone who can complete Tour de France at all or moderately but steadily grow an investment portfolio over the years should be extremely satisfied with just that already. (I'm not certain what "should" means in that sentence - a moral
14.
▲
by
ddfisher
14y ago
Terrible. RIP. :( What can we do to stop things like this from happening again? There's clearly no quick-fix overnight solution, but there should be some set of actions we can take to slowly reduce/eventually eliminate this kind of viole
15.
▲
by
ddfisher
14y ago
Do it! What's stopping you?
16.
▲
by
ddfisher
14y ago
I believe this is the shadow of the rover.
17.
▲
by
ddfisher
14y ago
As another person who's spent some time thinking about this: I disagree. Why couldn't a machine simulate the noise as well?
18.
▲
by
ddfisher
14y ago
I recommend Escape, actually - it skips the whole conversation. :)
19.
▲
by
ddfisher
15y ago
I recently started using Phabricator ( http://phabricator.org/ ), which is open-source, and find that it's quite easy to use/set up. It's also used and well regarded by a number of startups, including Facebook, Asana and Quora. Disclaimer:
20.
▲
by
ddfisher
15y ago
Because Haskell is evaluated lazily, two maps doesn't imply two iterations over the data. In this case, I would expect only one pass through the data for both of the maps. Out of curiosity, I did a quick criterion benchmark for both functi
21.
▲
by
ddfisher
15y ago
As someone considering paleo, I'd be interested to hear what studies you thought well supported the claim that saturated fats aren't the problem and why you thought those studies were more reliable than the ones that indicte the contrary.
22.
▲
by
ddfisher
15y ago
Activate visual mode first. In visual mode, the argument is used for the number of indents (because the lines to indent are selected visually). So to indent the current line 4 times, type: "V4>". Happy vimming! :)
23.
▲
by
ddfisher
15y ago
While I too find it odd that your original comment was downmodded (has it been edited?), I don't think that a personal attack is an appropriate response. It doesn't seem like younata was being a jerk (from my reading of the comments), but y
24.
▲
by
ddfisher
15y ago
Perhaps I had the wrong impression, but I thought the correct response to a factually incorrect post was to point out the correct information in a reply, not to downmod the post. This is more inclusive (as everyone is misinformed at times)
25.
▲
by
ddfisher
15y ago
"the general progress of AI" Out of curiosity, what are you referring to here?
26.
▲
by
ddfisher
15y ago
FYI: you're probably not being downvoted because people think you are incorrect. (In fact, it is my understanding that incorrect information should generally be politely corrected, rather than downvoted.) Instead, the downvotes most likely
27.
▲
by
ddfisher
16y ago
If Google is going to be launching a social network called "Circles" in the near future, I think they would launch it tomorrow, because tomorrow is Pi Day. (This is meant in all seriousness, Google seems to enjoy small flourishes like that
28.
▲
by
ddfisher
16y ago
"E.g. args.length returns 0, and they try to access the first element in the list (due to heritage from c pointers we start counting at 0) which is the 'zeroth' one, which doesn't exist" I'm not sure if you're making some subtle point here
29.
▲
by
ddfisher
16y ago
The most recent edit to the article prepended "Nazi" to "Germany" and contributed nothing further. This seems rather unnecessary, as the sentence clearly specifies that this occurred during WWII. Did you make this change?
30.
▲
by
ddfisher
16y ago
Username: "kimidorisakana" I haven't posted much, but I read HN regularly.
More ›