A small but extensible Java based "embedded lisp"- derives from the 1960 Mc Carthy Lisp a new consequently functional, dynamically scoped dialect enriched by modern features (pattern matching, parallel processing, implicit lex. closures etc).
Be the first to post a text review of LiLi. Rate and review a project by clicking thumbs up or thumbs down in the right column.
Lili has gone a long way since release 011. The new version (021) is significantly faster (2.5-3x faster than JScheme 1.4) and supports some nice new features like pattern-matching, lexical closures (although principally dynamically scoped), and implicit closuring. Work on a documentation is in progress. See littlisp.sourceforge.net for an under-construction-homepage. Unfortunately Lili has became a one-person project. Any help would be great!
-bug fixing
-bug fixing
-extended macro support: now macros may have a non-static number of arguments by using pattern matching in their definition. new example for a case macro: ;the case macro: (defun case-eq (e1 e2) (cond ((eq e2 'else) t) (t (eq e1 e2)))) (defun eq-alize (var) (lambda (case) (list (list 'case-eq var (car case)) (cadr case)))) (defmacro case (*cons* var (*cons* casefirst caserest)) (let (eqv (eq-alize var)) (cons 'cond (cons (eqv casefirst) (map eqv caserest)))) | case (x) (throw-ex "CASE-ERROR:" x) ) (defun test-case (x) ;a silly test function for the case macro (case x (1 "one") (2 "two") (3 "three") ('else "something else")) ) ;end case macro
-added macro support (only macros with a fixed number of arguments are allowed) an example for a case macro: ;the case macro: (defun case-eq (e1 e2) (cond ((eq e2 'else) t) (t (eq e1 e2)))) (defun eq-alize (var) (lambda (case) (list (list 'case-eq var (car case)) (cadr case)))) (defmacro case (var cases) (let (c cases) (cons 'cond (map (eq-alize var) cases)))) (defun test-case (x) ;a silly test function for the case macro (case x ((1 "one") (2 "two") (3 "three") ('else "something else")) )) ;end case macro -left the path of pure dynamic scoping. Added support for *lexical* closures. Use the special form lexlambda instead of lambda to create a closure. A primitive example: (defun curry-add-4 (x) (lexlambda (x') (lexlambda (x'') (lexlambda (x''') (+ x (+ x' (+ x'' x'''))))))) Playing with the example: lili > (((curry-add-4 1) 2) 3) #<CLOSURE: (x''') -> (+ x (+ x' (+ x'' x''')))> lili > (rewrite-closure it) (lambda (x''') (+ 1 (+ 2 (+ 3 x''')))) lili > (it 4) 10 lili > ((((curry-add-4 1) 2) 3) 4) 10 lili > -these are all changes.
-general bug fixing -ugly bugs fixed in the swing console -improved evaluation routine for pattern matching functions - much faster now. -some overall acceleration -improved exception handling
-much faster (as long, as there's enough memory available: about twice as fast as jscheme) ! -many new features (eg: built-in pattern matching, new built-in functions, implicit reduce eval for binary functions, an exception datatype, new organization of the Lisp-/Java meta-communication level within an api called "symbiosis", etc)
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use
Thanks for your rating!
Would you also like to write a review?