HNHacker News
TopNewBestAskShowJobs

aidos

8,384 karma · joined December 3, 2010

Co-founder of https://www.countfire.com

I like automating things. Currently building lots of software in Python / Typescript / Postgres.

Contact me: aidankane on that google hosted email platform.

submissionscomments
aidos··on Uv: Python packaging in Rust
I do get the caution, but I think that even in that case there’s enough momentum behind Ruff for the community to fork and carry on.

Obviously it would be pretty crummy to end up in a situation like pyright where MS really have leant in to their embrace, extend, extinguish strategy.

aidos··on Uv: Python packaging in Rust
If all they did right now was leave Ruff exactly as it was and walk away they would have given the Python community a great gift.

Sure, it’s rendered a bunch of projects obsolete, but it’s because it’s so much better than the predecessors.

aidos··on Why the serverless revolution has stalled (2020)
What’s the process / worker model when it’s run like that? Is there a continuous process running listening on a port waiting for a request?
aidos··on Twenty years of my work with Arm architecture
At least for us, we made the switch in preparation for the release of the M1 Mac machines.

It took about a year for things to simplify - originally we had to use qemu for dependencies and had to hack and compile a few other bits along the way. We have more gnarly deps than your average web app though.

Now the only thing we’re running on x86 is Sentry and I’ll stop self hosting that when I get a spare moment because it’s more of a beast to run than I like.

aidos··on What's new in the Postgres 16 query planner
We hit a curios bug recently on production with the JIT.

I had apt updated a couple of packages and then all of a sudden a bigger query we run every 5 minutes was failing. Or rather, Postgres just started silently hanging up the connection mid query execution with even putting anything in the logs.

Took me a while of running manually in explain to see that the variations of the query that ended up using the JIT broke while those that didn’t were ok. Disabled the JIT and everything was ok again.

aidos··on Hold on there: WPA3 connections fail after 11 hours
To follow up, I moved the device to be right near the access point and it worked ok. So now I need to figure out what I’m going to do when it’s in situ…
aidos··on Hold on there: WPA3 connections fail after 11 hours
Thanks. Will try moving to about to see how it goes.
aidos··on Hold on there: WPA3 connections fail after 11 hours
Question for those with more experience - I’ve just purchased a Pi Zero 2 and I’ve been having real issues with the WiFi since I opened the box. Is it likely a faulty device?
aidos··on We migrated our PostgreSQL database with 11 seconds downtime
I love that where the rubber meets the road it doesn’t matter if you’re a government organisation or a web agency, it’s still just plain old Postgres, python, sqlalchemy and dns with a low ttl.
aidos··on Automatic class sorting with Prettier (2022)
Sorry, I meant what order does this is linter do it in?

I’m well aware of how css works, I’ve been here since we did table layouts with shims!

aidos··on Automatic class sorting with Prettier (2022)
Interesting idea. I’ve seen people get very confused by thinking that adding them in a certain order to the element would give some sort of control.

Which order do they do it in? Later classes are later in the css so more likely to be applied?

aidos··on (Unsuccessfully) Fine-tuning GPT to play "Connections"
The format in the show it’s lifted from (Only Connect - greatest game show ever) is that the teams have 2 minutes total to solve the “connecting wall”. They can have as many guesses as they want until they solve the first two groups - after that it’s 3 strikes and you’re out.
aidos··on He spent his life building a $1M stereo
Can I ask what you ended up buying?
aidos··on What I learned selling my company
Not to diminish your point, but you’ve described the UK housing market where that’s exactly how it works.
aidos··on Uber and Lyft paid SFO about $50M last year
$50M at $5.50 per trip means over 17 trips per minute every minute of the year. That’s pretty wild.
aidos··on Show HN: Marimo – an open-source reactive notebook for Python
Haha. Ok. I think that’s where we’re just going to have to agree to disagree.
aidos··on Show HN: Marimo – an open-source reactive notebook for Python
Ok. I think that’s all handled by my workflow, but it does involve taking responsibility for requirements files.

If I want to install something, I pip install and then add the explicit version to the base. I can then freeze the current state to requirements to lock in all the sub dependencies.

It’s a bit manual (though you only need a couple of cli commands) but it’s simple and robust.

