tags:

views:

206

answers:

4

Do you use CEAN, copy the source and compile them, copy the BEAM files, or something else. I need to distribute some Erlang code and I'm not sure which to choose.

+1  A: 

I package them on a Debian repository on Launchpad.

jldupont
I never heard of LaunchPad before. I went to the link you included but it is not obvious what launchpad does, or even how to add your libraries to my Erlang setup. I guess I need to install Debian to make use of it :)
Zubair
I use Ubuntu myself.
jldupont
So what do I to install your code? Is it apt-get?
Zubair
You follow the instructions on page https://launchpad.net/~jldupont/+archive/jldupont to add the PPA to your Ubuntu `sources` and then just use `apt-get` as usual.
jldupont
Ok, thanks. Just out of interest why did you add this PPA thing (which I had never heard of until now) and just do something like:apt-get install APPNAME?
Zubair
I like the convenience of managed repository e.g. takes care of dependencies.
jldupont
But canonical has their own "Canonical managed repository". Why not use that, or am I missing the point here?
Zubair
I don't know about "Canonical managed repository".
jldupont
+3  A: 

I clone the git repository, build it, and add the directory to my ERL_LIBS path. I hack the source for my private customizations. For those commits that are sensible, I publish.

I am a much happier developer after finding git and being able to manage my own changes and still be able to get upstream changes that I can rebase my stuff on.

I realize that this looks raw for end users, but I am my own end user.

If I would ship something to other end users I would look into using .ez zip archive files that the erlang code loader can use. See section "Loading of Code From Archive Files" on that page. Then provide a script that invokes erl with the correct arguments.

If the repository isn't available as a git, I git-svn clone it. If I can't do that, I tend to stay away from it.

Christian
These .ez files seem like a brilliant idea, rather like jar files in Java I guess, and is the type of thing I am looking for. Is there a .ez repository?
Zubair
No. I don't quite see the point. Is there a .jar repository?
Christian
I was comparing the jar files to ez files in that they are both renamed zip files. Yes, you are correct, there is no jar repository, which was a shortcoming of Java in the early years which caused Maven to become so popular when it introduced a jar repository.
Zubair
Also, I need things installed by non-technical people often, which excludes the use of git. Starting an Erlang shell is about the limit of their abilities usually :)
Zubair
If their system is reasonably set up and they have an ERL_LIBS environment variable defined then you could just drop your .ez files there and erlang will find them automatically. No installation at all really. This will not work as well if you need to do some initialisation or start-up.
rvirding
+3  A: 

I use faxien (a package manager for Erlang releases and applications) from the Erlware project: http://www.erlware.org. It and sinan are essential tools for Erlang development :).

Tristan Sloughter
+3  A: 

I've been working on EPM, an Erlang package manager. It pulls from GitHub. It's non-invasive and doesn't require installing anything on your system other than downloading an escript. It works as follows:

jvorreuter$ ./epm install ibrowse mochiweb
epm v0.1.0, 2010

===============================
Install the following packages?
===============================
    + epm-mochiweb-master
    + cmullaparthi-ibrowse-master

([y]/n) y

+ downloading http://github.com/epm/mochiweb/tarball/master
+ running mochiweb build command
+ running mochiweb install command
+ downloading http://github.com/cmullaparthi/ibrowse/tarball/master
+ running ibrowse build command
+ running ibrowse install command

You can read more about it at http://www.jkvor.com/erlang-package-manager

Jacob Vorreuter
Ok, this looks like it may have the most promise! And I could never get Faxian to work.
Zubair
I couldn't find the archive to download though, can you send me the link, as that is what I would call an easy install. Download it, run it, and give it the ability to be self updating, like gem is
Zubair
It is enough to do "wget -O ~/bin/epm http://github.com/JacobVorreuter/epm/raw/master/epm; chmod +x ~/bin/epm" and make sure ~/bin/epm is in your path
gleber
Just curious what problems people have had with using faxien?
Tristan Sloughter