Posted on December 26, 2014

I’ve made some good progress with GHCJS, and I think I’m going to explore that route with flare next. Unfortunately, that means I’ve got a bunch of tedious sysadmin stuff to do first, since GHCJS ghc-7.8 (at least). Also, hydrogen’s and helium’s 1G of RAM makes building this stuff pretty tedious.

I’m tempted to trash lithium (4G, and currently Debian wheezy, as I’d hit various odd problems on Fedora, although those have now evaporated) and reinstall it with F21. Then transfer the live flare installation over.

Some things that are needed on a flare host:

So that’s all done. There’s some issue with mutt, which may or may not be related to the move from hydrogen to lithium, but I’m not looking at C code immediately. No, I want to get on with seeing how GHCJS plays. I’ll be starting from the ember branch, as there were some improvements made there. I definitely want the server side REST APIs, for instance, and my first job will be to find or implement something that can talk to those and fetch data into GHCJS.

Hmm… I suppose I should probably start by doing that with the todo app: I have the REST side in the ember branch already. I’m a bit vague even how to structure the application; I suppose the GHCJS parts should be separate executables, provided I can persuade cabal to compile them…

Wow! The initial port of (non-persistent) todo to yesod worked first time! I mean, I didn’t expect too many problems, but I thought it might take a few goes round to get everything in the right places. Anyway, time to look at making it persistent. I’m going to start with Network.HTTP.Conduit and Aeson.