ashwinvis<p>It took 10 days of on and off programming with <a href="https://mastodon.acc.sunet.se/tags/rust" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rust</span></a> and <a href="https://mastodon.acc.sunet.se/tags/ndarray" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ndarray</span></a> crate to solve <a href="https://mastodon.acc.sunet.se/tags/AdventOfCode" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>AdventOfCode</span></a> day 4. It was bizzarely tough.</p><p>NDarray is getting there (close to <a href="https://mastodon.acc.sunet.se/tags/numpy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>numpy</span></a>) but some key features like indexing using arrays and boolean masks was missing. Which made the implementation painful.</p><p><a href="https://codeberg.org/ashwinvis/advent-of-code/src/branch/main/2024/examples/day04.rs" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">codeberg.org/ashwinvis/advent-</span><span class="invisible">of-code/src/branch/main/2024/examples/day04.rs</span></a></p><p>Could it be better?</p>