Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rcfox
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
24 ms
·
241.
▲
by
rcfox
7y ago
That's what a pipe does though. If liquid had its way, it would fall straight down. Pipes force it in another direction.
242.
▲
by
rcfox
7y ago
> Nothing ever gets replaced, things just get added on top of everything. I mean, look at all the angst around Python 2 -> Python 3. People don't want features to be replaced.
243.
▲
by
rcfox
7y ago
> "After the collapse of the Soviet Union, Ukrainians probably decided that the article denigrated their country [by identifying it as a part of Russia] and abolished 'the' while speaking English, so now it is simply Ukrai
244.
▲
by
rcfox
7y ago
FYI: It's just "Ukraine", not "the Ukraine". "The Ukraine" referred to the Ukrainian Soviet Socialist Republic in the Soviet Union.
245.
▲
by
rcfox
7y ago
I'm no radiation expert, but I have referred to https://xkcd.com/radiation/ a few times. The symptoms they describe of a solar flare would, according to the chart, put it at around 400 - 4000 mSv. I'm not sur
246.
▲
by
rcfox
7y ago
Maybe I don't understand your situation, but screening your calls and staying in airplane mode while you're on-call doesn't seem to be appropriate.
247.
▲
by
rcfox
7y ago
I feel like I've been seeing a lot of these almost identical articles pop up all over. Walrus operator, f-string equals, positional-only arguments, yawn . None of that is really going to change your life. There's a bunch of chang
248.
▲
by
rcfox
7y ago
Isn't Disney a poster child of political craziness? Copyright laws, workers rights, Walt Disney racism stuff, etc.
249.
▲
by
rcfox
7y ago
I asked my bank to automatically pay off my credit card in full at the end of each month. (It might help that my credit card is affiliated with my bank, I'm not sure.) I've never come close to spending near my limit, so I don'
250.
▲
by
rcfox
7y ago
Maybe I'm not the intended audience, but I had to look up the acronym WAF since it came up a lot in this article. I'm assuming it's "web application firewall"?
251.
▲
by
rcfox
7y ago
It will depend on your application, but you might also consider just one array of [x, y, x, y, x, y, ...] to improve cache locality.
252.
▲
by
rcfox
7y ago
My first thought was MSDOS/Turbo C, and I found this page when looking for confirmation: http://synfare.com/599N105E/hwdocs/sizes.html
253.
▲
by
rcfox
7y ago
The stated use case is to allow scientists to quickly add equations from other sources into their papers. However, if you look at output 2, there are some subtle mistakes in the result. It seems like whatever time is saved on transcribing e
254.
▲
by
rcfox
7y ago
My degree involved 4 months of school followed by 4 months of paid work. It meant that it took 5 years, but it was totally worth it. I graduated with 2.5 years of experience at different companies, no student debt, and a full-time job alrea
255.
▲
by
rcfox
7y ago
I use a uBlock Origin rule to hide the upper-left button.
256.
▲
by
rcfox
7y ago
I once worked at a place where the keyboard and mouse were chained to the tower and glued in place, and the spare USB ports were glued over.
257.
▲
by
rcfox
7y ago
I've worked the opposite way: calling Javascript from Python, using PyV8. It worked okay enough, but it felt super fragile. We only used it to run a tiny bit of client-side code on the server. I wouldn't want to have a large proje
258.
▲
by
rcfox
7y ago
I'm not sure I got to know Tcl properly . I needed to use it to interact with an electronics design tool in order to extract information about a design, and so most of what I learned was from the tool's documentation about how to
259.
▲
by
rcfox
7y ago
mypy supports comment-based annotations for Python 2. https://mypy.readthedocs.io/en/latest/python2.html
260.
▲
by
rcfox
7y ago
Good to know, but I hope to never need this.
261.
▲
by
rcfox
7y ago
That seems to work too.. a = Foo(Foo(Foo(None))) b = Bar(Bar(Bar(None))) c = Hep(Hep(Hep(None))) a.child.junk = 1 # error: Item "Foo" of "Optional[Foo]" has no attribute "junk" # erro
262.
▲
by
rcfox
7y ago
Just tried this myself, and it seems to only be an issue for typing.NamedTuple. Though, it still manages to do type checking correctly... from __future__ import annotations from typing import Optional, NamedTuple from dataclas
263.
▲
by
rcfox
7y ago
I recently added type annotations to my Python 3.7 project and found it very helpful. Just the process of adding the annotations caught a handful of bugs! Some things I found useful: 1. from __future__ import annotations As I mentioned in a
264.
▲
by
rcfox
7y ago
For Python 3.7, you can do: from __future__ import annotations This will defer the parsing of annotations until after the file has been parsed, allowing you to use the actual symbol instead of a string.
265.
▲
by
rcfox
7y ago
The Canada Revenue Agency wouldn't accept my tax filing until after 6am. This year.
266.
▲
by
rcfox
7y ago
Yes, and it does make code more difficult to read. I've looked at a fair amount of Python code, and it is very rare to see import * in the wild. On the other hand, import * is nice to have in a repl.
267.
▲
by
rcfox
7y ago
I strongly disagree. In Python, you can find exactly where every identifier comes from (unless you use `from foo import *`, but that's frowned upon) and it makes it extremely easy to navigate code and documentation. I've had to lo
268.
▲
by
rcfox
7y ago
Wasn't the ability to access Facebook users' profiles one of the (unofficial?) perks of working there in the early days? Also, the CEO of Reddit was caught editing user comments. https://www.reddit.com/r/annou
269.
▲
by
rcfox
7y ago
How similar is that to answer set programming?
270.
▲
by
rcfox
7y ago
> If I fight the battle to get centralized IT to install Python, I now have a guaranteed set of standard libraries as well. I'm never going to get permission to install anything other than default. Ever. You could install packages w
More ›