{"id":32191460,"url":"https://github.com/pawelstroinski/pabloware.diff","last_synced_at":"2025-10-22T01:41:25.528Z","repository":{"id":62434071,"uuid":"206730239","full_name":"PawelStroinski/pabloware.diff","owner":"PawelStroinski","description":"Readable diff \u0026 patch lib. Best used with maps.","archived":false,"fork":false,"pushed_at":"2019-09-07T13:20:10.000Z","size":10,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-20T08:40:57.167Z","etag":null,"topics":["diff","patch"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PawelStroinski.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}},"created_at":"2019-09-06T06:43:00.000Z","updated_at":"2020-11-02T15:56:46.000Z","dependencies_parsed_at":"2022-11-01T21:02:05.602Z","dependency_job_id":null,"html_url":"https://github.com/PawelStroinski/pabloware.diff","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PawelStroinski/pabloware.diff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PawelStroinski%2Fpabloware.diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PawelStroinski%2Fpabloware.diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PawelStroinski%2Fpabloware.diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PawelStroinski%2Fpabloware.diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PawelStroinski","download_url":"https://codeload.github.com/PawelStroinski/pabloware.diff/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PawelStroinski%2Fpabloware.diff/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280365576,"owners_count":26318385,"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-10-21T02:00:06.614Z","response_time":58,"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":["diff","patch"],"created_at":"2025-10-22T01:41:24.150Z","updated_at":"2025-10-22T01:41:25.519Z","avatar_url":"https://github.com/PawelStroinski.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pabloware.diff\n\nReadable diff \u0026 patch lib. Best used with maps.\n\n[![Clojars Project](https://img.shields.io/clojars/v/pabloware/diff.svg)](https://clojars.org/pabloware/diff)\n\n## Rationale\n\nWhile there are many diff \u0026 patch libs around, I could not find one which *shows* the shape of a diffed data in the diff itself, i.e. I wanted a diff of a map to be a map. Also, it should be able to use that diff to do patching.\n\nThis lib does exactly that but is very basic in terms of diffing lists and vectors. There are alternative libs for that.\n\n## Usage\n\n```clojure\n=\u003e (require '[pabloware.diff :as p])\n\n=\u003e (def band\n     {:id     1\n      :name   \"Esbjörn Svensson Trio\"\n      :active {:from 1993}\n      :genres #{:jazz :instrumental-music}\n      :albums [{:title \"When Everyone Has Gone\", :year  1993}\n               {:title \"EST Plays Monk\"          :year  1996}]})\n\n=\u003e (-\u003e band\n       (dissoc :id)\n       (assoc-in [:active :to] 2008)\n       (update :genres conj :bepop)\n       (update :albums conj {:title \"Winter in Venice\", :year 1997}))\n\n=\u003e (p/diff band *1)\n{:id     ::p/-\n :active {:to 2008}\n :genres #{:bepop}\n :albums [::p/+ {:title \"Winter in Venice\", :year 1997}]}\n\n=\u003e (= *2 (p/patch band *1))\ntrue\n```\n\nThe test namespace contains edge cases as well as a generative test using spec.\n\n## Bullet points\n\nGoals:\n\n* Straightforward implementation\n* Easy to read by humans diffs, especially for maps\n\nNice-to-haves:\n\n* Small diff size\n\nNon-goals:\n\n* Speed\n\n## License\n\nCopyright © 2019 Paweł Stroiński\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpawelstroinski%2Fpabloware.diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpawelstroinski%2Fpabloware.diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpawelstroinski%2Fpabloware.diff/lists"}