Better HN
topnewbestaskshowjobs
Log inSign up

kortex

8,487 karma · joined Feb 1, 2017 (9y ago) · 2,549 submissions

Submissions

comment 4y ago · link · parent

We really goofed as a society on that one. "But humans have ten fingers!" Well, we actually have 8 3-segment fingers and 2 thumbs, meaning you can count a dozen on one hand, and a gross on two, using thumbs as a cursor.

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

Cost and availability. Cylinder filters tend to be way more expensive ($30-50 per, I've seen true HEPA cylinder ones "for allergy sufferers" aka medical space, >$130) than rectangular (a few bucks). Rectangular also comes in a wider variety of form factors than cylinders, with more different filter styles (eg different thickness, with carbon, high flow, true HEPA/MERV >13).

comment 4y ago · link · parent

> Perhaps, “token-based” pagination would be a better term?

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

If you use ULIDs for IDs (sortable by time, millisecond resolution) and a tombstone field (nullable deleted_at is a good one) then you have a very stable collection that guarantees no new objects will be inserted/deleted before the write head - it is append only in effect.

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.

https://en.m.wikipedia.org/wiki/German_tank_problem

comment 4y ago · link · parent

The article mentions a virtual optical fence that cuts the beam if anything impinges, so no roast pigeon with this system. Anything which the beam could couple to, haze, smog, etc, would definitely reduce efficiency for sure.

comment 4y ago · link · parent

> I'm tired of venv, PYTHONPATH and OS package dependency issues.

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

Despite its warts, Python's type system is at least comparable to Go, and better in several areas. The type inference works really well much of the time without any assistance, you can use tools like pyre to generate types for untyped code, as well as tools for discerning types through running the application.

Heck, you can even use HKTs in Python if you are willing to install a plugin/library.

https://returns.readthedocs.io/en/latest/pages/hkt.html

comment 4y ago · link · parent

> Python is a pretty terrible language to work with.

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

You mean statically typed? Python is already strongly typed.

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

Is it possible to just use ::ffff:0:0/96 to map them? e.g. ::ffff:7f00:0/104 maps to 127/8

comment 4y ago · link · parent

How does that solve anything? Any hardware is gonna try to route packets to the "original" x.x.x.x and completely ignore this option field.

comment 4y ago · link · parent

What in the actual eff. Anything except actually switching fully to ipv6, amirite?

Trying to see the most charitable position here - is there an aspect in which redefining 127/8 to 127/16 across billions of devices is actually feasible?

comment 4y ago · link · parent

It's all about managing entropy. Less surprising means you can use fewer letters. More surprising means more letters. That shouldn't be too controversial.

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

Underground construction is really hard to do correctly. Partial earth bermed foundations as you mentioned are a good compromise, especially if the earth is built up. But even then, drainage and soil pressure are big engineering concerns.

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

That's more or less what PEP 659 tries to achieve, albeit without the flag.

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

A big part is that Python uses reference counting GC. Java, Go, C# all use tracing GC. Py_INCREF and Py_DECREF are responsible for inc/decreasing the reference count, and are not atomic. The GIL ensures refcount safety by allowing only one thread access to changing refcount. The naive approach to parallelization would require locking each ref inc/dec. There are some more sophisticated approaches (thanks to work by Sam Gross et al) that avoid a mutex hit for every inc/dec.

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

It needed to be done; there were several choices in python 1/2 holding the language back, that all but necessitated breaking changes. Mostly with string/bytes/unicode handling. And the non-breaking route would have been a long term pain.

They didn't decide to break over print() and cosmetic changes, it runs way deeper.

comment 4y ago · link · parent

I think python is finding the loosey-goosey dynamic everything makes for bad application scalability, both for maintainability but also performance.

Python with types, on the other hand, is pretty great for catching bugs before runtime.

comment 4y ago · link · parent

He openly admitted to having (deprecated term) Asperger's syndrome on SNL.

comment 4y ago · link · parent

He openly admitted to having (deprecated term) Asperger's syndrome on SNL.

> 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

That's charitable. That was a really long interview/behind the scenes. I also interpreted it mostly as being tired (he normally works obscene hours and around this time he was particularly burning both ends).

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

> Lets get one thing straight. If you are on the spectrum, the reason you act like this is because you don't understand that you are doing something wrong.

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

He seems to open up more when talking to people he considers "on his level" or at least deeply interested in what he is interested in. Take for example photographer and journalist Tim Dodd. Since Tim has a huge passion for rockets and actually wants to dig into the details of rocket engine cycles, manufacturing scale up - all the stuff Elon finds interesting - he really opens up.

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

> so I guess it's a hundred bucks per star. :)

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

That seems exactly opposite to the growing trend of "sqlite-as-application-file-format". There's a lot of nice features you get "for free" doing this, primarily way better consistency, than you do rolling your own binary format.

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 is why I like to always write any sort of user-script batch-job tools (backfills, purges, scrapers) with a "porcelain and plumbing" approach: The first step generates a fully declarative manifest of files/uris/commands (usually just json) and the second step actually executes them. I've used a --dry-run flag to just output the manifest, but I just read some folks use a --live-run flag to enable, with dry-run being the default, and I like that much better so I'll be using that going forward.

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.

http://www.laputan.org/mud/mud.html#ShearingLayers

comment 4y ago · link · parent

Sounds like you may have had too high a dose, or too quickly absorbed of a dose. That's more or less what I feel like in the 30-40mg range, which is about middle of the road for Adderall XR. The problem with XR is for some folks, it isn't extended release at all, it's just two timed dumps of immediate release.

comment 4y ago · link · parent

Thanks for sharing! This is incredibly relatable. One of my hallmarks has always been intensity. I rarely half-ass anything, and when I do, it's almost astonishingly mediocre. But normally it rockets between obsession and extreme apathy. Emotional reactions to anything are always 200%.

comment 4y ago · link · parent

I have it, have had it since I was a kid, and it's moderately treatment resistant to boot, so I'm acutely aware of how much it sucks, and I wear it with pride. I don't take pride in my depression and mood disorders.

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.

comment 4y ago · link · parent

Likewise. I love his channel, but I'm kind of amazed he hasn't lit his dwelling on fire by now.
1
323334
85