I pine for a Lisp with the embeddable ease of Lua.
Wisp: Small-but-featureful embeddable Lisp interpreter written in Haskell
11–20 of 30 posts
Re: Wisp: Small-but-featureful embeddable Lisp interpreter written in Haskell
#12I pine for a Lisp with the embeddable ease of Lua.
It could be trivially implemented in Lua as a pre-processor. Lua has lambdas, higher level functions, lexical scope and tail call elimination. The main problem is that it doesn't have a ternary operator, making conditional expression problematic to represent (you have to wrap an if statement in a lambda called on the fly). For something more fully featured, see [0], it is written in MoonScript (which itself compiles…
Re: Wisp: Small-but-featureful embeddable Lisp interpreter written in Haskell
#13I pine for a Lisp with the embeddable ease of Lua.
Lysp ( http://piumarta.com/software/lysp/ ) is fairly close to what I'm guessing you're "pining" for and if not, hey it's open source so have at it!
The author's own Maru (http://piumarta.com/software/maru/) might be better suited for this, but I'm not sure..
Re: Wisp: Small-but-featureful embeddable Lisp interpreter written in Haskell
#14Earlier quoted context omitted.
It could be trivially implemented in Lua as a pre-processor. Lua has lambdas, higher level functions, lexical scope and tail call elimination. The main problem is that it doesn't have a ternary operator, making conditional expression problematic to represent (you have to wrap an if statement in a lambda called on the fly). For something more fully featured, see [0], it is written in MoonScript (which itself compiles…
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).Re: Wisp: Small-but-featureful embeddable Lisp interpreter written in Haskell
#15Re: Wisp: Small-but-featureful embeddable Lisp interpreter written in Haskell
#16Not 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!
Re: Wisp: Small-but-featureful embeddable Lisp interpreter written in Haskell
#17Does anyone have any good, language agnostic resources for writing interpreters (not just for lisp)?
Re: Wisp: Small-but-featureful embeddable Lisp interpreter written in Haskell
#18Does anyone have any good, language agnostic resources for writing interpreters (not just for lisp)?
I also recently found Matt Might's Compilers class [3] via a submission here on HN. It has a lot of language-agnostic resources.
[1]: http://www.reddit.com/r/compilers
Re: Wisp: Small-but-featureful embeddable Lisp interpreter written in Haskell
#19> wisp lives in the ST (optionally IO) monad. separate > interpreters with completely segregated environments can be > run concurrently. wisp has a few IO facilities, but they're > completely sandboxed and can't accidentally affect the host > program or environment. This is wonderful. There's already an embedded R5RS Scheme for Haskell ( http://hackage.haskell.org/package/husk-scheme ) but it runs everything in the I…
Re: Wisp: Small-but-featureful embeddable Lisp interpreter written in Haskell
#20I pine for a Lisp with the embeddable ease of Lua.
Some links
1. Andy Wingo (main Guile implemetor)'s "buyer's guide" to Scheme implementations - http://wingolog.org/archives/2013/01/07/an-opinionated-guide...
2. Chibi Scheme homepage - http://synthcode.com/scheme/chibi/