#advent-of-code

1 messages · Page 16 of 1

cyan sleet
#

:/

#

so basically don't write prolog for what prolog does well

hidden musk
#

rip

noble skiff
#

I'm kinda regretting going back and doing day 5 part 2 the efficient way

#

this is pretty annoying code to debug

woven sable
#

what'd u write it in?

dense osprey
#

took a break

#

will solve part 2 now

#

optimal solution inc

noble skiff
hidden musk
#

this one might be a >24hrs ngl

dense osprey
#

i dont even know how to approach this in a non naive way

#

i just cant come up with a way

#

ive always avoided range style problems

#

havent solved anything similar yet

tardy vale
#

I got stumped a little by part 2 as well, but doing a little data exploration on my input and I have some new ideas

hidden musk
#

maybe you should activate your inner monoprologue

hazy ermine
cyan sleet
#

ffs, =< and => are the most cursed ways to write inequalities

hidden musk
#

yes

weary kelp
#

lol, erlang has =< and >= 🙃

cyan sleet
#

it's =< and >=

hidden musk
#

i'm about to manually min the output ngl

cyan sleet
#

I'm just dumb

cyan sleet
hidden musk
#

no i just have the query results. idk how to make a list of them either 🥴

cyan sleet
#

wdym query results?

hidden musk
#

like, i'm doing it interactively

cyan sleet
#

🥴

hidden musk
#

shh

cyan sleet
#

oh, I managed to make something that finds all shifted intervals

#

now how tf do I find the non-shifted ones?

noble skiff
#

ugh, finally got the fast solution for part 2

#

smh

#

31 us for part1 and 2

hidden musk
#

i got part 1 finally 🙄

cyan sleet
#

prolog recursion is such a mindfuck

append([], List, List).
append([Head|Tail], List, [Head|Rest]) :-
    append(Tail, List, Rest).
hidden musk
#

🥴

#

yeah this is a >24 for pt 2

cyan sleet
#

I'm missing like one part to be able to start making an attempt

#

inverting ranges

low condor
#

I could not even begin to imagine doing today in an unfamiliar lang

hidden musk
#

i think if i was familiar with prolog it would be a breeze

low condor
#

if you lot can do it, very impressive

lusty rover
terse comet
#

part 1 is not too bad
I still haven't really started working on part 2 though

low condor
dense osprey
#

wrote a naive solution

low condor
#

took me hours and rigorous tests

lusty rover
dense osprey
#

i hope it finds the solution within the next 3 hours

low condor
dense osprey
#

idc abt optimal solution

#

i hate range stuff

lusty rover
low condor
dense osprey
#

spoiler sol

#

idk how to name my variables

terse comet
#

bruh

dense osprey
#

bruh contains the mappings

hidden musk
#

bruh

low condor
#

looking at the reddit memes I'm mildly surprised today is brute-forceable

honest nacelle
#

okay, back to work on day 5. Wish me luck

low condor
#

i took one look at the input file and thought the brute force would be a terrible idea, but seems you can make it work

hidden musk
#

i think i'm just gonna run the brute force overnight and see what happens

#

wait part 2 ain't even that hard

cyan sleet
#

either you're a genius or you missed something

dense osprey
hidden musk
dense osprey
#

this check shouldnt affect my runtime right?

#

1e9 of those should fit in 1 second

#

?

#

but division is slow

hidden musk
#

reiterating my dislike for the name of itertools.batched

cyan sleet
#

chunked

dense osprey
#

2.5seconds for 1e6 checks

hidden musk
#

that's quite slow 🤔

dense osprey
#

yea

#

it is

#

1sec

cyan sleet
#

I hope you're using optimization flags

dense osprey
#

25 for 1e7

#

4:10 for 1e8

#

ok ill let it run while i sleep

#

41:40 for 1e9

#

assuming that sol is below 5e9

#

thus around 3 hours

#

i just want the golden star

covert arrow
dense osprey
#

just wanted to time my program

#

without using a buildin timer

#

but thank you

cyan sleet
#
f(A, [X], [range(A, X)]).
f(A, [range(L, R)|Tail], [range(A, L)|Rest]) :- f(R, Tail, Rest).

:- f(-100, [range(1, 2), range(4, 9), 100], L), writeln(L).
```that'll do it

[range(-100,1),range(2,4),range(9,100)]

#

my head cries

compact wasp
#

i think that's how crying usually works

dense osprey
#

i want a math heavy problem

#

not advanced math

compact wasp
#

can i send you my algebra hw

dense osprey
#

20$ and ill do your homeworl

compact wasp
#

nah not worth

#

3 lowest hw grades get dropped and there are only 2 left

#

i could get 0s and still ace the class

dense osprey
#

cant you just cheat on your homeowrks

#

i wish i had homework grades

#

i love chatgpt

compact wasp
dense osprey
#

whenever my teacher asks something, i ask chatgpt the same question

#

and then use chatgpt's answer

compact wasp
dense osprey
#

and get an a in class

dense osprey
compact wasp
#

yeah

dense osprey
#

tried öearning it last year

#

gave up

compact wasp
#

rip

honest nacelle
#

Man I thought I had a good solution, part 2 taught me different

dense osprey
#

3min runtime

#

or 4

hidden musk
#

wild

dense osprey
#

i love easy leetcode problems

honest nacelle
#

easy

simple raven
#

3min runtime wouldn't solve a leetcode problem 😄

dense osprey
dense osprey
simple raven
#

ah k

honest nacelle
#

gonna let this brute force run while I try to think of something better...

#

WAIT

river hollow
#

Part 2 is 34 milliseconds for me

honest nacelle
#

I'm so dumb

#

WAIT

#

I'm not dumb :9

#

well I am but not in the way I thought

river hollow
#

How is the bot leaderboard here different than the AoC leaderboard? One has me at 116th, the other has me at 16th.

cyan sleet
honest nacelle
#

so it turned out to be 😦

cyan sleet
#

we all be dumb

#

I'm bonus dumb

honest nacelle
#

WAIT I'm not NOT not dumb maybe

cyan sleet
#

Schrödinger's dumb

dense osprey
#

3 jane street guys in top 100

feral hazel
#

wasn't there a site with the entire aoc leaderboard for the python server or was that taken down in favor of the command?

dense osprey
dense osprey
#

its still avaiable

feral hazel
#

yeah the global command links to the global leaderboard

simple raven
#

I finally figured out the solution

for i in range(1e20):
    response = submit_answer_to_AoC_and_parse_response(i)
    if response:
        break
``` see you in a week
terse comet
#

