{"id":20550147,"url":"https://github.com/dnmfarrell/dict","last_synced_at":"2026-03-19T16:21:02.899Z","repository":{"id":259316446,"uuid":"877543387","full_name":"dnmfarrell/dict","owner":"dnmfarrell","description":"A pure ISO Prolog dictionary","archived":false,"fork":false,"pushed_at":"2024-10-23T21:47:14.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-24T10:23:58.820Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Prolog","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/dnmfarrell.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":"2024-10-23T20:42:41.000Z","updated_at":"2024-10-23T21:47:17.000Z","dependencies_parsed_at":"2024-10-24T10:32:45.572Z","dependency_job_id":"19281bee-348f-4332-94cd-5d37267e2908","html_url":"https://github.com/dnmfarrell/dict","commit_stats":null,"previous_names":["dnmfarrell/dict"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dnmfarrell/dict","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2Fdict","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2Fdict/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2Fdict/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2Fdict/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnmfarrell","download_url":"https://codeload.github.com/dnmfarrell/dict/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2Fdict/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30384087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T14:10:17.325Z","status":"ssl_error","status_checked_at":"2026-03-11T14:09:37.934Z","response_time":84,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-16T02:23:34.570Z","updated_at":"2026-03-11T14:37:16.175Z","avatar_url":"https://github.com/dnmfarrell.png","language":"Prolog","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dict\nAn ISO Prolog dictionary, implemented as an incomplete binary search tree.\n\nInspired by Chapter 15.3 from [The Art of Prolog](https://mitpress.mit.edu/9780262691635/the-art-of-prolog/)  by Sterling and Shapiro.\n\nTested with [Scryer Prolog](https://scryer.pl).\n\n## Exports\n* `add(+Key, ?Dict, ?Value)` - adds a key-value pair to the dictionary, if it doesn't already exist.\n* `balance(+Dict, -Dict)` - balances a dictionary.\n* `get(+Key, +Dict, -Value)` - gets the value associated with the key. Fails if key does not exist.\n* `height(+Key, -Height)` - calculates and returns the height of the dictionary's tree.\n* `put(+Key, ?Dict, -Dict1, +Value)` - adds/updates the value of a key, returning a new dictionary.\n* `to_list(+Dict, -List)` - serializes a dictionary to a list of key-value pairs.\n\n## Testing\n    $ scryer-prolog -f test/dict.pl\n    Running test \"add/get\"\n    Running test \"put\"\n    Running test \"to_list\"\n    Running test \"height/balance\"\n\n## See Also\nMany prologs ship with a balanced tree dictionary implementation called [assoc](https://www.scryer.pl/assoc).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnmfarrell%2Fdict","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnmfarrell%2Fdict","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnmfarrell%2Fdict/lists"}