fluxite
Fluxite
Fluxite is a reactivity/reactive streams-ish library for Crystal. The main feature is that it uses a message queue instead of recursion allowing (potentially) unbounded feedback.
world = Fluxite::Port(Symbol).new
world.select(:tick).map { :tock }.into(world)
world.select(:tock).map { :tick }.into(world)
world.each { |sym| p! sym }
Fluxite.pass(world, :tick)
# STDOUT:
# sym # => :tick
# sym # => :tock
# sym # => :tick
# sym # => :tock
# sym # => :tick
# sym # => :tock
# ... forever
Also message propagation is much more intuitive than in more naive reactive streams implementations, and is more like circuits (Fluxite is breadth-first vs. depth-first naive reactive systems). That is, progress is made across the entire level of the tree before descending deeper.
Installation
-
Add the dependency to your
shard.yml
:dependencies: fluxite: github: homonoidian/fluxite
-
Run
shards install
Usage
require "fluxite"
TODO: Write usage instructions here
Development
TODO: Write development instructions here
Contributing
- Fork it (https://github.com/homonoidian/fluxite/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Alexey Yurchenko - creator and maintainer
Repository
fluxite
Owner
Statistic
- 0
- 0
- 0
- 0
- 1
- 7 months ago
- March 1, 2024
License
MIT License
Links
Synced at
Thu, 07 Nov 2024 07:02:10 GMT
Languages