range(1e20) is a TypeError lol

honest nacelle
#

Mmm... is it a good solution if it only works because of the specific values in the source data?

simple raven
terse comet
dense osprey
#

how do ppl solve a problem in 90seconds

#

or a part of a problem

feral hazel
simple raven
river hollow
#

Lots of pre-existing libraries they glue together, particularly for parsing.

terse comet
honest nacelle
river hollow
#

You can find such a leader and click through to their github and find their code ... and libraries.

#

There's at least one person who wrote their own AoC DSL.

honest nacelle
#

DSL?

river hollow
#

Domain-specific language

dense osprey
#

someone got day 4 in 1:22

#

how is that possible

river hollow
honest nacelle
#

Honestly though I can't even understand the problem or physically write code that fast

#

it's wild

dense osprey
#

ah

dense osprey
dense osprey
simple raven
#

when you watch videos of people solving the google coding challenge I would expect they are the same people that some these in minutes, crazy to watch

river hollow
river hollow
#

There's a lot of libraries, very compact code. So it's lots of practice code golfing and doing competitive stuff.

dense osprey
#

ah

simple raven
ripe meteor
#

we've escaped the great filter once more, see you tomorrow peeps

river hollow
#

I found one person who had tools that hits the AoC website and grabs the sample data, then the input data; downloads it, builds a skeleton project with their AoC library, and then pops open the IDE onto that project.

#

I got Day 6 in 2021 in 9 minutes, 36 seconds. I was ranked 2838.

#

Haven't done any better. It's futile, since I'm not going to write my own library or any of these tools.

ripe meteor
#

Never

#

Im struggling enough as it is

hidden musk
#

huh

#

python?

ripe meteor
#

Ye

#

Idk if im just out of practice but this year feels much harder

#

Maybe im just dumb, who knows

hidden musk
#

you fell off

ripe meteor
#

Peaked many years ago

#

Tbh today's part2 wasnt that hard

#

I think i just panicked when i read it lmao

#

Put it off the entire day

dense osprey
#

but idk how useful they would be

hidden musk
#

i know what i want. i don't how to get it

dense osprey
#

since üroblems so far didnt really require anything that couldve been prewritten

ripe meteor
#

You're using prolog today?

dense osprey
#

except reading input

cyan sleet
#

I'm going all recursion, screw this

#

I've found a tool that can actually do stuff

hidden musk
cyan sleet
#

recursedion

plush grove
#

are we allowed to use libraries such as regex in advent of code?

honest nacelle
#

BRUTE FORCE FTW

terse comet
dense osprey
#

i hate regex

#

had to use it once

honest nacelle
#

regex is a great tool, but not a hammer

dense osprey
#

a year ago

#

i still remember reading the docs and not understand them

#

the pain

#

the suffering

#

regex

honest nacelle
#

it comes with practice, personally I don't write any regex without using regex101 or a similar site

river hollow
#

Mostly.

dense osprey
#

found out that the ctrl+f search thing has regex

river hollow
honest nacelle
jovial jay
river hollow
#

It seems dumb to debate it.

#

But I look forward to your live-stream of flipping switches on your Altair to get one of the solutions running.

pine ravine
#

whats the library people are using to import the data and submit results

river hollow
compact wasp
#

i use my own

placid lake
#

i use my own as well

river hollow
#

Yeah, personal bespoke ones abound

compact wasp
#

i could probably publish mine on pypi

placid lake
#

i need to go on site tomorrow so i can't stay up to do AoC tonight :(

compact wasp
#

rip

fleet fox
#

F

compact wasp
#

i'll try to leaderboard for you

placid lake
#

cheers

#

best of luck

compact wasp
#

ty

feral hazel
#

oh hey today was my 200
at least on this account

magic oxide
#

nice

woven sable
#

i got zero for my answer wtf 😭

#

it works for the test data but not my input data

#

and i made sure to ||clear all the old seed values j to get the final location mappings at the end||

sleek cave
#

sees day 5 part 1
"what a beautiful day for another ||naive simulation||"
answer passes :D
sees part 2
oh.

#

time to ||overlap intervals!!||

plush grove
#

i'm going for the minimalist approach this year

onyx flicker
#

fuck i'm just now getting started. part 2 gonna be interesting

magic oxide
#

I had like -600mil for my answer at one point

onyx flicker
#

i now have ideas
brb

jovial jay
#

Day 6 is going to be better, right?

river hollow
river hollow
#

Thanks! I've never found that before

#

Oh, derp. It at [Events] in the top menu

woven sable
#

i'm confused for part two

#

||so even if you have a map that entirely remaps a range, you still keep the original range bc it stemmed from the initial seeds?||

#

||bc now i j have a 0 in my ranges which kinda fucks up my code||

zinc kindle
woven sable
#

||ranges can be split into multiple new ranges no?||

onyx flicker
#

i have a plan of action af but i require sleep
must save til tomorrow 😔

zenith elbow
cyan sleet
#

I think ||the number of ranges will grow at worst linearly with the number of shifts there are||

modern terrace
sharp panther
#

