Get the latest tech news

Bthreads: A Simple and Easy Paradigm for Clojure


Can bthreads make event-driven programs both simple and easy?

IterationEventNew remaining-paths 0 nil#{[0 0 :x] [1 0 :x] [2 0 :x]} 1[1 0 :x]#{[0 0 :x] [2 0 :x]} 2[0 0 :x]#{[2 0 :x]} 3[2 0 :x]#{} Whenever an event from winning-paths occurs, the reduce function iterates and returns the next bid. Nothing about behavioral programming prevents us from creating a bthread that maintains its data structure representing the entire board. This paradigm is flexible enough for various applications, such as stream processing (using Kafka or Kinesis) and managing complex UIs, and it includes established patterns for distributed systems.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of paradigm

paradigm

Photo of Clojure

Clojure

Photo of bthreads

bthreads

Related news:

News photo

Rama on Clojure's terms, and the magic of continuation-passing style

News photo

Core: an experimental new way to write videogames

News photo

Debugging a memory leak in a Clojure service