I'm going to be splitting my time with 6 hours a week on iOS dev, 4 hours on Rust and 2 on ML.
Continue to progress through 100 days of Hacking with Swift.
Implement a CLI tool:
- Reads file
- Counts word frequency
- Outputs sorted results
Constraints:
- No cloning unless necessary
- Explain every move
Questions:
- When does a move occur?
- Why does
Stringmove buti32copy?
Study:
- Vectors
- Dot product
- Matrix multiplication
Implement in Python:
- Basic vector ops from scratch (don't use numpy aha)
Refactor week 1 tool to:
- Avoid unnecessary moves.
- Use references.
- Implement functions that borrow instead of take ownership.
- Intentionally create borrow checker errors, then fix them.
Document:
- Why the error occurs.
- What rule is being enforced.
Derive: $$ J(0) = \frac{1}{2m}\sum (h_{\theta}(x) - y)^2 $$ Explain:
- Why square the error?
- Why divide by m?
- What shape are these objects?
Create:
- A small struct holding references.
- Functions returning borrowed data.
- Add explicit lifetime annotations.
Explain:
- What lifetime annotations actually mean.
- Why Rust can't infer some cases.
Derive update rule: $$ \theta \colonequals \theta - \alpha \nabla J(\theta) $$ Implement:
- Gradient descent loop manually.
Implement:
- Multi-threaded word counter using
Arc+MutexQuestions: - Why is shared mutable state dangerous?
- What problem does
Mutexsolve? - What is a data race formally?
Combine:
- Synthetic dataset
- Manual regression
- Plot loss decreasing
Rules:
- No ML frameworks
- Optional:
NumbPyfor convenience only after manual implementation