Erlang Central

Difference between revisions of "Lisp Flavoured Erlang"

From ErlangCentral Wiki

(Added link to gen_server example.)
Line 14: Line 14:
  
 
The LFE installation comes with some examples. '''TODO: build up a set of examples here which help show a clear mapping from classic Erlang syntax to LFE syntax'''.
 
The LFE installation comes with some examples. '''TODO: build up a set of examples here which help show a clear mapping from classic Erlang syntax to LFE syntax'''.
 +
 +
* [[LFE gen_server Example]]

Revision as of 18:59, 10 January 2009


Introduction

Lisp Flavoured Erlang is a tool which allows you to use a Lispy syntax instead of the classic Erlang one. There are various reasons one might find this compelling; LFE has Lispy/Schemey macros; the syntax is more consistent (e.g. no issues with ; vs. , vs. .).

Note that while LFE currently can do a lot, it doesn't quite support all the things available to you in the classic Erlang syntax.

Installation

The Erlang shell will look for bytecode (.beam) files in certain places, so you want the LFE install to be found that way. You can put all of the LFE bytecode under <path-to-installed-erl>/lib/. For example, I extracted LFE so that I I end up with .../erl5.6.5/lib/lfe/{doc,ebin,examples,src,test,etc.}. Or you can edit the environment variable ERL_LIBS to include the path to the LFE installation. TODO: somebody who uses ERL_LIBS, please put in a precise example here.

Examples

The LFE installation comes with some examples. TODO: build up a set of examples here which help show a clear mapping from classic Erlang syntax to LFE syntax.