this post was submitted on 24 Nov 2024
36 points (92.9% liked)

Advent Of Code

778 readers
159 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 18 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
 

Last year I used mainly crystal. This year I'm thinking pharo smalltalk, if I can pick it up in time

I also want to do visualizations, not sure how possible that is with smalltalk.

top 50 comments
sorted by: hot top controversial new old
[–] FizzyOrange@programming.dev 2 points 11 hours ago (1 children)

I'm going to try with an awful language so I can better criticise it in future.

[–] morrowind@lemmy.ml 1 points 5 hours ago* (last edited 5 hours ago)
[–] CodeMonkey@programming.dev 1 points 13 hours ago

Go, out of the languages I use at work, it is the one I learned most recently and have the least experience with. I am not planning to get on the leader board (or even comple more than the first week of challenges), but it is an excuse to get more comfortable with the standard library.

[–] NostraDavid@programming.dev 1 points 14 hours ago (1 children)

Hm. Want to try to use the Relational Model, but am starting to hate SQL. Anyone know of any decent alternatives?

[–] morrowind@lemmy.ml 1 points 13 hours ago

Typically when people want to avoid sql they use an orm, but um, I'm not sure why you want to use a database for aoc

[–] LeFantome@programming.dev 2 points 16 hours ago

Portuguese and Gleam.

[–] reboot6675@sopuli.xyz 1 points 14 hours ago

Go. I actually I haven't written a single line of Go since last year's AoC so it's a good excuse to go again (pun intended).

[–] UFODivebomb@programming.dev 2 points 1 day ago

Scala 3 again. More inline. More better.

[–] antlion@lemmy.dbzer0.com 5 points 1 day ago

I skipped 2023, but in 2022 I got decently far using newer Excel functions like LET and LAMBDA. And then if I could I would golf the solution into a single cell formula. Years before 2022 I used Python. I think I had more fun with Excel. Will I be up for it this year?

[–] Nighed 6 points 1 day ago

I will try to learn rust while doing it, seems like an up and coming language with some interesting features.

I never get past the first 10 days anyway due to how long they start to take and how many things are going on in December.

I hate the ones that turn out to require some niche mathematical knowledge too....

[–] Gobbel2000@programming.dev 2 points 1 day ago

I have previously done it in Rust, but have toyed with the idea of taking this year as a reason for looking into OCaml.

[–] stardustpathsofglory@lemmy.world 17 points 2 days ago (1 children)

I always use Rust, because I cannot use it at work and I am still bad with it.

[–] riskable@programming.dev 5 points 2 days ago (2 children)

New Years resolution the past 5 years: I will get better with Rust.

...and I do get better but somehow it always feels like it's not enough. Like, I'm still an imposter.

I can program an entire embedded USB keyboard/mouse firmware from scratch that can do all sorts of things no keyboard has ever done before yet I still feel like a newbie somehow. Like there's all these people that talk about traits and mutli-threaring with async and GPU and AI stuff and I'm like, "I wrote an embedded_hal crate that lets you use both 8 and 16-channel multiplexers simultaneously!" or, "I wrote an interface that let's you use the extra space in your RP2040 flash memory as a filesystem!"

