tonsky

Joined 12 years ago

Karma
113
Submissions
126
Member since
Apr 25
https://tonsky.me/ https://mastodon.online/@nikitonsky
View on Hacker News

Recent submissions

Comment · 1 year ago
Maven's version resolution mechanism determines which version of a dependency to use when multiple versions are specified in a project's dependency tree. Here's how it works:

- Nearest Definition Wins: When multiple versions of the same dependency appear in the dependency tree, the version closest to your project in the tree will be used.

- First Declaration Wins: If two versions of the same dependency are at the same depth in the tree, the first one declared in the POM will be used.

Comment · 1 year ago
> I’d love to lock my library to numpy 2.3.4, but if the developers of another library pin theirs to 2.3.5 then game over.

Why? Can’t you specify which version to use?

Comment · 1 year ago
> would fail in languages like Python where dependencies are shared

And yet Java and Maven exist...

Comment · 1 year ago
I updated the post, see near the bottom
Comment · 1 year ago
Yeah but version ranges are fiction. Some says: we require libpupa 0.2.0+. Sure you can find a version in that range. But what if it doesn’t work? How can you know that your library will work with all the future libpupa releases in advance?
Comment · 1 year ago
I worked for 20 years in an ecosystem that didn’t have lockfiles and had reproducible builds before the term was invented, and now you come and tell me that it couldn’t be?
Comment · 1 year ago
> Lockfiles are essential for somewhat reproducible builds.

No they are not. Fully reproducible builds have existed without lockfiles for decades

Comment · 1 year ago
One of the versions will be picked up. If that version doesn’t work, you can try another one. The process is exactly the same
Comment · 1 year ago
It’s totally fine in Maven, no need to rebuild or repackage anything. You just override version of libinsecure in your pom.xml and it uses the version you told it to
Comment · 1 year ago
Clojure Electric is different. It’s not really a sync, it’s more of a thin client. It relies of having fast connection to server at all times, and re-fetches everything all the time. They innovation is that they found a really, really ergonomic way to do it
Comment · 1 year ago
If you think of an existing database, like Postgres, sure. It’s not very convenient.

What I am saying is, in a perfect world, database and server will be the one and run code _and_ data at the same time. There’s really no good reason why they are separated, and it causes a lot of inconveniences right now.

Comment · 1 year ago
Ah, no. Not really. People sometimes think about conflict resolution as a problem that needs to be solved. But it’s not solvable, not really. It’s part of the domain, it’s not going anywhere, it’s irreducible complexity.

You _will_ have conflicts (because your app is distributed and there are concurrent writes). They will happen on semantic level, so only you (app developer) _will_ be able to solve them. Database (or any other magical tool) can’t do it for you.

Another misconception is that conflict resolution needs to be “solved” perfectly before any progress can be made. That is not true as well. You might have unhandled conflicts in your system and still have a working, useful, successful product. Conflicts might be rare, insignificant, or people (your users) will just correct for/work around them.

I am not saying “drop data on the floor”, of course, if you can help it. But try not to overthink it, either.

Comment · 1 year ago
> There's no such thing as reliable network in the world

I’m not saying there is

Comment · 1 year ago
- You can have many sync engines

- Sync engines might only solve small and medium scale, that would be a huge win even without large scale

Comment · 1 year ago
It’s not as simple as you make it sound:

- Reliable communication is hard - Optimistic writes should on client are hard - Tracking subsets of data is hard (you don't want the entirety of Datomic on the client, do you?) - Permissions are hard in this model

Why didn't I implement it? Mostly comes down to free time. It's a hobby project and it's hard to find time for it. I also stopped writing web apps so immediate pressure for this went away.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton