All Projects → jeremykross → Ulmus

jeremykross / Ulmus

A functional-reactive style programming library for Clojure(script)

Programming Languages

clojure
4091 projects
clojurescript
191 projects

Projects that are alternatives of or similar to Ulmus

Hareactive
Purely functional reactive programming library
Stars: ✭ 293 (+787.88%)
Mutual labels:  frp, functional-reactive-programming, functional-programming
Dunai
Classic and Arrowized Functional Reactive Programming, Reactive Programming, and Stream programming, all via Monadic Stream Functions
Stars: ✭ 115 (+248.48%)
Mutual labels:  frp, functional-reactive-programming, functional-programming
Ios Oss
Kickstarter for iOS. Bring new ideas to life, anywhere.
Stars: ✭ 7,840 (+23657.58%)
Mutual labels:  frp, functional-reactive-programming, functional-programming
Kickstarter Reactiveextensions
A collection of extensions to the ReactiveSwift framework.
Stars: ✭ 183 (+454.55%)
Mutual labels:  frp, functional-reactive-programming, functional-programming
Sodium Typescript
Typescript/Javascript implementation of Sodium FRP (Functional Reactive Programming) library
Stars: ✭ 102 (+209.09%)
Mutual labels:  frp, functional-reactive-programming, functional-programming
Android Oss
Kickstarter for Android. Bring new ideas to life, anywhere.
Stars: ✭ 5,627 (+16951.52%)
Mutual labels:  frp, functional-reactive-programming, functional-programming
reflex-dom-semui
A reflex-dom API for Semantic UI components
Stars: ✭ 22 (-33.33%)
Mutual labels:  functional-reactive-programming, frp
recurrent
A library for building functional-reactive (FRP) GUIs in Clojurescript
Stars: ✭ 49 (+48.48%)
Mutual labels:  functional-reactive-programming, frp
Facsimile
Facsimile Simulation Library
Stars: ✭ 20 (-39.39%)
Mutual labels:  functional-reactive-programming, functional-programming
Mobx Keystone
A MobX powered state management solution based on data trees with first class support for Typescript, support for snapshots, patches and much more
Stars: ✭ 284 (+760.61%)
Mutual labels:  frp, functional-reactive-programming
mutable
State containers with dirty checking and more
Stars: ✭ 32 (-3.03%)
Mutual labels:  functional-reactive-programming, frp
Swiftrex
Swift + Redux + (Combine|RxSwift|ReactiveSwift) -> SwiftRex
Stars: ✭ 267 (+709.09%)
Mutual labels:  frp, functional-programming
Yampa
Functional Reactive Programming domain-specific language embedded in Haskell, for programming efficient hybrid (mixed discrete-time and continuous-time) systems.
Stars: ✭ 294 (+790.91%)
Mutual labels:  frp, functional-reactive-programming
Swift-3-Functional-Programming
Code repository for Swift 3 Functional Programming, published by Packt
Stars: ✭ 78 (+136.36%)
Mutual labels:  functional-reactive-programming, frp
purescript-pop
😃 A functional reactive programming (FRP) demo created with PureScript events and behaviors.
Stars: ✭ 33 (+0%)
Mutual labels:  functional-reactive-programming, frp
reflex-dom-ace
Reflex wrapper for the ACE editor
Stars: ✭ 12 (-63.64%)
Mutual labels:  functional-reactive-programming, frp
demonstration-gsd
GSD (Get your Stuff Done) | Basic Todo list for demonstrating CQRS/Command Sourcing in Haskell
Stars: ✭ 46 (+39.39%)
Mutual labels:  functional-reactive-programming, frp
Reflex Platform
A curated package set and set of tools that let you build Haskell packages so they can run on a variety of platforms. reflex-platform is built on top of the nix package manager.
Stars: ✭ 602 (+1724.24%)
Mutual labels:  frp, functional-reactive-programming
Lightning
A Swift Multiplatform Single-threaded Non-blocking Web and Networking Framework
Stars: ✭ 312 (+845.45%)
Mutual labels:  frp, functional-reactive-programming
Turbine
Purely functional frontend framework for building web applications
Stars: ✭ 651 (+1872.73%)
Mutual labels:  frp, functional-reactive-programming

Ulmus is a library for doing Functional Reactive Programming (FRP) in Clojure and Clojurescript.

Usage

[ulmus "0.2.3"] in project.clj

or

{:deps {ulmus {:mvn/version "0.2.3"}}} in deps.edn

Introduction

Ulmus is a library designed to facilitate a functional-reactive style of programming. It's primarily inspired by Elm and RX. Some of the API apes Elm although it makes no attempt to be complete or exclusive in doing so.

Signals are the basic building blocks of ulmus. Conceptually, a signal is a datatype which holds a particular value. Signals can be composed with standard functional tooling (eg. map, filter, reduce), producing new, dependent, signals. Changing a signal's value causes all of it's dependent signals to update as well.

So for the sake of illustration, we might define a signal representing the current position of the mouse.

(defn mouse-pos
  []
  (let [sig-$ (ulmus/signal)]
    (.addEventListener
      js/body
      "mousemove"
      (fn [e]
        (ulmus/>! sig-$ [(.-clientX e) (.-clientY e)])))
    sig-$))

(def position-$ (mouse-pos))

We now have a signal, position-$ which represents the current mouse position. Dereferencing the signal will return it's current value.

@position-$

might return [640 480] for instance.

Just like static data, signals can be composed, yielding new signals. So,

(def mouse-x-$ (ulmus/map first position-$))

Signals can model functionally interactions that would otherwise require slipping into imperative coding. To better understand how these ideas might be applied to user interface see Recurrent.

Examples

Various examples can be found at https://jeremykross.github.io/recurrent-examples.

API Docs

cljdoc badge

Status

Ulmus is fairly well-tread at this point, but still beta quality. It shouldn't be relied on yet for anything mission critical.

Todo

  • Spec

Thanks

The Ulmus logo was created by the eminently talented @the_stritt.

License

Copyright 2019 Jeremy Kross

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

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].