Live data from Hacker News

Ending Dependency Chaos: A Proposal for Comprehensive Function Versioning

github.com

11–20 of 57 posts

Re: Ending Dependency Chaos: A Proposal for Comprehensive Function Versioning

#11
post #8

I agree, it would be nice to have a refactoring workflow that every program modification only creates new functions, never changes existing ones. Then we could get automated testing of new functions against old functions, or even, automated proof that the change doesn't affect the result.

Purely-functional data structures are known for quite some time [1]. I can imagine that the very same approaches can be used to organize functions (the whole interdependency graphs of them), so that an update produces a new version with relevant parts changed, while the previous version remains there, completely unchanged. An IDE, or some other language tool, can fully automate the necessary legwork.

(It will of course also take some garbage collection mechanism to eventually remove old, disused versions when nobody depends on them any more.)

[1]: https://en.wikipedia.org/wiki/Purely_functional_data_structu...

Re: Ending Dependency Chaos: A Proposal for Comprehensive Function Versioning

#14
I don’t think the proposal helps as it puts more burden on package maintainers (honourable semvar for the whole package is burden enough!).

The problem is in NPM culture, and how much churn there is in packages and especially unnecessary breaking changes.

Avoid that and then the problem is reduced from constantly fighting to play API keepup to simply letting security updates flow through.

Let your patch version number go to the moon (which is no real problem practically, computers do big numbers and it is auto automatable.)

Re: Ending Dependency Chaos: A Proposal for Comprehensive Function Versioning

#15

I don’t think the proposal helps as it puts more burden on package maintainers (honourable semvar for the whole package is burden enough!). The problem is in NPM culture, and how much churn there is in packages and especially unnecessary breaking changes. Avoid that and then the problem is reduced from constantly fighting to play API keepup to simply letting security updates flow through. Let your patch version numbe…

> semvar

It's "semver" (with an "e"), short for Semantic Versioning.

https://semver.org/

Re: Ending Dependency Chaos: A Proposal for Comprehensive Function Versioning

#16
post #7

What if the functions modify some type of external state. E.g. in TypeScript, what if a module property is updated by one function and referenced in a different function? How would two functions share the same state if they were at different versions?

What's missing there is dependency between functions, between data / types and functions, and versioning of data / types themselves.

Once a node in this graph (a function, a type) changes, it may require a version change of anything that depend on it (a function, a type), because the behavior / contract may materially change even if the code itself did not change!

I suppose this is handled by changing the module version, because that module likely also contains the stateful object whose behavior is now different.

But equally the module version should change once its dependencies change, because the summary behavior of the functions inside the module is now different, as it incorporates the changed behavior of its dependencies.

Because of that I suspect we'll end up with situation similar to today's, with constant updates of our dependencies because their (distant transitive) dependencies changed.

Theoretically we could track dependencies on an individual function level. Then the version o a function may stay the same even if its module's dependencies have changed, because we can prove that these changes did not reflect on the function in any way. I don't think it's realistic for Typescript specifically though, and I don't think it would bring much practical benefit.

Re: Ending Dependency Chaos: A Proposal for Comprehensive Function Versioning

#17

I don’t think the proposal helps as it puts more burden on package maintainers (honourable semvar for the whole package is burden enough!). The problem is in NPM culture, and how much churn there is in packages and especially unnecessary breaking changes. Avoid that and then the problem is reduced from constantly fighting to play API keepup to simply letting security updates flow through. Let your patch version numbe…

> The problem is in NPM culture, and how much churn there is in packages and especially unnecessary breaking changes.

This is a human culture problem if anything. Things cannot be left alone and be called "done" anymore, everything has to constantly "improve", breakage be damned. New connectors HAVE to be invented, even though the improvements are marginal, and now everything "old" doesn't work anymore.

How many times haven't you opened up a tool you use daily/weekly and suddenly the UI has shifted in ways so you cannot understand how to do the task you were supposed to do?

With SaaS, this has become much more prevalent than before. And it's not just the "npm culture" or even JavaScript, this exists everywhere in society, from cars to doors to chairs to airplanes and everything in-between. Obviously, some sectors are better with standards than others, but seems to be happening more and more, everywhere.

Re: Ending Dependency Chaos: A Proposal for Comprehensive Function Versioning

#18
post #4
post #2

TL;DR (by ChatGPT) Stopped reading there.

You stopped reading because the author used ChatGPT to create a summary of an article they wrote themselves? This may actually be the best use case for ChatGPT.

Depending on how exactly you mean use, I would not say so, because chatgpt cannot actually summarize anything.

In this case it may be ok because we may assume the author looked over the result and agrees with it. They could remove the citation as far as I'm concerned, the same way they don't have to cite their spell checker.

But a summary is a distillation of an understanding.

chatgpt does not understand anything, it is merely pattern-matching against and recomposing other texts.

The only reason the result is even half way sensible is because as of today, most other text that it is matching against and recomposing was written by people who did understand what they were writing and writing about.

So I would perhaps agree that a person using it as part of the process of their own writing is a good use case. But I would not agree that chatgpt can summarize things, and would not say that letting it do the entire job of interpreting and restating is a good use case.

Re: Ending Dependency Chaos: A Proposal for Comprehensive Function Versioning

#19
post #4
post #2

TL;DR (by ChatGPT) Stopped reading there.

You stopped reading because the author used ChatGPT to create a summary of an article they wrote themselves? This may actually be the best use case for ChatGPT.

Without saying one thing or another about the bots ability or propriety, I'd still argue that if the burden of summarizing succinctly something you wrote is so great that you need to pull out high-powered AI technology to do it, you should probably should spend some more time thinking about what you are writing.

Who cares about pure velocity if you are really trying to communicate something? We shouldn't measure written word by pure word count, or how quickly you can ship it. Not everything needs to be just some kind of hyper-advertising.

Just gives the impression they only care so much about what they wrote, that they only care so much about their readers!

Re: Ending Dependency Chaos: A Proposal for Comprehensive Function Versioning

#20
It good people are thinking about this problem, but this proposal doesn't address some fundamental issues. E.g,

- why developers/maintainers choose the package granularity they currently do. e.g., you can have tiny granular packages today (npm famously has single-simple-function packages, which is widely derided, BTW). Developers break down packages in a way that makes sense to them to best develop, test, maintain, and release the package. If you reduce the overhead of a small "grains" of package, developers might choose to go a little more granular, but not a lot.

- why people want or need to update. People want or need security updates. People want or need new features and functionality.

So even with this magically fully in-place (there's some tooling implied here), I don't think there would be much impact on updating.

(And people who tried to implement it or use packages that implemented it would be getting burned by version update mistakes -- this seems almost pathologically error-prone -- and when something does go wrong, it will take some new class of tool to even diagnose what went wrong where. People will end up with issues triggered by their personal upgrade path.)

BTW, patch updated don't have to be done at a source or function level at all. (e.g. upgrade from version x to x+1 could be expressed as a delta. Or x to x + 2 for that matter.) This has been popping up for decades, but it seems the practical value must not be worth the trouble because it doesn't seem to catch on in a big way.

Post reply on HN