Something Similar

About Jeff Hodges
Atom Feed

erl_interface is Deprecated and I Hate the Erlang Docs

I’ve been learning Erlang in fits and starts for a few months now, and trying to play with the C interface to it. Unfortunately, it wasn’t until tonight that I learned that the best documented interface, erl_interface, is deprecated in favor of ei. (That link is not all of the ei documentation. See the end of this post).

Oh, but you’ll still have to include erl_interface.h in order to get your code to run since ei requires it. Be careful to put -lerl_interface before -lei.

And all of the docs about interoperability with C have you including both ei.h and erl_interface.h and make no mention of the relationship between them or the deprecation of erl_interface. Hell, they barely mention ei, anyhow.

This is the kind of thing that makes languages on the verge of true popularity spin down until they find themselves in the graveyard of “interesting but irrevelant”. There will be no fiery crash, no awe-inspiring fight to the death, no raging against the dying of the light. Nothing more than the slow frost bite of a crumbling community.

I love what Erlang can do, but if you’re going to make a language that proudly shows it roots in a Prolog interpreter, you’ve got to give the plebeians like me a chance.

Oh, and could we get a decent math library while we’re at it? I shouldn’t have to break out to C just to work with matrices. Combined with a quickly made mnesia database you could have some serious distributed work going.

You would probably have to move to a more lightweight data structure than what mnesia gives, but what a great way to write a proof of concept! Of course, you’ll first have to find documentation for mnesia that isn’t ages old.

Since the mnesia and ei documentation (along with everything else) is pretty much unGooglable in all of those frames, I suggest using the documentation tarball (lastest release). In the the current release, hit ./otp_doc_html_R11B-5/lib/erl_interface- for ei and ./otp_doc_html_R11B-5/lib/mnesia-4.3.5/doc/index.html for mnesia.

Blech. The things you do for love.

I’ll be writing up my experiences and some posts to help others with ei as I go along. Let’s hope I can be as productive as I am critical.