{"id":15482887,"url":"https://github.com/brandonbloom/backtick","last_synced_at":"2025-04-13T02:20:16.151Z","repository":{"id":5603661,"uuid":"6810719","full_name":"brandonbloom/backtick","owner":"brandonbloom","description":"Clojure's syntax-quote reader macro as a normal macro","archived":false,"fork":false,"pushed_at":"2023-09-09T17:22:04.000Z","size":29,"stargazers_count":214,"open_issues_count":0,"forks_count":11,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-04T04:13:01.271Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"breakaway-bikers/Prsnl","license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brandonbloom.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":"2012-11-22T09:32:48.000Z","updated_at":"2025-03-22T12:40:59.000Z","dependencies_parsed_at":"2024-06-18T21:52:53.979Z","dependency_job_id":null,"html_url":"https://github.com/brandonbloom/backtick","commit_stats":{"total_commits":41,"total_committers":5,"mean_commits":8.2,"dds":0.09756097560975607,"last_synced_commit":"0463b49ddb0863653231fc6c922bb124ff5f7d25"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonbloom%2Fbacktick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonbloom%2Fbacktick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonbloom%2Fbacktick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonbloom%2Fbacktick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brandonbloom","download_url":"https://codeload.github.com/brandonbloom/backtick/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654611,"owners_count":21140329,"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-10-02T05:10:16.333Z","updated_at":"2025-04-13T02:20:16.130Z","avatar_url":"https://github.com/brandonbloom.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# backtick\n\nA Clojure library providing the syntax-quote (aka quasiquote) reader macro as a normal macro.\n\n\n## Motivation\n\nClojure's backtick `` ` `` reader macro, called syntax-quote, complects the\ntemplating of Clojure forms with Clojure's namespaced symbol resolution.\n\nBacktick allows you to use the unquote `` ~ `` and unquote-splicing `` ~@ ``\nmetacharacters for templating forms with or without a custom symbol resolver.\n\nLots more background at \u003chttps://www.brandonbloom.name/blog/2012/11/23/templating-clojures-backtick/\u003e.\n\n\n## Installation\n\nArtifacts are hosted on Clojars: \u003chttps://clojars.org/backtick\u003e\n\n\n## Usage\n\n```clojure\n(use 'backtick)\n\n;; Full syntax-quote replacement\n(let [x 5 v [:a :b]]\n  (syntax-quote {:x ~x, s #{~@v \"c\" inc}}))\n\n;; Returns:\n{:x 5, user/s #{\"c\" clojure.core/inc :a :b}}\n\n;; Templating only, no symbol resolution\n(let [x 5 v [:a :b]]\n  (template {:x ~x, s #{~@v \"c\" inc}}))\n\n;; Returns:\n{s #{\"c\" :a :b inc}, :x 5}\n```\n\nNote that while `template` does not resolve symbols, it does support gensyms:\n\n```clojure\n(template [x# x# y#])\n\n;; Returns something like:\n[x__auto__990 x__auto__990 y__auto__991]\n```\n\nYou can create a templating macro with a custom resolver by using `defquote`:\n\n```clojure\n(defquote shout-quote (comp symbol clojure.string/upper-case))\n\n(shout-quote {:foo bar})\n\n;; Returns:\n{:foo BAR}\n```\n\nCorresponding functions are generated for every quoting macro:\n\n```clojure\n(syntax-quote-fn 'foo) ;; =\u003e (quote user/foo)\n(template-fn 'foo)     ;; =\u003e (quote foo)\n(shout-quote-fn 'foo)  ;; =\u003e (quote FOO)\n```\n\n\n## License\n\nCopyright © 2012 Brandon Bloom\n\nDistributed under the Eclipse Public License, the same as Clojure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandonbloom%2Fbacktick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrandonbloom%2Fbacktick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandonbloom%2Fbacktick/lists"}