News for hackers. Stuff that matters.
Re:Unison Programming Language by torginus on Sunday June 27, 2021 @03:05PM (#27654266)
You are right - but choosing the correct solution imho needs to be done with human oversight - I think a semver based dependency resolution works great here, for example if bar requires foo 1.0 and baz needs 1.0.1 they will happily use the same version, but if baz used foo 1.1 they would use the separate ones.
Re:Unison Programming Language by lamontcg on Sunday June 27, 2021 @03:28PM (#27654486)
Except 1.0.1 can fix a bug that one piece of code needs, while another piece of code can be happily bug dependent upon it.

You can scream at the developers that they've violated semver but a "bugfix" is entirely subjective (relevant xkcd, spacebar heating, etc).

And even when developers violate semver in a point release the problem still exists. They actually rarely, if ever, rollback with a 1.0.2 that is equivalent to 1.0.0 and instead usually move forwards.

And if you have a language that supports loading 1.0 and 1.1 then there's no point in being artificially constrained over which two versions can be loaded at the same time based on the label, the underlying framework shouldn't be built to care. There's no need for a multi-version library loader to care about what a bugfix is.

Re:Unison Programming Language by slver on Sunday June 27, 2021 @04:46PM (#27655151)
SemVer remains a pragmatic approach that works in vast amount of cases. It’s unclear what alternative we have here which works in more cases.
Re:Unison Programming Language by lamontcg on Sunday June 27, 2021 @05:19PM (#27655499)
We don't have any better alternative, but lets not be naive about it when it comes to building bits of framework.

Semver would just be an artificial impediment at this level.

Re:Unison Programming Language by slver on Sunday June 27, 2021 @06:00PM (#27655872)
SemVer is an impediment only if you insist to make it so.
Re:Unison Programming Language by jonahx on Monday June 28, 2021 @01:06AM (#27658302)
Go takes an alternative approach:

https://www.youtube.com/watch?v=wWApoImHuf8

Re:Unison Programming Language by slver on Tuesday June 29, 2021 @02:04PM (#27679523)
That's not a new idea, I also put the version in my package name, so that you can use v1.x with v2.x etc.

It doesn't contradict SemVer.

However when you do that, it becomes a big deal to jump from one version to another even if the breaks are minor. So pros and cons.

Re:Unison Programming Language by uncomputation on Monday June 28, 2021 @03:43AM (#27659083)
(Mentioned xkcd: https://xkcd.com/1172/)
Re:Unison Programming Language by fastball on Sunday June 27, 2021 @04:08PM (#27654830)
I think another key idea is that you're still thinking about libraries as complete packages where you kinda install two versions of the same thing. But it seems more likely in the Unison ecosystem that you'd end up with the ability to much more easily only extract the specific functions you need.

So say there is v1 and v2 of a utility lib in my dep tree, but actually only using func A from v1 and func B from v2. Then I just have the AST of v1.A and v2.B in my deps and everything works.

Re:Unison Programming Language by Nullabillity on Sunday June 27, 2021 @04:28PM (#27654983)
You still need some unit of atomicity to be able to maintain invariants. You can't combine HashMap_LinearProbe::insert with HashMap_Chains::remove, because they both depend on implementation details in order to maintain HashMap's invariants.