Live data from Hacker News

The fundamental problem of programming language package management

blog.ezyang.com

31–40 of 73 posts

Re: The fundamental problem of programming language package management

#31

Earlier quoted context omitted.

Yes! The Haskell community has been using Nix to great effect and I would like to see other programmers catch on as well. Here is a great talk about using Nix targeted at Python programmers: http://pyvideo.org/video/3036/rethinking-packaging-developme... In addition to Nix, there is also a newer project: GNU Guix. Guix is built on top of Nix but replaces the custom package configuration language with Scheme, among ot…

You could of course use a platform that doesn't depend on OS dependent binaries (like the JVM) and a package manager that likes ad-hoc and easily created repositories and that has lots of plugins available (Maven, or derivates like Gradle, SBT or Leiningen). I worked with a lot of platforms, such as PHP, Perl, Ruby, Python, Node.js and .NET. I felt the pain of pip, easy_install, setup-tools, virtualenv, bundler, gems…

>You could of course use a platform that doesn't depend on OS dependent binaries (like the JVM) and a package manager that likes ad-hoc and easily created repositories and that has lots of plugins available (Maven, or derivates like Gradle, SBT or Leiningen).

I don't think being locked into the JVM is a very good solution. Java libraries can depend on other non-Java components.

Re: The fundamental problem of programming language package management

#33

The downside he mentions to "pinned versions" actually applies to everything on this page. If you don't pay attention to security updates, you will be vulnerable whether or you forgot about your pinned versions or you forgot about your stable distribution. "Stable" distributions have an additional downside he doesn't mention: when you upgrade every package all at once it's a LOT more effort than if you had upgraded t…

> Dealing with multiple library changes at once is an order of magnitude more difficult than dealing with them one-at-a-time. From my experience exactly the opposite is true. Compare uprading Slackware to keeping an Arch Linux running. With Slackware, I have to sit down for an hour, do the upgrade, read the notices that come along with it, maybe see if it will break any of my custom packages. This happes once or twic…

What I'm advocating is not analogous to the ArchLinux model, partly because I don't think we should stop supporting old versions and I don't think upgrades should be essentially required the moment something is release.

I'm fine with having the odd out of date version of something, I'm just saying: be incremental about keeping your stuff up to date.

Re: The fundamental problem of programming language package management

#34
Completely misses the real fundamental problem: people make assumptions about their target. Almost all of this discussion is centered around Linux systems. What about Windows? What about Solaris? HPUX? AIX? VMS? Tru64? Plan9? BeOS? Android?

Package management itself is not a solved problem, so you can't very well expect programming languages to be any different. The existing systems work quite well and make total sense: your package manager is tailored to your specific use case. Centralized/decentralized is a red herring. First figure out how to package every single thing for every single system and use case in the world, and then come back to me about organizational systems.

Re: The fundamental problem of programming language package management

#35

Just by reading the title I expected this would be about fixing the dependency diamond problem. I.e. when library A needs library C 1.0 and B needs library C 1.1 incompatible with C 1.0 and then libraries A and B meet in the same project :(

The author is actually working on implementing a solution to that in ghc/cabal as well!

Re: The fundamental problem of programming language package management

#36
post #25

This topic reminded me of some very interesting thoughts from Joe Armstrong, that I remember seeing posted somewhere (HN?) some time ago -- "Why do we need modules at all?": [...] The basic idea is - do away with modules - all functions have unique distinct names - all functions have (lots of) meta data - all functions go into a global (searchable) Key-value database - we need letrec - contribution to open source can…

I already deal with a large library of functions like that, and it's totally mind-numbing. I had to create tools just to try to group the functions in different ways so I could figure out if there was anything like what I wanted to use, what it was called, and how to use it.

Modules and sub-module hierarchy offers a greater, simpler organizational methodology.

Re: The fundamental problem of programming language package management

#37
post #8

Every program with plugins of any sort will eventually include a sketchy rewrite of apt-get. Not just languages - WordPress, MediaWiki ... If you're very lucky, the packaging in question will not conflict horribly with apt or yum. So you probably won't be lucky.

As if apt-get would solve the problems that we have. Good luck in installing multiple versions of the same package with apt-get.

Inability to install multiple versions of the same package can be a feature. It encourages the creation of stable, backwards-compatible packages.

Re: The fundamental problem of programming language package management

#38
post #24

> The Git of package management doesn't exist yet We've taken a pretty good shot at this in the OCaml ecosystem the via OPAM package manager ( https://opam.ocaml.org ). * OPAM composes its package universe from a collection of remotes, which can be fetched either via HTTP(S), Git, Hg or Darcs. The resulting package sets are combined locally into one view, but can be separated easily. For instance, getting a view into…

I am a Haskell programmer who got to use OPAM when installing Coq (HoTT version) recently. It was surprisingly nice.

Also, you can pick which version of the compiler to run, and have it manage switching everything.

It seemed like it was years ahead of cabal, but that might just be because I only used it a little, I don't know. But there are some things to learn from OPAM.

Do you have a blog post like this, or something I could post the the Haskell subreddit?

Re: The fundamental problem of programming language package management

#39

Nix, NixOS, Nix ... a thousand times Nix. I can't believe the article doesn't mention it. I've been using NixOS as my OS for development, desktop and we're in the middle of transitioning to using it for production deployments too. Nix (the package manager not the distribution) solves so many of the discussed problems. And NixOS (the linux distribution) ties it all together so cleanly. I keep my own fork of the Nixpkg…

I would be very interested in reading a detailed post about your experiences with Nix/NixOS.

I've been hearing a lot about this project, but I always thought it was just an academic experiment. I'm in the process of packaging and maintaining a Python+Javascript+Redis+PostgreSQL application and Nix certainly is something I should learn more about.

Re: The fundamental problem of programming language package management

#40
post #25

This topic reminded me of some very interesting thoughts from Joe Armstrong, that I remember seeing posted somewhere (HN?) some time ago -- "Why do we need modules at all?": [...] The basic idea is - do away with modules - all functions have unique distinct names - all functions have (lots of) meta data - all functions go into a global (searchable) Key-value database - we need letrec - contribution to open source can…

> - all functions have unique distinct names

Seriously? Is that his solution to package management?

Post reply on HN