An event looping abstraction to be used as the driving loop for a game engine, Elmish frontend, etc.
Add the net.clojars.jamesaorson/brain
Clojars project
[net.clojars.jamesaorson/brain "x.x.x"]
net.clojars.jamesaorson/brain {:mvn/version "x.x.x"}
The minimal main program would be as follows
(ns examples.minimal.main
(:require [net.clojars.jamesaorson.brain.core :refer (spark)]))
(defn msg-handler [{}] [false {}])
(defn -main
[& _args]
(spark {:msg-handler msg-handler}))
(-main)
implementation("net.clojars.jamesaorson:brain:0.0.1")
<dependency>
<groupId>net.clojars.jamesaorson</groupId>
<artifactId>brain</artifactId>
<version>0.0.1</version>
</dependency>
Refer to main.clj
for an ever-evolving, documenting example project, meant to demonstrate every feature of the engine simultaneously.
Over time, this will lead to the most wild and insane application you can imagine.
Please help to make it so.
Additional examples will come to live in their namesake
The first thing to do is to install babashka so all other scripts work
./scripts/install_babashka.bash
On Linux, this is also referred to as linuxbrew
./scripts/install_brew.bb
Using brew:
./scripts/install_clojure.brew.bb
or, if on Linux, directly using the install script:
./scripts/install_clojure.linux.bb
You can install leiningen using our script
./scripts/install_leiningen.manual.bb
Or you can install leiningen for your platform
sudo apt-get install -y leiningen
brew install leiningen
Or using our script
For Debian/Ubuntu:
sudo apt-get install -y jq
For MacOS:
brew install jq
./scripts/lint.bb
./scripts/build.bb
./scripts/run.bb
./scripts/test.bb
Simply click this link, and follow the instructions here to create a patchset, sending the patchset email to the following for the brain mailing list: ~jamesaorson/brain@lists.sr.ht
Can you improve this documentation?Edit on sourcehut
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close