{"id":21168022,"url":"https://github.com/rokf/janet-tile38","last_synced_at":"2026-02-14T15:33:14.741Z","repository":{"id":258676020,"uuid":"873854409","full_name":"rokf/janet-tile38","owner":"rokf","description":"A Janet client library for interfacing with Tile38","archived":false,"fork":false,"pushed_at":"2024-10-19T15:36:41.000Z","size":11,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-12T18:29:07.679Z","etag":null,"topics":["janet","janet-lang","tile38","tile38-client"],"latest_commit_sha":null,"homepage":"https://tile38.com","language":"Janet","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/rokf.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-16T20:44:18.000Z","updated_at":"2024-10-26T18:40:43.000Z","dependencies_parsed_at":"2024-10-21T17:06:09.928Z","dependency_job_id":null,"html_url":"https://github.com/rokf/janet-tile38","commit_stats":null,"previous_names":["rokf/janet-tile38"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rokf/janet-tile38","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rokf%2Fjanet-tile38","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rokf%2Fjanet-tile38/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rokf%2Fjanet-tile38/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rokf%2Fjanet-tile38/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rokf","download_url":"https://codeload.github.com/rokf/janet-tile38/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rokf%2Fjanet-tile38/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29448008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T14:10:32.461Z","status":"ssl_error","status_checked_at":"2026-02-14T14:09:49.945Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["janet","janet-lang","tile38","tile38-client"],"created_at":"2024-11-20T15:04:53.306Z","updated_at":"2026-02-14T15:33:14.726Z","avatar_url":"https://github.com/rokf.png","language":"Janet","funding_links":[],"categories":[],"sub_categories":[],"readme":"# janet-tile38\n\nA Janet client library for interfacing with Tile38.\n\n## Installation\n\nThe library can be installed with `jpm` using `jpm install https://github.com/rokf/janet-tile38`\nor by adding the following line into your project's dependency tuple:\n\n```janet\n{ :url \"https://github.com/rokf/janet-tile38\" :tag \"main\" }\n```\n\n## API\n\nAfter the library is installed you should be able to import its `tile38`\nmodule with `(import tile38)`.\n\n### `tile38/make-client`\n\nThe `make-client` function takes three optional parameters:\n- `host` (string), defaults to `127.0.0.1`\n- `port` (number), defaults to `9851`\n- `pass` (string), the password for authentication (if required), defaults to `nil`\n\nIt creates a new Tile38 client that wraps its RESP API. The client can be\nused with Janet's `with`, because it implements a `:close` method.\n\n```janet\n(def client (tile38/make-client \"localhost\" 9852 \"my-secret-123\"))\n```\n\n### `tile38/{command}`\n\nFunctions for Tile38's commands are generated using a macro because they all\nfollow the same pattern. See [Commands](https://tile38.com/commands/#) for\ndetails. See tests and examples for some practical usage examples. Generally\nthey're following the pattern below:\n\n```\n(tile38/{command} client \u0026 args)\n```\n\nSome commands don't take any arguments. In those cases you'd only have to pass\nin the client.\n\n### `tile38/close`\n\nCloses the underlying connection stream.\n\n```janet\n(tile38/close client)\n```\n\n### `tile38/watch`\n\nWaits for events (notifications) to appear in subscribed channels, decodes them\nand pushes them into an event channel, which you have to pass as an argument\n(`event-ch`). Exits cleanly if the `stop-ch` channel is closed using something\nlike `(ev/chan-close stop-ch)` from the standard library. The interval for\n`stop-ch` state checks and reading from the client's internal Tile38 connection\ncan be configured using the optional `timeout` parameter, which defaults to\n`0.5`, meaning half a second. By default it will wait for half a second each\nloop iteration for the `stop-ch` channel to get closed and then it will try\nto read from the connection for half a second, before going back to the `stop-ch`\ncheck.\n\n```janet\n(tile38/watch client event-ch stop-ch \u0026opt timeout)\n```\n\n## Examples\n\nUsage examples can be found in the `examples` folder. The folder also contains\na Docker Compose specification that spins up a Tile38 server instance, which\nhas the configuration required by the examples.\n\n## Tests\n\nUnit tests can be found in the `test` folder. They require `judge` to be\ninstalled on your machine. You can install `judge` with:\n\n```sh\njpm install https://github.com/ianthehenry/judge\n```\n\n## License\n\nMIT - see the `LICENSE` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frokf%2Fjanet-tile38","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frokf%2Fjanet-tile38","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frokf%2Fjanet-tile38/lists"}