{"id":20230867,"url":"https://github.com/ethul/redis-algebra-interpreter","last_synced_at":"2026-05-11T10:34:36.231Z","repository":{"id":10251864,"uuid":"12359401","full_name":"ethul/redis-algebra-interpreter","owner":"ethul","description":null,"archived":false,"fork":false,"pushed_at":"2014-06-20T04:27:33.000Z","size":200,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-14T00:19:31.669Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ethul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-25T13:30:21.000Z","updated_at":"2015-02-03T21:33:31.000Z","dependencies_parsed_at":"2022-08-31T15:01:09.794Z","dependency_job_id":null,"html_url":"https://github.com/ethul/redis-algebra-interpreter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethul%2Fredis-algebra-interpreter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethul%2Fredis-algebra-interpreter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethul%2Fredis-algebra-interpreter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethul%2Fredis-algebra-interpreter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethul","download_url":"https://codeload.github.com/ethul/redis-algebra-interpreter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241676825,"owners_count":20001569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T07:44:06.986Z","updated_at":"2026-05-11T10:34:36.186Z","avatar_url":"https://github.com/ethul.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redis Algebra Interpreter\n\nAn interpreter for running programs written using the [Redis Algebra](https://github.com/ethul/redis-algebra). The interpreter uses the non-blocking Redis client [Scala Redis NB](https://github.com/debasishg/scala-redis-nb) under the hood for performing the commands of the algebra.\n\n# Install\n\nReleases and snapshots of the Redis Algebra Interpreter are published to the [Sonatype OSS Repository Hosting Service](https://oss.sonatype.org). The necessary [SBT Resolvers](http://www.scala-sbt.org/release/docs/Detailed-Topics/Resolvers.html) may be added as follows to your SBT build file.\n\n```scala\nresolvers += \"Sonatype releases\" at \"http://oss.sonatype.org/content/repositories/releases/\"\n\nresolvers += \"Sonatype snapshots\" at \"http://oss.sonatype.org/content/repositories/snapshots/\"\n```\n\n# Usage\n\n```scala\nimport com.redis.RedisClient\n\nimport akka.actor.ActorSystem\nimport akka.util.Timeout\n\nimport scala.concurrent.duration.Duration\n\nimport scalaz.{CharSet, NonEmptyList}, NonEmptyList.nels\nimport scalaz.std.list._\nimport scalaz.syntax.{Ops, comonad, monad, traverse}, comonad._, monad._, traverse._\nimport scalaz.syntax.std.list._\n\nimport redis.algebra.{R, all}, all._\nimport redis.algebra.interpreter.nonblocking.{NonBlocking, future}, future._\n\nval e0 =\n  set[R](\"key\".utf8, \"value\".utf8) \u003e\u003e\n  get[R](\"key\".utf8)\n\nval e1 =\n  set[R](\"counter\".utf8, \"100\".utf8) \u003e\u003e\n  incr[R](\"counter\".utf8) \u003e\u003e\n  incr[R](\"counter\".utf8) \u003e\u003e\n  incrby[R](\"counter\".utf8, 10)\n\nval e2 =\n  List(\"first\".utf8, \"second\".utf8, \"third\".utf8).map(a =\u003e rpush[R](\"messages\".utf8, nels(a))).sequenceU \u003e\u003e\n  lrange[R](\"messages\".utf8, 0, 2)\n\nimplicit val duration = Duration(2, \"seconds\")\n\nimplicit val system = ActorSystem(\"redis-algebra-interpreter\")\n\nimplicit val executionContext = system.dispatcher\n\nimplicit val timeout = Timeout(duration)\n\nlazy val client = RedisClient(\"localhost\", 6379)\n\nimplicit def StringToStringOps(a: String): StringOps = new StringOps { val self = a }\n\nsealed abstract class StringOps extends Ops[String] { final def utf8 = self.getBytes(CharSet.UTF8).toIndexedSeq }\n\nval r0 = NonBlocking.run(e0, client).copoint\n\nval r1 = NonBlocking.run(e1, client).copoint\n\nval r2 = NonBlocking.run(e2, client).copoint\n\nprintln(r0)\n// Some(ByteString(118, 97, 108, 117, 101))\n\nprintln(r1)\n// 112\n\nprintln(r2)\n// Vector(ByteString(102, 105, 114, 115, 116), ByteString(115, 101, 99, 111, 110, 100), ByteString(116, 104, 105, 114, 100))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethul%2Fredis-algebra-interpreter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethul%2Fredis-algebra-interpreter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethul%2Fredis-algebra-interpreter/lists"}