Language Roulette: Day 6
The language is ... F#

hidden musk
#

bruh

#

@ripe meteor

magic oxide
#

Gb moment

#

yet again am outside

#

I'm gonna hope my parity theory is true and day 6 is of normal difficulty for day 6

earnest forge
#

GL everyone

hidden musk
#

f# is surely a lot better than prolog

shut trellisBOT
magic oxide
#

gl

#

ooh math

#

yay

noble skiff
#

Weird question

#

Could actually do this by hand in less than 5 minutes probably

sharp panther
#

oh good, today is a normal speed day

noble skiff
#

The data set is so small part b must be something really evil

jovial jay
#

It's more bearable I think. I might actually try

hexed axle
#

That was faster than normal I'd say, wow

sharp panther
#

yep, that was really fast

earnest forge
#

That wasn't too bad

tepid cairn
#

finished already?

earnest forge
#

Messed up my comparison for p1 though which probably cost me at least 20 places though lol

tepid cairn
#

I need to catch up to the previous days first 😩

#

school needs to stop schooling for a bit

humble copper
#

lmfao

#

i wish i didnt think too hard about this

#

def could have shaved some time

compact wasp
#

fuck i missed the start

woven solar
#

what the fuck is this day compared to the previous ones

#

this should have been day 1 or 2

compact wasp
#

yeah

pine tiger
#

god i'm so bad

modern terrace
#

i have no clue how this works

pine tiger
#

BRO I THOUGHT I HAD TO ||SOLVE THE QUADRATIC FORMULA||

jovial jay
magic oxide
#

lmao

#

I finished today in desmos on my phone

woven sable
#

still stuck on day 5 lmaooo

pine tiger
#

got baited tbh

left pawn
#

I ended up entering the data manually

#

faster I swear

zenith elbow
stable shale
covert arrow
stable shale
#

Was sitting there going it can't be this easy...right?

#

(especially after P2 last time)

pine tiger
#

the numbers could have been a bit larger 😭

untold briar
#

Well today's challenge is really... light?

#

First time I've seen such a small input

pine tiger
#

there's been puzzles where's the inputs like a single number

#

there is a precedent

untold briar
#

I think if they make the input bigger, it would be more interesting

pine tiger
#

!!

untold briar
#

Ppl would then find ways to optimize their code since it would take forever to brute force today's problem

#

I saw the small input and just decided to brute force it haha

deep ferry
#

💀 i used the exact same code for part 2

#

and it worked

candid brook
#

Knowing when to brute force is also a skill lol

untold briar
deep ferry
untold briar
#

Yeah

deep ferry
#

my code still ran fine

#

maybe cuz i'm using an m2 mac

untold briar
#

I'm wondering how fast did today's 1st place do lol

#

Is there a way to see that on the website?

deep ferry
#

i was about to start coding a smart solution until my old code worked within 6 seconds

untold briar
#

My laptop is kinda weak so it took 10 secs to run the bruteforce solution

deep ferry
#

||a smart way was quadratic formula, no?||

untold briar
#

Well dang, 2 mins for both stars

#

😂

naive stone
untold briar
#

And 5mins if you want to be in the leaderboard

zinc kindle
#

Yep, that was fairly easy. Brute forced part 1, wrote more efficient method for part2.
Yep, makes sense, looking back at the input, brute force might have worked.
(also I ended up using ||bisection, an O(log(n)) method, and in retrospect using squares and square roots might have run faster and been written faster||. Eh, still ran too fast for me to notice a delay).

deep ferry
#

in USACO usually they have numbers well over 10^9

naive stone
#

the speed of python amazes me sometimes

deep ferry
#

ikr

deep ferry
pine tiger
deep ferry
#

for non-bruteforcable problems at leat

deep ferry
untold briar
#

So we just need to find 1 end of the solution and mirror it

woven sable
#

i finished day 5 omg

#

after 5 hours of trying it

deep ferry
#

day 5 pt 2 is cancer

woven sable
#

my issue was the way i split ranges 😭

deep ferry
#

ikr

untold briar
#

Also we can take bigger steps to make finding the first solution much faster

woven sable
#

never gonna spend this much time debugging again

untold briar
pine ravine
#

whats the point of part B if i didnt even need to change my code?

pine tiger
#

very good question

#

we're all trying to figure that out

pine ravine
#

maybe authors forgot a couple digits on the input

untold briar
zinc kindle
untold briar
#

If the input is bigger, part B could become quite a struggle

pine ravine
#

no code needed

pine ravine
untold briar
pine ravine
#

right

untold briar
#

Much faster than sitting there thinking of a smart solution

pine ravine
#

i expected it to be hard so i wasnt online at exactly 11:00 and my coworkers beat me 😠

untold briar
#

Maybe they intend this as a breather? Since yesterday's part 2 was a disaster 😂

#

Wow yesterday's first place took 8.5 mins to earn 2 starts

pine ravine
#

is that high?

untold briar
#

Well... I took 3 hours

#

And yes that's really high

#

2.5 mins faster than 2nd place

woeful topaz
#

Anyone got solution for day 5 part 2

#

(yesterday)

scarlet wasp
woeful topaz
#

I'm sorry for asking that, I just spent way to much time breaking my brain

woeful topaz
magic scaffold
#

scared for tomorrow 🥹

magic scaffold
#

i just removed spaces from input.. rather than map to str and join

weary kelp
magic scaffold
#

difficulty level of AoC this year

'Fucked' if i%current_day else 'EZ'
pine ravine
#

thats a no no word

magic scaffold
#

the calendar looking nice... i can see gondola

untold briar
#

My favorite part is still the trebuchet

terse comet
dire notch
#

ok

jade atlas
#

so day 6 was easier than day 1.. why would they do that? pithink

earnest forge
#

My guess is by putting hard days near the beginning he's hoping to dissuade people who might use LLMs

