{"id":28033025,"url":"https://github.com/w1redch4d/pcclist","last_synced_at":"2025-05-11T09:10:17.424Z","repository":{"id":291724592,"uuid":"978565134","full_name":"w1redch4d/PCCList","owner":"w1redch4d","description":"PCCList is a dynamic, Python-style list implementation in C++ capable of storing heterogeneous types","archived":false,"fork":false,"pushed_at":"2025-05-06T07:23:11.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T08:35:22.839Z","etag":null,"topics":["cpp17","data-structures","dynamic-array","python-list"],"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/w1redch4d.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}},"created_at":"2025-05-06T07:21:07.000Z","updated_at":"2025-05-06T08:05:05.000Z","dependencies_parsed_at":"2025-05-06T08:39:44.372Z","dependency_job_id":"92b977f7-e0f1-4197-8b96-42c41b366a81","html_url":"https://github.com/w1redch4d/PCCList","commit_stats":null,"previous_names":["w1redch4d/pcclist"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w1redch4d%2FPCCList","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w1redch4d%2FPCCList/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w1redch4d%2FPCCList/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w1redch4d%2FPCCList/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/w1redch4d","download_url":"https://codeload.github.com/w1redch4d/PCCList/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253540834,"owners_count":21924537,"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":["cpp17","data-structures","dynamic-array","python-list"],"created_at":"2025-05-11T09:10:16.523Z","updated_at":"2025-05-11T09:10:17.407Z","avatar_url":"https://github.com/w1redch4d.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PCCList\n\nPCCList is a dynamic, Python-style list implementation in C++ capable of storing multiple types using `std::any`, including support for C-style strings, `std::string`, and various fundamental types. It also supports intuitive indexing, mutation, iteration, and formatted output.\n\n## What it supports?\n\nThe list supports:\n- [x] Indexed access: `L[0]`\n- [x] Mutation: `L[1] = 99`\n- [x] Iteration: `for (auto v : L)`\n- [x] Type-safe retrieval via `.get\u003cT\u003e(index)` and `.try_get\u003cT\u003e(index)`\n\n## How to use it?\n\nExamples are in the `example` directory feel free to read around\n\n## Compilation\n\nFor building (Modify the CMakeLists to point to your main.cc for custom usage):\n\n```bash\ncmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++\ncmake --build build\n```\n\nTo run tests:\n\n```bash\n./build/tests/test_pcclist\n```\n\n## How it works?\n\nPCCList internally stores elements in a `std::vector\u003cstd::any\u003e`, allowing heterogeneous types. It supports construction from any mix of copyable/movable types, including C-style strings, which are converted to `std::string` internally. Access through `operator[]` returns a proxy ValueRef, which supports implicit casting, assignment, and printing via operator\u003c\u003c. Type safety is ensured through `.get\u003cT\u003e()` or `.try_get\u003cT\u003e()` APIs, which safely cast the value at a given index.\n\n## TODOS for future\n\n- [] Support for nested lists (e.g., lists of lists)\n- [] JSON-style output or serialization\n- [] Optional typed mode with compile-time enforcement\n- [] Lots of Optimizations\n- [] Fuzz Testing using LibFuzzer\n\n## Contributing\n\nFeel free to contribute if you wanna add any interesting features or help speeding up the TODOs, if you implement something make sure to add the respective gtest for the feature on `tests/test_pcclist.cc`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fw1redch4d%2Fpcclist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fw1redch4d%2Fpcclist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fw1redch4d%2Fpcclist/lists"}