for aoc day 4, i just did it today, instead of doing it right when it came out. it was kinda fun to just do it as slow as i wanted and take time to learn more about #nim
I haven't really used nim templates that much in the past, I can't belive I can get away with this:
template assign(p: Passport, a: untyped, b: bool) =
p.a = a
p.invalid = true
where `a` can function as both the symbol for the field name *and* the value 🤯
Merveilles is a community project aimed at the establishment of new ways of speaking, seeing and organizing information — A culture that seeks augmentation through the arts of engineering and design. A warm welcome to any like-minded people who feel these ideals resonate with them.