{"id":13646137,"url":"https://github.com/ztellman/riddley","last_synced_at":"2025-05-16T10:08:36.554Z","repository":{"id":62434453,"uuid":"12545493","full_name":"ztellman/riddley","owner":"ztellman","description":"code-walking without caveats","archived":false,"fork":false,"pushed_at":"2022-09-04T21:25:42.000Z","size":650,"stargazers_count":196,"open_issues_count":7,"forks_count":30,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-03T03:41:03.181Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ztellman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-02T17:36:06.000Z","updated_at":"2024-09-27T01:30:38.000Z","dependencies_parsed_at":"2022-11-01T20:45:57.024Z","dependency_job_id":null,"html_url":"https://github.com/ztellman/riddley","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ztellman%2Friddley","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ztellman%2Friddley/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ztellman%2Friddley/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ztellman%2Friddley/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ztellman","download_url":"https://codeload.github.com/ztellman/riddley/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254050947,"owners_count":22006387,"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-08-02T01:02:49.233Z","updated_at":"2025-05-16T10:08:31.545Z","avatar_url":"https://github.com/ztellman.png","language":"Clojure","funding_links":[],"categories":["Clojure","Miscellaneous"],"sub_categories":[],"readme":"    Walker is my name\n    and I am the same.\n    Riddley Walker.\n    Walking my riddels\n    where ever theyve took me\n    and walking them now\n    on this paper the same.\n\nfrom [Riddley Walker](http://en.wikipedia.org/wiki/Riddley_Walker) by Russell Hoban\n\n---\n\nCode may be data, but only some of that data is executable.  If we want to perform a pervasive code transformation, using something like `clojure.walk` presents a few problems:\n\n* binding forms are treated the same as actual expressions\n* `clojure.walk/macroexpand-all` will pass in a nil `\u0026env` to all macros\n* macroexpansion doesn't expand inlined functions\n\nThis means that transforms that we intend to apply to expressions may have unintended consequences on a `fn`, `let`, or `case` form.  It also means that any macro which relies on `\u0026env` will not compose with our transformation.  Finally, if inlined functions aren't expanded, certain transformations will break.\n\n### usage\n\n[![Build Status](https://travis-ci.org/ztellman/riddley.png?branch=master)](https://travis-ci.org/ztellman/riddley)\n\n```clj\n[riddley \"0.2.0\"]\n```\n\nRiddley provides a correct `riddley.walk/macroexpand-all`, which preserves the binding information in `\u0026env` and expands inlined functions, and `riddley.walk/walk-exprs`, which is a general mechanism for code walking and transformation.\n\n`walk-exprs` takes two arguments, a `predicate` for whether it should transform the sub-form, and a `handler` for doing the transformation.\n\n```clj\nriddley.walk\u003e (walk-exprs number? inc '(let [n 1] (+ n 1)))\n(let* [n 2] (. clojure.lang.Numbers (add n 2)))\n```\n\nNotice that `walk-exprs` implicitly macroexpands the form, including the inline form for `+`.  Unlike `clojure.walk`, if `handler` is called, sub-forms will not be walked.  The handler function is responsible for recursively calling `walk-exprs` on the form it's handed.\n\nAccess to `\u0026env` is available via `(riddley.compiler/locals)` if you need it as part of your transformation.\n\nFull documentation can be found [here](http://aleph.io/codox/riddley/).\n\n### license\n\nCopyright © 2013 Zachary Tellman\n\nDistributed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fztellman%2Friddley","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fztellman%2Friddley","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fztellman%2Friddley/lists"}