{"id":50429641,"url":"https://github.com/schak04/s-vector","last_synced_at":"2026-05-31T13:02:17.923Z","repository":{"id":354005405,"uuid":"1221752880","full_name":"schak04/s-vector","owner":"schak04","description":"A minimal implementation of a dynamic array I'm writing in C, inspired by C++ STL's std::vector.","archived":false,"fork":false,"pushed_at":"2026-05-05T06:18:00.000Z","size":234,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-05T08:23:05.368Z","etag":null,"topics":["c-programming","data-structures","dynamic-array","reimplementation"],"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/schak04.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-26T16:30:24.000Z","updated_at":"2026-05-05T06:18:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/schak04/s-vector","commit_stats":null,"previous_names":["schak04/s-vector"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/schak04/s-vector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schak04%2Fs-vector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schak04%2Fs-vector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schak04%2Fs-vector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schak04%2Fs-vector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schak04","download_url":"https://codeload.github.com/schak04/s-vector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schak04%2Fs-vector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33731998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"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":["c-programming","data-structures","dynamic-array","reimplementation"],"created_at":"2026-05-31T13:02:15.418Z","updated_at":"2026-05-31T13:02:17.918Z","avatar_url":"https://github.com/schak04.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# s-vector\n\nWriting a minimal implementation of a dynamic array in C, inspired by C++ STL's `std::vector`.\n\n\u003e This project is part of my effort to get more comfortable with low-level programming in C.\n\u003e I really enjoy working with C (and C++) for the level of control they provide over memory and performance. Before making more complex stuff like a custom memory allocator (`s-memalloc`, which is ongoing actually, but I felt the need to warm up a bit before continuing), I’m starting with smaller components to strengthen my understanding of memory management and data structures.\n\u003e While I’ve implemented data structures in C while learning data structures and algorithms for the first time and for further practice, I haven’t built standalone C projects before. This is the first step I’m taking to change that.\n\n---\n\n## Design\n\n\u003e Integer-only for now, for the sake of simplicity.\n\n### Insertion (at the end)\n\n![sv_push_back() design](./docs/design-sketches/sv_push_back_design.png)\n\n### Deletion (from the end)\n\n![sv_pop_back() design](./docs/design-sketches/sv_pop_back_design.png)\n\n---\n\n## Naming\n\nAll the functions use the `sv_` prefix (e.g., `sv_init`, `sv_push_back`, `sv_pop_back`, `sv_free`).  \n`sv` stands for **s-vector**.\n\n**Why a prefix?**  \nSince C has no namespaces, a generic name like `push_back` (like C++'s `std::vector`) could collide with other libraries or my future programs.\n\nSo, the prefix:\n- Avoids any conflicts.\n- Makes the functions' duty obvious (as they work on my `s_vector`).\n\n---\n\n## Author\n\nSaptaparno Chakraborty\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschak04%2Fs-vector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschak04%2Fs-vector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschak04%2Fs-vector/lists"}