Hacker News new | ask | show | jobs
by pawelkowal 4085 days ago
> Erlang's module system means that a chunk of the raison d'etre behind language-specific package managers is already alleviated.

Sure, modules provide a way to "package" functions, but that is 5% of what a package manager does. Being able to distribute, fetch and do dependency resolution is certainly the bulk of it.

I definitely prefer my deployments to rely on packages than fetching git repositories from Github and Bitbucket. There are recent discussions in Erlang mailing list regarding packages and the OTP team (the team behind Erlang) is looking into package managers too.

> The rest - dependency management and building, is handled quite well by tools like Rebar.

Sorry, Rebar does not handle dependencies well. Rebar does not even guarantee repeatable builds. Once I fetch dependencies on my machine, my co-worker can end-up with versions different than mine and that is dependency management 101.

Rebar 3 seems to improve in this area but is still alpha. erlang.mk idea of package manager is a file on github in tsv format (and still no repeatable builds).

> Unicode handling? I think this might be a knock on Erlang's string handling.

Erlang needs better unicode support, regardless of using lists or binaries. Strings support only latin1 in literal format. If I want to write my name as a binary, it needs to be written as <<"paweł"/utf8>>. This is nowhere close to acceptable to anyone that has to write strings in formats other than latin1.

Things are getting better in Erlang 18 but there won't be any conveniences for handling unicode. There is no function to calculate the grapheme length (essential if you want to support languages like japanese or korean and do a size validation on an input), to convert to lowercase/uppercase and so on. Be it if the underlying representation is a list or a binary.

2 comments

> Sure, modules provide a way to "package" functions, but that is 5% of what a package manager does. Being able to distribute, fetch and do dependency resolution is certainly the bulk of it.

Please God the Erlang/Elixir community don't invent another package manager. Pip, easy_install, gem, npm, composer, bundler, bower, maven and all the others I don't know about - we've got enough as users to remember the variations in syntax for. Let alone the duplication of effort in developing and maintaining the package managers, when their clever creators could be working on other problems.

You're too late ;)

Maybe someday someone will just create one package manager to rule them all, one that's not tied to a specific language, but can instead manage anything running on your computer.

Oh, wait.

Rebar does not even guarantee repeatable builds

I think you're setting the bar a little high there. Reproducible builds is something that most package managers, OS and language-specific alike, struggle with to this day. Only Nix and Guix have complete solutions, I think.

Certainly Rubygems+Bundler in Ruby does it, as well as Mix in Elixir. npm in node.js may even do it due to its weird require system but I am not sure.