naive stone
#

from the about page on the website:

Why was this puzzle so easy / hard? The difficulty and subject matter varies throughout each event. Very generally, the puzzles get more difficult over time, but your specific skillset will make each puzzle significantly easier or harder for you than someone else. Making puzzles is tricky.

earnest forge
naive stone
#

yea, i mean, as soon as i saw day 5 i knew day 6 was gonna be easier lol

digital whale
#

hows day 6?

#

oh easy?

peak dock
#

yeah

digital whale
#

good for yall

naive stone
#

daw

digital whale
#

daw?

#

i tried redoing day 3 part 2 this morning but i got so irritated i gave up temporarily

flat mica
#

is there any private leaderboard for this server?

untold briar
#

Treat it as a learning experience and do better in the next challenges

untold briar
flat mica
#

although tbh they should just put the join code in the channel descriptor

dim pivot
#

I’m really hoping, no monkey map this year

peak dock
#

we have multiple leaderboards because of the limit

flat mica
#

oh i see

untold briar
#

Well we already got 2D challenges

#

So a 3D or more will probably come

#

😏

digital whale
#

I'll try to check tho thanks :)

long jacinth
#

well, todays very easy...

#

i need to return to yesterdays, didnt want to bother in the evening after work

flat mica
ripe scroll
#

I wonder why today's was so easy

narrow rover
#

i applaud people who get this done in a few hours. it takes me all day sometimes. and sometimes i dont even get it./ But I suppose thast what learning and chalenges are all about. I agree that todays challene is so much easier. Not that i have done it yet.

simple raven
#

ah day 6 part 1 is a bit of physics, finally I can feel at home a bit 😄

simple raven
#

who knew that the good old ||quadratic equation|| would make an appearance

devout turtle
simple raven
devout turtle
#

As in solving day 6, you mean?

simple raven
devout turtle
#

Hmm... Okay.
I did already solve day 6, but it might be nice to look at another approach, if I have some time left today.

timber stirrup
#

Hey everyone, I'm stuck on day 5 part 2, my solution is to use ranges and split these ranges depending on the values, I have created tests such as:

assert test(range(80, 90), 85, 10, 1) == [range(80, 85), range(1, 6)]
assert test(range(80, 90), 70, 30, 10) == [range(20, 30)]
assert test(range(80, 90), 70, 15, 10) == [range(20, 25), range(85, 90)]
assert test(range(80, 90), 80, 10, 0) == [range(0, 10)]
assert test(range(80, 90), 81, 2, 0) == [range(80, 81), range(0, 2), range(83, 90)]
assert test(range(0, 10), 9, 10, 100) == [range(0, 9), range(100, 101)]

And they all pass, but the number I get is too low, is there any other corner case I could have missed?
The example data passes and I've traced it and everything seems to be correct there.

covert arrow
timber stirrup
covert arrow
halcyon pulsar
#

This year is throwing me around the place

#

Couldnt even do part 2 day 5

simple raven
devout turtle
#

My PC is still looking and counting..

long jacinth
#

day 5 part 2 is easy if you have an eternity to solve it! 😄

#

i should hook up my raspi and see if it can manage to solve it using my current code before december ends

devout turtle
long jacinth
#

ram is fine

#

my solution used 4MB of ram

devout turtle
devout turtle
#

That's the right answer! You are one gold star closer to restoring snow operations.

You have completed Day 5! You can [Shareon Twitter Mastodon] this victory or

Whoohoo.

wet yoke
#

Side note by the way, Sir Robin incorrectly tells folks that &aoc join is used to join the leaderboard, when in fact it's a slash command, /aoc join. Using the & form just throws up the help info.

dense osprey
#

input file is small

#

hope todays problem is easy#

untold briar
#

Or to congratulations

dense osprey
#

tmrw will be an unsolved problem

long jacinth
#

just

#

solve chess

hollow wharf
#

Hey, I'm new to python

woven solar
earnest forge
woven solar
#

meh

#

that's a weird choice, to make the numbers that small, actually

#

make it even more of a "what is this day 2 task doing at day 6"

earnest forge
#

||closed-form has off by ones to worry about, brute-force is easier||

woven solar
#

||I did an if-statement to correct the off-by-one, but yeah, it did take a bit of time||

earnest forge
#

Oh yeah I agree that the puzzle is more of a day 1/2 task than a day 6 task

earnest forge
#

