4,836 karma · joined Jul 9, 2008 (18y ago) · 1,322 submissions
[ my public key: https://keybase.io/jreese; my proof: https://keybase.io/jreese/sigs/oMm1rGpBWQUZlYjQeGCSD25PvSnx2g6ZuaQ89HzjO2Q ]
comment 3y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
Edit: and if you're willing to use Safari on iOS, there are dozens of Safari plugins on the app store that provide good-enough adblocking.
comment 4y ago · link · parent
comment 4y ago · link · parent
Also, FWIW, they don't just pick between 18 gears with a single shifter. They have multiple inputs that allow shifting between multiple combinations of gears, some requiring clutch to change and some not, as they gain speed. Most trucks still only have 6-ish positions for the main gear shifter to slot in to.
comment 4y ago · link · parent
comment 4y ago · link · parent
I'm a happy F1TV subscriber, and really enjoyed watching some FE races here and there in the past, but it feels like they're going out of their way to make it difficult or pointless to actively watch full races during the season. Is there an "FETV" type of deal similar to F1TV, or do I just have to give up hope of seeing them before the end of the season?
comment 4y ago · link · parent
comment 4y ago · link · parent
We do this for Python applications, by combining a ZIP containing the "link tree" of sources/packages/modules, with a shell bootstrap script that automatically sets up the environment, import path, etc, and Python itself has built in support for importing pure-python modules from a ZIP file. All that's needed for native modules is a simple import hook that extracts the native objects into temp space and then loads them appropriately.
comment 4y ago · link · parent
Similar to the Carbon/Cocoa split, I'm sure we'll see AppKit supported well into the future, especially since we just passed the latest major architecture transition. But that doesn't mean AppKit isn't a dead end.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
>>> a = "this is a long sentence in a string literal"
>>> b = "this is a long" + " sentence in a " + "string literal"
>>> a is b
False
>>> id(a)
4386376272
>>> id(b)
4387721264
>>> a == b
Truecomment 4y ago · link · parent
comment 4y ago · link · parent
values = [
value
for line in buffer.readlines()
if (value := line.strip())
]
Previously, I would have needed to either duplicate effort like: values = [
line.strip()
for line in buffer.readlines()
if line.strip()
]
Or used a sub-generator: values = [
value
for value in (
line.strip() for line buffer.readlines()
)
if value
]
Or rewritten it altogether using a (slower) for loop calling append each time: values = []
for line in buffer.readlines():
line = line.strip()
if line:
values.append(line)
The assignment expression is perfect for this sort of use case, and is a clear win over the alternatives IMO.Edit: fixed initial example
comment 4y ago · link · parent
This is why my coworker built the project he called "dowsing"; it tries to understand as much as possible from the setup.py's AST, without actually executing it.