stal
Version, currently 0.1.03 versions
- 0.3.0latestDec 23, 2016
- 0.2.0not indexedJan 10, 2022
- 0.1.0not indexedJan 10, 2022
github.com/soveran/stal-crystal
Set algebra solver for Redis
Nothing has been indexed for 0.1.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
stal:
github: soveran/stal-crystal
version: ~> 0.1.0Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.0. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
Stal
Set algebra solver for Redis
Description
Stal receives an array with an s-expression composed of commands
and key names and resolves the set operations in Redis.
Community
Meet us on IRC: #lesscode on freenode.net.
Getting started
Install Redis. On most platforms it's as easy as grabbing
the sources, running make and then putting the redis-server binary
in the PATH.
Once you have it installed, you can execute redis-server and it
will run on localhost:6379 by default. Check the redis.conf
file that comes with the sources if you want to change some settings.
Usage
Stal requires a Resp compatible client. To make things
easier, resp is listed as a runtime dependency so the examples
in this document will work.
require "stal"
# Connect the client to the default host
resp = Resp.new("redis://localhost:6379")
# Use the Redis client to populate some sets
resp.call("SADD", "foo", "a", "b", "c")
resp.call("SADD", "bar", "b", "c", "d")
resp.call("SADD", "baz", "c", "d", "e")
resp.call("SADD", "qux", "x", "y", "z")
Now we can perform some set operations with Stal:
expr = ["SUNION", "qux", ["SDIFF", ["SINTER", "foo", "bar"], "baz"]]
Stal.solve(resp, expr)
#=> ["b", "x", "y", "z"]
Stal translates the internal calls to "SUNION", "SDIFF" and
"SINTER" into SDIFFSTORE, SINTERSTORE and SUNIONSTORE to
perform the underlying operations, and it takes care of generating
and deleting any temporary keys.
For more information, refer to the repository of the Stal script.
Installation
Add this to your application's shard.yml:
dependencies:
stal:
github: soveran/stal-crystal
branch: master
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.0- Tagged
- Jan 10, 2022
- Commit
e0036d8aecde- Indexed
- not yet
Dependents
Repository
github.com/soveran/stal-crystal
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 26, 2026
- Synced
- Sep 26, 2026
- Versions
- 3