Beep Boop Bip
[Return] [Entire Thread] [Last 50 posts] [First 100 posts]
Posting mode: Reply
Name
Email
Subject   (reply to 3044)
Message
BB Code
File
File URL
Embed   Help
Password  (for post and file deletion)
  • Supported file types are: BMP, C, CPP, CSS, EPUB, FLAC, FLV, GIF, JPG, OGG, PDF, PNG, PSD, RAR, TORRENT, TXT, WEBM, ZIP
  • Maximum file size allowed is 10000 KB.
  • Images greater than 260x260 pixels will be thumbnailed.
  • Currently 1097 unique user posts.
  • board catalog

File 16698735903.png - (1.55MB , 1920x1080 , SUPPA HAKKA.png )
3044 No. 3044 [Edit]
Hello gentlemen, and welcome to the Advent of Code: TOHNO-CHAN Edition.

Post your solutions!
Ask questions!
Have fun!

Leaderboard: 1795791-8781b07c
51 posts omitted. Last 50 shown. Expand all images
>> No. 3290 [Edit]
The Advent of Code approaches once more. Is anybody up for another round?
>> No. 3291 [Edit]
File 170062139441.png - (82.63KB , 596x957 , aoc12gold.png )
3291
>>3290
yeah I'll try to make time for the first week at least
>> No. 3294 [Edit]
File 170141869435.png - (90.04KB , 1748x512 , aoc2023day1.png )
3294
Part 1 was easy, but part 2 was probably the hardest day1 puzzle of any year.
I wonder if Eric was trying to trip up ChatGPT with this.

You can still use the leaderboard in the OP for this year's calendar, by the way.
>> No. 3295 [Edit]
File 170152261647.png - (56.67KB , 1048x306 , AOC.png )
3295
Day 2
>> No. 3296 [Edit]
File 170189886355.webm - (944.09KB , aoc2023day12.webm )
3296
>>3291
animated
>> No. 3305 [Edit]
File 170257879120.png - (76.03KB , 800x786 , aocday14part2clojure.png )
3305
today's puzzle was pretty fun
>> No. 3357 [Edit]
File daythree2023.txt - (19.28KB )

3357
C dude here. Last year(2023) I tried Advent of Code again and surprisingly succeeded at first. I did the first day part 1 in around 2 days, then part 2 also around 2 days. I progressed this way doing all problems until day 3 pt1. When I finished it, it was already day 12 or something. I eventually got sidetracked and returned to this a few days ago to finish day 3 pt2. Well, I did the thing and my program apparently works flawlessly, I have it printing every individual value and manually checked for many numbers, but the fucking site gives me "wrong answer". How do I debug this? How to find the one fucking * that is causing me all this trouble? My program is still written in the same style as my 2022 attempt, pure C, parsing every single char at a time. It is too long and contrived and so I wouldn't want to force anybody to wade through the spaghetti swamp. I kindly ask any anon that have done this if they can check my input with their code at at some random lines(binary search recommended) so I can find the fucking line with the faulty exception.
>> No. 3358 [Edit]
>>3357
Just run my input and say something like:
Up until line 40: Total gear sum value is: XYZ
Up until line 100: Blah, blah, blah.
Just a few lines so I can compare with my results.
>> No. 3360 [Edit]
>>3357
>How to find the one fucking * that is causing me all this trouble? My program is still written in the same style as my 2022 attempt, pure C, parsing every single char at a time. It is too long and contrived and so I wouldn't want to force anybody to wade through the spaghetti swamp
Have you considered using a different language?
>> No. 3362 [Edit]
>>3360
Ah, I bet you're the guy on SO who responds to every JS question with "use lodash" (or if this were the 2010s, "use jquery").

