{"id":24629947,"url":"https://github.com/voidcoefficient/ziglings","last_synced_at":"2025-03-20T04:37:37.888Z","repository":{"id":107854329,"uuid":"556124154","full_name":"voidcoefficient/ziglings","owner":"voidcoefficient","description":"learn zig for fun and profit","archived":false,"fork":false,"pushed_at":"2022-10-23T06:00:53.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T03:35:48.421Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/voidcoefficient.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}},"created_at":"2022-10-23T05:21:58.000Z","updated_at":"2023-11-07T13:01:14.000Z","dependencies_parsed_at":"2023-09-16T14:12:57.011Z","dependency_job_id":null,"html_url":"https://github.com/voidcoefficient/ziglings","commit_stats":null,"previous_names":["marlalain/ziglings","voidcoefficient/ziglings"],"tags_count":0,"template":false,"template_full_name":"ratfactor/ziglings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidcoefficient%2Fziglings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidcoefficient%2Fziglings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidcoefficient%2Fziglings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidcoefficient%2Fziglings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voidcoefficient","download_url":"https://codeload.github.com/voidcoefficient/ziglings/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244554051,"owners_count":20471172,"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":"2025-01-25T06:20:38.313Z","updated_at":"2025-03-20T04:37:37.867Z","avatar_url":"https://github.com/voidcoefficient.png","language":"Zig","readme":"# Ziglings\n\nWelcome to Ziglings! This project contains a series of tiny broken programs.\nBy fixing them, you'll learn how to read and write\n[Zig](https://ziglang.org/)\ncode.\n\n![ziglings](https://user-images.githubusercontent.com/1458409/109398392-c1069500-790a-11eb-8ed4-7d7d74d32666.jpg)\n\nThose tiny broken programs need your help! (You'll also save the planet from\nevil aliens and help some friendly elephants stick together, which is very\nsweet 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 before.\nBut no specific programming experience is required. And in particular,\nyou are _not_ expected to have any prior experience with \"systems programming\"\nor a \"systems\" level language such as C.\n\nEach exercise is self-contained and self-explained. However, you're encouraged\nto also check out these Zig language resources for more detail:\n\n* https://ziglearn.org/\n* https://ziglang.org/documentation/master/\n\nAlso, the [Zig community](https://github.com/ziglang/zig/wiki/Community) is incredibly friendly and helpful!\n\n## Getting Started\n\nInstall a [development build](https://ziglang.org/download/) of the Zig compiler.\n(See the \"master\" section of the downloads page.)\n\nVerify the installation and build number of `zig` like so:\n\n```bash\n$ zig version\n0.10.0-dev.3978+xxxxxxxxx\n```\n\nClone this repository with Git:\n\n```bash\n$ git clone https://github.com/ratfactor/ziglings\n$ cd ziglings\n```\n\nThen run `zig build` and follow the instructions to begin!\n\n```bash\n$ zig build\n```\n\n## A Note About Versions\n\nThe Zig language is under very active development. In order to be current,\nZiglings tracks **development** builds of the Zig compiler rather than\nversioned **release** builds. The last stable release was `0.9.1`, but Ziglings\nneeds a dev build with pre-release version \"0.10.0\" and a build number at least\nas high as that shown in the example version check above.\n\nIt is likely that you'll download a build which is _greater_ than the minimum.\n\n_(For those who cannot easily update Zig, there are also community-supported\nbranches in this repo. At the moment, there's one for v0.8.1. Older version\nbranches may or may not have all exercises and/or bugfixes.)_\n\nOnce you have a build of the Zig compiler that works with Ziglings, they'll\ncontinue to work together. But keep in mind that if you update one, you may\nneed to also update the other.\n\nAlso note that the current \"stage 1\" Zig compiler is very strict\nabout input: \n[no tab characters or Windows CR/LF newlines are allowed](https://github.com/ziglang/zig/issues/544).\n\n### Version Changes\n\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 or _start_ from a single\nexercise:\n\n```bash\nzig build 19\nzig build 19_start\n```\n\nYou can also run without checking for correctness:\n\n```bash\nzig build 19_test\n```\n\nOr skip the build system entirely and interact directly with the compiler\nif you're into that sort of thing:\n\n```bash\nzig run exercises/001_hello.zig\n```\n\nCalling all wizards: To prepare an executable for debugging, install it\nto zig-cache/bin with:\n\n```bash\nzig build 19_install\n```\n\n## What's Covered\n\nI've decide to limit Ziglings to the core language and not\nattempt coverage of the Standard Library. Perhaps you can change\nmy mind?\n\nCore 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--- IN PROGRESS!\n\n## Contributing\n\nContributions are very welcome! I'm writing this to teach myself and to create\nthe learning resource I wished for. There will be tons of room for improvement:\n\n* Wording of explanations\n* Idiomatic usage of Zig\n* Maybe additional exercises?\n\nPlease see CONTRIBUTING.md in this repo for the full details.\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidcoefficient%2Fziglings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoidcoefficient%2Fziglings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidcoefficient%2Fziglings/lists"}