Recently got started with Nix and Home-Manager. I thought Advent Of Code would be a good way to get more comfortable with the Nix language.

I don’t think I ever made it beyond Day 6 though, even in my most comfortable language (Python) so no idea where this will strand.

I am learning a lot about Nix though!

Have you used the Nix language outside of configuration? Let’s share and discuss!

You are viewing a single thread.
View all comments View context
0 points

@F04118F which I promptly did away with because I couldn’t be arsed today lol

permalink
report
parent
reply
0 points

Nix regex sucks. Is there any package with a reasonable regex matchAll?

permalink
report
parent
reply
1 point

@F04118F if it’s for todays advent of code, I used split and it worked fine. See my live steam on YouTube or my GitHub .

permalink
report
parent
reply
1 point

Somehow I completely missed that split can do match groups… Oopsie! I did it in Python today but I did make a completely functional (and way too complicated) algorithm.

Tap for spoiler

The way you handle the do and dont is much cleaner

.

permalink
report
parent
reply