{"id":20381719,"url":"https://github.com/jacob-c-smith/tuple","last_synced_at":"2025-12-02T10:04:31.692Z","repository":{"id":190335309,"uuid":"682406175","full_name":"Jacob-C-Smith/tuple","owner":"Jacob-C-Smith","description":"Immutable, iterable, integer indexed collection","archived":false,"fork":false,"pushed_at":"2024-12-29T08:25:48.000Z","size":58,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T07:39:20.881Z","etag":null,"topics":["c","tested","tuple"],"latest_commit_sha":null,"homepage":"https://g10.app/status/#abstract_data_i","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jacob-C-Smith.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}},"created_at":"2023-08-24T05:30:16.000Z","updated_at":"2024-07-26T02:53:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"acc1fd6f-8a06-4e48-a3b7-161edefd6e17","html_url":"https://github.com/Jacob-C-Smith/tuple","commit_stats":null,"previous_names":["jacob-c-smith/tuple"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacob-C-Smith%2Ftuple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacob-C-Smith%2Ftuple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacob-C-Smith%2Ftuple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacob-C-Smith%2Ftuple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jacob-C-Smith","download_url":"https://codeload.github.com/Jacob-C-Smith/tuple/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241933815,"owners_count":20044789,"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":["c","tested","tuple"],"created_at":"2024-11-15T02:15:05.227Z","updated_at":"2025-12-02T10:04:26.674Z","avatar_url":"https://github.com/Jacob-C-Smith.png","language":"C","readme":"# tuple\n[![CMake](https://github.com/Jacob-C-Smith/tuple/actions/workflows/cmake.yml/badge.svg?branch=main)](https://github.com/Jacob-C-Smith/tuple/actions/workflows/cmake.yml)\n\n**Dependencies:**\\\n[![sync](https://github.com/Jacob-C-Smith/sync/actions/workflows/cmake.yml/badge.svg)](https://github.com/Jacob-C-Smith/sync/actions/workflows/cmake.yml)\n[![log](https://github.com/Jacob-C-Smith/log/actions/workflows/cmake.yml/badge.svg)](https://github.com/Jacob-C-Smith/log/actions/workflows/cmake.yml)\n\n A minimal tuple implementation written in C. \n \n \u003e 0 [Try it](#try-it)\n \u003e \n \u003e 1 [Download](#download)\n \u003e\n \u003e 2 [Build](#build)\n \u003e\n \u003e 3 [Example](#example)\n \u003e\n \u003e\u003e 3.1 [Example output](#example-output)\n \u003e\n \u003e 4 [Tester](#tester)\n \u003e\n \u003e 5 [Definitions](#definitions)\n \u003e\n \u003e\u003e 5.1 [Type definitions](#type-definitions)\n \u003e\u003e\n \u003e\u003e 5.2 [Function definitions](#function-definitions)\n\n## Try it\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/Jacob-C-Smith/tuple?quickstart=1)\n\nWait for a few moments, then click the play button on the bottom of the window. This will run the example program.\n\n ## Download\n To download tuple, execute the following command\n ```bash\n $ git clone https://github.com/Jacob-C-Smith/tuple\n ```\n ## Build\n To build on UNIX like machines, execute the following commands in the same directory\n ```bash\n $ cd tuple\n $ cmake .\n $ make\n ```\n  This will build the example program, the tester program, and dynamic / shared libraries\n\n  To build tuple for Windows machines, open the base directory in Visual Studio, and build your desired target(s)\n ## Example\n To run the example program, execute this command\n ```\n $ ./tuple_example\n ```\n ### Example output\n ```\nConstructing tuple (\"Dogs\", \"Cats\", \"Birds\", \"Fish\")\n[0] Dogs\n[1] Cats\n[2] Birds\n[3] Fish\n\nTuple slice [1:2]\nCats\nBirds\n ```\n [Source](main.c)\n## Tester\n To run the tester program, execute this command after building\n ```\n $ ./tuple_test\n ```\n [Source](tuple_test.c)\n \n [Tester output](test_output.txt)\n ## Definitions\n ### Type definitions\n ```c\n typedef struct tuple_s tuple;\n ```\n ### Function definitions\n ```c \n// Allocaters\nint tuple_create ( const tuple **const pp_tuple );\n\n// Constructors\nint tuple_construct      ( tuple       **const pp_tuple, size_t               size );\nint tuple_from_elements  ( const tuple **const pp_tuple, void   *const *const elements     , size_t size );\nint tuple_from_arguments ( const tuple **const pp_tuple, int                  element_count, ... );\n\n// Accessors\nint    tuple_index    ( const tuple *const p_tuple, signed             index      , void   **const pp_value );\nint    tuple_get      ( const tuple *const p_tuple, const void **const pp_elements, size_t  *const p_count );\nint    tuple_slice    ( const tuple *const p_tuple, const void **const pp_elements, signed         lower_bound, signed upper_bound );\nbool   tuple_is_empty ( const tuple *const p_tuple );\nsize_t tuple_size     ( const tuple *const p_tuple );\n\n// Iterators\nint tuple_foreach_i ( const tuple *const p_tuple, void (*const function)(void *const value, size_t index) );\n\n// Destructors\nint tuple_destroy ( tuple **const pp_tuple );\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacob-c-smith%2Ftuple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacob-c-smith%2Ftuple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacob-c-smith%2Ftuple/lists"}