(that said, testing against the example screwed me out of several places because of an edge case in the sample that isn't in actual inputs)

#

Literally 14 seconds from leaderboard (p2) - less than I spent debugging that edge case in p1 :')

#

Just realised I'm at most the 4043rd person to get 400 stars in all of AoC (4043rd on 2016 day 25, which was my 400th star)
I'm surprised that more people haven't done it tbth

magic oxide
#

I would but no time

#

yeah today was definitely an anomaly

simple raven
tall wasp
#

today being so easy makes me fear tomorrow.. hell is gonna break loose

noble skiff
#

so much for the theory that AoC is hard this year to dissuade AI usage

woven solar
#

ugh, dirty link

#

so much for the theory that AoC is hard this year to dissuade AI usage
oof

noble skiff
#

?

woven solar
#

well, without that theory it just seems like an unforced error

noble skiff
#

unforced error?

simple raven
honest tangle
#

hey guys

#

can somone send me screenshoots of results

hollow wharf
#

thats not even close to topic of the channel

#

!rule 7

marsh currentBOT
#

7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.

honest tangle
#

can someone send me results of this code

#

ok i know sorry

#

buy i need results

hollow wharf
#

..

warm berry
marsh currentBOT
#

:incoming_envelope: :ok_hand: applied timeout to @honest tangle until <t:1701875549:f> (10 minutes) (reason: chars spam - sent 4734 characters).

The <@&831776746206265384> have been alerted for review.

noble skiff
#

the algorithmic concept wasn't trivial, and the implementation was definitely not trivial to iron out all the bugs

#

for a day 10-15 it would be pretty typical

honest nacelle
#

Brute force win every time

simple raven
noble skiff
#

took me a while. should have stuck with brute force 😛

honest nacelle
#

I noticed that a lot of people skipped day 3 intially, that one seems harder than I'd expect an early one to be

hollow wharf
#

3 wasnt so hard seeing what was in day 5 now

honest nacelle
#

My Day 6 solution was also a bit brute forced, but in what I'd like to think is a slightly smarter way

#

I tried calculus first and gave up

jade atlas
#

day 3 and day 4 have almost same number of 2 stars.
day 5 and day 6 have almost same number of 2 stars.

ripe meteor
#

in 2022, the first day to have ~46k completions was day 14

#

they really messed up the difficulty this year

rapid wolf
#

to be fair, 2022 has had a bit more time to accumulate.

tall wasp
#

yeah day 6 hasnt even been open for 12 hours yet, of course the numbers are lower than day 6 for a year ago

ripe meteor
#

idk, you think it would double by next year?

torn sapphire
rich delta
#

Bruh tried yesterdays part 2 code using dict

#

lmao

lime fulcrum
#

Well give it more memory

ripe meteor
rich delta
#

anyone knows any online compiler or something with larger mem?

woven solar
#

than an actual PC? no.

#

(also, calculate first how much memory you'll need, to see if it's feasible :p)

rich delta
odd wigeon
#

I found you don't need to actually know the name of the mapping. They're all processed in order.

woven solar
#

(||funnily enough my estimates aren't that high|| - ||only in the low hundreds of gigabytes||)

rich delta
#

Ok thanks. Will try

mental pagoda
#

✨️

#

✨️

hazy ermine
peak dock
rich delta
hazy ermine
tepid cairn
#

syntax highlighting, but solely for aesthetics

#

cat | lolcat

peak dock
rich delta
# peak dock vsc

i use some plugins solely built for pycharm pro. But there are some geberal one for vs code too

kind oasis
#

day6 part1 awakened the mathematician in me
only problem is that he has been sleeping for decades

#

xD

untold briar
#

Day 3 and 5 make people drop like flies

untold briar
#

Or you did just a bit too much brute force

#

I accidentally made an endless printing loop in one of the challenge and an error similar to this appeared.

rich delta
summer kraken
#

Isnt the difficulty level too random this year?

#

Day 5, Day 6 💀

onyx flicker
#

day6? more like day0

naive stone
#

people will say this literally every year without fail

onyx flicker
#

lmao

glad tartan
#

day 6 can be solved with paper and pencil

compact wasp
onyx flicker
#

tbf there always is one problem much easier

naive stone
compact wasp
#

😔

onyx flicker
#

take it from non-leaderboard 😤

lime fulcrum
glad tartan
naive stone
#

you guys need to understand that eric doesn't care about this being a perfect climb in difficulty. Puzzles are ordered for lots of reasons, one of them including fitting in with the story. Day 6 is when we got to that boat race area, so day 6 is when we get that puzzle. Yes it may be easier than all the puzzles prior, but that doesn't matter to eric

onyx flicker
#

yeye i'm not mad at him lol. i think we all get difficulty goes up and down and is also subjective. just fun to poke fun at it

naive stone
#

lol yea no for sure. There are plenty who are legit criticizing though, which is just crazy to me. It's a single man making a christmas game for hundreds of thousands. Give the man a break lmao

onyx flicker
#

does bot react on christmas in message?

naive stone
#

yea wtf lol

onyx flicker
#

lol

hazy ermine
#

it reacts for tree as well

naive stone
#

TIL

hazy ermine
lost star
#

tree

onyx flicker
#

ohshit more highlight words

lime fulcrum
#

just enough so that brute force isn't viable

onyx flicker
#

it is what it is 🤷‍♀️
i wrote my solution assuming that the input would be too large to brute so it ended up being fast either way

minor cave
naive stone
hazy ermine
naive stone
#

yea i'm scared for 7. I really need to finish up day 5 part 2 before midnight

hazy ermine
#

i just bruteforced it lol

naive stone
#

how long did that take?

hazy ermine
#

and while it was crunching numbers i was thinking about optimising but it spit out an answer before I could come up with one

#

took about 4m30s

#

(in Golang)

#

but saw another Python bruteforce that took about 5m

naive stone
#

i'd be curious to see that

onyx flicker
#

oh anything over 30s to brute feels too icky for me to do

naive stone
#

regardless, i'm currently trying to write a clever solution

hazy ermine
#

I'd need a whole day for that so I saved it for after AoC ends

onyx flicker
#

ye i have an idea for what i want my clever solution to be. but like writing it is a tad annoying and i only have so much time to work on it

hazy ermine
#

ye exactly

lost star
#

What is AoC?

naive stone
#

same yea. currently at work

onyx flicker
#

advent of code

lost star
#

what is it though?

onyx flicker
minor cave
lost star
#

ty

hazy ermine
woven sable
#

second most i've ever spent on a. problem

onyx flicker
#

i was mentioning in my work chat whether or not i wanna spend time writing the clever solution in python or just brute it in go lol

hazy ermine
#

C bruteforce took 60s as someone here said

compact wasp
# lost star What is AoC?

alexandria ocasio-cortez is the representative for ny's 14th congressional district as a member of the democratic party

naive stone
#

lol fellow new yorker enira?

minor cave
naive stone
#

haha. i did think of advent of code when someone first used that abbreviation though

onyx flicker
#

lol it's so hard for me not to answer with her when asked about aoc

compact wasp
ripe meteor
naive stone
ripe meteor
#

tho it did take me a while to figure out I cant have

{ 1 .. time }

if time is int | uint64

#

silly error messages are so cryptic

#

also ionide shat the bed on me today

earnest forge
#

is that your cat?

#

(/gen)

hidden musk
#

this is actually based ngl

earnest forge
#

Yeah type systems with units are kinda cool

ripe meteor
#

Pretty much instant pt2 today even though i brute forced it

earnest forge
#

Yeah p2 was surprisingly small

cyan sleet
#

wrong units → compile error

hidden musk
#

mhm

#

i saw a similar thing in rust

#

very neat

#

today was quite a reprieve

woven sable
noble skiff
#

in C++ it's actually somewhat straightforward (depending how many bells and whistles you go for)

#

it's actually being proposed for the standard library in C++, though I doubt it gets in

hidden musk
#

idk how well it works, but that seems reasonable

silver wyvern
#

I love getting the wrong answer because I printed a number and assumed that was the answer. But I actually forgot to print the answer

cyan sleet
#

@hidden musk F# feels like ocaml but with batteries included

modest ermine
#

day 6 was much nicer than day 5 lol

cyan sleet
#

day 6 is the easiest task so far

#

quite boring really

modest ermine
#

yeah

#

i mean my part 2 would be slow if the numbers were larger

#

so i could optimize that but i honestly don’t care

cyan sleet
#

you could have made twists to make it a tad more interesting

hidden musk
#

F# is great because .net though, no denying that

cyan sleet
modest ermine
#

i love brute forcing 😩

cyan sleet
hidden musk
#

yeah true

#

calling functions is weird though

cyan sleet
#

though maybe i've been functionally primed now 🥴

hidden musk
#

ain't no way you wrote Delta

cyan sleet
#

correct, I wrote Δ

hidden musk
#

\Delta

pine tiger
#

decided to hunker down and

lime fulcrum
#

holy moly. thats a lot of work. did you have fun?

pine tiger
#

depends on which day

#

i get angry every time i have to hardcode something

cyan sleet
pine tiger
#

what

cyan sleet
#

8 more stars

pine tiger
#

haha

lime fulcrum
#

No.

lime fulcrum
cyan sleet
#

events

pine tiger
#

there's an events thing

#

@ the top

lime fulcrum
#

ah. i've been enditing the url to change years. that does make it more pleasant

plush grove
#

HOLY COW I COMPLETED DAY 3 PART 2 FIRST TRY

low condor
#

p2 is not so difficult after p1; it's getting day 3 p1 done which can be tricky

plush grove
#

hmmm i see

cyan sleet
#

wait what day was 3?

#

groovy, ocaml, haskell, ...

#

gears?

low condor
#

yup

cyan sleet
#

I am starting to forget the order of languages 🥴

#

..., lisp, prolog, F#

hidden musk
#

🥴

sharp panther
cyan sleet
#

well yeah

#

I could also just look at my repo

#

I didn't name the dirs by language, but...

hidden musk
#

i don't think i've seen a single f# job

ripe meteor
#

Are you looking for one?

hidden musk
#

no the language looks sad

ripe meteor
#

😔

#

I think it looks great

plush grove
#

im gonna be honest, trying to do the minimalist approach (doing everything in as few lines as possible) is the hardest thing i've ever done

hidden musk
#

haskell close second

#

of the languages we've done so far ocaml is prob my favorite

#

prolog takes the cake for "interesting"ness

#

it's probably the most unique of the bunch

magic oxide
#

fewer lines isn't really golfing tho
one liners should always be possible here

#

even excluding uses of exec and stuff

compact wasp
#

for sure

plush grove
#

I kinda just crashed my computer doing advent 😭

#

All of my memory

magic oxide
#

that's why you don't brute force

untold briar
#

I only brute force with small input like day 6

#

My laptop only has 8GB RAM so I have to be extra careful when brute forcing

plush grove
hidden musk
#

brute forced day 5 pt 2 in 5.724 seconds 😩

wet yoke
#

Noice

covert arrow
#

this is gonna have to go now

rancid creek
#

what will it be today, path finding? mini compiler? chinese remainder theorem or other modular arithmetic? game of life in 12 dimensions with sea monsters?

minor cave
#

Language Roulette: Day 7
The language is ... Visual Basic

rancid creek
#

reminds me I shold install networkx and learn how to use it again

earnest forge
#

GL everyone

rancid creek
wet yoke
#

🫡

earnest forge
rancid creek
hexed axle
#

That was the first programming language I ever used, VB is ... Factually speaking a language

rancid creek
#

Not as much as Rockstar being a chosen language, but still

wet yoke
#

Is Excel on the roulette?

magic oxide
#

good luck to everyone

covert arrow
#

GLHF

rancid creek
#

The number of reddit mods here outnumbering the number of cobol devs here.

magic oxide
#

won't be able to aim for leaderboard again sadly since outside rn

zenith elbow
#

vimscript would be nice

royal gull
#

I’m tired tho, Gluck I’ll hit it in morning

covert arrow
#

I have a flight in 2 hours

rancid creek
#

emacs lisp!

earnest forge
magic oxide
covert arrow
#

at the airport rn

rancid creek
magic scaffold
#

glhf

shut trellisBOT
royal gull
magic oxide
#

ooh nice

#

wonder what p2 is

woven solar
#

...tbh this one just looks painful and boring.

magic oxide
#

it looks easy

#

or at least p1

#

which is what I need

magic oxide
#

because I do not have the time to struggle with aoc

magic oxide
#

good night pub

hidden musk
#

@ripe meteor this one's for you

magic oxide
#

have a good sleb

sinful pewter
#

Looks like Poker

hollow wharf
#

i'd rather play it in real life with a person on top of a camel

pine tiger
#

dopamine.exe

earnest forge
#

14/16

earnest forge
#

I should have just pushed it for p2 I was thinking 'surely this isn't fast enough'

pine tiger
#

?

earnest forge
#

(spoiler: it was and I could have sent it around 20s earlier)

pine tiger
#

was there any clever optimization?

earnest forge
pine tiger
#

lmao see here's the thing

earnest forge
#

I should have just pushed it immediately

pine tiger
#

||like i had a debug print printing out every comparator||

earnest forge
#

Ah

pine tiger
#

||and even with that my sol ran in time||

earnest forge
#

Yeah that will slow you down

pine tiger
#

anyways, i just ||brute forced all jokers, wbu||

earnest forge
#

Wait why did you need to debug your ||comparator|| lol

earnest forge
#

I should have just shipped it because ||n is at most 5 so it really isn't that bad||

pine tiger
earnest forge
#

That's completely fair

pine tiger
earnest forge
#

You literally just acknowledged why that isn't better lmao

pine tiger
#

well i supposed it's time to start cleaning up my code

pine tiger
minor cave
magic oxide
#

could someone tell me what p2 is?

jovial jay
#

Day 7 look fun

magic oxide
#

just anytime after leaderboard fills up

pine tiger
magic oxide
pine tiger
earnest forge
#

I told him in solutions btw

covert arrow
#

i choked again

pine tiger
#

most unfortunate

covert arrow
#

I completely missed this line: ||If two hands have the same type, a second ordering rule takes effect. Start by comparing the first card in each hand.||

#

||I was comparing the repeated cards instead (so 25557 > 33327)||

earnest forge
#

Lol rip

covert arrow
#

advent of reading comprehension is back 😔

pine tiger
#

💀

zenith elbow
#

welp that was slightly tricker than I thought ||JJJJJ||

humble copper
#

not using ||regex|| is probably what messed me up on this

covert arrow
naive stone
#

the way i determine the value of a hand is so scuffed lol. Also part 2 is clever, seems like it'll be fun

humble copper
earnest forge
covert arrow
#

I think the ||counter method|| is the most straightforward

untold briar
#

Well day 7 is the middle ground I guess?

#

Not hard, not easy

#

For the jokers dont panic, a couple more if-else would be able to handle it

covert arrow
naive stone
#

all good!

humble copper
weary kelp
#

Maybe the next one will be hard...

long jacinth
#

so whats the value of a JJJJJ hand? five of a kind? full house?

long jacinth
#

or is it a 'high card' so the weakest hand?

#

or does it turn into a 'AAAAA' but its still just four of a kind?

pine ravine
#

Do yall find this one hard compared to other days?

long jacinth
#

five of a kind of not a defined type though

pine ravine
#

Of type joker

#

Joker lives matter

#

JJJJJ is the weakest of all the 5 of a kinds

long jacinth
#

god, it is

#

im blind

#

theres a bug somewhere, but time to work

#

right answer, yay

#

can i maybe get someone whos a pro to look over my code to check for places to improve?

mystic gull
long jacinth
woven solar
long jacinth
#

yeah, i forgot 5 of a kind was defined at the beginning

#

considering you dont get 5 of the same cards in a normal deck

#

but saw JJJJJ in my input and it confused me

mystic gull
#

thats what ive been missing 💀💀

thin blaze
#

Fun, nobody on the subreddit used the same method than me.

#

I found it elegant enough.

spice hemlock
#

Aid

jade atlas
#

I feel sad now because I over engineered the 2nd part.
I thought J should ||be one of the dealt cards, instead of seeing that it is just the most occurring card.||

thin blaze
#

What does it change?

jade atlas
thin blaze
#

I have the feeling I didn't face that kind of difficulty.

#

My way to solve this was pretty straightforward.

#

I just counted jokers card and added them to the score of the other cards.

covert arrow
#

Because you don't have to deal with it if you ||correctly assume jokers become the most common non-joker card||

lime fulcrum
#

do you tend to use modules or try solve it without anyting extra?

thin blaze
#

I used collections.Counter but you can do it without.

lime fulcrum
#

yeah it is really powerful in this case

long jacinth
#

so far ive used no imports

#

although maybe i should start using them, i feel like im not learning anything from this

thin blaze
#

To be fair, Python builtins are already powerful enough.

halcyon pulsar
#

Ever get it when your solution works on the test input but not the whole data

devout turtle
#

That's my main issue with day 3.

dapper pine
#

Today (part 1): When the hand variations are explained, what does this one mean:
High card, where all cards' labels are distinct: 23456
Does it mean all labels should be different? Or should it be in some series, like 23456 is? Thanks

ripe meteor
#

It means all labels are different

#

A2678 is also a high card hand

dapper pine
#

Thanks :)

halcyon pulsar
#

Could anyone run their solution on my test input and tell me how many hands get sorted into the 7 different types?

#

1 93 100 173 171 261 201 is my types supposedly where the 1 is 5 of a kind and it goes down respectively

normal umbra
#

Anyone know of a good discord bot for a private leaderboard?

slate berry
#

ok part 2 done too nice

#

but not very nice implementation

gloomy kernel
#

missed day 3

#

ahh

somber trench
#

I've given up on this all together, dear lord it's hard

somber trench
#

I believe I stopped day 2 part 2 or maybe day 3 idr

lime fulcrum
#

yeah day 3 is fiddly. took way too long but I had fun. have you considered #aoc-solution-hints ?

somber trench
lime fulcrum
#

can I give a slight hint?

somber trench
#

Sure

lime fulcrum
#
  1. ||put your input in a nested list so that each character has its own coordinates||
#

2.||get a list with only the numbers||

somber trench
#

This is day 3?

lime fulcrum
#

..

#

crap

somber trench
#

Nw I'm still on day 2 part 1 lol

lime fulcrum
#

no its right

somber trench
#

Just checked

lime fulcrum
#

ah.

#

that explains it

lime fulcrum
#

no that was 3

#

thought you were on 3

somber trench
#

Ah

lime fulcrum
#

did you process your input already?

somber trench
#

Like get my input data?

lime fulcrum
#

yes and put it in a list where you have your values seperated

somber trench
#

That should be easy enough, I've done it before

slate berry
kind rapids
hollow wharf
slate berry
#

yeah?

minor cave
hidden musk
#

I have 6 months of experience with vb.net 😩

slate berry
cyan sleet
#

Visual Basic (VB), originally called Visual Basic .NET (VB.NET)

hidden musk
#

they have different runtimes

#

oh they call them the same thing now?

#

it feels like cheating because .net is so based though

ripe meteor
#

Do it in excel or else

north atlas
#

👀

#

Or else what

slate berry
#

in excel...

rapid wolf
#

excel is surprisingly good at AOC

hidden musk
#

indeed

ripe meteor
cyan sleet
ripe meteor
#

basically the same thing

hidden musk
#

nah

untold briar
#

Well excel can be used to solve certain problems

#

For more complicated ones, its faster and easier to just write code, unless you are really adept in excel

slate berry
royal gull
#

Did anyone post an Excel solution for day 7? Or even VB?

hidden musk
sharp crown
#

Im doing day6 part one. Id like to verify my understanding of the task so far. I am supposed to move up all cards of the same rank with the secondary rule. This would mean that every rank execept for the last rank has only one member?

lime fulcrum
#

6 was the races

simple raven
#

the secondary rule applies within-rank, not between ranks

simple raven
sharp crown
royal gull
sharp crown
#

maybe later

jovial jay
#

just realized one of my earlier code might be useful here. does the order matter?

half tree
#

Is it just me or do the AoC problems this year come with a lot less useful test data? I keep having situations where my code works for the test data but not the real data and I think it's happening more than in previous years

#

It's hard to tell if this is an intentional change or not, but I'm finding it a bit more frustrating this way

rancid creek
#

I found that happened a lot in previous years as well. This year seems ok so far. You could always add more test cases to your example input I suppose.

noble skiff
#

I think it's pretty much the same as always too, fwiw

#

the test data is good for basic sanity checking, but every year there's generally at least one day, often several, where at some point I'm failing on the input but succeeding on the test

#

some edge cases just don't show up in the test, it's always been like that

rapid wolf
#

I do like that quite a few problems can just be checked by hand, its just compute a thing for each row.

noble skiff
#

One thing i will say is that for a lot of days, he really walks through how the test data translates into the solution, step by step

#

for example, he might give the value for every row for a row based problems. Or for day 5, he explained every single step of the mapping

#

So when you write unit tests based on the test input, you don't have to write a single unit test that just does the same thing as running the whole problem

raw quest
#

im still on the first day is it too late for me 💀

noble skiff
#

you can have much more fine grained unit tests. that helped me a lot when I was trying to get the optimized solution for day 5.

rapid wolf
noble skiff
#

also you don't need to do previous days

raw quest
#

i was put up to this by some sysadmin friends the first challenge looks easy enough. is this something you guys put on your resume?

noble skiff
#

you can just jump to day 7

raw quest
#

it doesnt get harder?

noble skiff
#

though do keep in mind they get more challenging

raw quest
#

ah

simple raven
simple raven
noble skiff
#

best part!

onyx flicker
raw quest
#

ah. How are we faring? no spoilers i wanna do this on my own

simple raven
#

bad, good, bad, meh, terrible, great, good

raw quest
#

lol

#

ok cya guys around

slate berry
#

why such randomised difficulties

cyan sleet
#

6 was boring

slate berry
#

true

simple raven
slate berry
#

I didn't write even proper code for 6

simple raven
#

too bad you could ||bruteforce the thing in under a second||

rapid wolf
#

APL can invert functions, so it was truly trivial.

slate berry
#

APL?

rapid wolf
#

a weird language I am learning for this AOC

naive stone
#

alien programming language

simple raven
#

APL stands for A Programming Language 😄

slate berry
#

like what do I need to learn

naive stone
slate berry
#

I could use hell lot of macros in c++ ig but maybe could get a lang. of my own lol

hazy ermine
#

i coded the entire solution assuming go's regex package supports backrefering.... it doesn't

#

this hurts

lost needle
#

I just signed for the first time(so I'm new to this) into the advent of code and completed part one of day 1.
But I just don't know how to do the part 2 in python.
I would really appreciate any help.
Thank you!

dense osprey
#

todays problem is nice

#

isnt part 1 just writing a custom comparator

mossy basin
#

you can make a functools-type compare function, or a function that just returns something that sorts like the cards

bright haven
#

"just" a custom comparator: there are details to get right inside that comparator

ripe meteor
#

These edge cases are really kicking my butt

#

I should look at my input more closely

torn sapphire
#

edge cases in part 1 or part 2?

ripe meteor
#

Part 2

torn sapphire
#

aah, ic

#

have fun with that :P
how did you solve part 1? i think certain solutions to part 1 end up with much easier/more difficult solutions to part 2

ripe meteor
#

Implemented a comparator and a bunch of str.replaces to make sorting easier

simple raven
dense osprey
ripe meteor
#

My two solutions are pretty similar, i just hadnt considered ||JJJJJ|| and ||J dominant|| inputs

dense osprey
#

but what i meant was, that the solution is a custom sort function

#

the difficult part would probably be checking what type of hand you have

ripe meteor
#

I get that part of the puzzle is to figure out other edge cases but i hate it all the same 💀

dense osprey
#

part 2 is edge case handling

#

spoiler :||or you could just insert every possible card for j and choose the strongest||

woven sable
#

that's what i did

dense osprey
#

another spoiler: ||but if every of the 1k hands had 5 js, then youd have 14^5 * 10^3||

woven sable
#

ran instantly

woven sable
royal gull