~nixnomad/brain

Remove -main call
8: Convert loop to message handling

clone

read-only
https://git.sr.ht/~nixnomad/brain
read/write
git@git.sr.ht:~nixnomad/brain

You can also use your local clone with git send-email.

#brain

An event looping abstraction to be used as the driving loop for a game engine, Elmish frontend, etc.

builds.sr.ht status - ci.yml

#Usage

Add nixnomad.brain to your project

;; Leiningen
[nixnomad.brain "0.0.1"]

#Examples

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

#Local Development

#Local Development - Setup

For Linux or MacOS, install Clojure via Brew:

#Setup Clojure

# NOTE: https://brew.sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Add brew to your path...

brew install clojure/tools/clojure

#Setup Leiningen

Install leiningen for your platform

For Debian/Ubuntu:

sudo apt-get install -y leiningen

For MacOS:

brew install leiningen

#Setup Babashka

Install babashka

./scripts/install_babashka.bash

#Setup jq

For Debian/Ubuntu:

sudo apt-get install -y jq

For MacOS:

brew install jq

#Local Development - Lint

./scripts/lint.bb

#Local Development - Build

./scripts/build.bb

#Local Development - Run

./scripts/run.bb

#Local Development - Test

./scripts/test.bb

#Local Development - Submitting a PR

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: ~nixnomad/brain@lists.sr.ht

#Bugs

...

#Any Other Sections

#That You Think

#Might be Useful

#License

Copyright © 2023 FIXME

This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version, with the GNU Classpath Exception which is available at https://www.gnu.org/software/classpath/license.html.