[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


Janitor application acceptance emails are being sent out. Please remember to check your spam box!


[Advertise on 4chan]


File: aoc-logo.jpg (87 KB, 2000x1000)
87 KB
87 KB JPG
12 days edition

>Advent of Code is an 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. People use them as a speed contest, interview prep, company training, university coursework, practice problems, or to challenge each other.
https://adventofcode.com/

/g/ leaderboard join code:
224303-2c132471
anonymous-only leaderboard:
383378-dd1e2041

Previous thread: >>103661747 >>107371611
>>
Damn, already that time again
>>
>>107379367
Time to get filtered again
>>
/aocg/ memes ranked by retardedness:
1. unwashed ass
2. showtime cancer music
3. FUCK
4. the dog fucker namefag
5. retards not being able to read and then blaming eric
6. retards coming into the threads and LARPing as non-neets who are too busy getting paid 100 bucks / hour to waste their time doing AoC
7. retards claiming that you aren't filtered if you've spent more than 1 hour on a problem or if you've looked at other solutions
8. code screenshots with tranime background
9. big boys that change the rules of the problem
10. code screenshots made with carbon without disabling window controls
11. calendar
12. cniles posting their shit code with fixed sized arrays, integer overflows, etc.
13. quirky solutions (e.g. excel)
>>
File: 1758129383528262.jpg (178 KB, 866x600)
178 KB
178 KB JPG
>>107379367
You do realize they're just gonna feed their AI with your solutions, right?
>>
>>107379422
Tell me you've never actually participated in AoC without telling me you've never actually participated in AoC.
>>
>>107379422
you don't write your code on their website dummy
>>
File: epa.png (14 KB, 300x183)
14 KB
14 KB PNG
>>107379422
>my shitty broot gets fed into big tech's shitty broot to be fed into other people's shitty broot
hooray for efficiency
>>
>>107379422
https://www.youtube.com/watch?v=Hwz7YN1AQmQ
>>
wonder how much AI vibe faggotry we'll see from retards cheating at challenging themself
>>
Stats page still exists, hopefully it will still log how many solves there are even if there's no global leaderboard
>>
>>107379422
so you're telling me they already got filtered?
>>
>>107379422
You:
>worried about AI water usage
>won't publish code so it won't be used to train AI
>will die a mortal death
Me:
>unconcerned
>publish to github
>will live forever in the mind of the machine God.
The Apokatastasis laughs at you through time and space.
>>
>>107379458
Eric removed the Global leaderboard, so it won't matter. If we catch jeets in our private leaderboard, autists will suss them out.
>>
>>107379422
>>107379556
I unironically feel like this anon. I've asked chat gpt questions about random friends and family by name and it does actually know what little about them it finds on line. My point being if you've contributed any sort of text to the online bot harvest that is the internet all modern and future ai will have our shitty hot takes and quick math as part of their eternal matrix math.
>>
File: 1730437667690.jpg (101 KB, 414x503)
101 KB
101 KB JPG
>>107379422
Their loss
>>
>>107379665
DuckDuckGo's AI frontend claims to not use your chats for training AI models.
>>
>>107379684
>claims
>>
>>107379422
AI can already solve AoC easily
>>
File: 1733204931968420.png (192 KB, 1012x1424)
192 KB
192 KB PNG
>>
>>107379834
You can solve all of this by just not posting on reddit.
>>
>>107379834
>Make something
>People like it and create a community to discuss it
>Creator says he would like people to not spread the input
>The community who like it respect the creators wishes
>Some guy wishes to ignore the creators wishes
>Gets upset that the community they want to engage in doesn't align with their views
>>
>>107379853
Good goy
>>
>>107379845
Happy Holidays
>>
File: file.png (64 KB, 1569x284)
64 KB
64 KB PNG
>>107379367
>12 days edition
What's the reason for this?
>>
>>107379853
If the site ever goes down, your program is useless without the input. Therefore the input should be bundled with the program when you commit it.
If the creator asked you to cut your dick off would you respect his wishes too?
>>
>>107379968
try clicking the link, dumb retard
>>
>>107379968
1. He's tired of making the puzzles.
2. He absolutely does not want anyone to help him for some sort of fear of copyright or lawsuits.
>>
File: file.png (301 KB, 1593x751)
301 KB
301 KB PNG
>>107379994
>>107379999
checked
Oh, makes sense.
>>
ETA - 18:07:02
>>
>>107380051
thanks, now instead of checking the website for an updating countdown timer I can instead just read your post and mentally subtract the amount of time between when you sent it and when I look at it to know when the event will start, which is much more convenient
>>
>>107379422
What do you think this is, visual studio code?
>>
>>107380064
i set a cron job to notify me every 10m to remind me to read that post
>>
>>107379984
>retarded strawman
At this point you just want to argue
>>
>>107379367
just here to say that im in the first /aocg/ thread of this year
>>
>>107379984
Just save the puzzle page as a web archive.
>>
EC chads are going to be laughing as AoC starts off with a Gear ratio problem.
>>
>>107380127
Explain why I'm wrong then because I'm not getting it. Is it because I don't have to push to github or share on reddit?
>>
>>107380064
>How would I have felt this morning if I have had to count down with my fingers yesterday?
ETA - 17:42:22
>>
>>107380206
If being a kind person and following a persons request is not understandable to you and you think being asked to not show some some input is the same as being asked to cut your dick off you are off the deep end and need professional help.
Or you just a troll
>>
>>107380231
No, I'm just pointing out by extreme example that if someone requests you to do something, it's not automatically valid.
>>
>>107380268
Seems like a pointless argument to make when the discussion is about a concrete request
>>
>>107379367
Wadup my niggas, it's almost that time of the year once again.
>12 days edition
Gaaayyyy
>>
>>107380294
Exactly.
You: "Someone requested you to do something, so you should be nice and do it."
Me: "Request X, which you would not follow, exists. Therefore 'being nice' and 'someone asked you to do something' are not sufficient reasons to follow a request."

The point of the argument is to get past the "be kind" and "someone asked you to do something" stuff (>>107380231) and to look at the actual request. However even after I explain why I am not doing the request, you are still bringing up the 'be nice' stuff. Do you get it now?

If I fulfill the request, I risk making my repo worthless in isolation, and to what. Stop someone from cloning AoC? The only way that's ever happened is EC which is completely different. I think his fear is unfounded and following the request is preventing something that was never going to happen anyway.
>>
File: 1751548345602489.jpg (22 KB, 210x313)
22 KB
22 KB JPG
What's the purpose of this thread? Am I supposed to be hyped or what?
>>
>>107380381
>>>/v/ is down the hall to the right
>>
>>107380413
But this is a /v/ thread. They love to hype things up. This is just bunch of coding challenges and it hasn't even started yet.
>>
>>107380381
It's called fun.
It's been a yearly event on /g/ since 2017. One of the few nice things to happen on this board.
>>
>>107380437
ok go there and post the same thread and we migrate
>>
>>107380472
I really don't care about coding a christmas tree. Go play Project Euler or something.
>>
>>107380500
we can tell you are a nocoder, your copes have been told a thousand times all these years
>>
>>107380500
go rope yourself or something what are you even doing here
>>
>>107380500
>I really don't care
Then leave. This thread isn't for you.
Project Euler is far less enjoyable.
>>
>>107380530
But it is. You actually have to know math. These challenges you can just type to ChatGPT and any pajeet can beat them.
>>
>>107380484
no please don't leave me here alone
i can't go to /v/ because years of being on /g/ made me hate it even though ive never actually been
>>
>>107380370
>I risk making my repo worthless in isolation
every repo related to AoC is worthless.
You made a novel solution and nobody can stop you from posting it online.
People can however decide it doesn't follow their rules and that you have to find somewhere else to show and talk about it.
>>
This contest is rediculous and extremely harmful. I am a professional, technical specialist with dozens of certs and credentials. I entered hoping for a nice Christmas puzzle to bring cheerful experiences over the holidays. What I got instead was:
>You are not adequate if you don’t know super complex math like Chinese Remainder theorem and shoe lace string theory.
>I have to know what a Christmas tree looks like
>I need a quantum computer because normal straight forward programs never seem to terminate.
>I’m expected to know escoteric algorithms, like queues, dfs, bfs or whatever the fs.
>I had a full blown panic attack, asked anons for help and they all started calling me Dijkstra, that’s not even my name.
No this is not for me. I am some how made to feel lesser because I don’t know these things, and yet I have more certs than all of you combined. I won’t play this game, I just won’t. My self-esteem doesn’t deserve it.
>>
File: kinder-surprise_9.jpg (29 KB, 640x640)
29 KB
29 KB JPG
>>107380695
>queues, dfs, bfs
>escoteric algorithms
where did you got your certifications again?
>>
>>107380695
>I’m expected to know escoteric algorithms, like queues, dfs, bfs
>I am some how made to feel lesser
>some how
filtered
>>
>>107380695
>>I have to know what a Christmas tree looks like
So harmful.
>>
File: 1751471638317566.png (258 KB, 442x447)
258 KB
258 KB PNG
>>107380695
>>
>>107379367
Wait what? 12?
>>
Okay, I read the FAQ. 12 days and removing the global leaderboard sound like good changes.
>>
>>107380695
>shoe lace string theory
kek
>>
>>107381119
>removing the global leaderboard
I didn't realize this, that's good, it will filter all the ai pajeets but it used to be a cool feature in the past, especially when anons used to make reddit seethe, rip.
>>
>>107379422
Literally why would I care?
>>
>>107379400
sperging out about anime is peak reddit
>>
File: 1733469899128610.png (560 KB, 2872x1614)
560 KB
560 KB PNG
Is your machine ready?
>>
>>107381442
I just got new laptop
>>
Sorry, guys, but I have a real job that pays real money, I just can't have fun in your coding event for unemployed, this would be a waste of my highly valuable time.
>>
>>107381442
Not sure if I should be impressed or ashamed that one of my solutions used >20GB of RAM, and it needed every fucking bit of it.
Gave the right answer within a couple minutes, can't complain I guess.
>>
>>107379367
are these puzzles doable (in a non shitty & bruteforce way) if you've never studied computer science formally?
i've been programming for years but i never properly sat down and studied cs as a subject (things like graph theory & fundamental data types & automata theory and whatnot)

obviously ive been exposed to things a little through programming but nowhere beyond the surface level. I only recently learned about the difference between DFS and BFS searches for exmaple, not that i didn't know how to iterate through things before.

Is 12 days enough to learn what i need? i hear it gets quite complex towards the end (chinese remainder theorum meme etc.)
>>
>>107381620
Just try it bro. Learn as you go.
>>
>>107379853
why does the creator take issue with people sharing the input and puzzle text in the first place? seems like an arbitrary restriction
>>
>>107381492
nobody cares also filtered
>>
>>107381620
Formal training isn't necessary. If you have any gaps in your knowledge, you can pick it up from the thread. It's also entirely possible to come up with a solution on your own, and only learn that there's a proper term for it later.
The chinese remainder thing was kind of an outlier, which is why it was memed to death. Eric apparently didn't know it himself when he made the puzzle, and you didn't need to know it to solve it. It was just trivial if you did know it.
>>
excited for it
I'll hard limit myself to 1.5 hrs/day on it. I still need to get work done
>>107379665
wow
are you sure it's not doing a web lookup in the baclground? I guess one could use an offline model to check
>>
>>107381442
lol
>>
This year I'll be using Rust and maybe also Haskell
>>
Question for anons: how long do you guys usually take per question?

>>107381922
For me it's my first time, so I will be using C#. I have done 0 practice with previous years challenges, but I expect it to all go well.
>>
>>107381758
It's likely just a precedent thing. Letting people take some parts of his work may make it harder to enforce control over other things at a later date. He probably had a lawyer or solicitor tell him to try and make sure everything isn't too freely spread if it wants to ensure he always has control over it.
>>
>>107382031
>Question for anons: how long do you guys usually take per question?
It varies. The first few days tend to be doable within a few minutes, whereas you can end up wasting hours on the later ones.
>>
>>107382031
Depends on a day.
From a minute to hours.
>>
>>107382094
i still feel like its a dickhead thing to ask because its quite an ask of the players
if i've spent a few hours making a program i'd really prefer to be able to put the puzzle text and input next to it in case someone else looks at it. Its quite an ask to ask me not to do that, just to make it easier for you to sue people over this in the future. I dont even think this is something you should sue over, even if some other website tries to copy his whole thing and profit off of it.
>>
>>107381922
Nice. Both are really great languages, though Rust is more practical.
I'm trying out Idris, which is basically Haskell minus the automatic laziness and plus a bunch of extensions. The main draw is dependent types, but I'm probably not going to use them much if at all.

I'm somewhat glad that it's only 12 problems this year so I can finish the whole thing.
>>
>>107379367
>and puzzles come out every day (ending mid-December).
fucking why? if he's gonna cuck early with only 12 days, at least stagger releases.
>>
>>107379834
>file a lawsuit
based beyond belief.
>>
>>107380695
>shoe lace
I am now reminded some anons literally used flood fill for one of the problems this was relevant for.
>>
Sup /g/, I haven't been here since the last AoC. What did I miss?
>>
>>107382705
Nothing. This place died long time ago, it's just bots and jeets now. AoC is the only thing worth coming back for.
>>
>>107379834
>I think the reasons why should be obvious. Should I be allowed to rob a bank because my creative process requires a lot of money and the banks have money?
It isn't obvious at all to me, so I was interest in reading what he would say next. What a retarded comparison.
>>
I was thinking about trying out Go for this year. But after re-solving day 1 from last year in it, I am already annoyed.
>>
>>107379834
>javascript dev having a meltdown because he doesn't know how to read the input from a file
holy kek
>>
>>107379999
>He absolutely does not want anyone to help him for some sort of fear of copyright or lawsuits.
i'm fine with him dropping the global leaderboard since i'm sure fags message him all the time throwing a hissyfit about it, but this is such a gay reason to drop it to 12 days. really should not be that hard to have some "guest" puzzle people do like one day each to fill out the month and include a contract saying they own the IP to that one puzzle and nothing else

the whole premise of AoC is that it's supposed to be an advent calendar but instead of each day giving you a little toy or piece of chocolate, you get a coding puzzle. stopping at 12 days breaks that completely.

I'd rather him have just broken down the puzzle so that day 1 is the silver start and day 2 is day 1's gold star just to fill out the calendar
>>
>>107382927
there are no silver stars though
>>
>>107382705
A bunch of devs got fired and RAM is worthiest weight in gold now. Google and NVIDIA own the entire industry now. Altman is getting bailed out by the US government. Valve is releasing a gaming PC. Rust is now unsafe.
>>
>>107380695
>people actually responding to this earnestly
i r8 this b8 8 out of 8
>>
File: vga_dump.png (21 KB, 418x498)
21 KB
21 KB PNG
anyone else planning on doing it on old hardware this year? I liked NESanon last year
>>
>>107382958
see >>107379400 #13
>>
>>107380695
You have lost izzat sir
>>
>>107381620
the majority of people in this thread who do day one will not finish it and it's unlikely you will, but it's still fun to play along the first couple days to see how far you'll get. i've learned some good stuff about optimization that have helped in my real work just from doing these puzzles (not that they were esoteric concepts, just good excuse to practice)

the people who do well on these challenges and made the global leaderboard in years past (rip) aren't just "naturally gifted cs prodigies", but people who already had a lot of practice doing these kinds of puzzles in competitions and know all of their language's libraries to quickly string a solution together in a few minutes.

so yeah, i guess it's technically possible that you could throw together a decent solution for some mid-month pathfinding puzzle despite not knowing djikstra's or A*, but if you aren't willing to look stuff up it's more likely you'll get frustrated and quit. but IMO that's fine and it's still fun even if you get filtered early
>>
>It takes a ton of my free time every year to run Advent of Code
Ok but why not release a puzzle every 2 days? It also takes time for us to do them, make it enjoyable for everyone buddy
>>
>>107381620
Yes, especially now that you have AI to talk to to help you through the problems.
>>
>>107382031
it gets harder as it goes on (though not necessarily day by day). last year, the global leaderboard (fastest 200 people) filled up in ~3 minutes on day 3 while it took an hour to fill on day 24. and those are the people who actually know what they're doing
>>
>>107382200
>>107382202
Thanks
>>
>>107383084
surely he makes some money off of this with all of the sponsors and AoC++ people? maybe not enough to live off of but it's not like he's slaving away for free. not to mention it's got to be validating that he's a micro celebrity for AoC, nothing else he's ever worked on will ever make him as well known as this
>>
Is it just me, or does it feel like the population of these threads has dropped enormously? I feel like we're just sort of living in the ruins of the 2010's tech industry.

Still doing all days, but, like, you know.
>>
>>107382859
severe reading comprehension issues
>>
>>107383234
yes and it's a good thing
we're almost free
>>
>>107383234
the /g/ threads definitely peaked in activity from like 2016 to 2019, but that's also when calendar image shit-flinging was very popular so idk if anything of value was really lost
>>
>>107383361
thankfully we have the idiomatic calendar now
>>
>>107380381
if for jeets and neets to larp as software engineers
>>
>>107382958
>60mhz, 64mb
nice, that's a little slower than an n64, with a bit more memory although the OS obviously takes some of it.
I don't have any old system running myself but I'd like to see how far you can get with this. I think the ram could potentially be the harder limit on some days with larger input.
Which language are you going to use? I guess you don't want to run an interpreter on such a small machine.
>>
>>107383519
>I think the ram could potentially be the harder limit on some days with larger input
Def. I'll probably need to use paging or chunk things into swap files.
>I guess you don't want to run an interpreter on such a small machine.
Actually, there is one interpreted language that's pretty fast: Awk. My plan is to sketch out and algorithmically optimize the solution in Awk like I often do normally and then go in and convert it to C for performance if I have to, which is often pretty fun because Awk was designed to map to C basically 1-to-1.

If it's still too slow then I can break out the mmap abuse and stuff like that.
>>
>>107383084
I was thinking the same
>>
can anybody give a project euler equivalent for each day?
>>
>>107380051
need an update
no i will not do any arithmetic
>>
>>107383576
>My plan is to sketch out and algorithmically optimize the solution in Awk like I often do normally and then go in and convert it to C for performance if I have to
been doing that for the last couple years
you're in for a lot of fun mate
>>
>>107383725
ETA - 10:37:46
>>
>>107383895
because the leaderboard is gone, I no longer feel pressure to do the problem right as it drops
>>
>>107383936
same, I don't care and can't compete but there are still the private leaderboards as I understand
>>
>>107383836
Cheers, anon!
>>
>>107382831
I only recommend go when you need:
Reasonable performance with the convenience of single binary, no dependencies runtime (outside of OS libc for non-linux) and no cross compiler autism.
Your cowagies are literally retarded.
Killer app or library.

It's absolutely dogshit of a language if you're too intelligent.
>>
>>107383725
The website shows the ETA....
>>
09:26:22
>>
Who says array langs aren't readable
   Sum EvenFilter CapFilter fibonacci
4613732

>>
>>107379834
>creator literally just says "please don't redistribute problems or inputs"
>the absolute extent of enforcement of this is that moderators on reddit will slap you on the wrist
>redditor still pisses and shits himself over it
lmao
>>107379984
Literally a non-issue unless you're a redditor.
>>
>>107384674
And of course with a better fibonacci implementation
Sum CapFilter fibonacci

or even
Sum fibonacci


This is simple enough to expand
Sum { (Sum fibonacci_coefficients Times LastTwoElements) Join_swap arg }_repeat9 first_two_even_fibonacci_numbers
>>
A little late, but working on my helper library
Picking up some tips for parsing by checking out the one billion rows challenge.

Guessing first few days will be fast and mostly parsing and some quick numbers.
Need to get a generic bfs made and maybe some graph helpers
>>
>>107384678
>please don't share my precious strings©
>>
>>107380816
Don't you remember the amount of seethe that problem generated? It was hilarious.
>>
>>107380695
>Chinese Remainder theorem
>super complex
kek
>>
>>107380695
>escoteric algorithms, like queues, dfs, bfs or whatever the fs

0/10 shitty bait
>>
>>107381442
Change that to GPU and we're talking about Sam Altman.
>>
>>107385033
I solved it by generating PNGs and flipping manually through all of them until I saw the Christmas three. It ruled.
>>
>>107385056
It's kind of extremely niche desu. I was seething too.
>>
>>107385088
I defined a concept of image entropy and just tweaked the constants til it "worked." DESU I found the problem to be bullshit too because without any geometry, the problem is finnicky.
>>
>>107381620
This survey of some of the things may be helpful to you. Pretty concise and just focuses on what you need for these competitions.
https://cses.fi/book/book.pdf
>>
>>107381442
>>
>>107382971
Quirky solutions are based and only someone dead inside hate them.
>>
File: eric.jpg (62 KB, 1024x1024)
62 KB
62 KB JPG
I hope Eric takes a dark turn and drops 12 maddeningly difficult problems that have trivial solutions (if you know the trick). Crashing out with a reign of terror for the holidays.

>The Mathematics Department of Moscow State University, the most prestigious mathematics school in Russia, was at that time actively trying to keep Jewish students (and other “undesirables”) from enrolling in the department. One of the methods they used for doing this was to give the unwanted students a different set of problems on their oral exam. I was told that these problems were carefully designed to have elementary solutions (so that the Department could avoid scandals) that were nearly impossible to find. Any student who failed to answer could easily be rejected, so this system was an effective method of controlling admissions. These kinds of math problems were informally referred to as “Jewish” problems or “coffins”. “Coffins” is the literal translation from Russian; they have also been called “killer” problems in English.
https://arxiv.org/pdf/1110.1556
>>
>>107385522
>wypipo bad!
>>
ah just in time
my yearly humiliation ritual
>>
>>107379400
Is brute forcing acceptable now?
>>
>>107385522
He did this last year by making problems that were fucking impossible to optimize beyond brute forcing unless you looked at the input and figured out the weird undocumented constraint he was using.
>>
>>107385663
I rank brute forcing above even closed form solutions. It’s honestly more impressive.
>>
>>107385663
Why wouldn't it be acceptable? You have a set of constraints and a problem, you coded a solution.
>>
>>107385663
>your code gets the solution in less than a ms
yawn
>your code takes over 10 minutes to get the solution and uses over 10 GB of RAM
giga based
>>
My retarded ass deleted the screenshot generation tool I used last year, but I got its URL:
https://gitlab.com/xolatile/xarbon/
Where the fuck are you anon? Where the fuck did it go????
>>
So what problems last year filtered the AIs?
>>
File: 1743285896645725.png (405 KB, 756x456)
405 KB
405 KB PNG
Trying out Nim this year, oiling the machine by rewriting last year's day 1.
>>
>>107379400
fuck off tourist
>>
>>107385786
Is this it? https://git.xolatile.top/?p=xolatile-xarbon.git;a=commit;h=b2bbfd7be69c1de91a06d922a9f7e09b45e59c1e
>>
CIA honeypot for retards and cunts

https://wikileaks.org/google-is-not-what-it-seems/

>but I heckin love building the torture nexus!
kill yourself.
>>
>>107385812
definitely day 24, took an hour for global board to fill
>>
File: 1742739618273776.png (6 KB, 628x276)
6 KB
6 KB PNG
>>107385932
Nice, thanks anon.
I couldn't manage to "git clone" it so I used the "snapshot" link, and the command-line parameters aren't working right, so you have to point it to a file directly.
>>
>>107385816
I tried Nim a few years ago, but got frustrated and gave up halfway through. I felt like I was writing ugly, un-idiomatic solutions for everything. Maybe I'll try again this year.
>>
>>107385033
I do remember it, and it was hilarious.
I just made it look for a bunch of symbols lining up and that was the Christmas tree.
>>
>>107385953
Oh ya, 24 was pretty fucking annoying.
>>
>>107385933
explain how the cia benefits from me doing comfy christmas puzzles
>>
>>107385288
Fair enough. Though anyone with a math degree would know that theorem.
>>
>>107383234
>>
>>107386270
Fuck, forgot to say that I miss it, too.
>>
>>107386107
I feel you, it's hard to figure out how I'm "supposed" to use the language. Everything I do feels like a hack, and the various syntax sugars like style insensitivity, "a(b) == b.a()" and how parens are optional "a b == a(b)", make it *extremely* hard to write idiomatic code.

I had a friend who would try his hardest to do as much as possible on a single line of C, and would try to avoid parens as much as possible, so you'd get stuff like "for (int x = 0; x < 10; x++) if (*++y) x[y + z]" where y is the array for some reason (because in C, "x[y] == *(x + y) == y[x]").
So in honor of him, I'm going to try to minimize the amount of parens I use in Nim. Just because I can, and because it feels "idiomatic" to write this ugly ass language in the most ugly ass manner possible.

I really want to like Nim, but man does it make it hard to be liked.
>>
I am going with js, it is nice, I like it. It has everything I need to solve things fast. Ts is generally better, but not in this case.
>>
>>107385663
If it terminates before the heat death, yes.
>>
>>107386362
>>107386107
I never thought it was difficult to write nice-looking Nim when I used it.
The language lets you drop parentheses or write things in a more left-to-right manner when it makes sense, that doesn't mean you have to do it literally everywhere.
>>
>>107386627
I just really find it hard to tell when it "makes sense" especially when even the official docs aren't consistent about writing "int(x)" vs "x.int" or whether to use parentheses with echo() or not.
Call it OCD but I really prefer having one way to do things...
>>
should i do aoc in js or learn rust and do it in that?
>>
>>107386887
do it in x86 assembly
>>
>>107386830
For f(a) vs a.f I usually asked myself "Would this be implemented as a free function or as a method in C++?" and chose based on that. Parentheses I usually dropped when the right side only had a single argument (so something like "sequence.add x" was fine), and never inside an arithmetic expression.
But I have also always felt that people exaggerate the need for a 100% consistent style, so others will probably disagree. I would still be using Nim if it had a few more library conveniences that I am used to from Python.
>>
Advent of parsing. No thank.
>>
>>107387042
ask chatgpt to parse for you
>>
File: 1745748141946434.jpg (363 KB, 1328x1328)
363 KB
363 KB JPG
holy smokes chat I am not ready
>>
>>107387317
>it's been a whole year...
>>
>Advent of two weeks that stops way before christmas
>>
File: calendarbee.png (911 KB, 1349x1024)
911 KB
911 KB PNG
who got last year's calendar?
>>
>>107387599
Oh dang, I thought it would have been every other day ending on the 24th.
>>
I'm going to attempt to solve a puzzle this year using EXApunks. I just need to build the arena using the level editor.
>>
>>107387599
they should at least make it so that you have 2 problems for the event.
>>
>>107379367
gonna solve this with AI
>>
>>107387911
Could you abstract a problem into Spacechem?
>>
I thought it would be out at 00:00 UTC not 05:00
anons I will be missing showtime the first night I am so sorry
>>
>>107388393
not forgiven
>>
>>107388166
I don't know, I've never played that game. If Spacechem is Turing Complete then theoretically yse.
>>
2 hours
>>
It's good to be back, guys.
>>
OH SHIT IT DROPPED EARLY
>>
brootbros get in here

same leaderboards as last year?
>>
>>107380045
>runtimes
people bought dedicated servers to run lines of code?
>>
>>107389208
there's always a fresh one, it's in the OP
>>
>>107388149
filtered
>>
perhaps with half the puzzles eric made some good ones
>>
import solution
>>
1 hour
>>
>>107389454
oops, all parsing!
>>
>>107389454
it's going to be all grids
>>
>Also, starting this year, there will be 12 days of puzzles each December.
watch these be on alternate days kek
no problem tomorrow! you're only supposed to solve part 1 today!
>>
>>107389197
dont scare me bro
>>
>>107389587
no he specifically said it was going from dec 1 - dec 12 because apparently it might be "confusing" if puzzle day 3 wasn't on december 3. so basically he thinks we're all retarded
>>
>>107389637
you have to consider that there are also pajeets "solving" these problems
>>
>>107389640
i wonder how many "HELP DAY 13 ISN'T LOADING FOR ME" messages he will get
>>
oh shit it's almost time
>>
So glad I paid for AoC++! Already solving the first puzzle. Thanks for the perks Eric!
>>
>>107389673
did you see the day 2 preview yet? check your 4chan inbox
>>
>>107389637
>so basically he thinks we're all retarded
He's right.
>>
>>107389637
He could have made one star per day instead of two stars per day
>>
>>107389673
well that was straightforward
presumably this year gets harder twice as quickly?
>>
Oh snap did Eric mess up the puzzle opening code? You can see the puzzle early if you link to it directly
https://adventofcode.com/day/1
>>
30mins
>>
>>107387761
full size: https://files.catbox.moe/pbao91.png
>>
>>107389737
>the link actually works
lmao I just expected an error page
>>
>>107389751
>day 14
kek i was there
in fact i think that's a screenshot of my terminal if i remember correctly
>>
>>107389737
LMAO
>>
>still need an account
god im so sick of making a throwaway reddit every fucking year
>>
>>107389737
leaderboard bros....we've been gapped...
>>
i think i'm gonna skip this year, too much stress. life really gets worse monotonically
>>
>>107389737
>Not quite lisp
Unfortunately for you I've done all of these and remembered the title. Fuck you.
>>
already got filtered
i cant decide if i want to do these in c or bbc(python)
>>
>>107389737
>2015
almost got me
>>
idk what language to use
>>
>>107389795
>christmas puzzles are stressful
click here: >>>/lgbt/
>>
>>107389751
based, i miss calendar posting even if i don't miss the shitflinging
>>
>>107389801
your own of course
>>
>>107389802
/tttt/ loves AoC what are you talking about
>>
>>107389801
for me it's ada
also you can make adacore donate money to charity if you submit solutions on the ada-lang forum. haven't seen any other PL communities doing interesting stuff
>>
>>107389801
m4
>>
>>107389653
It will be funny if people leave AI bots running all day without checking
>>
15mins
>>
>>107389801
English + pen&paper
>>
>>107389847
don't jinx it
>>
>>107389850
What type of pen are you using?
>>
>>107389852
day one will be another "robotic arm" problem
>>
so, will day 1 be day 1 difficulty or harder?
>>
AoC++ bros it's up... djikstra day one wtf eric
>>
Day light's fadin away...
>>
>>107389867
Starting day 1 with an ultra filter is too based for Eric
>>
10 MINUTES
>>
10mins
>>
Oh no, I've gotta shit.
>>
>wasnt planning on doing it this year
>somehow find myself on the website 10 minutes before it starts
muscle memory
>>
most of you faggots will be filtered by day 6
>>
FUCK
>>
FUCK FUCK FUCK
>>
cancer music
>>
>>107389892
Less commitment this year anyway, might as well.
>>
Today is filter. Eric DMd me personally. Good luck you chuds!
>>
>>107389903
but my leaderboard dreams are over...
>>
1 snus or 2 snus right now lads?
>>
File: file.png (12 KB, 633x468)
12 KB
12 KB PNG
God it's so good to be back.
>>
>>107389902
https://www.youtube.com/watch?v=rKdtO2HWWoc
>>
>To-Do
>Become the king of dragonducks? Check
>Save Christmas? Let's get started
>>
>>107389911
HIIIIIIII!
>>
postin in ebin bread
>>
>>107389892
You are here forever.
>>
>>107389911
Good to see you again. I want to see her shooting a potato gun and exposed indecently.
>>
Predicting:
days 1-4: trivial
5-8, 10 and 12: medium
9: hard
11: filter
>>
5 MINUTES
>>
did eric make a decision about it being first 12 days vs every 2nd day?
>>
i need to poop but it's not coming out
pray for me
>>
>>107389911
Welcome back anon
>>107389933
FAQ says it ends mid-December
>>
File: kony.jpg (309 KB, 1275x1600)
309 KB
309 KB JPG
>>107389913
thank you for the water my friend
>>
>>107389928
Eric doesn't have to hold back for the last day anymore, because it's not on Christmas
>>
the good news is with only 12 problems we won't have any duplicate dijkstra / grids
right guys?
right?
>>
File: 1743645515709941.jpg (243 KB, 1277x957)
243 KB
243 KB JPG
https://www.youtube.com/watch?v=hjGZLnja1o8
>>
>>107389934
PUSH ANON
>>
>>107389949
cancer music
>>
>>107389940
KONY 2012!
>>
>>107389934
don't push to hard you'll get hemorrhoids
>>
who else "working" right now
>>
>>107389946
Grids. Grids everywhere.
>>
I HAVE TO SHIT
>>
>>107389949
thanks doc
>>
>>107389911
YAY! We're so happy you're back again!
Merry Christmas!
>>
>>107389957
>he doesn't wear a competitive programming diaper
>>
>>107389950
i'm trying to scrape it out with my fingers but it's completely blocked
>>
FUCK
>>
1 MINUTE FUCK FUCK FUCK FUCK
>>
twone
>>
TEN SECONDS LADS
>>
>>107389967
>import z3
>import numpy
>import networkx
Yep, it's coding time
>>
FUCK
>>
FUCK
>>
FUCK
>>
ERIC WTF IS THIS
>>
FUCK
>>
done
>>
>>107390033
import sys

ans = 0
inp = sys.stdin.read().strip()
lines = inp.splitlines() # note map(int, line.split())

pwd = 0

pos = 50
for line in lines:
lr = line[0]
times = int(line[1:])
for i in range(times):
if lr == "L":
pos -= 1
if lr == "R":
pos += 1
if pos < 0:
pos += 100
pos %= 100
if pos == 0:
pwd += 1

print(pwd)


Day   -Part 1-   -Part 2-
1 00:04:57 00:06:06


i placed at least 31st
>>
>>107390040
... unless the leaderboard updated slowly
i don't know how it works this year
>>
Everybody Codes has spoiled me. I keep trying to double-click the examples to copy them, and I have to open the input in a whole new tab instead of having a button to copy it to clipboard.
>>
>example works
>R1000 works
>real input doesn't
bruh how did I fuck up this early
>>
File: 1745744759396936.png (7 KB, 460x436)
7 KB
7 KB PNG
unwashed python
>>
File: 1761602891516904.png (200 KB, 1200x900)
200 KB
200 KB PNG
i used a for loop
>>
>>107390064
same lmao, some gay edge case i'm not accounting for
>>
File: carbon.png (107 KB, 890x1752)
107 KB
107 KB PNG
Day   -Part 1-   -Part 2-
1 00:02:40 00:06:24

>fuck up first try trying to do part 2 the correct way with division
>delete it and go full retard grug brain instead
>>
>>107390064
Try starting at pos 0 and doing L20, it shouldn't be counting it for part 2.
>>
Part 1
data = map(int, open("Day 01 input.txt", "r").read().strip().replace("R","").replace("L","-").split("\n")) #individual numbers
num = 50
total = 0
for i in data:
num += i
num %= 100
if num == 0: total += 1
print total

Part 2
data = map(int, open("Day 01 input.txt", "r").read().strip().replace("R","").replace("L","-").split("\n")) #individual numbers
num = 50
total = 0
for i in data:
for j in range(abs(i)):
num += 1 if i >= 0 else -1
num %= 100
if num == 0: total += 1
print total

Lost time to skimming the warning about R1000. Lazy loop to the rescue.
>>
>mess up the math
>realize that brooting it was faster
>>
>>107390077
Forgot to post times
Day   -Part 1-   -Part 2-
1 00:04:40 00:12:11
>>
File: 2025_day1.png (41 KB, 1425x485)
41 KB
41 KB PNG
>>107390104
Reject mathematics, always brute.
>>
File: stats.png (3 KB, 624x41)
3 KB
3 KB PNG
Stats page still works, can use it as an estimate of global difficulty
>>
File: xarbon.png (11 KB, 812x484)
11 KB
11 KB PNG
Day   -Part 1-   -Part 2-
1 00:02:36 00:11:01


Don't care now that there is no global leaderboard.
>>
Part 2 took me far too long. I have failed you.
>>
>>107390116
i think it updates slowly
when i solved it there were 31 golds: >>107390040
then it didn't update until there were 300 something golds
:/
>>
>>107390064
sorry I meant:
Try starting at pos 20 and doing L20, it shouldn't be counting it for part 2.
>>
File: code.png (283 KB, 1326x1812)
283 KB
283 KB PNG
Day   -Part 1-   -Part 2-
1 00:04:28 00:17:39

part 2 took ages because my brian refused to math and then i also forgot the parsing was a generator which got consumed by part a so i was running it on nothing and getting a 0
>>
File: d01_022131.png (131 KB, 960x1584)
131 KB
131 KB PNG
I am not proud.
Should be simple enough to do in ASM though.
>>
>0x434C49434B
>43 4C 49 43 4B
> C L I C K

good one Eric
>>
File: 01.png (564 KB, 5224x2282)
564 KB
564 KB PNG
Rust solution
>>
>>107390129
Leaderboards seem to have a big delay too.
>>
>>107390166
Based noticer.
>>107390145
>refused to math
I momentarily forgot the name of the function that returns the sign of the number... it's called Sign, go figure.
>>
>>107390050
>I keep trying to double-click the examples to copy them
Triple click and Ctrl+C
>>
File: codeimage-snippet_1.png (71 KB, 525x513)
71 KB
71 KB PNG
>>
>>107390166
>You should have seen the chaos when the Elves overflowed their 32-bit password method counter.
What was method L I C K?
>>
>>107390050
>Click to get my input, expect it to download to file
AAAAAAACK.
>>
File: 1749420555581707.png (5 KB, 564x308)
5 KB
5 KB PNG
>>107390077
Washed python.
Not sure if I can further improve the p2 calcs.
>>
>already stuck on day one
i'm going to kill myself
>>
>>107390050
>not scheduling a job to download your input as soon as the puzzle is posted
>>
https://pastebin.com/raw/yS0qSY8n

can someone tell me how far off I am for part 2? apparently the issues I keep fixing are not the real problem and now eric is timing me out for 5 minutes. surely not off by 1

6195 is my current answer
>>
>>107390050
>right click
>save page as
I don't know why you'd want to clipboard it.
>>
>>107390233
have you tried starting at 0 and doing L20? it shouldn't count it for p2.
>>
>>107390233
your answer is lower and not off by one
your p1 answer was 999, yes?
>>
>>107390252
>your answer
i should clarify, the correct answer is lower
your `current answer' is higher than your answer
apologies for the confusion
>>
>>107390241
yeah L20 gives me 0 when starting at 0

>>107390252
good to know. also yeah, can't get to part 2 without a working part 1 after all
>>
File: 1750968837666552.png (79 KB, 1231x666)
79 KB
79 KB PNG
quirky excel solution
>>
Part 1:

package main

import (
"bufio"
"fmt"
"os"
"strconv"
)

func main() {
zeroes := 0
dial := 50
file, _ := os.Open("input.txt")
defer file.Close()
scanner := bufio.NewScanner(file)

for scanner.Scan() {
s := scanner.Text()
fmt.Println(s)
if len(s) == 0 {
break
}
direction := s[0]
size, err := strconv.Atoi(s[1:])
if err != nil {
panic(err)
}
if direction == 'L' {
dial -= size
} else if direction == 'R' {
dial += size
}
dial = dial % 100
if dial < 0 {
dial = 100 - (dial * -1)
}
fmt.Println(dial)
if dial == 0 {
zeroes++
}
}

fmt.Println(zeroes)

}


Part 2 is exactly the same, but simulating the actual clicks one by one:


if direction == 'L' {
for i := 0; i < size; i++{
dial -= 1
if dial < 0 {
dial = 99
}
if dial == 0 {
zeroes++
}
}
} else if direction == 'R' {
for i := 0; i < size; i++ {
dial += 1
if dial > 99 {
dial = 0
}
if dial == 0 {
zeroes++
}
}
}
>>
>>107390259
just asking in case your input has some edge case mine didn't
>>
>>107390262
Based excel chad gonna save Xmas this year.
>>
File: file.png (3 KB, 103x101)
3 KB
3 KB PNG
>>107385305
>>107385088
I found the image lmao
>>
>>107390259
also i want to make sure you see this: >>107390256
my first reply was ambiguous
>>
File: carbon.png (175 KB, 573x1481)
175 KB
175 KB PNG
Day   -Part 1-   -Part 2-
1 00:03:03 00:21:24

Shameful.

>>107390104
I gave up on figuring out the math after 15 minutes and wrote a brooter.
I still haven't figured out the math, but I'm trying.
>>
File: day 1.png (88 KB, 657x837)
88 KB
88 KB PNG
My somewhat hacky solution
>>
Why is everyone solving part 2 with nested for loops? Is it not possible in O(n) time?
>>
File: 01.png (626 KB, 5546x2412)
626 KB
626 KB PNG
idiomatic Rust solution



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.