I just made a git repo for my #AdventOfCode solutions, so if any of you wanna see my spaghetti code you can find it here on #Codeberg - codeberg.org/rokosun/AOC

I'm using the #Nim programming language since I started learning it a while ago, still very much a beginner tho πŸ™ƒ

P.S. Also check out @amin's private leaderboard for #AOC - alpha.polymaths.social/@amin/s…

#AdventOfNim


For people doing Advent of Code, I have a Private Leaderboard of Fediverse people you're welcome to join!

Join code is 382566-472d5a9a.


This entry was edited (2 years ago)

Rokosun reshared this.

in reply to Rokosun

@sotolf @amin

Wow your code looks much better and well structured than mine. I still find it a bit hard to wrap my head around these custom types and things but I understand why it can be beneficial - it feels like the initial part of your code that defines all the custom types and the procedures used to parse them provides a sort of scaffolding that makes the rest of the code more easy to manage, I also like how modular everything is compared to my "omnifunction" πŸ˜„

in reply to Rokosun

@amin yeah, that's exactly how I'm thinking how can I represent the data, and then how can I get closer to what I want, or functions I need to do what I need. My way is just one way to do it, but it's the one I find the easiest to work with :)

Types are a bit daunting in the beginning but when you do they really help you think, and let's the compiler help you not do a quite big group of errors :)

@amin
⇧