Skip to content

jamesmacaulay/zelkova

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Elm-style FRP for Clojure and ClojureScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published