Home

Awesome

Lol — Lisp On erLang

Lol — and programming is fun again.

Why?

Because the world strongly needs another programming language.

A little bit more seriously: the main idea is to make metaprogramming in erlang easier.<br> It is not about replacing Erlang, it is about using the two together.

Why not LFE? Lol has:

Why not Joxa?

Build

$ git clone git://github.com/b0oh/lol.git
$ cd lol
$ ./rebar compile
$ echo '(defn hello [name] (io:format "Hello, ~s.~n" [name]))' > simple.lol
$ erl -pa ebin
1> lol_compiler:file("simple.lol", "ebin/simple.beam").
{ok,simple,[]}
2> simple:hello("Dima").
Hello, Dima.
ok

Example

Lol application example

Lol language

Forms

Special forms

(defn public [arg1 arg2]
  (expr1)
  (expr2))
(defn- private [arg1 arg2]
  (expr1)
  (expr2))
(fn [arg1 arg2] (expr1) (expr2))
(let [{'ok file} (file:read_file "number")
      number (binary_to_integer file)]
  (io:format "Number is: ~p~n" [number]))
(let [{'ok file} (file:read_file "number")
      number (binary_to_integer file)]
  (do
    (file:write_file "number_copy" (integer_to_binary number))
    (io:format "Number is: ~p~n" [number])))
(case (get_coords)
  ({x y} 'ok)
  ({x y z} (do (first_expr) (second_expr))))
(call 'func)
(call 'func [arg1 arg2])
(call 'mod 'func)
(call 'mod 'func [arg1 arg2])
(func)
(mod:func)
((fn [x] x) "some")

Plans

It is dedicated to “Let Over Lambda” and “Land of Lisp”.


Have fun.