Yet everything I ever write in Rust always just uses the most basic and simple features because I still have trouble with complex lifetimes (passing them around quickly gets too confusing for me) and traits that work with non-basic types (because in the world of embedded 'static is king).

[–] arendjr@programming.dev 5 points 1 day ago

Good news: if you’re writing #Rust and only using basic features of the language, you’re doing it right.

People who use the advanced stuff either have unique, interesting challenges, or they’re over-engineering. Since the former are overrepresented in the blogosphere, you’re probably comparing yourself to them. But just because their problems are interesting doesn’t mean yours are not! Nor does it mean you have to use the same solutions.

If you can solve interesting problems (it sounds like you can!) and keep the code simple, more power to you!

[–] Iapar@feddit.org 5 points 2 days ago (1 children)

Maybe you should work more on you self-esteem instead of rust?

Doesn't seem healthy to be good at something and not recognizing it as an accomplishment.

[–] riskable@programming.dev 1 points 1 day ago* (last edited 1 day ago)

Haha, well... I have plenty of self-esteem but not Rust-specific self-esteem. I still have imposter syndrome with that language.

I'm a top notch expert in Python and JS though! 😁👍

I wrote PyMinifier which required such a deep understanding of Python it kinda broke my brain writing it for a while, haha. I eventually figured everything out though and got an even deeper understanding of the language and its features.

For JS it has just been years and years and years of knowing 100 ways to do what I want in JS but none ever seeming to be, "correct". Then eventually I realized there's no best way to do basically anything in JS and that's when the true enlightenment came 🤣

If you look at anyone's JS code and think to yourself, "ugh, there's got to be a better way to do this" chances are you're wrong. All the ways will be equally shitty for any number of different reasons! 😆

[–] kahnclusions@programming.dev 13 points 2 days ago (1 children)

This year I'm thinking of a real challenge and writing brainfuck with butterflies.

Or Rust. Rust is the way.

[–] morrowind@lemmy.ml 6 points 2 days ago

Real programmers don't mess time messing around with butterflies or physically interacting with the world. They just intimidate the program into acting as they want through sheer fucking will

[–] ICastFist@programming.dev 3 points 1 day ago

Might finally do something with Elixir. Plenty of ideas for using it with Phoenix and while I've seen a couple of tutorials for simple stuff like a live chat, I've done fuck-all thus far.

Might try V one way or another as well. Super small compiler and very small executables make me happy.

[–] GetOffMyLan@programming.dev 3 points 1 day ago (1 children)

Going with c# again. I know the language super well but don't often have a chance to get really deep into it with the stuff at work. These often present very non typical problems that require lesser used features.

[–] LeFantome@programming.dev 2 points 16 hours ago

C# is like a black hole for me. Ever since I started using it, I have been unable to really get into anything else.

If I would have learned it later, I could have learned five other languages instead ( really learned, I have still played with a bunch ).

[–] andioop@programming.dev 2 points 1 day ago (1 children)

Python. I don't have much fun in that language and I figure maybe doing AoC will help delete the mental barrier of "Python make sad" and also get me to learn more about it, so if it still makes me unhappy at least it won't be an "I have very little understanding of what I am doing" unhappy.

[–] morrowind@lemmy.ml 2 points 1 day ago (1 children)

I don't entirely know why, but it's difficult to enjoy programming in python, even if you enjoy the end product. Something about it's design, which usually forces you to do things imperatively or reach for a library, it's position as mainly a glue language, it's philosophy of "there should only be one way to do it". They're practical philosophies, but not very fun

[–] fossphi@lemm.ee 2 points 23 hours ago

You might have put into a words a suspicion I've had for a long time. I don't know if this is completely the case for me. But yes, Python most of the times doesn't spark joy

[–] wer2@lemm.ee 6 points 2 days ago (1 children)

I like to use lisp. It is about the only time I get to use it, and I get a little better each year.

[–] chris@lem.cochrun.xyz 1 points 21 hours ago

Last year i did rust and lisp both, lisp most of the time was easier.

[–] Deebster@programming.dev 4 points 2 days ago

Probably start with Rust again this year, although it definitely makes some of the days a lot harder. I might switch to something better for quick code if I fall too far behind.

I might even try PHP - I coded it professionally at the start of my career but haven't touched it for a decade and I'm curious to know if its improvements make it pleasant to use.

[–] Mikina@programming.dev 2 points 2 days ago (1 children)

Really curious about how'd unsupervised AutoGPT handle it. Will probably require making some kind of agent that handles input and feedback loop, and it will definitely be a disaster, but could be interesting exercise.

[–] SmoothOperator@lemmy.world 1 points 1 day ago (1 children)

I'm pretty sure AI won the first few days last year.

[–] Mikina@programming.dev 1 points 1 day ago (2 children)

Wasn't using AI for leaderboards against the rules? Or did you mean win as in completed?

[–] morrowind@lemmy.ml 1 points 5 hours ago

Yes, but there's no way to know

[–] SmoothOperator@lemmy.world 1 points 1 day ago

I meant win as in completed the day first. Maybe it was banned last year, but there was at least one year recently where it happened.

[–] neidu3@sh.itjust.works 2 points 2 days ago* (last edited 2 days ago)

I don't code enough to justify investing time and energy into becoming fluent in a new language, andd habits die hard, so... perl. It does what I need it to do, and it is so thoroughly embedded in the back of my head that it's extremely rare that I have to look something up when writing.

[–] YodaDaCoda@aussie.zone 2 points 2 days ago (1 children)

I want to learn rust but I don't think I have the socks for it

[–] zarlin@lemmy.world 4 points 2 days ago

Thinking of using nim again like last year

[–] dinckelman@lemmy.world 1 points 1 day ago

Rust again, more than likely. I enjoyed using it last time, and want more practice

[–] tinwelint@lemmy.zip 2 points 2 days ago

I want to use ArkScript this year, a small lisp like language written in C++. Might be fun, might find ways to improve the standard library!

[–] SpaceNoodle@lemmy.world 4 points 2 days ago (1 children)
[–] morrowind@lemmy.ml 2 points 2 days ago (1 children)
[–] SpaceNoodle@lemmy.world 2 points 2 days ago

It'll definitely be running on hardware

[–] MeepMorp@lemmy.world 2 points 2 days ago

I always use R! Sometimes I sprinkle in some Rcpp (c++ with extensions for interacting with R objects).

[–] Faresh@lemmy.ml 1 points 2 days ago

I'm boring and going to try kotlin and rust. Perhaps some other language too if something comes up till the first.

[–] ace@lemmy.ananace.dev 1 points 2 days ago (1 children)

Been doing Ruby the last few years, since it's what I use most at work.
Might try for some C# as well though.

[–] morrowind@lemmy.ml 1 points 1 day ago (1 children)

You should try crystal, if you haven't already

[–] ace@lemmy.ananace.dev 1 points 23 hours ago

I have tried it, but it's never really clicked when I've used it.