- Notifications
You must be signed in to change notification settings - Fork142
Lisp Flavoured Erlang (LFE)
License
lfe/lfe
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
LFE, Lisp Flavoured Erlang, is a lisp syntax front-end to the Erlangcompiler. Code produced with it is compatible with "normal" Erlangcode. An LFE evaluator and shell is also included.
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 theerl
binary isin$PATH
.
To run the full suite of tests for LFE, simply use the following:
make tests
Should you wish to have LFE available system-wide, you can runthe followingmake
target:
$ make install
By default this will create the programslfe
,lfec
,lfedoc
andlfescript
in/usr/local/bin
. This can be changed by defining themake
variablePREFIX
to point to the desired parent directory.
Note that theinstall
target will also install the LFE man pages in theappropriate$(PREFIX)/share/man/man*
directories. This can be changed bydefining themake
variableMANINSTDIR
to point to the desired topman
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.
If you're running LFE from a git clone working dir, you can start the REPLlike 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: http://docs.lfe.io/ | a / / | Source: http://github.com/lfe/lfe \ l |_/ | \ r / | LFE v2.2.0 (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 scriptswith:
$ ./bin/lfe script-name script-arg-1 ...
or
$ lfe script-name script-arg-1 ...
Thedocs site has several places to explorethat will show you how to start using LFE. However, here's a quick taste:
- start up an LFE REPL as demonstrated above
- then, do something like this:
lfe> (*2 (+123456))42lfe> (*2 (lists:foldl#'+/20 (lists:seq16)))42
LFE now supports Docker. To get started, simply do the following, once youhave Docker set up on your machine:
$ docker pull lfex/lfe
Alternatively, you could build the image yourself:
$cd lfe$ docker build.
To bring up the LFE REPL:
$ docker run -it lfex/lfe
Files with more technical details:
- lfe.txt
- lfescript.txt
- lfe_bits.txt
- lfe_clj.txt
- lfe_comp.txt
- lfe_docs.txt
- lfe_gen.txt
- lfe_io.txt
- lfe_lib.txt
- lfe_macro.txt
If you would like to make changes to the LFE documentation and then regeneratethe docs, you'll want to read the instructions here:
LFE on Slack, join by requesting an invitehere
Steps:
- Update the version in
src/lfe.app.src
- Create the release tags
- Create a release on Github
- Publish to hex.pm
Once theapp.src
has been updated with the version for the release, you can create and push the tags (to Github) with the following:
make tags
That will create the number-only version as well as the "v"-prefixed version.
For now, the process of creating a release on Github is manual:
- Go tohttps://github.com/lfe/lfe/releases
- Click "Draft new release"
- 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 systemrebar.config
file. With that in place, publish a new release to hex.pm requires only the following:
make publish