{"id":21703685,"url":"https://github.com/frodoalaska/ishtar","last_synced_at":"2025-03-20T16:48:16.489Z","repository":{"id":260427782,"uuid":"881270844","full_name":"FrodoAlaska/Ishtar","owner":"FrodoAlaska","description":"A single-file suite of tools for C++","archived":false,"fork":false,"pushed_at":"2024-11-15T18:55:57.000Z","size":183,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-25T15:41:30.924Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FrodoAlaska.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":"2024-10-31T08:32:15.000Z","updated_at":"2024-11-15T18:56:00.000Z","dependencies_parsed_at":"2024-11-25T21:34:43.181Z","dependency_job_id":null,"html_url":"https://github.com/FrodoAlaska/Ishtar","commit_stats":null,"previous_names":["frodoalaska/ishtar"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrodoAlaska%2FIshtar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrodoAlaska%2FIshtar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrodoAlaska%2FIshtar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrodoAlaska%2FIshtar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FrodoAlaska","download_url":"https://codeload.github.com/FrodoAlaska/Ishtar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244656645,"owners_count":20488638,"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":[],"created_at":"2024-11-25T21:34:38.703Z","updated_at":"2025-03-20T16:48:16.460Z","avatar_url":"https://github.com/FrodoAlaska.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What Is *Ishtar*? \n*Ishtar* is a single-file suite of tools for C++. It has basic data structures like dynamic arrays, stacks, queues, hash tables, strings, and even some useful algorithms. \n*No need to build it*. Just a single header file that can be copied and pasted into any project. \n*No overhead*. A minimal use of the standard library is present, but nothing else.\n*And readable, too*. A library that you can actually look at without vomiting? No way! \n\n# What Does *Ishtar* Use? \n*Ishtar* only uses the standard library to do basic things like memory management and asserts. Here's _exactly_ the standard libraries that *Ishtar* uses:\n- cstdlib (for `malloc`, `free`, and `realloc`)\n- cstring (for `memset`)\n- casserts (for `assert`)\n \n# What Does *Ishtar* Have?\n*Ishtar* supports most of the basic data structures:\n- Linked Lists\n- Stacks \n- Queues \n- Dynamic Arrays\n- Strings \n- Hash tables \n- Arena allocator\n- Extensive documentation\n\n# Upcoming Features\n- Smart pointers\n- Path string \n- File system API\n- Searching algorithms (binary search, binary search tree, breadth-first search, depth-first search)\n- Sorting algorithms (quick sort, merge sort, bubble sort)\n- Trees (Binary, Quad, etc.)\n\n# How To Build? \n*Ishtar* only has one header file and one translation unit (.cpp file). The only requirement is to add the following line of code before the `#include` directive in one `.cpp` file only _once_ in the whole project. \n\n```c++\n#define ISHTAR_IMPL\n#include \u003cishtar.h\u003e\n```\n\nOnce you build that translation unit, the library will be ready for use.\n\n# How To Use?\nThe following code excerpt illustrates how to use the data structure `DynamicArray` in *Ishtar*. It is a very contrived example, but it gets the point across nonetheless. However, if you wish to know more about the other data structures in *Ishtar* and how they are used, you can go to the \"examples\" folder to see more. Otherwise, you can go through the `ishtar.h` file if you'd like and read the documentation since it is somewhat concise.\n\n```c++\n#include \"ishtar.h\"\n\n#include \u003ccstdtio\u003e\n\nint main() {\n    // Creating a `DynamicArray` with an initial reserved capacity of 256\n    ishtar::DynamicArray\u003cint\u003e arr(256);\n\n    // Adding a new elements into the array \n    arr.append(0);\n    arr.append(1);\n    arr.append(2);\n    arr.append(4);\n    // ...\n\n    // You can also pop from the end of the array \n    int last = arr.pop_back();\n    int first = arr.pop_front();\n\n    // You can also use a for each loop and pass it a function pointer\n    auto print_element_func = [](int\u0026 value) {\n       printf(\"%i\\n\", value); \n    };\n    arr.for_each(print_element_func);\n\n    // You can also cut a piece of the array and return a \"slice\" of it \n    // @NOTE: The slice is taken from `begin` till `end`. Both `begin` and \n    // `end` are _inclusive_.\n    DynamicArray\u003cint\u003e arr_piece = arr.slice(0, 2); \n\n    // A remove operation can also be done on the array. \n    // @NOTE: This does not resize the array. Meaning, there aren't any \n    // allocations or de-allocations that happen. The `size` is just \n    // decremented and the elements are shuffled over\n    arr.remove(0);\n\n    // This NEEDS to be called if you want to free the underlying allocated memory \n    arr.clear();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrodoalaska%2Fishtar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrodoalaska%2Fishtar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrodoalaska%2Fishtar/lists"}