3 ms·
Oh man. I almost got through this with Python before some planned huge life change took over last year. I just couldn't get the final bit figured out but maybe
by skytreader 6y ago
Oh man. I almost got through this with Python before some planned huge life change took over last year. I just couldn't get the final bit figured out but maybe this is the universe telling me I should attempt debugging it again :). Plus, not 24h ago some Michael Abrash notes were featured here on HN.
For anyone curious, I implemented it at https://github.com/skytreader/praytracing https://github.com/skytreader/praytracing in a way that's Pythonic, more software engineer-y, with experiments on the code outlined in the comments. It also has no dependencies (save mypy) which means it could turn your computer to a radiator for a short while, perfect for winter.
(Also used it to benchmark and experiment with PyPy, but that's another story.)