rt if you've ever:
- self-harmed
- attempted suicide
- been to a therapist
- cancelled on things because you don't have the energy to live
- lied about being okay
- had a panic attack in a public bathroom
the world needs to know how common these things are.
Test-driven development is cool, but have you tried docs-driven development in @rustlang?
1. Write the docs
2. Code examples are tests. Run with `cargo test`
3. Keep developing until you've implemented everything you've documented
Result: Fully documented with tested code! π
I reckon you're only as behind as you feel. If you're okay with your pace, then don't fret not being at the front of the pack. It's all about fun, not competition, IMO.
It would be the case that I stay up until gone midnight writing a helper library ready for today's AdventOfCode, only to find that today's doesn't need the library :(
Clever! I decided to hack a direct proc_macro approach and came up with git.gitano.org.uk/parsebyreg⦠which is horrific in all senses, but does work for me, moderately complicatedly. It'd need serious refactorage before it could be primetime though.
Also, do you know of any serde type thing where I could annotate a struct with a regexp with named captures of the fields, and have a derived parser for cheap?
One thing I really need to get on, is naming my captures in my regular expressions. I'm bored with "cap.get(n).ok_or("what, no foo?")?.as_str()......" type stuff :-)
Your approach to day4 was a tad wordier than mine but seems to have been similar. I'm trying to do your thing of not panic!()ing etc. It has been instructive in error propagation for me :-D
git.gitano.org.uk/personal/d⦠if you're interested :-)