>>3357
I looked at the file but it just seems to be the output, and I don't really want to read the AoC text to figure out what this is supposed to be and how to parse that. Probably you're failing on some edge-case, can you just get a solution off the internet, run it on that, and diff the results compared to yours?
>> No. 3374 [Edit]
The spam filter has claimed yet another innocent victim. I apologize for the inconvenience and removed your ban.
>> No. 3375 [Edit]
>>3362
Yes, the problem was caused by reading the schematic and writing it without the \n character. This was useful for part 1 and I was building on part 1 to do part 2, but I did part 1 months ago and didn't suspect anything about that.
Here's a link that will help you debug your programs(using a URL shortener because i suspect something in the url triggered the spam filter.)
https://shorturl.at/tRZ56
>>3374
Thanks. First time seeing that ban video, very fun.
>> No. 3394 [Edit]
File 171245977282.png - (145.87KB , 1336x1015 , aocsolutions.png )
3394
>>3357
>> No. 3395 [Edit]
File 171246030411.gif - (189.94KB , 1023x1000 , つらら005a294e19aa4e7ab9315f0fd703aca2.gif )
3395
>>3394
oh, maybe I should've read the rest of the thread...
>> No. 3457 [Edit]
File 172643848254.jpg - (737.69KB , 1080x2052 , intcode computer.jpg )
3457
if you're wondering which year is the most fun to do, it's 2019
>> No. 3514 [Edit]
>>3457
Not really, I'd just embarrass myself and that doesn't feel either fun or fulfilling.
>> No. 3515 [Edit]
>>3514
Sorry I replied to the wrong post. I meant that one in /ot/ mentioning Advent of Code 2024.
>> No. 3516 [Edit]
File 173093561225.png - (742.41KB , 2752x4342 , interviewQuestionsFizzbuzz.png )
3516
>>3514
Fair enough, but I will say that writing bad code should only be embarrassing if you're a professional programmer.
>> No. 3526 [Edit]
File 17330440192.png - (30.31KB , 1199x232 , aoc2024day1gold.png )
3526
>> No. 3527 [Edit]
File 173308135671.png - (110.03KB , 1176x1008 , event1-1.png )
3527
How are we feeling, boys?
>> No. 3528 [Edit]
File 173309115170.jpg - (88.31KB , 1010x340 , aoc2024day1.jpg )
3528
>>3527
I'm having fun

is that D?
>> No. 3529 [Edit]
File 173310141584.png - (892.15KB , 955x955 , 1733090889539438.png )
3529
>> No. 3530 [Edit]
If anybody else would like to participate, please check the OP for our leaderboard ID.

>>3528
>I'm having fun
Good!

>is that D?
It is. In the interest of time I chose the language I'm most familiar with.
I see you're still rocking Clojure. Your solutions are always enviously succinct.
>> No. 3531 [Edit]
File 173312292457.png - (53.88KB , 731x598 , day1.png )
3531
This took embarrassingly long for me, but it works now and I'm glad it does. At some point was contemplating just doing it in Excel really quick, but I'm glad I solved it now.
>> No. 3533 [Edit]
File aocd1.c - (2.40KB )

3533
Very easy to double check with
awk '{sum += $2 - $1} END{print sum}'

Can't post images
>> No. 3534 [Edit]
File 173313775226.png - (80.51KB , 833x755 , aoc2024day2goldClojure.png )
3534
>>3530
>In the interest of time I chose the language I'm most familiar with.
yah, same here with clojure at this point
>Your solutions are always enviously succinct
thank you
I also wrote a solution in Dart yesterday, it's obviously a lot less succinct:
http://tohno-chan.com/ot/res/33536.html#43198
I'd like to turn the whole event into a Flutter app and also add animations etc. if I can make the time for it

>>3531
>contemplating just doing it in Excel
I mean, whatever works
>> No. 3535 [Edit]
File aocd2.c - (3.58KB )

3535
You must be really angry with me to forbid posting images, heehee
>> No. 3536 [Edit]
File 17331544245.png - (117.86KB , 1920x1023 , aoc2024day2ClojureDart.png )
3536
>>3534
>I'd like to turn the whole event into a Flutter app
I just integrated the clojuredart compiler so I can use my clj solutions for the app instead of solving everything a second time in a worse language
>> No. 3541 [Edit]
File 173320472887.png - (91.34KB , 746x540 , aoc2024day3python3.png )
3541
Playing on easy mode again as per the suggestion by >>/ot/43099
>> No. 3543 [Edit]
File 173321662970.png - (52.93KB , 1469x410 , aoc2024day3Clojure.png )
3543
>>3541
yeah today was a regex day
>> No. 3546 [Edit]
File 173334022749.jpg - (382.41KB , 999x1108 , aoc2024day4clojure.jpg )
3546
day 4 seemed more tedious than anything.
>> No. 3547 [Edit]
File 173334218865.png - (1.37MB , 1024x1024 , elf aoc crossword.png )
3547
>> No. 3548 [Edit]
File 173337978090.png - (180.38KB , 1396x1678 , event3-2.png )
3548
I've been occupied elsewhere, sorry! Glad to see you guys are still trucking along.

