{"id":51463329,"url":"https://github.com/alternative-intelligence-cp/nmaps","last_synced_at":"2026-07-06T08:01:15.296Z","repository":{"id":368554028,"uuid":"1285062631","full_name":"alternative-intelligence-cp/nmaps","owner":"alternative-intelligence-cp","description":"Pure native Nitpick Map data structures (100% C-free).","archived":false,"fork":false,"pushed_at":"2026-07-01T04:36:57.000Z","size":1481,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-01T06:29:56.031Z","etag":null,"topics":["c-free","data-structures","maps","nitpick"],"latest_commit_sha":null,"homepage":null,"language":"LLVM","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:52:21.000Z","updated_at":"2026-07-01T04:37:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/alternative-intelligence-cp/nmaps","commit_stats":null,"previous_names":["alternative-intelligence-cp/nmaps"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/alternative-intelligence-cp/nmaps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alternative-intelligence-cp%2Fnmaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alternative-intelligence-cp%2Fnmaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alternative-intelligence-cp%2Fnmaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alternative-intelligence-cp%2Fnmaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alternative-intelligence-cp","download_url":"https://codeload.github.com/alternative-intelligence-cp/nmaps/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alternative-intelligence-cp%2Fnmaps/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","maps","nitpick"],"created_at":"2026-07-06T08:01:14.177Z","updated_at":"2026-07-06T08:01:15.290Z","avatar_url":"https://github.com/alternative-intelligence-cp.png","language":"LLVM","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NMAPS\n\nA pure native implementation of high-performance Maps and Associative Arrays for Nitpick.\n**No C-Dependencies, No Shims, 100% Native.**\n\n## Features\n\n- **Pure Native Map Allocation**: Highly optimized block allocation and generic heap integrations.\n- **State-of-the-art Hashing**: `FNV-1a` (32/64-bit) and `Murmur3` hashing integrated natively.\n- **Open Addressing IntMap**: Blazing fast `int64` -\u003e `int64` map with Robin Hood / Linear Probing styles.\n\n## Build \u0026 Usage\n\nTo compile the `nmaps` repository natively using the Nitpick compiler (`npkc`):\n\n```bash\n# Compile and run the benchmark suite\nnpkc tests/benchmark_nmaps.npk -o tests/benchmark_nmaps\n./tests/benchmark_nmaps\n```\n\nTo use `nmaps` in your own Nitpick projects, simply import the required map type:\n```nitpick\nuse \"path/to/nmaps/src/intmap.npk\".*;\n\npub func:main = int32() {\n    int64:map = raw IntMap.create(16i64);\n    drop raw IntMap.put(map, 100i64, 42i64);\n    drop raw IntMap.destroy(map);\n    exit 0i32;\n};\n```\n\n## API Reference\n\n### `src/intmap.npk`\n- `create(initial_capacity)`: Initializes an Open Addressing IntMap.\n- `put(map, key, val)`: Inserts a key-value pair, handling automatic dynamic rehashing when load factor \u003e 70%.\n- `get(map, key, out_val_ptr)`: Retrieves a value by key. Returns 1 if found, 0 otherwise.\n- `remove(map, key)`: Deletes a key via a tombstone, preserving linear probe chains.\n- `destroy(map)`: Frees the entire map and its internal buckets.\n\n### `src/hash.npk`\n- `fnv1a(data, len)`: 64-bit FNV-1a hash.\n- `fnv1a_32(data, len)`: 32-bit FNV-1a hash.\n- `murmur3_32(data, len)`: 32-bit MurmurHash3.\n- `hash_int64(key)`: 64-bit fast integer mixer (SplitMix64 variant).\n\n### `src/mapv.npk` (Universal Map)\n- `mapv_create(initial_capacity)`: Initializes a Universal Map.\n- `mapv_put(map, key_tag, key, val_tag, val)`: Inserts a tagged key-value pair.\n- `mapv_get(map, key_tag, key, out_tag_ptr, out_val_ptr)`: Retrieves a tagged value.\n- `mapv_remove(map, key_tag, key)`: Removes a generic key.\n\n### `src/mapc.npk` (Chained Hash Map)\n- `mapc_create(initial_capacity)`: Initializes a Chained Hash Map.\n- `mapc_put(map, key, val)`: Inserts via Linked List collision resolution.\n- `mapc_get(map, key, out_val_ptr)`: Retrieves a value by key.\n\n### `src/treemap.npk` (Binary Search Tree)\n- `treemap_create()`: Initializes a generic BST map.\n- `treemap_put(map, key, val)`: Inserts node and preserves binary search order.\n- `treemap_get(map, key, out_val_ptr)`: Binary searches the tree for $O(\\log N)$ lookups.\n- `treemap_remove(map, key)`: Deletes node by finding in-order successor and reconnecting subtrees.\n\n### `src/lru.npk` (LRU Cache)\n- `lru_create(max_capacity)`: Initializes a size-constrained cache backed by an IntMap and doubly-linked list.\n- `lru_put(lru, key, val)`: Appends to head; seamlessly evicts tail node to MapAllocator and clears from Hash map on overflow.\n- `lru_get(lru, key, out_val_ptr)`: Retrieves key and resets accessed node to head position.\n\n## Status\n- **Cycle 0.1**: Foundation \u0026 Hashing Core (Completed)\n- **Cycle 0.2**: Core HashMap / IntMap (Completed)\n- **Cycle 0.3**: Universal \u0026 Specialized Maps (Completed)\n- **Cycle 0.4**: Ordered Maps (`TreeMap` \u0026 `LRU`) (Completed)\n- **Cycle 0.5**: Validation, Benchmarks \u0026 Release (Completed)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falternative-intelligence-cp%2Fnmaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falternative-intelligence-cp%2Fnmaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falternative-intelligence-cp%2Fnmaps/lists"}