{"id":13609464,"url":"https://github.com/weavejester/hashp","last_synced_at":"2025-04-12T20:31:59.406Z","repository":{"id":36516823,"uuid":"227962882","full_name":"weavejester/hashp","owner":"weavejester","description":"A better \"prn\" for debugging","archived":false,"fork":false,"pushed_at":"2025-04-01T01:19:23.000Z","size":31,"stargazers_count":459,"open_issues_count":2,"forks_count":23,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-01T01:21:30.508Z","etag":null,"topics":["clojure","debugging"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","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/weavejester.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":"2019-12-14T03:56:35.000Z","updated_at":"2025-04-01T01:19:23.000Z","dependencies_parsed_at":"2025-04-01T01:20:41.102Z","dependency_job_id":"90709ae5-486f-4364-927e-b99e88a27803","html_url":"https://github.com/weavejester/hashp","commit_stats":{"total_commits":27,"total_committers":5,"mean_commits":5.4,"dds":"0.14814814814814814","last_synced_commit":"86511677dd629e916f0f37c28a2669d0871d4147"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fhashp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fhashp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fhashp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weavejester%2Fhashp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weavejester","download_url":"https://codeload.github.com/weavejester/hashp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248629750,"owners_count":21136305,"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":["clojure","debugging"],"created_at":"2024-08-01T19:01:35.158Z","updated_at":"2025-04-12T20:31:59.400Z","avatar_url":"https://github.com/weavejester.png","language":"Clojure","funding_links":[],"categories":["Clojure"],"sub_categories":[],"readme":"# Hashp\n\nHashp is a better `prn` for debugging Clojure code. Inspired by\nprojects like [Spyscope][], Hashp (ab)uses data readers to make it\neasier to get useful debugging data sent to STDERR.\n\n[spyscope]: https://github.com/dgrnbrg/spyscope\n\n## Usage\n\nOnce installed, you can add `#p` in front of any form you wish to\nprint:\n\n```clojure\n(ns example.core)\n\n(defn mean [xs]\n  (/ (double #p (reduce + xs)) #p (count xs)))\n```\n\nIt's faster to type than `(prn ...)`, returns the original result, and\nproduces more useful output by printing the original form, function\nand line number:\n\n```\nuser=\u003e (mean [1 4 5 2])\n#p[example.core/mean:4] (reduce + xs) =\u003e 12\n#p[example.core/mean:4] (count xs) =\u003e 4\n3.0\n```\n\n## Installation\n\n### tools.deps\n\nTo use `#p` in a tools.deps project, add the following dependency to\nyour project's `deps.edn` file:\n\n```edn\n{:deps {dev.weavejester/hashp {:mvn/version \"0.4.0\"}}}\n```\n\nYou will then need to load the `hashp.core` namespace before using `#p`:\n\n```clojure\n(require 'hashp.preload)\n```\n\n### Leiningen\n\nTo make `#p` globally available to all Leiningen projects, add the\nfollowing to `~/.lein/profiles.clj`:\n\n```edn\n{:user\n {:dependencies [[dev.weavejester/hashp \"0.4.0\"]]\n  :injections [(require 'hashp.preload)]}}\n```\n\n### Boot\n\nTo make `#p` globally available to all Boot projects, add the following\nto `~/.boot/profile.boot`:\n\n```clojure\n(set-env! :dependencies #(conj % '[dev.weavejester/hashp \"0.4.0\"]))\n(require 'hashp.preload)\n(boot.core/load-data-readers!)\n```\n\n## Configuration\n\nHashp can be turned on or off via the `hashp.config/*disable-hashp*`\nvar. This is checked when `#p` is **initially evaluated**, so if it is\nchanged, any existing namespace that uses `#p` will need to be reloaded\nbefore the change takes effect.\n\n```\nuser=\u003e (alter-var-root #'hashp.config/*disable-hashp* (constantly true))\ntrue\nuser=\u003e (require 'example.core :reload)\nnil\nuser=\u003e (mean [1 4 5 2])\n3.0\n```\n\nYou can also turn the colors off. Hashp respects the [NO_COLOR][]\nenvironment variable, and you can also set it via the\n`hashp.config/*disable-color*` var. Unlike `*disable-hashp*`, this is\nchecked on each print, so there's no need to reload the namespaces.\n\n```\nuser=\u003e (alter-var-root #'hashp.config/*disable-color* (constantly true))\ntrue\n```\n\nFinally, you can change the output writer. By default this is `*err*`,\nwhich outputs to STDOUT, but you can set this to any other print writer,\nsuch as `*out*`.\n\n```\nuser=\u003e (alter-var-root #'hashp.config/*hashp-output* (constantly *out*))\n#object[java.io.PrintWriter 0x2deddab6 \"java.io.PrintWriter@2deddab6\"]\n```\n\n[no_color]: https://no-color.org/\n\n## License\n\nCopyright © 2025 James Reeves\n\nReleased under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweavejester%2Fhashp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweavejester%2Fhashp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweavejester%2Fhashp/lists"}