{"id":29554379,"url":"https://github.com/tornikegomareli/swiftlings","last_synced_at":"2025-09-13T16:02:38.157Z","repository":{"id":308431836,"uuid":"1005842421","full_name":"tornikegomareli/swiftlings","owner":"tornikegomareli","description":"🦉 Learn Swift interactively by fixing small exercises, inspired by Rustlings","archived":false,"fork":false,"pushed_at":"2025-09-12T21:32:07.000Z","size":713,"stargazers_count":23,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-12T23:41:40.194Z","etag":null,"topics":["coding-exercises","developer-tools","education","exercises","learning","swift","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/tornikegomareli.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,"zenodo":null}},"created_at":"2025-06-20T23:33:06.000Z","updated_at":"2025-09-12T21:32:10.000Z","dependencies_parsed_at":"2025-08-05T23:36:48.459Z","dependency_job_id":null,"html_url":"https://github.com/tornikegomareli/swiftlings","commit_stats":null,"previous_names":["tornikegomareli/swiftlings"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/tornikegomareli/swiftlings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tornikegomareli%2Fswiftlings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tornikegomareli%2Fswiftlings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tornikegomareli%2Fswiftlings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tornikegomareli%2Fswiftlings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tornikegomareli","download_url":"https://codeload.github.com/tornikegomareli/swiftlings/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tornikegomareli%2Fswiftlings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274989473,"owners_count":25386551,"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","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"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":["coding-exercises","developer-tools","education","exercises","learning","swift","tutorial"],"created_at":"2025-07-18T07:09:45.438Z","updated_at":"2025-09-13T16:02:38.144Z","avatar_url":"https://github.com/tornikegomareli.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview 🦉\n\n\u003cdiv align=\"center\"\u003e\n\nhttps://github.com/user-attachments/assets/20aa3330-1016-45de-841c-13adc1c3ffa4\n\n\u003c/div\u003e\n\nSwiftlings is an interactive learning tool for Swift, inspired by Rustlings. It provides a structured path through Swift programming concepts. Each exercise is a small, focused problem designed to teach specific Swift features through hands-on practice.\n\n### ⚠️ Early Development Notice\n\n**This project is in very early development.** While it has been tested and works well on macOS, it still requires proper testing and validation on Windows and Linux platforms.\n\n## Installation\n\n### Install via Homebrew\n\n```bash\nbrew tap tornikegomareli/swiftlings\nbrew install swiftlings\n```\n\n## Getting Started\n\n1. Initialize a new Swiftlings project:\n\n```bash\nswiftlings init\n```\n\nThis creates a new directory with all exercises.\n\n2. Navigate to the project directory:\n\n```bash\ncd swiftlings\n```\n\n3. Start the interactive learning mode:\n\n```bash\nswiftlings\n```\n\n## Usage\n\n### Interactive Mode\n\nInteractive mode is default mode when u run\n\n```bash\nswiftlings\n```\n\nThe default mode monitors your exercise files and automatically builds it and runs tests when you save changes.\n\n#### Interactive Commands\n\nWhile in watch mode, you can use these keyboard shortcuts:\n\n- `n` - Move to next exercise\n- `h` - Show hint for current exercise\n- `l` - List all exercises\n- `q` - Quit\n- `r` - Re-run current exercise\n- `c` - Clear terminal\n\n### Manual Mode\n\nRun specific exercises directly:\n\n```bash\nswiftlings run variables1\n```\n\n### Other Commands\n\n**List all exercises:**\n```bash\nswiftlings list\n```\n\nShows all exercises with their completion status and categories.\n\n**Get hints:**\n```bash\nswiftlings hint variables1\n```\n\nDisplays helpful hints for solving specific exercises.\n\n**Reset an exercise and its state:**\n```bash\nswiftlings reset variables1\n```\n\nRestores an exercise to its original state.\n\n### Data Structures \u0026 Algorithms Mode (NEW!)\n\nStart the DSA learning mode to master data structures through implementation:\n\n```bash\nswiftlings dsa\n```\n\nCurrently includes Queue exercises (6 progressive exercises building a FIFO data structure from scratch). New data structures and algorithms are coming soon! \n\nI'm open to PRs for improving existing DSA exercises or adding new data structures and algorithms.\n\n## Exercise Structure\n\nExercises are organized into 19 progressive categories:\n\n1. **00_basics** - Introduction and basic syntax\n2. **01_control_flow** - if/else, switch, loops\n3. **02_functions** - Function declaration and usage\n4. **03_collections** - Arrays, sets, dictionaries\n5. **04_optionals** - Swift's optional types\n6. **05_structs** - Value types and structures\n7. **06_classes** - Reference types and inheritance\n8. **07_enums** - Enumerations and associated values\n9. **08_protocols** - Protocol-oriented programming\n10. **09_extensions** - Extending existing types\n11. **10_generics** - Generic programming\n12. **11_error_handling** - Error handling patterns\n13. **12_closures** - Closures and functional programming\n14. **13_memory_management** - ARC and memory management\n15. **14_property_wrappers** - Property wrappers and observation\n16. **15_concurrency** - Modern Swift concurrency\n17. **16_result_builders** - DSL and result builders\n18. **17_advanced_types** - Advanced type system features\n19. **18_codable** - Encoding and decoding\n\n## How It Works\n\nEach exercise file contains:\n\n- Instructions in comments explaining what to implement\n- Code with `// TODO` markers indicating what needs to be fixed\n- Test cases that verify your solution\n\nYour goal is to make all tests pass and solution to be compilable for each exercise. The CLI provides instant feedback as you work.\n\n## Progress Tracking\n\nSwiftlings automatically tracks your progress through exercises. Your progress is saved locally and persists between sessions.\n\n## Updating\n\nTo update to the latest version:\n\n```bash\nbrew update\nbrew upgrade swiftlings\n```\n\n## Development\n\n### Building from Source\n\n```bash\ngit clone https://github.com/tornikegomareli/swiftlings.git\ncd swiftlings\nmake build-release\n```\n\n### Running Tests\n\n```bash\nmake test\n```\n\n### Code Formatting\n\n```bash\nmake format\n```\n\n## Contributing\n\nI love contributions! Swiftlings is a community-driven project, and I welcome improvements from developers of all skill levels.\n\n### Ways to Contribute\n\n#### Found a Bug in an Exercise?\n\nIf you encounter an exercise that:\n- Has incorrect test cases\n- Contains compilation errors unrelated to the learning objective\n- Has misleading or unclear instructions\n\nPlease open a PR with the fix! Even small corrections are valuable.\n\n#### Have a Better Explanation?\n\nLearning is personal, and sometimes an exercise explanation doesn't click. If you can explain a concept more clearly:\n- Fork the repository\n- Improve the exercise comments and instructions\n- Submit a PR with your improvements\n\nI especially value contributions that make complex concepts more approachable for beginners.\n\n#### Found a CLI Bug or Technical Issue?\n\nThe CLI itself is also open for improvements! If you encounter:\n- Bugs in the watch mode, file detection, or command execution\n- Issues with progress tracking or state management\n- Problems with the build system or test runner\n- Any crashes or unexpected behavior\n- Performance issues or resource problems\n\nPlease report them or better yet, submit a fix! Technical contributions to the core tool are extremely valuable.\n\n#### New Exercise Ideas\n\nGot an idea for teaching a Swift concept better? I'd love to see it!\n\n1. Create a new Swift file in the appropriate category directory\n2. Add the exercise metadata to `exercises.json`\n3. Include:\n   - Clear learning objectives\n   - Step-by-step instructions\n   - Helpful hints\n   - Test cases that guide learning\n4. Submit a pull request\n\n#### Improving Documentation\n\n- Found a typo?\n- Have a clearer way to explain something?\n- Want to add examples?\n\nDocumentation improvements are always welcome!\n\n### Contribution Guidelines\n\n1. **Test Your Changes**: Make sure all exercises compile and run correctly\n2. **Follow Existing Patterns**: Look at existing exercises for style and structure\n3. **Keep It Focused**: Each exercise should teach one concept clearly\n4. **Be Encouraging**: Write hints and messages that encourage learners\n5. **Consider Difficulty**: Place exercises appropriately in the progression\n\n### Submitting a Pull Request\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b improve-optionals-exercise`)\n3. Make your changes\n4. Test thoroughly (`make test`)\n5. Commit with clear messages\n6. Push to your fork\n7. Open a PR with a description of what you changed and why\n\n### Report Issues\n\nNot ready to fix it yourself? No problem! Open an issue describing:\n- Which exercise has the problem (if exercise-related)\n- What you expected to happen\n- What actually happened\n- Any error messages you saw\n- Your environment (macOS version, Swift version, etc.)\n\nEvery contribution, no matter how small, helps make Swiftlings better for everyone learning Swift!\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\nInspired by [Rustlings](https://github.com/rust-lang/rustlings), the fantastic Rust learning tool.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftornikegomareli%2Fswiftlings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftornikegomareli%2Fswiftlings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftornikegomareli%2Fswiftlings/lists"}