Let’s dive into some new language programming. Functional of course… Erlang!
In Openbsd, did some tweaks into the installation process…
~> doas pkg_add erlang rebar
~> ln -s /usr/local/bin/erl<version> ~/bin/erl # my personal bin directory
~> ln -s /usr/local/bin/rebar<version> ~/bin/rebar
It was not so obvious for me but it seems that rebar is to erlang like leiningen is to clojure. And as such, you can initialize your project quite easily
rebar new umbrella prj-name
Also your first time?
A bit more on rebar
You can see all templates and understand them better with
rebar new help
Now what?
Well, now with the template one can really program in Emacs. I am currently using erlang mode from this instruction. However, my load path was a bit different.
(setq load-path (cons "/usr/local/lib/erlang<version>/lib/tools-<tools version>/emacs"
load-path))
(setq erlang-root-dir "/usr/local/erlang<version>")
(setq exec-path (cons "/usr/local/erlang<version>/bin" exec-path))
(require 'erlang-start)
Once that is fired up, in the *app*.erl
file, C-c C-k
to compile
(quite ciderish… very comfy).
Doubts?
If in doubt with rebar
rebar help <command that clouds your mind>
If in doubt with erlang:
- learn some earlang for the greater good
- erlang official website
- more here in the future =]
/comments ~lucasemmoreira/opinions@lists.sr.ht?Subject=Re: Erlang? Erlang!