mango314 / d3js-haskell

Haskell to D3.js binding by deep EDSL approach.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

D3.js binding for Haskell

Build Status

Ver. 0.1.0.0 http://hackage.haskell.org/package/d3js

MIT license


A fork has been necessary since I was unable to install with Stack and has not been active in two years. Certainly d3.js has moved on since then and this library may no longer be accurate. My goal (despite very limited knowledge of Haskell) is to pick up the baton and writen a working library.

In Clojure such a interoperating library Strokes has already been achieve and looks well-maintained. One may look at the nice discussion there. Since Clojure is an extension of Lisp, I feel obligated to cite SICP and extol its tree based approach to programming.


EDSL stands for E mbedded D omain S pecific L anguage - in this case we are embedding d3.js into Haskell

hs-d3js: d3.js --> Haskell

This is not embedding of JavaScript into Haskell. Then - in the contravariant way - we can compile Haskell into a subset of JavaScript that is well-formulated d3.js

compile: Haskell --> d3.js

Wouldn't it be wonderful if we could represent the d3.js primitives themselves as Haskell objects? Then we could reason about them!

From one of the comments:

This modules provides high-level functions for drawing common charts, such as bar charts and scatter plots. Those functions also exemplify how to compose primitive functions to achieve complex drawing. This module will be expanded in the near future.

It never got expanded. Now we can add in the low-level functions in a safe, functionl way.

About

Haskell to D3.js binding by deep EDSL approach.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 52.1%Language:Jupyter Notebook 47.9%