SLFE stands for Shitty LFE (LISP-flavoured Erlang).
It's a new programming language based on Elixir which aims to support all of the Enum functionality.
The slfec compiler is a program that takes a foo.sl source file and produces a foo executable binary.
The isl REPL is an executable interactive program/environment (like Ruby's irb and Elixir's iex) for .sl programs.
These tools do not exist yet, but that's how you would ideally use SLFE.
- Booleans
- UTF-8 Strings
- Integers
- Floats
- Multiple statements
-
ifexpressions - Equality checks with
==and/= - Functions
- Math operators (
+,-,*,/) - Linked lists
This project is currently composed of 4 files:
- src/lisp_lexer.xrl - Lexical analyzer generator
- src/lisp_parser.yrl - LALR-1 Parser Generator
- lib/lisp_parser.ex - Layer on top of
:lisp_lexerand:lisp_parser - lib/lisp_evaluator.ex - Evaluates s-expressions and writes to stdio. Ideally the two things should be decoupled.
You can do so by running mix test from the command line.
$ mix test
............................
Finished in 0.07 seconds
28 tests, 0 failures
Should I use this?
Probably not. This is actually just an experiment, so I wouldn't recommend people using it to build actual programs. But feel free to use it anyway if you want.
Why Erlang/Elixir?
leex and yecc are the powerful Erlang alternatives to lex and yacc. I like Erlang, and Elixir is pretty rad too. So why not?
Is SLFE a Turing-complete language?
Yeah, I guess.
SLFE was inspired by this blog post (thanks Andrea!).
Kudos to lpil for the name suggestion and for being awesome.