{"id":51463333,"url":"https://github.com/alternative-intelligence-cp/nlists","last_synced_at":"2026-07-06T08:01:17.046Z","repository":{"id":368425944,"uuid":"1285063180","full_name":"alternative-intelligence-cp/nlists","owner":"alternative-intelligence-cp","description":"Pure native Nitpick List data structures (100% C-free).","archived":false,"fork":false,"pushed_at":"2026-06-30T13:08:12.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-30T15:11:35.381Z","etag":null,"topics":["c-free","data-structures","lists","nitpick"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alternative-intelligence-cp.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-30T12:53:00.000Z","updated_at":"2026-06-30T13:08:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/alternative-intelligence-cp/nlists","commit_stats":null,"previous_names":["alternative-intelligence-cp/nlists"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/alternative-intelligence-cp/nlists","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alternative-intelligence-cp%2Fnlists","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alternative-intelligence-cp%2Fnlists/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alternative-intelligence-cp%2Fnlists/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alternative-intelligence-cp%2Fnlists/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alternative-intelligence-cp","download_url":"https://codeload.github.com/alternative-intelligence-cp/nlists/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alternative-intelligence-cp%2Fnlists/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35182322,"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-07-06T02:00:07.184Z","response_time":106,"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-free","data-structures","lists","nitpick"],"created_at":"2026-07-06T08:01:16.245Z","updated_at":"2026-07-06T08:01:17.034Z","avatar_url":"https://github.com/alternative-intelligence-cp.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# nlists\n\n`nlists` is a purely native Nitpick library containing highly-optimized List data structures (Singly-Linked, Doubly-Linked, Circular, SkipLists, etc.). \n\nThis library is built entirely with Nitpick and relies solely on raw POSIX native system calls for memory allocation—guaranteeing 100% C-dependency-free operation.\n\n## Completed Cycles\n- **Cycle 0.1**: Foundation \u0026 Pure Native Memory Allocation (Completed)\n- **Cycle 0.2**: Singly-Linked Lists (`SList` and `SListV`) (Completed)\n- **Cycle 0.3**: Doubly-Linked Lists (`DList` and `DListV`) (Completed)\n- **Cycle 0.4**: Specialized Lists (`SortedList`, `CList`, `SkipList`) (Completed)\n- **Cycle 0.5**: Validation, Benchmarks \u0026 Release (Completed)\n\n## Features\n- **Singly \u0026 Doubly Linked Lists**: $O(1)$ head/tail operations (`SList`, `DList`).\n- **Circular Lists**: Continuous looping pointer structures (`CList`).\n- **Ordered Collections**: `SortedList` for linear $O(N)$ sorted insertions.\n- **Probabilistic Data Structures**: `SkipList` for $O(\\log N)$ insertions, removals, and lookups natively mirroring Binary Search Trees without the rebalancing overhead.\n- **Universal Payloads**: Standalone modules (`SListV`, `DListV`) dynamically supporting untyped/tagged payloads using `MapV` concepts.\n\n## Build \u0026 Usage\n\nTo compile the `nlists` repository natively using the Nitpick compiler (`npkc`):\n\n```bash\n# Compile and run the benchmark suite\nnpkc tests/benchmark_nlists.npk -o tests/benchmark_nlists\n./tests/benchmark_nlists\n```\n\nTo use `nlists` in your own Nitpick projects, simply import the required list type:\n```nitpick\nuse \"path/to/nlists/src/singly.npk\".*;\n\npub func:main = int32() {\n    int64:list = raw SList.create();\n    drop raw SList.push_front(list, 42i64);\n    drop raw SList.destroy(list);\n    exit 0i32;\n};\n```\n\n## API Reference\n\n### `src/singly.npk` (`SList`)\n- `SList.create()`: Creates a new singly-linked list.\n- `SList.push_front(list, val)`: Inserts element at head.\n- `SList.pop_front(list)`: Removes and returns element from head.\n- `SList.push_back(list, val)`: Inserts element at tail.\n- `SList.contains(list, val)`: Checks if value exists.\n- `SList.remove_first(list, val)`: Removes the first matching element.\n- `SList.reverse(list)`: Reverses the list in-place.\n- `SList.destroy(list)`: Frees the list.\n\n### `src/doubly.npk` (`DList`)\n- `DList.create()`: Creates a new doubly-linked list.\n- `DList.push_front(list, val)` / `DList.push_back(list, val)`\n- `DList.pop_front(list)` / `DList.pop_back(list)`\n- `DList.insert_before(list, target, val)` / `DList.insert_after(list, target, val)`\n- `DList.remove(list, val)`\n- `DList.destroy(list)`\n\n### `src/skiplist.npk` (`SkipList`)\n- `SkipList.create()`: Creates a skip list capable of 16-level random node height via internal LCG.\n- `SkipList.insert(list, val)`: Inserts into the appropriate sorted level in $O(\\log N)$ time.\n- `SkipList.contains(list, val)`: Checks if a value exists in $O(\\log N)$ time.\n- `SkipList.remove(list, val)`: Deletes an element from all its levels in $O(\\log N)$ time.\n- `SkipList.destroy(list)`: Safely dismantles the skip graph structure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falternative-intelligence-cp%2Fnlists","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falternative-intelligence-cp%2Fnlists","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falternative-intelligence-cp%2Fnlists/lists"}