7 ms·
I have tried on multiple occasions to learn and use Erlang for some different projects. My process has always been stopped by a few specific things, and I end
by lokedhs 9y ago
I have tried on multiple occasions to learn and use Erlang for some different projects.
My process has always been stopped by a few specific things, and I end up going back to Common Lisp, which tends to be much easier to get to work.
My first problem is to make sense out of how to actually run a server application. Manually compiling source files and run functions is one thing, but trying to actually set up an application with all the monitors and stuff is really annoyingly hard. Even following step-by-step instructions resulted in errors that I didn't understand as soon as I tried to do anything outside what the tutorial showed.
The second issue that I have never managed to properly solve is how to use libraries. In particular, I have wanted to use the client libraries for RabbitMQ and CouchDB (both written in Erlang, so you'd expect it to be simple). The instructions how to install the libraries usually doesn't match the thing you actually download.
I've also tried to use the EDTS in Emacs, which is pretty nice, but as soon as I try to use a library, it can never find the hrl files.
I really want to use Erlang, but the difficulty of actually getting started with a real project as opposed to simple tutorial stuff has been extremely frustrating.
- JamesUtah07 9y agoTry out elixir. It runs on the Erlang VM but is easy to get up and running and has a great community. It's much easier to add external libraries and uses its own package manager.
- lokedhs 9y agoThanks for the suggestions (you, and the other two people mentioning the same thing). I have just started looking at Elixir, and I'm hoping that will work better. Am I just to assume that Erlang deployment really is as complicated and poorly documented as I thought, since no one suggested any documentation, but three people suggested I switch to Elixir.
- klibertp 9y agoIn my experience, Erlang doesn't have a standard way of doing a deployment. There are 3rd party apps like Rebar and others, but they are both not available by default (after a fresh install) and seriously underdocumented. The result of this, IMHO, is that everyone builds their own build and deployment system, using shell scripting, Make or Erlang itself. Elixir includes Mix - a standard task runner - and Hex as part of the distribution. It also provides a central pkg repository (https://hex.pm/packages https://hex.pm/packages). It's much, much easier to start a project and pull all your dependencies. I guess you could use Hex and Mix with pure Erlang projects, but I haven't tried this.
- marianoguerra 9y agorebar3 will become the standard build tool for erlang, it's already in the erlang organization (https://github.com/erlang/rebar3 https://github.com/erlang/rebar3), most people nowadays use either rebar3 or erlang.mk (https://erlang.mk/ https://erlang.mk/), both work really well, at least for me.
- brightball 9y agoSecond vote for the other comment. Elixir is basically developer friendly Erlang without a performance penalty.
- _asummers 9y agoTo someone who likes Lisps, Elixir has Lisp style hygenic macros, and a very Lispy AST.
- klibertp 9y ago"People who like Lisps" are actually the target audience for LFE (Lisp Flavored Erlang at http://docs.lfe.io/current/index.html http://docs.lfe.io/current/index.html). It doesn't have all the Elixir ecosystem goodness, but it's a genuine Lisp, not merely Lisp-like :)
- a13xnet 9y agoHave you tried erlang.mk with relx? Setting up the project takes literally no effort, building & running the server app is as easy as "make run".