8,487 karma · joined Feb 1, 2017 (9y ago) · 2,549 submissions
comment 4y ago · link · parent
You can also form a set of 12 symbols that is visible from farther away by doing shapes similar to ASL:
1-4: fingers held up
5-8: touching tip of finger with thumb
9-12: touching top of 2nd phalanx with thumb.
Holding down the pinky in isolation is tricky so this kinda favors starting with pinky out as 1, but you could make assorted variants of this system work.
Fractions would be so nice to work with in "dozenal metric".
comment 4y ago · link · parent
comment 4y ago · link · parent
Let's do it. When I was first learning about it, I wondered how the concept related to database cursors, if at all.
It's really just a pointer to the next item at its most simple. But it really is just any opaque blob. Maybe you want it to be a jwt/encrypted blob with a request counter so you can track request usage by specific accounts (along with the pointer). jk that's probably a terrible idea (too entangled). Idk, just came up with it. Point is, you could do something like that, it's just a blob opaque to the client.
So I like "token-based pagination".
comment 4y ago · link · parent
You can then do some cool things, especially if your objects are evenly distributed and especially if you don't need exact page sizes or can over-query and hide them as needed.
If you then know the approximate frequency of objects, you can then map some linear scaling to an approximate range of ULIDs. Basically German tank problem in reverse.
comment 4y ago · link · parent
To both you and the peanut gallery. You should basically* never be using PYTHONPATH or OS packages. And there are several solutions to improve ergonomics of virtualenvs out there.
* I've never had a legitimate use case to use OS packages and only one to use PYTHONPATH, which is tot temporarily set it during tests in a repo with multiple independent sub-packages, coverage reports get a bit squirrelly.
comment 4y ago · link · parent
Heck, you can even use HKTs in Python if you are willing to install a plugin/library.
comment 4y ago · link · parent
That's just like, your opinion, man.
> Tooling sucks.
Not in my experience. Lot of tools could be better, but I would not say there is a lack of un-sucky tooling at this point. Poetry and pytest in particular are largely excellent to work with.
> Dependency conflicts are common.
This has been a problem historically but it's leagues better today, especially with lockfiles.
> There's no test framework/runner worth a damn.
Um, what? Unittest (stdlib), Pytest, tox, nose, hypothesis, schemathesis, and a few other lesser known ones.
> Web frameworks are inferior to those in most other languages.
FastAPI is pretty amazing. Flask is well regarded as a good intro framework. Django I'm not a fan of personally, but many love it.
> If not for data science and academia keeping it alive, it'd be disappearing along with Perl.
And machine learning. And web dev. And sysadmin scripting.
comment 4y ago · link · parent
Try running it through mypy with all the strict options. If you can get it to 100% pass and don't try to "cheat" the system too much with dynamic casts, I think you will find runtime type errors to be very rare.
comment 4y ago · link · parent
The part where it gets tricky is when a concept is widely used, but is a complex concept. What if you have dozens of calls to cudaGetTextureAlignmentOffset in a function, and hundreds in a codebase? Heck, even CUDA is an acronym, Compute Unified Device Architecture.
There's a similar complication when you have several of these big names with slight differences. Made up example, say you also had cudaGetTextureAccessKey, cudaGetVectorAlignmentOffset, etc. I actually find these sometimes worse than the initialisms, as my eyes skip over these long names. The acronyms (CGTAO, CGTAK, CGVAO) have a higher ratio of different letters to total length. But then obviously the abbreviations are very opaque.
comment 4y ago · link · parent
Also you have no control over how much thermal interface you have. My office is on the first floor on a slab. It's great in the summer and freezing in the winter, despite a carpet.
Digging down becomes increasingly expensive vs equivalent volume building up.
Why not just use ground source heat pumps? It's much easier to bury some tubes than habitable spaces. It's easier to move heat/cold where you need it. You aren't forced into a fixed thermal flux.
comment 4y ago · link · parent
Given that nearly everything in Python is an Object and can be modified/patched at any time, this dynamic adaptation is probably as best as one can get, without something like numba or cython, which "knows" more about specific blocks of code and can compile them down.
https://docs.python.org/3.11/whatsnew/3.11.html#pep-659-spec...
comment 4y ago · link · parent
Tracing GC does not run into this problem. Why Python doesn't use tracing GC is not something I am qualified to answer.
Sam Gross' work: https://docs.google.com/document/d/18CXhDb1ygxg-YXNBJNzfzZsD...
The GIL code: https://github.com/python/cpython/blob/main/Python/ceval_gil...
Py_INCREF: https://github.com/python/cpython/blob/a4460f2eb8b9db46a9bce...
comment 4y ago · link · parent
They didn't decide to break over print() and cosmetic changes, it runs way deeper.
comment 4y ago · link · parent
> That's just called childish behavior,
That's pretty judgy, IMHO.
> But most adults who act that way can't get away with it. When it is paired with wealth and a megaphone as it is with Musk and others like him, not only can they get away with it, but it can be amplified by a mass following of people who wish they could get away with it, and live vicariously through them.
True.
comment 4y ago · link · parent
I think it's telling that he didn't tell Tim to scram or he even got that close of a look at all. If he wanted to get away, he could have easily done so.
The disparity is even more obvious in the pressers when reporters ask typical reporter questions, vs when someone (often Tim, but there are others) asks something technical.
comment 4y ago · link · parent
This might be a nitpick, I wouldn't describe it as an "understanding" problem. Usually we understand that there are social cues and what they mean (at least in the mild cases). The difference is in the strength of that signal.
It's like as if people have a warning indicator when doing things socially inept. Most folks seem to have a loud klaxon "You are being an ass! Stop that!". With ASD, it's more like a quiet "check engine" light that's easy to overlook.
If you never experience the social pressure to actively look for that indicator light (see exhibit E.), you never really build strong social graces. Or, maybe you just don't give a damn about masking, too tired, just not interested.
comment 4y ago · link · parent
That's actually pretty common among those "gifted with mild ASD/ADHD" types, they can't be assed to talk about anything that doesn't pique their interest. I struggled with it a lot until I learned to be more social with other folks' topics of discussion. I think Elon is the logical endpoint of what happens when you have zero pressure to socially accommodate.
It does seem like he's increasingly emboldened to act an ass since being crowned world's richest man.
comment 4y ago · link · parent
That actually totally checks out as a Fermi estimation. If you think of starring as developers marking a library that has brought them value, if they starred it, it's probably saved them an hour or so in the long run. So one benny* per star totally checks out.
* Ben Franklin, not Ben Johnson, lol, pun not intended
comment 4y ago · link · parent
I don't want to have to deal with locks if at all possible. Binary works fine if each file is atomic, but that does not sound like the case you are advocating.
comment 4y ago · link · parent
This pattern has the added benefit that it makes it really easy to write unit tests, which is something often sorely lacking in these sorts of batch scripts. It also makes full automation down the line a breeze, since you have nice shearing layers between your components.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
I think the big distinction, and what TFA is getting at, is ADHD actually is more like a true neurodiverty than a disorder. The dysfunction largely manifests due to the constraints in the modern world. I love making things but I hate "adulting" - bills, paperwork, keeping 9 million small things in order. Were I living in a hunter-gatherer or early agrarian society, things would be different.
I'm able to offset bad prioritization skills by being really good at breadth-first search and having a huge knowledge base from curiosity driven rabbit holes when I should be doing my "real" work. It feels much more balanced than depression, which just sucks the life out of me and reduces all aspects of quality of life across the board.