Readit News logoReadit News
larkost commented on Getting decent error reports in Bash when you're using 'set -e'   utcc.utoronto.ca/~cks/spa... · Posted by u/zdw
imcritic · a month ago
larkost · a month ago
I have never liked this statement of the problem.

It is not that `set -e` is bad, it is that bash is a bit weird in this area and you have to know when things eat errors and when they don't. This is not really changed by `set -e`: you already had to know them to make safe code. `set -e` does not wave a magic wand saying you don't have to understand bash error control.

But having `set -e` is almost universally better for people who do not understand it (and I would argue also for people who do). Without it you are responsible for implementing error handling on almost every line.

As other have already said: this is one of those things that generally pushes me to other languages (in my case often Python), as the error handling is much more intuitive, and much less tricky to get right.

larkost commented on Pa. House passes 'click-to-cancel' subscription bills   pennlive.com/news/2025/07... · Posted by u/bikenaga
aspenmayer · a month ago
Instructions unclear? Do I move to California before or after I cancel my subscription(s)?
larkost · a month ago
I think in this case you just need to change your mailing address with them. There is a California law (and from other comments it looks like 4 other states) that requires them to allow easy cancelations to CA residents. And since it is probably too much work for them to prove you are a CA resident, they just have the logic check if your address is in CA to enable the online cancelation (since they have online signup)
larkost commented on Linda Yaccarino is leaving X   nytimes.com/2025/07/09/te... · Posted by u/donohoe
greedo · 2 months ago
Witness his entire Boring Company being a sock puppet project to derail California's High Speed Rail system.
larkost · 2 months ago
Can you provide more about this idea? I see the Boring company as being pretty feckless, and at the same time extremely boastful. They have gotten hopes up in a number of places about solving city traffic problems, only to go dark when the rubber (should have) met the road.

But I don't see any of those having impacted the California High Speed Rail. Rather that has been harmed by lots of different groups throwing roadblocks up, sometime for ideological reasons (lots of this from State and National Republicans, sometimes with reasons, but often more political), and a whole lot of NIMBY (see: Palo Alto). What do you see the Boring Company having to do with that?

As a side note: there are some really poorly thought through parts of the project, for example they don't have a plan for actually making it over the mountains into Los Angeles. I still want it to happen, but...

larkost commented on uv: An extremely fast Python package and project manager, written in Rust   github.com/astral-sh/uv... · Posted by u/chirau
larkost · 2 months ago
Just a warning in case others run into it: on very anemic systems (e.g.: AWS T2.micro running Windows, yes... I know...) uv will try to open too many simultaneous downloads, overloading things, resulting in timeouts.

You can use ent ENV variable UV_CONCURRENT_DOWNLOADS to limit this. In my case it needed to be 1 or 2. Anything else would cause timeouts.

An extreme case, I know, but I think that uv is too aggressive here (a download thread for every module). And should use aggregate speeds from each source server as a way of auto-tuning per-server threading.

larkost commented on Working on databases from prison   turso.tech/blog/working-o... · Posted by u/dvektor
freedomben · 2 months ago
I don't disagree that 40 cents an hour is ludicrous and is only one notch above slavery, but I do think it worth pointing out that the work for 40 cents per hour is voluntary (i.e. they can quit or choose not to accept the work), whereas "slavery" is very much not.
larkost · 2 months ago
In many cases the work is not really voluntary, there are sanctions for not taking it. Prisoners in some states are regularly put into solitary confinement for not "volunteering" to work these jobs (a punishment that some areas deem torture). With that amount of coercion I can't see them as voluntary, and so the slavery label is awfully close to the mark.
larkost commented on Pope Francis has died   reuters.com/world/pope-fr... · Posted by u/phillipharris
rglullis · 4 months ago
> There’s that one line.

And centuries of liberal democracies where the church was just one institution that had no direct rule over its subjects?