The full solution is almost 100LOC, so I left out my basic parser implementation.

>>3536
>I just integrated the clojuredart compiler so I can use my clj solutions for the app
Neat!

>>3546
Day 4 looks familiar to a past event.
>> No. 3549 [Edit]
And evidently I'm tired because the sum is mislabeled as a product. Oh goodness.
>> No. 3550 [Edit]
File 173342494052.png - (112.82KB , 5874x1608 , calendar elves.png )
3550
I was busy today with preparing my 3-day trip to my aunt, but the train just left the station without me (from a different platform than it said on my ticket as well as on the schedule when I checked 5 minutes before it arrived) so... I guess I'll have time do some more puzzles this week...
>> No. 3551 [Edit]
>>3550
You are fated to do AoC.
>> No. 3552 [Edit]
File 173344787833.jpg - (390.42KB , 989x1235 , aoc2024day5Goldclojure.jpg )
3552
>>3551
なら、運命に乗るしかない
>> No. 3553 [Edit]
File 173348488757.png - (168.54KB , 993x967 , aoc2024day6goldClojure.png )
3553
brute force, but it works
>> No. 3554 [Edit]
File 173349078719.webm - (205.79KB , day6.webm )
3554
>>3553
>> No. 3555 [Edit]
File 173355165427.png - (97.68KB , 847x614 , aoc2024day7python3.png )
3555
Painfully slow, but it works

>>3552
その意気だ

>>3553
Clojure looks like a nice Lisp to use.

>>3554
Nice.
>> No. 3556 [Edit]
File 173355882725.png - (40.01KB , 658x419 , aoc2024day7gold.png )
3556
>>3555
>Painfully slow
How slow are we talking?
Picrelated takes 3.65 seconds for my input
>> No. 3557 [Edit]
File 173357204926.jpg - (179.21KB , 770x754 , aoc2024day7gold40msClojure.jpg )
3557
>>3556
here's a smarter algorithm I stole from someon on 4chan. This finishes in 40ms on my phone.
>> No. 3558 [Edit]
File 173364127867.png - (178.63KB , 746x987 , aoc2024day8python3.png )
3558
>>3556
>How slow are we talking?
My dumb solution runs embarrassingly slow at over half a minute. But my leaderboard clear times for that day are relatively good compared to other days, including today.
>> No. 3559 [Edit]
File 173375096020.png - (76.12KB , 754x524 , aoc2024day8goldClojure.png )
3559
>> No. 3560 [Edit]
File 173380230842.png - (2.81KB , 594x326 , defrag_working-1.png )
3560
today's puzzle was fun because it made me feel nostalgic for the Windows 95 days
>> No. 3561 [Edit]
File 173392682036.png - (80.32KB , 680x604 , aoc2024Day11Clojure.png )
3561
if you want a hint for today's puzzle, it's basically a slightly harder version of Lanternfish from the 2021 edition:
https://adventofcode.com/2021/day/6

Eric even put this hint into the example input
>> No. 3562 [Edit]
File 17339650933.gif - (357.27KB , 1000x707 , aoc11.gif )
3562
>> No. 3563 [Edit]
File 173406462714.png - (183.21KB , 938x1033 , aoc2024day12Clojure_.png )
3563
And here's my last one for this year. It's starting to get tedious.
>> No. 3564 [Edit]
File 173407446139.png - (116.99KB , 671x652 , aoc2024day13python3.png )
3564
>>3563
寂しくなるね
I might not continue this year either, because it looks like there isn't anyone else here who's still participating.
>> No. 3565 [Edit]
>>3564
This solution is incorrect in the general case. It happens to work for my input but it doesn't work for all valid inputs. For example, it fails on this input:
Button A: X+2, Y+2 Button B: X+1, Y+1 Prize: X=2, Y=2
The correct answer for this should be 2. Press Button B 2 times, spending 2 tokens in total. Pressing Button A 1 time is suboptimal because it costs 1*3 tokens.
[Return] [Entire Thread] [Last 50 posts] [First 100 posts]

View catalog

Delete post []
Password  
Report post
Reason  


[Home] [Manage]



[ Rules ] [ an / foe / ma / mp3 / vg / vn ] [ cr / fig / navi ] [ mai / ot / so / tat ] [ arc / ddl / irc / lol / ns / pic ] [ home ]