Embedded scripting Language for haskell app

Hi, Can some one please give me a suggestion on the best choice for an embedded scripting Language for a haskell application? I mean, something like guile/lua for c/c++ and groovy/jruby for java. For quite some time, I've been using a lisp-like interpreter that I implemented myself. But this is not going too well - going by this road, I suspect I will end up with a mule. I am looking for a pony (a declarative programming language). I am okay with a donkey too. baskell[1] seems interesting. And there's hslua[2]. Can one use hint[3] like this ? Thanks Hemanth K [1] baskell - http://hackage.haskell.org/package/baskell [2] hslua - http://hackage.haskell.org/package/hslua [3] hint - http://hackage.haskell.org/package/hint

Hello Hemanth, Tuesday, August 17, 2010, 2:05:44 PM, you wrote: btw, i've written unfinished hslua tutorial: http://haskell.org/haskellwiki/HsLua -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

Bulat Ziganshin
Hello Hemanth,
Tuesday, August 17, 2010, 2:05:44 PM, you wrote:
btw, i've written unfinished hslua tutorial: http://haskell.org/haskellwiki/HsLua
And in related news embedded Lua interpreter recently got upgraded to version 5.1.4. -- Gracjan

On Tue, Aug 17, 2010 at 6:05 AM, Hemanth Kapila
Hi, Can some one please give me a suggestion on the best choice for an embedded scripting Language for a haskell application? I mean, something like guile/lua for c/c++ and groovy/jruby for java. For quite some time, I've been using a lisp-like interpreter that I implemented myself. But this is not going too well - going by this road, I suspect I will end up with a mule. I am looking for a pony (a declarative programming language). I am okay with a donkey too. baskell[1] seems interesting. And there's hslua[2]. Can one use hint[3] like this ?
How about a tiny lisp or scheme interpreter? Lots of those to choose from, (including some written in Haskell) and with a few clever macros you could easily provide a declarative DSL for users to work with. I see that you mentioned guile, but even tinyscheme would be pretty powerful and only add a few K to your project. This raises the question, what is the smallest (or most embeddable anyway) Haskell interpreter that can be built? Steve

On 18/08/2010 12:20 PM, Stephen Sinclair wrote: you could script in haskell by embedding hugs. Hugs exe + base lib ~ 1MB.
On Tue, Aug 17, 2010 at 6:05 AM, Hemanth Kapila
wrote: Hi, Can some one please give me a suggestion on the best choice for an embedded scripting Language for a haskell application? I mean, something like guile/lua for c/c++ and groovy/jruby for java. For quite some time, I've been using a lisp-like interpreter that I implemented myself. But this is not going too well - going by this road, I suspect I will end up with a mule. I am looking for a pony (a declarative programming language). I am okay with a donkey too. baskell[1] seems interesting. And there's hslua[2]. Can one use hint[3] like this ?
How about a tiny lisp or scheme interpreter? Lots of those to choose from, (including some written in Haskell) and with a few clever macros you could easily provide a declarative DSL for users to work with. I see that you mentioned guile, but even tinyscheme would be pretty powerful and only add a few K to your project.
This raises the question, what is the smallest (or most embeddable anyway) Haskell interpreter that can be built?
Steve _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Wed, Aug 18, 2010 at 4:42 AM, John Lask
On 18/08/2010 12:20 PM, Stephen Sinclair wrote:
you could script in haskell by embedding hugs. Hugs exe + base lib ~ 1MB.
Hmmm... Would it be possible to pass complex values between the program (with GHC) and the script (with Hugs)? Probably there would need to be done some serialization/deserialization, because GHC and Hugs use different memory representations. So you lose the ability to transparently use script functions in you program, because some values can't be serialized (e.g. infinite data structures, functions...) and others are too costly and would double the memory requirements. On the other hand, you may want use Hugs as Lua is used, creating bindings in the Hugs/Lua world that can be used to call back to the GHC world. But if you go through this route, then perhaps using Lua in the first place would be better. It depends on how easy it is to create these bindings in an embedded Hugs. Cheers! =) -- Felipe.

Mmh, I raised this question some months ago, I thought about Scheme and I've
been recommended to use Lua instead of Scheme (as far as I remember, the
author of a scheme implementation available on Hackage told it wasn't solid
enough).
I would add something: who will script for your application?
If it is only the developper (i.e. you), you can use whatever language you
want.
But if the application is intended to be extended by its users (just like
modders for games), then it may be preferable to use a -- still good -- but
knowed language. Or at least a language that is easy to learn.
Lua is a nice language, totally simple to learn, and made for scripting.
Haskell is a über powerful language, but it is much longer to learn.
Scheme is simpler to learn than Haskell, but far more "exotic" than Lua.
Anyway, that's just my opinion.
2010/8/18 Stephen Sinclair
On Tue, Aug 17, 2010 at 6:05 AM, Hemanth Kapila
wrote: Hi, Can some one please give me a suggestion on the best choice for an embedded scripting Language for a haskell application? I mean, something like guile/lua for c/c++ and groovy/jruby for java. For quite some time, I've been using a lisp-like interpreter that I implemented myself. But this is not going too well - going by this road, I suspect I will end up with a mule. I am looking for a pony (a declarative programming language). I am okay with a donkey too. baskell[1] seems interesting. And there's hslua[2]. Can one use hint[3] like this ?
How about a tiny lisp or scheme interpreter? Lots of those to choose from, (including some written in Haskell) and with a few clever macros you could easily provide a declarative DSL for users to work with. I see that you mentioned guile, but even tinyscheme would be pretty powerful and only add a few K to your project.
This raises the question, what is the smallest (or most embeddable anyway) Haskell interpreter that can be built?
Steve _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (7)
-
Bulat Ziganshin
-
Felipe Lessa
-
Gracjan Polak
-
Hemanth Kapila
-
John Lask
-
Stephen Sinclair
-
Yves Parès