Ancestors

Toot

Written by F04118F@feddit.nl on 2024-12-02 at 07:57

Is anyone else doing Advent Of Code in Nix?

https://feddit.nl/post/24765621

=> More informations about this toot | More toots from F04118F@feddit.nl

Descendants

Written by Gavin Masterson on 2024-12-02 at 08:18

@F04118F

If I can make the time, I will. But I know @ellyse is doing it. 🎅 👩‍💻

She did one last night live on stream.

https://ohai.social/@ellyse/113482901348671949

=> More informations about this toot | More toots from gavin@fosstodon.org

Written by Ellyse on 2024-12-02 at 09:23

@gavin @F04118F yup! thats a link to a 2019 AoC, but here's my video for day 1 this year https://www.youtube.com/live/P_3rUzAN0vw?si=W0qxiwKeDHVN_2aQ

the code is here: https://github.com/ellyxir/advent_of_code/tree/main/2024/nix/day01

i looked at your solution, good work!

=> More informations about this toot | More toots from ellyse@ohai.social

Written by F04118F@feddit.nl on 2024-12-02 at 12:22

Your code looks awesome, I’m definitely going to steal some ideas from that, especially the lib.pipe really cleans up a lot of unnecessary bindings I did.

=> More informations about this toot | More toots from F04118F@feddit.nl

Written by kintrix@linux.community on 2024-12-02 at 13:00

You can also use the pipe operators; but they are still experimental features.

foo (bar (baz x)) = x |> baz |> bar |> foo = foo <| bar <| baz <| x`

=> More informations about this toot | More toots from kintrix@linux.community

Written by Ellyse on 2024-12-02 at 22:49

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

=> More informations about this toot | More toots from ellyse@ohai.social

Written by F04118F@feddit.nl on 2024-12-03 at 06:50

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

=> More informations about this toot | More toots from F04118F@feddit.nl

Written by Ellyse on 2024-12-03 at 10:02

@F04118F is builtins.split lacking something or just difficult to use?

=> More informations about this toot | More toots from ellyse@ohai.social

Written by Ellyse on 2024-12-03 at 13:48

@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 .

=> More informations about this toot | More toots from ellyse@ohai.social

Written by F04118F@feddit.nl on 2024-12-03 at 22:08

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

.

=> More informations about this toot | More toots from F04118F@feddit.nl

Written by Ellyse on 2024-12-03 at 22:13

@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!

=> More informations about this toot | More toots from ellyse@ohai.social

Written by F04118F@feddit.nl on 2024-12-03 at 22:18

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

=> More informations about this toot | More toots from F04118F@feddit.nl

Written by Atemu on 2024-12-04 at 10:36

That looks very lispy, is that intentional?

=> More informations about this toot | More toots from Atemu@lemmy.ml

Written by F04118F@feddit.nl on 2024-12-04 at 12:35

Yes, Nix is a pure functional programming language, like Lisp.

The reason for its existence is to allow for reproducible and repeatable builds of packages and configuration. This is the basis for nixpkgs, NixOS and Home Manager.

=> More informations about this toot | More toots from F04118F@feddit.nl

Written by Atemu on 2024-12-08 at 22:27

Oh, I know; I have commit access to Nixpkgs ;)

I was just commenting on the way you’ve styled your Nix code here.

=> More informations about this toot | More toots from Atemu@lemmy.ml

Written by monty33@lemmy.ml on 2024-12-02 at 12:44

What’s an advent of code? Interested if it will help me learn more!

=> More informations about this toot | More toots from monty33@lemmy.ml

Written by kintrix@linux.community on 2024-12-02 at 12:58

adventofcode.com

An advent calendar of coding puzzles. Dec 1-25 you get a new puzzle every day

=> More informations about this toot | More toots from kintrix@linux.community

Written by kintrix@linux.community on 2024-12-02 at 12:57

I definitely am: git.sr.ht/~kintrix/aoc2024

=> More informations about this toot | More toots from kintrix@linux.community

Written by F04118F@feddit.nl on 2024-12-02 at 13:35

Love the structure of your code.

Exposing a part1 and part2 result from the same source file is a great idea

=> More informations about this toot | More toots from F04118F@feddit.nl

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113582160381880376
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
358.049212 milliseconds
Gemini-to-HTML Time
4.472046 milliseconds

This content has been proxied by September (ba2dc).