{"id":17992932,"url":"https://github.com/leostera/retrie","last_synced_at":"2025-09-11T16:17:21.804Z","repository":{"id":141534975,"uuid":"184712546","full_name":"leostera/retrie","owner":"leostera","description":"A quick and dirty, likely broken trie","archived":false,"fork":false,"pushed_at":"2019-05-03T07:10:44.000Z","size":55,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T16:16:48.812Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leostera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-05-03T07:04:45.000Z","updated_at":"2019-08-27T14:23:55.000Z","dependencies_parsed_at":"2023-08-15T23:51:20.381Z","dependency_job_id":null,"html_url":"https://github.com/leostera/retrie","commit_stats":null,"previous_names":["leostera/retrie"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fretrie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fretrie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fretrie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fretrie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leostera","download_url":"https://codeload.github.com/leostera/retrie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247123103,"owners_count":20887260,"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-29T20:09:40.108Z","updated_at":"2025-04-04T04:46:05.066Z","avatar_url":"https://github.com/leostera.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# retrie\n\u003e A quick and dirty trie, possibly broken in more than one way\n\nI originally started with an algebraic datatype like:\n\n```reason\ntype t =\n  | Node(list(edge))\n  | Leaf\nand edge = (string, t);\n```\n\nwhich makes a single path construction trivial, but makes merging searches more\nconvoluted.\n\nThen I swapped to a `Hashtbl.t(int, list(string))`, where each position had an\nassociated string. While making it easier to look up chars, it did not make it\nany easier to search.\n\nThen I swapped to the an algebraic type like:\n\n```reason\ntype t = \n  | Node(option(string), M.t(t));\n```\n\nWhere `M.t('a)` is a map of string-keys to `'a`.\n\nNot in love with it, and I haven't benchmarked, but beyond the bugs I haven't\ndug for, it seems to work for the simple tests I've done with it.\n\n### Running\n\n```sh\nostera/retrie λ npm -g i esy\nostera/retrie λ esy dune exec ./retrie.exe\nbaaah wasnt found, yay!\nann works\nannual works\nannulment works\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleostera%2Fretrie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleostera%2Fretrie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleostera%2Fretrie/lists"}