{"id":31285718,"url":"https://github.com/escherize/streetlight","last_synced_at":"2025-09-24T08:14:42.131Z","repository":{"id":62434739,"uuid":"205416963","full_name":"escherize/streetlight","owner":"escherize","description":"Tools to throw light onto deep and dark datastructures","archived":false,"fork":false,"pushed_at":"2019-09-04T17:50:17.000Z","size":27,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-16T02:27:06.649Z","etag":null,"topics":["clojure","datastructure","inspection"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/escherize.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-08-30T16:16:30.000Z","updated_at":"2022-02-14T16:34:49.000Z","dependencies_parsed_at":"2022-11-01T21:02:08.939Z","dependency_job_id":null,"html_url":"https://github.com/escherize/streetlight","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/escherize/streetlight","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escherize%2Fstreetlight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escherize%2Fstreetlight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escherize%2Fstreetlight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escherize%2Fstreetlight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/escherize","download_url":"https://codeload.github.com/escherize/streetlight/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escherize%2Fstreetlight/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276714460,"owners_count":25691399,"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","status":"online","status_checked_at":"2025-09-24T02:00:09.776Z","response_time":97,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["clojure","datastructure","inspection"],"created_at":"2025-09-24T08:14:41.037Z","updated_at":"2025-09-24T08:14:42.121Z","avatar_url":"https://github.com/escherize.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Streetlight\n\nA Clojure library designed to throw light onto deep and dark datastructures\n\n\u003e A policeman sees a drunk man searching for something under a streetlight and asks what the drunk has lost. He says he lost his keys and they both look under the streetlight together. After a few minutes the policeman asks if he is sure he lost them here, and the drunk replies, no, and that he lost them in the park. The policeman asks why he is searching here, and the drunk replies, \"this is where the light is\".\n- ( https://en.wikipedia.org/wiki/Streetlight_effect )\n\n![streetlight](resources/streetlight.jpg)\n\n## Usage\n\nConsider this map:\n\n``` clojure\n{:a {:b {:c {:d 1}}}}\n```\n\nIt's not big enough to be painful to search through, but some are. :)\n\n#### Path Searching\n\n##### search with keywords\n\nIf you know what keys you want to find, you can use `search-keys`:\n\n``` clojure\n(search-keys {:a {:b {:c {:d 1}}}} :c)\n;;=\u003e [[[:a :b :c :d] 1]]\n```\n\nThis returns the path containing your keys and the value at that path.\n\n##### search with a regex\n\nIf you are unsure exactly what you're looking for, use `search-regex`:\n\n``` clojure\n(search-regex {:a {:b {:c {:d 1}}}} #\".*d.*\")\n;;=\u003e [[[:a :b :c :d] 1]]\n```\n\n### co-relate\n\nNow let's consider two maps, these are small and easy to read but should give you an idea. We can find where they 'overlap' by using co-relate.\n\n\n``` clojure\n(co-relate\n {:a {:b {:c {:d 1}}}}\n {:A {:B {:c {:d 1}}}})\n\n;; =\u003e [1 :c :d {:d 1} {:c {:d 1}}]\n```\n\nThis lists all the shared shapes of our two maps!\n\nI have used this to see how two big maps relate to one another.\n\n## License\n\nCopyright © 2019\n\nThis program and the accompanying materials are made available under the\nterms of the Eclipse Public License 2.0 which is available at\nhttp://www.eclipse.org/legal/epl-2.0.\n\nThis Source Code may also be made available under the following Secondary\nLicenses when the conditions for such availability set forth in the Eclipse\nPublic License, v. 2.0 are satisfied: GNU General Public License as published by\nthe Free Software Foundation, either version 2 of the License, or (at your\noption) any later version, with the GNU Classpath Exception which is available\nat https://www.gnu.org/software/classpath/license.html.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fescherize%2Fstreetlight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fescherize%2Fstreetlight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fescherize%2Fstreetlight/lists"}