{"id":16906608,"url":"https://github.com/rsms/ipvec","last_synced_at":"2025-04-11T15:26:54.576Z","repository":{"id":7149532,"uuid":"8447793","full_name":"rsms/ipvec","owner":"rsms","description":"Educational persistent vector implementation in C","archived":false,"fork":false,"pushed_at":"2013-02-27T03:21:22.000Z","size":112,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T12:41:49.874Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","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/rsms.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}},"created_at":"2013-02-27T03:18:09.000Z","updated_at":"2021-06-07T20:56:19.000Z","dependencies_parsed_at":"2022-09-02T18:50:20.756Z","dependency_job_id":null,"html_url":"https://github.com/rsms/ipvec","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fipvec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fipvec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fipvec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fipvec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rsms","download_url":"https://codeload.github.com/rsms/ipvec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248429951,"owners_count":21101924,"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-13T18:43:33.130Z","updated_at":"2025-04-11T15:26:54.557Z","avatar_url":"https://github.com/rsms.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ipvec\n\nEducational immutable, persistent vector implementation in C, inspired by the [Clojure vector](http://clojure.org/data_structures#Data%20Structures-Vectors%20%28IPersistentVector%29) implementation.\n\nHave a look at [`main.c`](https://github.com/rsms/ipvec/blob/master/main.c) to get started. Run `make \u0026\u0026 ./ipvec` to build run the demo program.\n\nNote that this is educational and there's really no memory management. I leave this detail as an exercise for the reader (hint: count refernces or implement GC and `free()` Node structs when dead.)\n\n## API\n\n```c\ntypedef struct IPVec IPVec;\n// An opaque structure representing a vector.\n\nextern const IPVec* IPVecEmpty;\n// The empty vector. This is usually what you will start with when building\n// a new vector.\n\nIPVec* IPVecPut(const IPVec* v, size_t index, void* value);\n// Derive a vector from v which has value at index\n\nIPVec* IPVecAppend(const IPVec* v, void* value);\n// Derive a vector from v which has value at the end of v\n\nvoid*  IPVecAt(const IPVec* v, size_t index);\n// Return the value at index, or NULL if not set\n\nsize_t IPVecLen(const IPVec* v);\n// Return the virtual length of v. Note that IPVec is sparese, and thus a\n// vector with only two items can have a length greater than 2.\n```\n\n# MIT License\n\nCopyright (c) 2013 Rasmus Andersson \u003chttp://rsms.me/\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsms%2Fipvec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsms%2Fipvec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsms%2Fipvec/lists"}