I've been writing about solving #AdventOfCode problems over here: https://www.scmb.xyz/post/advent-of-slowed-13-14/ Working through last year's problems over the course of this year..
I've been writing about solving #AdventOfCode problems over here: https://www.scmb.xyz/post/advent-of-slowed-13-14/ Working through last year's problems over the course of this year..
I've finally got around to learning Python, and I'm currently working through some of the Advent Of Code '24 puzzles to get some hands on experience.
I appreciate some of what I think are Python's claims to fame. It's the first language in which I've worked with comprehensions. They're fun, but I'm not sure I see them as more than semi-arcane syntactic sugar for map() and filter(). Clearly, python's dynamic typing applied to list, tuple, comprehension, and generator is extremely powerful. Figuring out that I could just unpack all the elements from a short known-length list into a tuple has been handy.
The standard distro has modules for a great many things, and the package index has most everything else. On the other hand, how much is most? Maybe I'm missing something, but I can't find a module defining range_inclusive(start, stop) anywhere. Yes, I know it's trivial to write myself, but that seems at odds with Python's "batteries included" philosophy. All the research I've done seems to suggest the standard idiom is just to call range(start, stop + 1).
I love having access to a REPL again during code writing. It makes me miss the days of writing LISP in Emacs. I'm using PyCharm, which, of course, has the ability to load the current file directly into a new interpreter.
Probably my biggest gripe is that the language enforces so little and leaves so much to convention. Sure, it's higher-level than C, but it leaves you so many opportunities to shoot yourself in the foot at runtime. I had to laugh when reading up on classes, attributes, and scopes. Clearly, the moral was to define your data attributes inside the __init__ or you'll get some pretty bizarre bugs.
Oh! This one turned out to be super easy for me. Yeah!
#AdventOfCode at Easter.
I've completed "Claw Contraption" - Day 13 - Advent of Code 2024 #AdventOfCode #AoC #rust
I had Part 1 working fine but obviously Part 2 had other plans.
I don't mind a bit of cheating, I'm not doing this to learn linear algebra
https://github.com/jeffmallozzi/AoC-2024-Rust/blob/master/src/days/day13.rs
adventofcode.com/2024/day/13
I just completed "Garden Groups" - Day 12 - Advent of Code 2024
Yeah I'm still slowly working through these
https://adventofcode.com/2024/day/12
https://github.com/jeffmallozzi/AoC-2024-Rust/blob/master/src/days/day12.rs
Happy #EasterSunday everybody. The final puzzle of my little #AdventOfCode inspired #programming challenge just went live! You can try it here https://easters.dev/2025/easter-sunday
In just 10 minutes the #HolySaturday problem of my little #AdventOfCode inspired #programming challange site https://easters.dev/ goes live!
In just 10 minutes the #GoodFriday Problem of my little #AdventOfCode inspired #programming challenge website https://easters.dev/ will go live.
Ale že mě tak to AOC dostane sem netušil. První den (pouze part 1) absolutně jsem nepřišel na to jak vyřešit druhou část… Den 6 jsem zvládl obě části (euforie) a pocit naděje.
Den 14.. po chvilce jsem to vzdal, hledám jiný úkol, tomu taky moc nerozumím… euforie je pryč. Deprese.
Zítra prostě musím nějak udělat 12. den!
Nicméně jsem fakt takový tupec? Nebo je to normál?
I just completed day 1 of #AoC 2024, I know, I'm late to the party but I am learning #clojure so thought I would learn better if I did something with it.
I will be uploading my solutions to github as I go forward, And I will probably be using multiple languages to solve the puzzles, to get better practice with different langs and also compare them.
Vorab kurz zu meinen Vorerfahrungen:
2 Semester Informatik im Studium, bisschen Anwendungen in C/C++ programmiert. Danach lange keine größeren Berührungspunkte, privat ab und an "programmiert" in C++, Java und Python. Größter Erfolge ein Sudoku-Löser, der sicher nicht effizient oder elegant, aber immerhin mein eigener war.
Beruflich aktuell Projektleiter eines SW-Entwicklungsprojekts - ab und an schaue ich da auch mal Code an.
Mal schauen, wie weit das reicht.
#adventofcode
Weil die Arbeit noch nicht stressig genug ist( ), habe ich beschlossen, die Coding-Skills aus der Uni (2 Semester Informatik-Grundlagen) mal bisschen aufzupolieren und bisschen Zeit in Problemlösung in C/C++ zu investieren - Ich arbeite mich mal durch den #adventofcode - Start im Jahr 2015. Werde den Thread hier zur Doku meiner Probleme und Erkenntnisse nutzen.
I just completed "Historian Hysteria" - Day 1 - Advent of Code 2024 #AdventOfCode https://adventofcode.com/2024/day/1
Yay!!
At last night’s @mug meeting we looked at a lot of different solutions to #adventofcode day 1 in many different languages. Two that were very interesting to me were #Zig and #haskell. The way these two languages worked was really quite fascinating. After seeing real code in these two languages, I can tell they are not for me; but they were interesting and illuminating nonetheless.
There was a solution entirely in #SQL. Another in #vim9script. Another in #swiftlang #swift (I don’t think that one’s in the repo yet). I wrote several implementations myself. The one I felt most proud of is #Python with the core written in #rustlang #rust tied together with #PyO3. The one I felt was maybe the best tool for the job was entirely based on #pandas. As I said in a previous post, I tried to solve it in #polars, but the API exposed by Polars at least as far as I could tell, made it no better than simple lists in Python. I need to get deeper knowledge here.
The repo lives here: https://github.com/MichiganUnixUserGroup/MUG-2025-03-11-Advent-of-Code.
Recurse me daddy! This always feels more like doing fsharp :p but recursion was the best way to do this without doing so many allocations, I do really enjoy writing zig, it has something nice to it.
Now the second part has a bug somewhere, as it doesn't catch all the correct ones, but I'm just not up to fixing it right now at least :p
https://paste.sr.ht/~sotolf/e24ed51b27fad97ab301cb3ff83bf10ba23b1c99
I want to go for an easy language for the next #AdventOfCode. The obvious choice being Python. And I really liked using my old PC in 2024, soooo I’m thinking about doing that again to get a proper #RetroComputing theme.
And I would also love to have a UNIX shell this time.
So, how about going for SuSE Linux 6.4 and Python 1.5?
(Yes, I’m planning ahead. )
I put off writing this for two months, and I am not happy with how it came out but I am trying to blog more regularly so here's an article on how to write a defmemo macro in #elixir which I did during the 2024 #adventofcode