{"id":24127057,"url":"https://github.com/westdragoniroh/ziglings-solutions","last_synced_at":"2026-06-15T09:32:05.734Z","repository":{"id":246948642,"uuid":"772110317","full_name":"WestDragonIroh/Ziglings-solutions","owner":"WestDragonIroh","description":"My ziglings solution","archived":false,"fork":false,"pushed_at":"2024-07-05T17:59:57.000Z","size":254,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T02:19:25.047Z","etag":null,"topics":["zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/WestDragonIroh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-03-14T14:56:39.000Z","updated_at":"2024-07-05T18:02:12.000Z","dependencies_parsed_at":"2024-07-06T00:44:16.914Z","dependency_job_id":null,"html_url":"https://github.com/WestDragonIroh/Ziglings-solutions","commit_stats":null,"previous_names":["westdragoniroh/ziglings-solutions"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WestDragonIroh/Ziglings-solutions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WestDragonIroh%2FZiglings-solutions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WestDragonIroh%2FZiglings-solutions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WestDragonIroh%2FZiglings-solutions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WestDragonIroh%2FZiglings-solutions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WestDragonIroh","download_url":"https://codeload.github.com/WestDragonIroh/Ziglings-solutions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WestDragonIroh%2FZiglings-solutions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34357281,"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-06-15T02:00:07.085Z","response_time":63,"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":["zig"],"created_at":"2025-01-11T17:37:49.927Z","updated_at":"2026-06-15T09:32:05.673Z","avatar_url":"https://github.com/WestDragonIroh.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ziglings\n# ⚠️ Ziglings has moved from GitHub to Codeberg!\n\nYou are looking at the current Ziglings repo if you are viewing\nthis at https://codeberg.org/ziglings/exercises/\n\nYou can also use the handy URL https://ziglings.org to get here!\n\n***\n\nWelcome to Ziglings! This project contains a series of tiny\nbroken programs (and one nasty surprise).  By fixing them, you'll\nlearn how to read and write [Zig](https://ziglang.org/) code.\n\n![Ziglings](images/ziglings.jpg \"Ziglings\")\n\nThose broken programs need your help! (You'll also save the\nplanet from evil aliens and help some friendly elephants stick\ntogether, which is very sweet of you.)\n\nThis project was directly inspired by the brilliant and fun\n[rustlings](https://github.com/rust-lang/rustlings)\nproject for the [Rust](https://www.rust-lang.org/) language.\nIndirect inspiration comes from [Ruby Koans](http://rubykoans.com/)\nand the Little LISPer/Little Schemer series of books.\n\n## Intended Audience\n\nThis will probably be difficult if you've _never_ programmed\nbefore.  But no specific programming experience is required. And\nin particular, you are _not_ expected to have any prior\nexperience with \"systems programming\" or a \"systems\" level\nlanguage such as C.\n\nEach exercise is self-contained and self-explained. However,\nyou're encouraged to also check out these Zig language resources\nfor more detail:\n\n* https://ziglang.org/learn/\n* https://ziglearn.org/\n* https://ziglang.org/documentation/master/\n* [Zig in Depth! (video series)](https://www.youtube.com/watch?v=MMtvGA1YhW4\u0026list=PLtB7CL7EG7pCw7Xy1SQC53Gl8pI7aDg9t\u0026pp=iAQB)\n\nAlso, the [Zig community](https://github.com/ziglang/zig/wiki/Community)\nis incredibly friendly and helpful!\n\n## Getting Started\n\nInstall a [development build](https://ziglang.org/download/) of\nthe Zig compiler.  (See the \"master\" section of the downloads\npage.)\n\nVerify the installation and build number of `zig` like so:\n\n```\n$ zig version\n0.12.0-dev.xxxx+xxxxxxxxx\n```\n\nClone this repository with Git:\n\n```\n$ git clone https://ziglings.org\n$ cd ziglings.org\n```\n\nThen run `zig build` and follow the instructions to begin!\n\n```\n$ zig build\n```\n\nNote: The output of Ziglings is the unaltered output from the Zig\ncompiler. Part of the purpose of Ziglings is to acclimate you to\nreading these.\n\n## A Note About Versions\n\n**Hint:** To check out Ziglings for a stable release of Zig, you can use\nthe appropriate tag. \n\nThe Zig language is under very active development. In order to be\ncurrent, Ziglings tracks **development** builds of the Zig\ncompiler rather than versioned **release** builds. The last\nstable release was `0.11.0`, but Ziglings needs a dev build with\npre-release version \"0.12.0\" and a build number at least as high\nas that shown in the example version check above.\n\nIt is likely that you'll download a build which is _greater_ than\nthe minimum.\n\nOnce you have a build of the Zig compiler that works with\nZiglings, they'll continue to work together. But keep in mind\nthat if you update one, you may need to also update the other.\n\n\n### Version Changes\n\nVersion-0.12.0-dev.2043\n* *2024-01-05* zig 0.12.0-dev.2043 - rename of `std.Build.FileSource` to `std.Build.LazyPath` - see[#16353](https://github.com/ziglang/zig/issues/16353)\n* *2023-10-24* zig 0.12.0-dev.1243 - changes in `std.ChildProcess`: renamed exec to run - see[#5853](https://github.com/ziglang/zig/issues/5853)\n* *2023-06-26* zig 0.11.0-dev.4246 - changes in compile step (now it can be null)\n* *2023-06-26* zig 0.11.0-dev.3853 - removal of destination type from all cast builtins\n* *2023-06-20* zig 0.11.0-dev.3747 - `@enumToInt` is now `@intFromEnum` and `@intToFloat` is now `@floatFromInt`\n* *2023-05-25* zig 0.11.0-dev.3295 - `std.debug.TTY` is now `std.io.tty`\n* *2023-04-30* zig 0.11.0-dev.2704 - use of the new `std.Build.ExecutableOptions.link_libc` field\n* *2023-04-12* zig 0.11.0-dev.2560 - changes in `std.Build` - remove run() and install()\n* *2023-04-07* zig 0.11.0-dev.2401 - fixes of the new build system - see [#212](https://github.com/ratfactor/ziglings/pull/212)\n* *2023-02-21* zig 0.11.0-dev.2157 - changes in `build system` - new: parallel processing of the build steps\n* *2023-02-21* zig 0.11.0-dev.1711 - changes in `for loops` - new: Multi-Object For-Loops + Struct-of-Arrays\n* *2023-02-12* zig 0.11.0-dev.1638 - changes in `std.Build` cache_root now returns a directory struct\n* *2023-02-04* zig 0.11.0-dev.1568 - changes in `std.Build` (combine `std.build` and `std.build.Builder` into `std.Build`)\n* *2023-01-14* zig 0.11.0-dev.1302 - changes in `@addWithOverflow` (now returns a tuple) and `@typeInfo`; temporary disabled async functionality\n* *2022-09-09* zig 0.10.0-dev.3978 - change in `NativeTargetInfo.detect` in build\n* *2022-09-06* zig 0.10.0-dev.3880 - Ex 074 correctly fails again: comptime array len\n* *2022-08-29* zig 0.10.0-dev.3685 - `@typeName()` output change, stage1 req. for async\n* *2022-07-31* zig 0.10.0-dev.3385 - std lib string `fmt()` option changes\n* *2022-03-19* zig 0.10.0-dev.1427 - method for getting sentinel of type changed\n* *2021-12-20* zig 0.9.0-dev.2025 - `c_void` is now `anyopaque`\n* *2021-06-14* zig 0.9.0-dev.137  - std.build.Id `.Custom` is now `.custom`\n* *2021-04-21* zig 0.8.0-dev.1983 - std.fmt.format() `any` format string required\n* *2021-02-12* zig 0.8.0-dev.1065 - std.fmt.format() `s` (string) format string required\n\n## Advanced Usage\n\nIt can be handy to check just a single exercise:\n\n```\nzig build -Dn=19\n```\n\nYou can also run without checking for correctness:\n\n```\nzig build -Dn=19 test\n```\n\nOr skip the build system entirely and interact directly with the\ncompiler if you're into that sort of thing:\n\n```\nzig run exercises/001_hello.zig\n```\n\nCalling all wizards: To prepare an executable for debugging,\ninstall it to zig-cache/bin with:\n\n```\nzig build -Dn=19 install\n```\n\nTo get a list of all possible options, run:\n\n```\nzig build -Dn=19 -l\n\n  install          Install 019_functions2.zig to prefix path\n  uninstall        Uninstall 019_functions2.zig from prefix path\n  test             Run 019_functions2.zig without checking output\n  ...\n```\n\n## What's Covered\n\nThe primary goal for Ziglings is to cover the core Zig language.\n\nIt would be nice to cover the Standard Library as well, but this\nis currently challenging because the stdlib is evolving even\nfaster than the core language (and that's saying something!).\nNot only would stdlib coverage change very rapidly, some\nexercises might even cease to be relevant entirely.\n\nHaving said that, there are some stdlib features that are\nprobably here to stay or are so important to understand that they\nare worth the extra effort to keep current.\n\nConspicuously absent from Ziglings are a lot of string\nmanipulation exercises. This is because Zig itself largely avoids\ndealing with strings. Hopefully there will be an obvious way to\naddress this in the future. The Ziglings crew loves strings!\n\nZig Core Language\n\n* [x] Hello world (main needs to be public)\n* [x] Importing standard library\n* [x] Assignment\n* [x] Arrays\n* [x] Strings\n* [x] If\n* [x] While\n* [x] For\n* [x] Functions\n* [x] Errors (error/try/catch/if-else-err)\n* [x] Defer (and errdefer)\n* [x] Switch\n* [x] Unreachable\n* [x] Enums\n* [x] Structs\n* [x] Pointers\n* [x] Optionals\n* [x] Struct methods\n* [x] Slices\n* [x] Many-item pointers\n* [x] Unions\n* [x] Numeric types (integers, floats)\n* [x] Labelled blocks and loops\n* [x] Loops as expressions\n* [x] Builtins\n* [x] Inline loops\n* [x] Comptime\n* [x] Sentinel termination\n* [x] Quoted identifiers @\"\"\n* [x] Anonymous structs/tuples/lists\n* [ ] Async \u003c--- ironically awaiting upstream Zig updates\n* [X] Interfaces\n* [X] Bit manipulation\n* [X] Working with C\n* [ ] Interfaces part 2\n\nZig Standard Library\n\n* [X] String formatting\n* [X] Testing\n* [X] Tokenization\n\n## Contributing\n\nContributions are very welcome! I'm writing this to teach myself\nand to create the learning resource I wished for. There will be\ntons of room for improvement:\n\n* Wording of explanations\n* Idiomatic usage of Zig\n* Additional exercises\n\nPlease see [CONTRIBUTING](https://codeberg.org/ziglings/exercises/src/branch/main/CONTRIBUTING.md)\nin this repo for the full details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwestdragoniroh%2Fziglings-solutions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwestdragoniroh%2Fziglings-solutions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwestdragoniroh%2Fziglings-solutions/lists"}