Thursday, April 21, 2011

EdgeLisp progress

My hobby Lisp->JS compiler, EdgeLisp (formerly known as CyberLisp) just passed a major milestone: using multiple dispatch, a numeric tower (provided by Danny Yoo's js-numbers), and inline JavaScript, I'm able to write the > generic function as follows:
(defgeneric > (a b))
(defmethod > ((a number) (b number))
#{ jsnums.greaterThan(~a, ~b) #})
Checking it out at the REPL:
(> 200000000000000000000000000000000000000000 100000000000000000000000000000000000000000)
#t
Yay!

EdgeLisp is FAR from usable by anyone but me, but at this point I just had to blog about it. You can check it out here if you want.

Disclaimer: docs are outdated, and the project is in rapid flux.

The more I work on this, the more I respect anybody who's produced a usable PL. The sheer amount of work is unbelievable. :)

Props also to Douglas Crockford's json.js and Chris Double's jsparse.

No comments: