A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/b0oh/lol below:

b0oh/lol: Lol — Lisp on erLang, and programming is fun again

Lol — and programming is fun again.

Because the world strongly needs another programming language.

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

$ 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

Lol application example

(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")

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

Have fun.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3