[Haskell-cafe] Embedded scripting Language for haskell app

Christopher Done chrisdone at googlemail.com
Wed Aug 18 05:05:19 EDT 2010

On 18 August 2010 01:41, Felipe Lessa <felipe.lessa at gmail.com> wrote:
> On Tue, Aug 17, 2010 at 7:07 PM, Christopher Done
> <chrisdone at googlemail.com> wrote:
>> Sadly this is true. I went ahead and tested this to confirm; compiled
>> mueval (which uses hint), copied the executable to a virtual machine
>> and it required the GHC package repo among other GHC-related
>> libraries.
>> The size is indeed a problem. But how much? How does this compare to Lua et al?
> IIRC, the Haskell Platform installer for Windows has around 70 MiB.
> So, if you want a simple installer to include in your installer, be
> prepared to have another 70 MiB.  I said a dozen mebibytes (12 MiB)
> because I think the bare minimum needs to have at least this size to
> have something useful for an app, but this isn't backed up by
> anything.

I mean, not using the Haskell Platform. I think if you're an
experienced developer you'd package just the things your project
needs, instead of using the whole Haskell Platform. I don't think the
Haskell Platform is the bare minimum.

> Lua, on the other hand, is embedded in the executable and weights less
> than 200 KiB, probably much less than a typical Haskell executable.  I
> don't know about other interpreters.

True, that's pretty small.

> $ du -hs /usr/lib/ghc-6.12.3/
> [..]
> So using one of the best generic compression algorithms available, the
> size of one of the biggest libraries that a program using hint may
> need comes down to 4.5 MiB.  Probably if someone is careful enough to
> include only what really is necessary, the program installer will be
> at most 10 MiB and will need at most 50 MiB on disk.  I think this is
> doable, but a lot more than Lua; hint can't be used on set-top boxes
> =).

That's pretty good! Encouraging if I write an end-user desktop
application and want to embed Haskell as a scripting language.

More information about the Haskell-Cafe mailing list