https://github.com/blankeos/zig-practice
🦎 Learning Zig because it's cool
https://github.com/blankeos/zig-practice
Last synced: about 1 year ago
JSON representation
🦎 Learning Zig because it's cool
- Host: GitHub
- URL: https://github.com/blankeos/zig-practice
- Owner: Blankeos
- Created: 2024-07-04T19:24:07.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-25T19:28:36.000Z (over 1 year ago)
- Last Synced: 2025-06-19T07:04:12.752Z (about 1 year ago)
- Language: Zig
- Size: 794 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Zig Practice
Learning Zig because I wanna get into low-level programming and do some cool stuff with it.
Projects on this repo:
1. [x] Hello World - Zig basics.
2. [x] Guessing Game - Random number guessing game.
3. [ ] Salary - Console app that estimates salary based on hourly, daily, monthly, and yearly rates.
4. [ ] Tried Passwords CLI - Recreation of my [Go implementation](https://github.com/Blankeos/tried-passwords-cli).
5. [ ] HTTP Server - Simple HTTP server to understand networking and concurrency in Zig.
6. [ ] TCP Socket Chat - A console-based chat application using sockets to understand network communication.
7. [ ] Random Quotes - A simple CLI application that fetches a random quote from the [API Ninjas Quotes](https://api-ninjas.com/api/quotes).
8. [ ] Tic Tac Toe - A simple Tic Tac Toe game with persistence.
9. [ ] WebSocket Chat - A console-based chat application using WebSockets to understand network communication on browser.
10. [ ] Static Site Generator - Converts markdown to HTML.
11. [ ] WebView - Electron-like webview for Zig.\*\*\*\*
12. [ ] Todo GUI Application - A simple GUI application to manage tasks.
### Notes
- Initializing new projects:
```sh
zig init # (I think this is like `cargo new`)
# Creates
# src/main.zig
# src/root.zig
# build.zig
# build.zig.zon
```
- `zig run .zig` - Run any zig file without making an exec.
- `zig build` - Build the project. Must have been created with `zig init`
- `./zig-out/bin/` - Where you can find the binary to run after zig build in a "Zig Project".
- `zig build-exe .zig` - Make an exec from any zig file.
- `./` - After running build-exe you can run like this as usual.
- I think I'm giving up after trying to implement Salary.
- 1: There's no library for getting the key presses.
- 2: Receiving user input from the terminal is EXTREMELY verbose. It's not straightforward to do.