Live data from Hacker News

Wisp: Small-but-featureful embeddable Lisp interpreter written in Haskell

github.com

21–30 of 30 posts

Re: Wisp: Small-but-featureful embeddable Lisp interpreter written in Haskell

#21
post #15

Does anyone have any good, language agnostic resources for writing interpreters (not just for lisp)?

For a quick introduction this might be worth a look (not really language agnostic though) http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_H...

Re: Wisp: Small-but-featureful embeddable Lisp interpreter written in Haskell

#23
post #4

Not to be confused with Wisp: Homoiconic JS with clojure syntax, s-expressions and macros: https://github.com/Gozala/wisp

Or my: https://github.com/espringe/wisp (Whitespace lISP) with f-expressions!

Incidentally, why is the scala version 100x slower than the Haskell one?

Re: Wisp: Small-but-featureful embeddable Lisp interpreter written in Haskell

#24
post #14
post #12

Earlier quoted context omitted.

Wrapping an if in a lambda is unlikely to work as expected.

((if foo + -) 4 6) Can be compiled to (function() if foo then return plus else return minus end end)()(4, 6) It is far too verbose to be used in manually crafted Lua, but acceptable if you treat it as a compiler target (with the caveat that the lambda creation will prevent LuaJIT from JITting that piece of code).

Plug https://github.com/meric/l2l

"A object-oriented, unicode-enabled lisp that compiles to and runs as fast as Lua. Equipped with macros and compile-time compiler manipulation. Comes with all built-in Lua functions."

Re: Wisp: Small-but-featureful embeddable Lisp interpreter written in Haskell

#29
post #24
post #14

Earlier quoted context omitted.

((if foo + -) 4 6) Can be compiled to (function() if foo then return plus else return minus end end)()(4, 6) It is far too verbose to be used in manually crafted Lua, but acceptable if you treat it as a compiler target (with the caveat that the lambda creation will prevent LuaJIT from JITting that piece of code).

Plug https://github.com/meric/l2l "A object-oriented, unicode-enabled lisp that compiles to and runs as fast as Lua. Equipped with macros and compile-time compiler manipulation. Comes with all built-in Lua functions."

Nice one! I started coding one after writing the above comment.

I have a question regarding your implementation: why do you use `goto`s rather than `elseif` to compile `(cond)` blocks? For nested blocks?

Re: Wisp: Small-but-featureful embeddable Lisp interpreter written in Haskell

#30
post #29
post #24

Earlier quoted context omitted.

Plug https://github.com/meric/l2l "A object-oriented, unicode-enabled lisp that compiles to and runs as fast as Lua. Equipped with macros and compile-time compiler manipulation. Comes with all built-in Lua functions."

Nice one! I started coding one after writing the above comment. I have a question regarding your implementation: why do you use `goto`s rather than `elseif` to compile `(cond)` blocks? For nested blocks?

Oh I think it it was for the return value of cond.
Post reply on HN