You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LFE, Lisp Flavoured Erlang, is a lisp syntax front-end to the Erlang
compiler. Code produced with it is compatible with "normal" Erlang
code. An LFE evaluator and shell is also included.
Building
To compile LFE, simple clone it and compile:
$ git clone https://github.com/lfe/lfe.git
$ cd lfe
$ make compile
LFE requires Erlang be installed on the system and that the erl binary is
in $PATH.
Running the Tests
To run the full suite of tests for LFE, simply use the following:
make tests
Installation
Should you wish to have LFE available system-wide, you can run
the following make target:
$ make install
By default this will create the programs lfe, lfec, lfedoc and
lfescript in /usr/local/bin. This can be changed by defining the
make variable PREFIX to point to the desired parent directory.
Note that the install target will also install the LFE man pages in the
appropriate $(PREFIX)/share/man/man* directories. This can be changed by
defining the make variable MANINSTDIR to point to the desired top
man directory.
So:
$ make install PREFIX=/Users/rv/ MANINSTDIR=/Users/rv/man
will put the programs in /Users/rv/bin and the man pages in the
/Users/rv/man/man* directories.
REPL
If you're running LFE from a git clone working dir, you can start the REPL
like so after compiling:
$ ./bin/lfe
Erlang/OTP 26 [erts-14.0.2] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit] [dtrace]
..-~.~_~---..
( \\ ) | A Lisp-2+ on the Erlang VM
|`-.._/_\\_.-': | Type (help) for usage info.
| g |_ \ |
| n | | | Docs: https://docs.lfe.io/
| a / / | Source: https://github.com/lfe/lfe
\ l |_/ |
\ r / | LFE v2.2.1 (abort with ^G)
`-E___.-'
lfe>
If you have installed LFE, then you may start the REPL from any location:
$ lfe
Likewise, you may run an LFE shell script in the same style as shell scripts
with:
$ ./bin/lfe script-name script-arg-1 ...
or
$ lfe script-name script-arg-1 ...
Usage
The docs site has several places to explore
that will show you how to start using LFE. However, here's a quick taste:
Select the correct tag from the drop-down "Choose a tag"
Click "Generate release notes"
Click "Publish release"
Lastly, to publish LFE to hex.pm, you need to have rebar3 installed on our system and an entry for the hex plugin in your system rebar.config file. With that in place, publish a new release to hex.pm requires only the following: