All Projects → jamesmacaulay → Zelkova

jamesmacaulay / Zelkova

Licence: mit
Elm-style FRP for Clojure and ClojureScript

Programming Languages

clojure
4091 projects

Zelkova

This project is unmaintained.

Clojars Project

Build Status

Elm-style FRP for Clojure and ClojureScript.

Here's a conference talk with some demos!

Here's a mailing list on Google Groups!

Bullet points

  • signal graphs are static, just like in Elm (why?)
  • core.async is used to wire up running graphs
  • you can run as many signal graphs as you want at the same time
  • graphs can share signal nodes because each signal is just a "recipe" value decoupled from the state of any running graph
  • works in both Clojure and ClojureScript, but ClojureScript is currently better supported with implementations for keyboard, mouse, and window signals (basically straight ports from the Elm libraries)
  • pairs really well with immediate-mode rendering (e.g. React-based systems like Om or Reagent)
  • transducer pipelines!!

What does it look like?

(ns my-app.ui
  (:require [jamesmacaulay.zelkova.signal :as z]
            [jamesmacaulay.zelkova.keyboard :as keyboard]
            [jamesmacaulay.zelkova.mouse :as mouse]))

(def saved-points-signal
  (let [shift-clicks (z/keep-when keyboard/shift mouse/clicks)]
    (->> mouse/position
         (z/sample-on shift-clicks)
         (z/reductions conj #{}))))

(def saved-points-atom
  (z/pipe-to-atom saved-points-signal))

Documentation

The docs.

Examples

License

Copyright © 2014-2015

Distributed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].