aidos··on Show HN: Marimo – an open-source reactive notebook for Python
I don’t understand the platform thing, is that something to do with running on Windows? Why wouldn’t you just pip install? Why bring conda etc into the mix?

If you have conflicts then you have to reconcile those at point of initial install - pip deals with that for you. I’ve never had a situation in 15 years of Python packages where there wasn’t a working combination of versions.

These are genuine questions btw. I see these common complaints and wonder how I’ve not ever had issues with it.

aidos··on Show HN: Marimo – an open-source reactive notebook for Python
People always complain about pip and python packaging but it’s never been an issue for me. I create a requirements.base.txt that has the versions of things I want installed. I then:

    pip freeze -r requirements.base.txt > requirements.txt
Install is then simply:

    pip install -r requirements.txt
Updating / installing something new is a matter of adding to the base file and then refreezing.
aidos··on Spot the bug in this Python code (2023)
I'll stick to DIY analogies, since it appears to speak to us.

In this case the author is using a tool for operating on lists on a thing that's not a list.

It's like they're trying to use a track / plunge saw for cross-cutting a single 2x4. You can do it, but you'll need to rig up some scaffolding (a list) around it in order for the track to have something to balance on. Meanwhile there's a circular saw and a speed square next to you on the table.

aidos··on Spot the bug in this Python code (2023)
The Python interpreter as acting totally sanely.

The author is asking it to loop over a list (or any iterable) and destructure each of the elements. But is then providing a a list containing some strings, none of which can be destructured.

Reducing to just the second part of the loop:

    [(x, z) for x, _, z, *_ in ["0x2d41854", "3", "0x80001a14", "(0xbffd)"]]
IE in non-list-comprehension form:

    for x, _, z, *_ in ["0x2d41854", "3", "0x80001a14", "(0xbffd)"]:
IE, the first element is expanded as:

    x, _, z, *_ = "0x2d41854"
Which is clearly nonsensical.
aidos··on Spot the bug in this Python code (2023)
An aversion to using something beyond the stdlib for no good reason probably. Personally I've seen people reach for pandas only to accidentally coerce data in non-obvious ways. Clearly it depends on what you're planning on doing with the data afterwards though.

    import csv
    with open(filename, 'r') as f:
        r = csv.reader(f)
        for row in r:
            tsc, _, pc, *_ = row
            print(int(tsc, 16), int(pc, 16))
aidos··on Japan's airport control towers stop using 'No.1' instruction for plane takeoffs
Is that meant to sound less like “fire”??
aidos··on DNS Toys (2022)
Oh interesting - those circumferences are actually closer than I assumed they would be!
aidos··on Fortran vs Python: The counter-intuitive rise of Python in scientific computing (2020)
I’m confused by seeing talk of vectorisation next to example code full of for loops
aidos··on How Open ID Connect Works
I had a look at this recently and the pricing was pretty wild. Am I right in understanding that the connection charge is effectively per organisation?
aidos··on 1D Pac-Man
1274, so yes.
aidos··on Liero – Sling'n'shoot Worms Game
I loved Scorched Earth! Don’t know anyone else who ever played it.
aidos··on IDEs we had 30 years ago
My understanding follows (I don’t use it but I’ve noticed the processes running on other people’s machines). Corrections welcome.

It’s split into a client (web frontend) and server that’s doing all the work. The server can be run anywhere but it’s effectively a bunch of stuff installed in a docker container. When you start an instance for a project, it creates a container for that instance with all the code folders etc bound in. LSPs are running in that container too.

It’s possible to use your own image as a base (you might have custom deps that make installing the requirements for an LSP hard, for example).

The trick they use here is that there’s some base container/volume that has most of the server stuff downloaded and rest to go. Whether you start a normal instance or from a custom image they do it the same way by just mounting this shared volume and installing what they need to bootstrap the server.

It also appears they create a frontend window per server process too. So the master client process starts, you select a project folder, they create a new server container and a new client window connected to it. The frontend client is local while each server can be anywhere (obviously you could run the client with X if you wanted to further muddy that).

aidos··on Stirling-PDF: local web application to perform various operations on PDFs
Something like this is probably a good starting point:

    ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
From this gist https://gist.github.com/guifromrio/6390547#
← PreviousPage 8 of 34Next →