|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| bin/ | H | 04-Jun-2017 | - | 628 | 435 |
| c_src/ | H | 04-Jun-2017 | - | 224 | 153 |
| dev/ | H | 04-Jun-2017 | - | 1,999 | 1,426 |
| doc/ | H | 03-May-2022 | - | 7,317 | 5,997 |
| emacs/ | H | 04-Jun-2017 | - | 736 | 464 |
| examples/ | H | 04-Jun-2017 | - | 2,972 | 2,625 |
| include/ | H | 04-Jun-2017 | - | 182 | 137 |
| src/ | H | 03-May-2022 | - | 17,242 | 11,612 |
| test/ | H | 04-Jun-2017 | - | 3,454 | 2,816 |
| .dockerignore | H A D | 04-Jun-2017 | 5 | 2 | 1 |
| .travis.yml | H A D | 04-Jun-2017 | 281 | 19 | 18 |
| Dockerfile | H A D | 04-Jun-2017 | 1.3 KiB | 45 | 39 |
| Emakefile | H A D | 04-Jun-2017 | 50 | 4 | 2 |
| LICENSE | H A D | 04-Jun-2017 | 11.1 KiB | 203 | 169 |
| Makefile | H A D | 03-May-2022 | 7.6 KiB | 295 | 195 |
| README.md | H A D | 04-Jun-2017 | 4 KiB | 166 | 117 |
| VERSION | H A D | 04-Jun-2017 | 4 | 2 | 1 |
| get_comp_opts.escript | H A D | 04-Jun-2017 | 2.4 KiB | 63 | 39 |
| rebar.config | H A D | 03-May-2022 | 854 | 22 | 18 |
| rebar.config.script | H A D | 04-Jun-2017 | 2 KiB | 57 | 49 |
| rebar.lock | H A D | 04-Jun-2017 | 4 | 2 | 1 |
README.md
1# LFE
2
3[![Travis](https://img.shields.io/travis/rvirding/lfe.svg)](https://travis-ci.org/rvirding/lfe)
4[![Hex.pm version](https://img.shields.io/hexpm/v/lfe.svg)](https://hex.pm/packages/lfe)
5[![Hex.pm downloads](https://img.shields.io/hexpm/dt/lfe.svg)](https://hex.pm/packages/lfe)
6[![Hex.pm weekly downloads](https://img.shields.io/hexpm/dw/lfe.svg)](https://hex.pm/packages/lfe)
7[![Hex.pm daily downloads](https://img.shields.io/hexpm/dd/lfe.svg)](https://hex.pm/packages/lfe)
8
9LFE, Lisp Flavoured Erlang, is a lisp syntax front-end to the Erlang
10compiler. Code produced with it is compatible with "normal" Erlang
11code. An LFE evaluator and shell is also included.
12
13
14## Building
15
16To compile LFE, simple clone it and compile:
17
18```shell
19$ git clone https://github.com/rvirding/lfe.git
20$ cd lfe
21$ make compile
22```
23
24LFE requires Erlang be installed on the system and that the ``erl`` binary is
25in ``$PATH``.
26
27
28## Installation
29
30Should you wish to have LFE available system-wide, you can run
31the following ``make`` target:
32
33```shell
34$ make install
35```
36
37By default this will create the programs ``lfe``, ``lfec``, ``lfedoc`` and
38``lfescript`` in ``/usr/local/bin``. This can be changed by defining the
39``make`` variable ``PREFIX`` to point to the desired parent directory.
40
41Note that the ``install`` target will also install the LFE man pages in the
42appropriate ``$(PREFIX)/share/man/man*`` directories. This can be changed by
43defining the ``make`` variable ``MANINSTDIR`` to point to the desired top
44``man`` directory.
45
46So:
47
48```shell
49$ make install PREFIX=/Users/rv/ MANINSTDIR=/Users/rv/man
50```
51
52will put the programs in ``/Users/rv/bin`` and the man pages in the
53``/Users/rv/man/man*`` directories.
54
55
56## REPL
57
58If you're running LFE from a git clone working dir, you can start the REPL
59like so after compiling:
60
61```shell
62$ ./bin/lfe
63Erlang 17 (erts-6.0) [source] [64-bit] [smp:8:8] ...
64
65LFE Shell V6.0 (abort with ^G)
66>
67```
68
69If you have installed LFE, then you may start the REPL from any location:
70
71```shell
72$ lfe
73Erlang 17 (erts-6.0) [source] [64-bit] [smp:8:8] ...
74
75LFE Shell V6.0 (abort with ^G)
76>
77```
78
79Likewise, you may run an LFE shell script in the same style as shell scripts
80with:
81
82```shell
83$ ./bin/lfe script-name script-arg-1 ...
84```
85
86or
87
88```shell
89$ lfe script-name script-arg-1 ...
90```
91
92## Usage
93
94The [docs site](http://lfe.github.io/docs.html) has several places to explore
95that will show you how to start using LFE. However, here's a quick taste:
96
97* start up an LFE REPL as demonstrated above
98* then, do something like this:
99```cl
100> (* 2 (+ 1 2 3 4 5 6))
10142
102> (* 2 (lists:foldl #'+/2 0 (lists:seq 1 6)))
10342
104```
105
106## Docker Support
107
108LFE now supports Docker. To get started, simply do the following, once you
109have Docker set up on your machine:
110
111```bash
112$ docker pull lfex/lfe
113```
114
115Alternatively, you could build the image yourself:
116
117```bash
118$ cd lfe
119$ docker build .
120```
121
122Here are a couple of simple usage examples:
123
124```bash
125$ docker run lfex/lfe
12642
127```
128
129```bash
130$ docker run -i -t lfex/lfe lfe
131Erlang/OTP 18 [erts-7.0] [source-4d83b58] [64-bit] [smp:8:8] ...
132
133LFE Shell V7.0 (abort with ^G)
134>
135```
136
137That last command will dump you into the LFE REPL on a running container
138of the ``lfex/lfe`` Docker image. For more information on using Docker
139with LFE, be sure to read the
140[tutorial](http://blog.lfe.io/tutorials/2014/12/07/1837-running-lfe-in-docker/).
141
142
143## Documentation
144
145* [Quick Start](https://lfe.gitbooks.io/quick-start/content/)
146* LFE [user guide](doc/user_guide.txt)
147* [version history](doc/src/version_history.md)
148
149Files with more technical details:
150
151* [lfe.txt](doc/lfe.txt)
152* [lfescript.txt](doc/lfescript.txt)
153* [lfe_bits.txt](doc/lfe_bits.txt)
154* [lfe_clj.txt](doc/lfe_clj.txt)
155* [lfe_comp.txt](doc/lfe_comp.txt)
156* [lfe_doc.txt](doc/lfe_doc.txt)
157* [lfe_gen.txt](doc/lfe_gen.txt)
158* [lfe_io.txt](doc/lfe_io.txt)
159* [lfe_lib.txt](doc/lfe_lib.txt)
160* [lfe_macro.txt](doc/lfe_macro.txt)
161
162If you would like to make changes to the LFE documentation and then regenerate
163the docs, you'll want to read the instructions here:
164
165* [Updating LFE Documentation](doc/src/updating_docs.md)
166