I am pretty excited about my Twelf Lisp interpreter. It slices, dices and even parses! I decided to do a parser because it seemed like it would be easy with logic programming (free backtracking!) I am taking slight advantage of the logic-programming features for the list case of the parser, but mostly I ended up just writing in a functional style (
(
Read more... )
Comments 7
For now though:
implementing first-class object-language primitives without first-class metalanguage functions
I think you made biscuits defunctionalization.
(NB: i think you'd actually get a kick out of that Reynolds paper!)
Reply
Reply
Reply
Reply
I don't know about logging, but O'Caml with Jane St's sexp syntax extension lets you do something like:
type exp = IntExp of int
| AddExp of exp * exp
| MultExp of exp * exp
with sexp
and get, for free, a variety of functions like sexp_of_exp : exp -> Sexp.t and exp_of_sexp : Sexp.t -> exp, and sexp's are the usual LISPy dealies that have various parsers, pretty-printers, and serializers inside the Sexp module.
Programming with this facility is really a joy for debugging, and i imagine it would be great for logging, too.
Reply
Reply
Reply
Leave a comment