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

Advent Of Code

20 readers
1 users here now

An unofficial home for the advent of code community on programming.dev!

Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

AoC 2024

Solution Threads

M T W T F S S
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25

Rules/Guidelines

Relevant Communities

Relevant Links

Credits

Icon base by Lorc under CC BY 3.0 with modifications to add a gradient

console.log('Hello World')

founded 1 year ago
MODERATORS
 

It's not my first choice, but it's gonna be TypeScript for me. I've got an interview for a primarily TS position coming up this week so would like to brush up on its quirks.

If the interview doesn't go well, then I'll probably switch to Go, though hehe. I've been really enjoying using it, but no one's ever paid me to do so.

top 28 comments
sorted by: hot top controversial new old
[–] Mikina@programming.dev 17 points 1 month ago
[–] kintrix@linux.community 9 points 1 month ago

Nix, because I hate myself. No, it is very much not made for this purpose. But it's possible to use if for this.

[–] sjmulder@lemmy.sdf.org 5 points 1 month ago

Still going with C as my main language with the 'straight to the point', data and array centric style that's worked well before. Perhaps see if I can get some of it running on Turbo C again. Also fiddling around with JavaScript now for list comprehension variants and was eyeing Elixir but that's probably not happening this year.

[–] the_beber@lemm.ee 4 points 1 month ago

My „comfort language“ Kotlin and Python, because I really got to refamiliarize myself with that language. I probably won‘t have the time to do much more than that, but if I do, I‘d love to try to solve the problems with a Minecraft datapack.

[–] Sekoia@lemmy.blahaj.zone 4 points 1 month ago

I've got a really nice setup with benchmarks, auto-input-fetching and solution upload and such, written in Rust, so I'm sticking with that. I kinda wanted to try Odin, but december really snuck up on me, and I didn't have time to set it up or really get familiar with it.

Iterators and slicing and such are all just... so nice for parsing streams.

[–] ch8zer@lemmy.ca 4 points 1 month ago (1 children)

Python

Not my first, second, or third choice. But I’m in between moves and have very limited access to my desktop (even remotely/SSH) so I need the simplest tool for the job.

[–] grrgyle@slrpnk.net 3 points 1 month ago (1 children)

I feel kind of silly working on my 100 line implementation, where someone will just Python up a 3 line solution and call it a day. It's definitely a good tool for the job.

[–] ch8zer@lemmy.ca 2 points 1 month ago

I don’t think you need to feel silly. Programming languages are tools. Some are better suited for jobs than others.

AoC is good for two skills:

  1. Learning how to solve problems.
  2. Learning how to process and model data.

With python #2 is no longer difficult. In the past I’ve used Rust or C and I spent way more effort on #2 than #1.

I think the key is what is your goal in doing this? I like the puzzles but have limited time so I use python to solve them quickly and be on my way. If I had more time i would have liked to learn / try go this year.

[–] AlmightyTritan 3 points 1 month ago (1 children)

I use too many nice languages for my day to day at work, so I'm gonna be a real piece of shit to myself and try and solve it in Godot's gdscript. Not that there's anything wrong with gdscript, I'm just pampered by all the niceties of Typescript and Groovy.

[–] grrgyle@slrpnk.net 2 points 1 month ago (1 children)

Rofl, does that mean you'll be running your code using the game engine? Sounds like a fun exercise anyway. Probably don't spend much time manipulating strings in gdscript normally

[–] AlmightyTritan 2 points 1 month ago

Yeah I think I can technically run it headless, but for the most part I think the whole game engine runs in the background. Should be interesting to see how it turns out.

[–] ByteOnBikes@slrpnk.net 3 points 1 month ago (1 children)

I was doing vanilla JavaScript and using code sandbox, because I was doing it with my coworker.

But now I'm considering switching to Typescript.

[–] grrgyle@slrpnk.net 1 points 1 month ago

TS is a great way to write JS, and one of the nice things about it is you get to choose exactly how much of it you want to use.

You can even just change your file extension from js to ts, compile it with tsc file.ts or run it directly with tsc-node file.ts.

[–] snowe@programming.dev 3 points 1 month ago (1 children)

I always default to ruby, even though I want to learn tons of other languages. Sometimes I do it in multiple languages, I might try Elixir again.

[–] grrgyle@slrpnk.net 1 points 1 month ago

Ruby is such an enjoyable language to write it. It really feels like they thought about the developer's experience when designing that language

[–] Daedskin@lemm.ee 3 points 1 month ago

C++ because I forgot to plan for anything else, so I'm just reusing what I had from last year

[–] solberg@lemmy.blahaj.zone 3 points 1 month ago (1 children)

Typescript with Deno. Was thinking of trying Gleam but I don’t know if I’d have the time to do it in a new language and Deno is just so nice anyway lol

[–] grrgyle@slrpnk.net 3 points 1 month ago

I've enjoyed Deno in the past. Similarly, I've heard good things about Bun, though haven't used it myself.

[–] RagingHungryPanda@lemm.ee 2 points 1 month ago

I'm trying F#. I normally work in C# with LanguageExt to make C# more functional.

[–] kryptonidas@lemmings.world 2 points 1 month ago

Golang, just for learning a new language. But I’m a bit time constrained so I don’t expect I’ll be able to complete every day.

[–] antlion@lemmy.dbzer0.com 2 points 1 month ago

R, because I’ve already used Python, VBA, and Excel formulas.

[–] ystael 2 points 1 month ago (1 children)

J, because I've wanted to learn it for a long time. It scratches kind of the same itch as my old HP 48 calculator, actually, although that was much closer to Forth than APL. Both of them are mind-bendingly terse and not great at expressing things other than raw mathematics.

[–] Andy@programming.dev 1 points 1 month ago (1 children)

Have you had a good look at Factor? FWIW I've got at least the first 3 days with it up here.

[–] ystael 2 points 1 month ago

I've been reading your solutions! I have not spent any time with Factor at all, but the solutions you've put up look very nice and clean.

[–] legoraft@reddthat.com 2 points 1 month ago

Going with rust for the second year, I'm still trying to learn things with it and AoC is a great way to do so

[–] Andy@programming.dev 2 points 1 month ago
[–] hosaka@programming.dev 1 points 1 month ago

Been trying to pick up zig, so made sense to try the AoC with it as well.

[–] janAkali@lemmy.one 1 points 1 month ago

Nim, because it's fast and expressive.