[Haskell-cafe] JavaScript (SpiderMonkey, V8, etc) embedded in GHC?

Claus Reinke claus.reinke at talk21.com
Sat Nov 10 22:40:35 CET 2012

>> I've looked around with no success… this surprises me actually. Has
>> anyone embedded SpiderMonkey, V8, or any other relatively decent
>> JavaScript interpreters in GHC (using the FFI)?
> I just started something [1].
> Cheers,
> Simon
> [1] https://github.com/sol/v8

Out of curiosity: wouldn't it make more sense to focus on the
other direction (calling Haskell from V8)? Roughly like:

- devices/GUI:
    Javascript/HTML/CSS in the browser/webview

- server/IO+lightweight computation:
    Javascript on node.js/V8

- server/computation+algorithms+parallelism+concurrency+..:
    Haskell on GHC

Also, if I recall correctly, the behind the scenes upgrade of
evented IO in GHC was never carried over to Windows.

Since node.js had to solve similar issues, and did so by using
libuv, perhaps there is an opening for completing the cross-
platform support for efficient evented IO in GHC, reusing
node's library-level efforts[1,2,3]? Just a thought..


[1] https://github.com/joyent/libuv
        "Its purpose is to abstract IOCP on Windows and
        libev on Unix systems."

[2] http://nikhilm.github.com/uvbook/introduction.html
        " libuv as a high performance evented I/O library
            which offers the same API on Windows and Unix."

[3] libuv - The little library that could (slides)

More information about the Haskell-Cafe mailing list