#advent_of_code — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #advent_of_code, aggregated by home.social.
-
@jonocarroll @adamhsparks This reminds me I did an exercise in #Positron regarding "readability" of code with these 3 languages (#R, #Julia, #Python) using #Advent_of_Code as examples. Maybe I should write this up in #Quarto somewhere?
-
@jonocarroll @adamhsparks This reminds me I did an exercise in #Positron regarding "readability" of code with these 3 languages (#R, #Julia, #Python) using #Advent_of_Code as examples. Maybe I should write this up in #Quarto somewhere?
-
Some serious health problems are messing with #Forth and #Advent_of_code plans. I was already moving slow but now I find that I can't work the problems and learn Forth at the same time. I love how the language works (OG assembly guy) but I can't make the jump from "writing words" to "writing phrases" of code--real programming requires phrases and then sentences.
I'm tired of Pascal, Go does little for me and often annoys me (all loops are "for", really?). I could pick up Scheme again but I don't trust that I'll have the capacity to move from phrases back to sentences.
Out on eBay I saw some old books that I liked at the time--the #BASIC era. One of them was a book I regretted losing in move (BASIC With Style). They are ordered and I've dusted off #QB64. I was more of a boot to Basic guy myself, but I can deal with QBasic style.
It's chicken soup for the ill programmers soul. Easy peasy comfort coding while enduring treatment.
https://qb64phoenix.com/qb64wiki/index.php/Main_Page. QB64PhoenixEdition
-
Some serious health problems are messing with #Forth and #Advent_of_code plans. I was already moving slow but now I find that I can't work the problems and learn Forth at the same time. I love how the language works (OG assembly guy) but I can't make the jump from "writing words" to "writing phrases" of code--real programming requires phrases and then sentences.
I'm tired of Pascal, Go does little for me and often annoys me (all loops are "for", really?). I could pick up Scheme again but I don't trust that I'll have the capacity to move from phrases back to sentences.
Out on eBay I saw some old books that I liked at the time--the #BASIC era. One of them was a book I regretted losing in move (BASIC With Style). They are ordered and I've dusted off #QB64. I was more of a boot to Basic guy myself, but I can deal with QBasic style.
It's chicken soup for the ill programmers soul. Easy peasy comfort coding while enduring treatment.
https://qb64phoenix.com/qb64wiki/index.php/Main_Page. QB64PhoenixEdition
-
In spite of it being the end times and problems with health, I continue to chip away at learning #Forth #Programming for #Advent_of_code. I'm finally learning to more aggressively factor out code (hint: if you want local variables or need >R, stop it). It's functional decomposition taken further than one might in a traditional language. Here's a silly example:
Trying to convert a string to all one case in one definition is (for me) something out of Lovecraft. Fortunately the problem breaks down into three obvious operations (using lower case as an example):
Convert a single character to lower case.
Convert the current character in a string to lower case and move to the next character.
Iterate over the characters in a string and convert them to lower case.Or in forth:
: c>lower ( C -- c ) dup ?isupper if 32 + then ;
: c>lower$ ( c-addr u -- c-addr2 u2 f )
dup 0< if false else
over dup c@ c>lower swap c! 1- swap 1+ swap true then ;: s>lower$ ( c-addr u -- )
begin c>lower$ 0= until 2drop ; -
In spite of it being the end times and problems with health, I continue to chip away at learning #Forth #Programming for #Advent_of_code. I'm finally learning to more aggressively factor out code (hint: if you want local variables or need >R, stop it). It's functional decomposition taken further than one might in a traditional language. Here's a silly example:
Trying to convert a string to all one case in one definition is (for me) something out of Lovecraft. Fortunately the problem breaks down into three obvious operations (using lower case as an example):
Convert a single character to lower case.
Convert the current character in a string to lower case and move to the next character.
Iterate over the characters in a string and convert them to lower case.Or in forth:
: c>lower ( C -- c ) dup ?isupper if 32 + then ;
: c>lower$ ( c-addr u -- c-addr2 u2 f )
dup 0< if false else
over dup c@ c>lower swap c! 1- swap 1+ swap true then ;: s>lower$ ( c-addr u -- )
begin c>lower$ 0= until 2drop ; -
Я участвовал в Advent of Code каждый год, начиная с 2021, и мне есть что сказать
Хабр, привет! Меня зовут Стас Федянин, я ведущий инженер-программист в Контуре. Недавно завершился Advent of Code 2025 — в этом году он длился 12 дней вместо 25. Я участвовал, как и пять предыдущих лет. Созрел на эту статью, потому что подумал, что мой опыт и мнение будут интересны сообществу, ведь есть изюминка: каждый год я писал код на новом языке. Считаю, это отличный способ расширить кругозор. В статье делюсь нюансами всех опробованных языков.
https://habr.com/ru/companies/skbkontur/articles/980476/
#advent_of_code #advent_of_code_2025 #программирование #задачи #языки_программирования #gleam #javascript #kotlin #dart #zig
-
Back in November, I decided I was going to attempt this year's Advent of Code in uiua as far as I could.
Uiua is a tacit (no variable bindings - state is on the stack) array-programming language, strongly influenced by APL and BQN - some things were obviously going to be pretty easy in it, but I was concerned about managing larger programs in a tacit paradigm. However, given I've not done much array programming, I thought the challenge would be good for me.Unexpected complication: I had flu - badly enough that I did have a fever and was clearly not entirely there for the second week of AoC. This meant that several of the later days had a lot of debugging needed...
My worries finally happened in Day 9 Part 2. Trying to write a relatively complex algorithm in uiua - with flu - meant that I lost track of the state of the stack somewhere. I tried debugging the code a few times [I even tried throwing LLMs at it as a last resort¹... which confidently told me multiple things that weren't true about the problem space and the code... and never found any issues - so much for the future of coding] but uiua's debugging functionality seems to rely on you using VSCode [sigh].
In the end, I solved everything but Day 9 Pt 2 and Day 10 pt 2 in uiua - it excelled at a lot of the problems (Day 11 Pt 2 was fun, although I wish uiua had built in matrix maths).
The last 2 days I finally wandered back to the unsolved parts and solved Day 9 and 10 pts2 in Julia - my solution to Day 9 was exactly the approach I tried to implement in uiua, but the Julia implementation worked perfectly first time (thanks, local variable bindings!).So, I think it was worth it - using uiua for most of AoC did make me think a bit different for some of them - but I remain somewhat unconvinced that tacitness is a great match for more complex algorithms. (And it's worth noting that uiua's basket of operators includes several that were implemented *because* the community found it hard to solve AoC problems in stock uiua without them!)
The most fun was using the fft operator (yes, uiua has one) to solve Day 4 (both parts) in a way I don't think Eric expected - it wasn't *optimal*, but it was *fun*.
(footnote about LLMs in reply)
-
#Advent_of_code is about close reading and not making assumptions as much as it is about solving a puzzle.
While I'm not happy with my #Forth code, I finally started on 2025 day 1 part 1. Of course I made an assumption about the live data that was wrong.
It reminds me of a one of the puzzles in Skiena's _Programming Challenges_, The 3n+1 problem (Collatz Conjecture). I was so distracted by performance issues that I failed to account for integer
overflow. Back in my 32-bit days I would have spotted that gotcha immediately.Stack management obscures the algorithm because I haven't learned the common phrases or patterns that I need to write and understand.
As one example, here's how I increment a counter by 1:
VARIABLE var
0 var !
\ code
var dup @ 1+ swap !It will all come clear with time.
-
#Advent_of_code is about close reading and not making assumptions as much as it is about solving a puzzle.
While I'm not happy with my #Forth code, I finally started on 2025 day 1 part 1. Of course I made an assumption about the live data that was wrong.
It reminds me of a one of the puzzles in Skiena's _Programming Challenges_, The 3n+1 problem (Collatz Conjecture). I was so distracted by performance issues that I failed to account for integer
overflow. Back in my 32-bit days I would have spotted that gotcha immediately.Stack management obscures the algorithm because I haven't learned the common phrases or patterns that I need to write and understand.
As one example, here's how I increment a counter by 1:
VARIABLE var
0 var !
\ code
var dup @ 1+ swap !It will all come clear with time.
-
I Tried Gleam for Advent of Code, and I Get the Hype
https://blog.tymscar.com/posts/gleamaoc2025/
#ycombinator #gleam #advent_of_code #beam #javascript #fold_until -
CW: AoC 2025 Day 7 ... pt2 soln
I am surprised to see people deciding that *memoisation* is the correct speedup for pt2 - you can just do pt1 but counting "how many beams" are overlapping (so if splitter 1 and splitter 2 both split into a space, you add the weights from both input beams to get the combined beam weight in that space), Then you just sum the weights at the end.
This was fairly nice in uiua except I forgot about fix and generally had some time working with arrays where I wanted to do different things to different rows/columns/etc.
-
Whelp!
Ich habe gerade seit seeehr langer Zeit einmal wieder ein #VisualStudioCode installiert. Und jetzt stehe ich vor der wunderbaren Aufgabe, endlich einmal wieder C# zu programmieren.
Ich mag einmal am #Advent_of_code teilnehmen (und auch bis zum Ende durchkommen), habe aber keine Lust mehr auf Python. Tja. Für mich quasi eine neue Programmiersprache. Ich bin mit C großgeworden, habe damit aber auch schon lange nix mehr gemacht.
Ihr dürft mich gerne die nächsten Tage treten und nach meinem Fortschritt fragen!
-
Whelp!
Ich habe gerade seit seeehr langer Zeit einmal wieder ein #VisualStudioCode installiert. Und jetzt stehe ich vor der wunderbaren Aufgabe, endlich einmal wieder C# zu programmieren.
Ich mag einmal am #Advent_of_code teilnehmen (und auch bis zum Ende durchkommen), habe aber keine Lust mehr auf Python. Tja. Für mich quasi eine neue Programmiersprache. Ich bin mit C großgeworden, habe damit aber auch schon lange nix mehr gemacht.
Ihr dürft mich gerne die nächsten Tage treten und nach meinem Fortschritt fragen!