larkost · 4 months ago
The word "direct" is carrying an awful lot of weight in that sentence. The Catholic Church (as well as the Protestant and others) are very responsible for, or at least implicated in, many horrible things in the last few hundred years alone: - signed off on the slave trade for hundreds of years (even gave excuses about how that was God's will) - during World War II they promised to hide many Jewish children, only to subsequently steal them from their parents arguing that "they are now Christian, it would be a sin to give them to Jews" - the inquisitions - were the justification for so many wars (conversion by the sword) - have long been a tool of repressive governments, arguing that it fell under "obey your father" - in the U.S. many churches, including the Catholic Church have preached that voting for one party (Democrats) is a sin (often about abortion, but other topics have been raised)

In general, the Church's political power has waned over the last 500 years or so, but there are an awful lot of calls from Republicans saying that this is where we have gone wrong.

One only look to the political donations of Opes Dei (Catholic branch dedicated to getting Cristian influence over the "Lay" sphere) to see them as major power players today. The Heritage Foundation (main writers of Project 2025) are intimately bound with the organization. And Chief Justice Roberts is also associated.

So they may not be "direct" rulers, they are major power players.

larkost commented on Turso SQLite Offline Sync Public Beta   turso.tech/blog/turso-off... · Posted by u/charlieirish
bob1029 · 5 months ago
Conflict resolution can't work in a general sense.

How you reconcile many copies of the same record could depend on time of action, server location, authority level of the user, causality between certain business events, enabled account features, prior phase of the moon, etc.

Whether or not offline sync can even work is very much a domain specific concern. You need to talk to the business about the pros & cons first. For example, they might not like the semantics regarding merchant terminals and offline processing. I can already hear the "what if the terminal never comes back online?" afternoon meeting arising out of that one.

larkost · 5 months ago
CFRDT (Conflict Free Replicated Data Types) can absolutely reconcile many-writers situations. There are a number of these systems, and they all have their own rules around that replication (sometimes very complicated rules that are hard to reason about). As long as you can live inside those rules, and accept that they are going to have sharp corners that don't quite make sense for your use case, then you can get a virtually free lunch there.

But living inside of those rules (and sometimes just understanding those rules) can be a big ask in some situations, so you have to know what you are doing.

larkost commented on Thinner Films Conduct Better Than Copper   spectrum.ieee.org/thin-fi... · Posted by u/rbanffy
larkost · 5 months ago
The linked article does not go into many details about what they are measuring. So I have to wonder: could this property be used to make thinner wires for conducting electricity in bulk (e.g.: hosing wires, or transmission lines) by stacking lots of very thin layers into a cable. I imagine there would be a good amount of development work to make manufacturing such a layered cable, so it would not be right around the corner. But is there any physical barrier to such a development?
larkost commented on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale   rivet.gg/blog/2025-02-16-... · Posted by u/PaulHoule
lbutler · 6 months ago
I’m building a local-first web app, and SQLite works well for my case since a single project can be contained in one database file, just like users are used to with existing desktop applications.

What I’d really like is an easy way to sync the SQLite database state to a cloud service. Most existing options expect you to query against a remotely hosted database and charge per read/write.

Since the database will have around 100,000 rows and you're typically working with all the data at once, streaming parts of it doesn’t make sense for my use case.

The closest I’ve found is Turso, which has offline writes in private beta, and SQLite Cloud, which lists local-first and offline sync as "coming soon."

The simplest approach might be letting users push to S3 storage with versioning. Ideally, it would also support point-in-time restores, tracking incremental updates alongside full snapshots.

Even better, I’d manage minimal server-side infrastructure and just pull the SQLite database from a service that handles syncing and management.

larkost · 6 months ago
I too think that CRDT databases are probably something you should explore. You generally have the whole database locally, and changes get synced pretty easily (but you have to live within the rules of your CRDT).

The one I thought of (mostly because I worked there before they went under/bought by MongoDB) is RealmDB: https://en.wikipedia.org/wiki/Realm_(database)

I have long since lost touch with the state of it, but at the time the syncing to their server was fast and had worked with a long list of environments/languages.

The one thing I will caution: their model was that you almost had to have a database-per-customer. You could have a second one that contained common information, but they had no concept of only syncing part of a database based on some logic. So many customer implications had the clients syncing multiple databases, and then a back-end client that would aggregate the data from all of those databases into one for backend processes. Extra complexity that I always thought was a real killer.

larkost commented on DOGE has 'god mode' access to government data   theatlantic.com/technolog... · Posted by u/perihelions
smallmancontrov · 6 months ago
No, loudly broadcasting the heavy-handed implication that you have found $100B in fraud without having found $100B in fraud is still bad, even if the 1/1000th that they did find (I'm being generous here) is real and goes into tax cuts / debt.

Also, the capital gains taxes ARE low and the income taxes ARE high, so just paying down the debt isn't nearly so "even-handed" as it seems.

larkost · 6 months ago
While I agree with you on the opinion that capital gains taxes are low (I should not be paying less on my winnings from bets on the stock market than I am on the income from my work). I think you need to justify the opinion that income taxes are high.

Personal income taxes are the larges revenue source for the U.S. Government, so it is the main way we have decided to tax ourselves. Arguably it is one of the most steerable, and we have long health that progressive taxation is for the common good (as much of a mockery as some high-income individuals have made of that).

So with that as the background, the U.S. ranks towards the bottom of the OCED countries in taxes vs. GDP. Yes we get less than the citizens of the countries paying the most, but not that much less.

https://taxpolicycenter.org/briefing-book/how-do-us-taxes-co...

u/larkost

KarmaCake day689July 16, 2015View Original