{"id":16985885,"url":"https://github.com/sharpobject/ziglings","last_synced_at":"2025-08-23T22:10:24.284Z","repository":{"id":139891056,"uuid":"378405439","full_name":"sharpobject/ziglings","owner":"sharpobject","description":"hello, i am working through some examples online","archived":false,"fork":false,"pushed_at":"2021-06-19T12:20:16.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-26T19:51:08.589Z","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/sharpobject.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":"2021-06-19T12:20:15.000Z","updated_at":"2021-06-19T12:20:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"39b92324-a2c7-4765-81e5-b581c6530dc5","html_url":"https://github.com/sharpobject/ziglings","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"ratfactor/ziglings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpobject%2Fziglings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpobject%2Fziglings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpobject%2Fziglings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpobject%2Fziglings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharpobject","download_url":"https://codeload.github.com/sharpobject/ziglings/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244894310,"owners_count":20527669,"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-10-14T02:44:21.748Z","updated_at":"2025-03-22T01:42:17.219Z","avatar_url":"https://github.com/sharpobject.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"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.9.0-dev.137+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.7.1`, but Ziglings\nneeds a dev build with pre-release version \"0.9.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\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\n### Version Changes\n\n* 2021-06-14 0.9.0-dev.137  - std.build.Id `.Custom` is now `.custom`\n* 2021-04-21 0.8.0-dev.1983 - std.fmt.format() `any` format string required\n* 2021-02-12 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## TODO\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* Additional exercises\n\nPlanned exercises:\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\n* [ ] Working with C?\n\nModules and the Zig Standard Library\n\n* [ ] Imports\n* [ ] Allocators\n* [ ] Arraylist\n* [ ] Filesystem\n* [ ] Readers and Writers\n* [ ] Formatting\n* [ ] Random Numbers\n* [ ] Crypto\n* [ ] Threads\n* [ ] Hash Maps\n* [ ] Stacks\n* [ ] Sorting\n* [ ] Iterators\n\nThe initial topics for these exercises were unabashedly cribbed from\n[ziglearn.org](https://ziglearn.org/). I've since moved things around\nin an order that I think best lets each topic build upon each other.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpobject%2Fziglings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharpobject%2Fziglings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpobject%2Fziglings/lists"}