Coder Social home page Coder Social logo

zelkova's Introduction

Zelkova

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))

Examples

License

Copyright © 2014-2015

Distributed under the MIT License.

zelkova's People

Contributors

bensu avatar jamesmacaulay avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.