this post was submitted on 02 Dec 2024
21 points (100.0% liked)

Nix / NixOS

1827 readers
1 users here now

Main links

Videos

founded 2 years ago
MODERATORS
 

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 comment's thread
view the rest of the comments
[–] F04118F@feddit.nl 1 points 2 weeks ago (1 children)

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 spoilerThe way you handle the do and dont is much cleaner

.

[–] ellyse@ohai.social 1 points 2 weeks ago (1 children)

@F04118F if i had known about match i probably would have gotten stuck also lol but luckily i used split once before and remembered it :) i made an issue in your github, hope thats ok, just to mention this in case you didnt see it on fedi!

[–] F04118F@feddit.nl 1 points 2 weeks ago

Yeah I was planning on changing the salty README and referencing your comment, thanks for putting the reminder there!