Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
eliben
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
69 ms
·
331.
▲
by
eliben
11y ago
This is pretty cool! How old is your son now? Do you intend to remain stay-at-home forever, or until your kid(s) reach a certain age?
332.
▲
by
eliben
12y ago
Brief letter of personal support following Curie's remarriage scandal. And then comes the P.S.: I have determined the statistical law of motion of the diatomic molecule in Planck's radiation field [...] Priceless :-)
333.
▲
by
eliben
12y ago
Are you implying that by using Python 3 incorrectly you can run into unicode problems? I agree with that. However, there are ways to do this safely. At the boundaries of your code you have to deal with the unicode/bytes question, in an
334.
▲
by
eliben
12y ago
Unless I'm missing something, this is precisely the kind of visualization that explains how to compute the result, but not why the computation makes sense. I.e. why is matrix multiplication defined this way at all.
335.
▲
by
eliben
12y ago
> when I used to think it wise to implement these things yourself It's a very good thing that you thought it wise at some point. There's nothing like reinventing a few fundamental wheels for a better understanding of how they w
336.
▲
by
eliben
12y ago
Typically, this visualization isn't taught, in my experience. What's taught is the formula for computing each cell of the result matrix (cell i,j being the dot product of row i of the first matrix with column j of the second). Whi
337.
▲
by
eliben
12y ago
The time diff between 2.7.3 and 2.7.6 is a year and a half, and lib2to3 got a bunch of fixed merge in during that period. I peeked at the CPython logs, and there's a number of changes so this bug may very well have been plugged. I gues
338.
▲
by
eliben
12y ago
Interesting. Can you cite the exact version of Python 2.7 you're using? Mine is 2.7.6 I'm asking because bugs get fixed in lib2to3 occasionally, and we see differences between minor Python versions in this regard.
339.
▲
by
eliben
12y ago
We're actually working on a heuristic that can signal yapf to break arguments to one per line, and do the same for data structures (think a dict initialization). Ultimately, we'd like to have these things configurable via the styl
340.
▲
by
eliben
12y ago
Sorry, I can't reproduce this. I'm trying on this file: https://gist.github.com/eliben/9727758f4847d2e7d86e And yapf runs just fine on it. Does this file work for you?
341.
▲
by
eliben
12y ago
yapf starts making tons of sense after you've used similar tools in other languages. The chief two examples are "go fmt" and clang-format. The former goes without saying - formatting is enforced in Go. The latter is widely us
342.
▲
by
eliben
12y ago
yapf's approach is, philosiphically, different from autopep8. yapf doesn't just fix pep8 violations. It takes a look at your whole code, and reformats it to a canonical form. If you've ever used "go fmt" or "cl
343.
▲
by
eliben
12y ago
Are you sure this is not a shell artifact? Does the same problem happen when there's a \\ in a file? In any case, feel free to open a Github issue for yapf, we'll take a look
344.
▲
by
eliben
12y ago
Indeed, it's just "Yet Another Python Formatter"
345.
▲
by
eliben
12y ago
Feel free to submit a Github issue for yapf
346.
▲
by
eliben
12y ago
Silly question: Can Github just carpet-block all Chinese IP addresses? Would this mitigate the attack? Or is it that GH doesn't want to punish real Chinese users (some of whom may well be paying customers) for their government's t
347.
▲
by
eliben
12y ago
yapf is developed using an internal Google coding style. Please don't hold it against the project :-) Once you get used to the style, the code of yapf is very consistent in terms of style (it was formatted with yapf itself!) and should
348.
▲
by
eliben
12y ago
This shouldn't happen - please report an issue
349.
▲
by
eliben
12y ago
Indeed, this is one of the biggest problems of Python for large-scale projects (saying this as an avid Pythonista myself). This is due to dynamic typing, though, not weak typing (Python's typing is actually strong). Weak typing has i
350.
▲
by
eliben
12y ago
But Python is strongly typed. A language can be dynamically typed, and strongly typed - no problem with that. More details in http://eli.thegreenplace.net/2006/11/25/a-taxonomy-of-typing...
351.
▲
by
eliben
12y ago
I think this is especially important for programmers. While learning a new technology (or programming in general), many get trapped in an endless consumption cycle - there are enough books and blogs to fill many lifetimes of reading for any
352.
▲
by
eliben
12y ago
Funny how old articles resurface suddenly :-) It's great that HN still likes technical content, though. FWIW I also wrote a (shorter) follow-up post a few months later about multi-dimensional arrays and their relation to pointers-to-po
353.
▲
by
eliben
12y ago
This is not limited to C++. All widely-used, "old" programming languages shun away from adding keywords, because it can break previously working code. Python is the same way too.
354.
▲
by
eliben
12y ago
Browsers have been doing this for at least 15 years. Is there anything especially strange here you wanted to point out?
355.
▲
by
eliben
12y ago
Taught by Cormen, no less
356.
▲
by
eliben
12y ago
So SPIR-V is completely unrelated to the previous attempt at a portable IR layer for compute kernels, named SPIR? This is crazy. Why is Khronos trying to be confusing?
357.
▲
by
eliben
12y ago
I don't think 2 years is typical for a PhD (even after already earning a M.Sc) This may be just a sign of the quality of research Sergey was doing which has, as we know now, fairly useful applications :-)
358.
▲
by
eliben
12y ago
Oops, thanks. Math is hard :) Fixed
359.
▲
by
eliben
12y ago
I have to admit I fail to see the point you're trying to make with the price of the compiler; how does this bear negatively on the C++ language?
360.
▲
by
eliben
12y ago
Mercy, folks, this post will turn 6 years old soon. Let me know if you have any questions (or just leave a comment).
More ›