#advent-of-code

1 messages ยท Page 23 of 1

hidden musk
#

need my clown role asap

rancid creek
#

I think this is the first year where I used only python for every puzzle. No perl, no C, no solving by hand. Just python.

#

Big shoutout to those that did do it with differnt languages.

strange zinc
#

python is my go to. Then other languages after that

hidden musk
#

fenix and i used python for the prolog day and for 25

#

i forget which was prolog. 5 maybe?

rancid creek
#

Python because I'm lazy and don't want to have to write as much code.
--- followed by me writing 1000 lines of experimenting different ways to solve the same problem.

strange zinc
#

that's only half right? Each day has 2 solutions

rancid creek
#

What was the language for day 25 ?

strange zinc
rancid creek
hidden musk
strange zinc
rancid creek
#

it was 2 days ago. lol

#

I meant 1 day, not day 1

strange zinc
#

oh LOL

hidden musk
#

49? use a different language to parse too :P

strange zinc
#

the only challenge I use for AOC is to do it all without additional packages

rancid creek
#

Doesn't matter how many languages I used I'll never be as cool as the guy that did them all in intcode. ๐Ÿ™‚

strange zinc
#

๐Ÿ˜ฎ

strange zinc
#

havent finished this year yet. will try at some point

mossy basin
#

i spend too long on visualizations to do extra challenges ๐Ÿ˜ฆ

rancid creek
#

There was a couple libs I played with just for fun like shapely and networkx that I didn't need.

strange zinc
hidden musk
#

i didn't know the language enough to use any libraries ๐Ÿ˜ฉ

rancid creek
#

z3 was the only external lib I didn't write an alternate solution for.

mossy basin
#

thanks, i'd like to do my own language one year, but i guess that means i'd have to write one

#

actually had 3 solutons on z3 day

#

and none were z3

strange zinc
#

I'd love to make my own language. Dont know where to start though.
May just wait for doing the module when I do comp sci honours

mossy basin
#

i know where to start, i just haven't started

rancid creek
mossy basin
#

at least i know the books

strange zinc
mossy basin
rancid creek
#

that's python's strength!

strange zinc
#

true. It is lovely to leave it out.
but my mind. I have always used strict type hinting. Probs due to being taught that way

rapid wolf
#

I would suggest crafting interpreters instead tbh, the dragon book isn't that great at getting you to actually write a language.

strange zinc
#

due to that, pyright has become a favourite for me

mossy basin
#

inb4 i just make worse version of julia

strange zinc
#

julia is nice

cyan sleet
#

on top of 25 langs

strange zinc
#

joe_salute
Of those languages, where they all new (or most) new for you? Any that stood out as being "fun" to learn

mossy basin
#

raku

hidden musk
#

we didn't do raku

mossy basin
#

i know, but i saw it a few times and it stood out

#

it's insane

cyan sleet
#

so these are the langs

mossy basin
#

day 11 could've been raku though

cyan sleet
#

ones I've used a decent amount before:
bash, lua, java, C#, C++, Rust

hidden musk
#

i was really impressed by the functional languages

mossy basin
#

didn't see any nim this year

cyan sleet
#

ones I've touched some before:
haskell, perl, php, go, ruby, kotlin

cyan sleet
hidden musk
#

f# was cute. the languages that let you have support of a big ecosystem like scala are great

#

actually usable + functional

#

clojure too

ripe meteor
#

F# shill now?

hidden musk
#

some of the syntax was just odd though

#

i think i did not understand how to call functions

cyan sleet
#

did you do clojure for lisp day?

hidden musk
#

yeah

#

decided to not want to die

cyan sleet
#

meanwhile I did clisp like a cave man ๐Ÿ˜…

hidden musk
#

the parentheses dream did not come to me

rancid creek
#

(decided (to (not (want to die))))

hidden musk
#

.xkcd 224

#

oh come on

cyan sleet
#

I actually starting getting annoyed at some of the verbosity of later days

rancid creek
cyan sleet
#

granted, it's in part because harder puzzles, but also less functional

hidden musk
#

composability and pipes and chaining ๐Ÿ˜Œ

rancid creek
#

I wonder how much lisp has changed since I last used it ~30 years ago.
I suspect not too too much.

hidden musk
#

i've said it before but clojure's reducers are soooo nice

#

like a cooler version of GNU parallel

rancid creek
#

Hopping on a plane in about 8 hours. Passport still missing. Should I panic now. Think I'll finish my coffee first.

hidden musk
#

i'm sure it'll turn up ๐Ÿฅด

rancid creek
#

Yeah. The question is whether it will turn up today. ๐Ÿ™‚

ripe meteor
#

Whats there to panic about, use your id card

#

Eurobest moment

hidden musk
#

didn't you guys exit ๐Ÿ˜›

ripe meteor
#

They sure did but im an eu citizen

rancid creek
ripe meteor
#

What are you coming here for

#

Its cold and grey and wet

rancid creek
#

mum's 75th bday.

hollow wharf
#

yo do you happen to know someone who does explain the aoc puzzles from the math view?

strange zinc
#

HyperNeutrino?

rancid creek
sleek cave
#

thought this message was about some graph traversal ๐Ÿ˜‚

rancid creek
#

Wasn't there a puzzle a year or two ago that was something akin to papers please?

strange zinc
#

2021 d14?

sleek cave
#

sees day 12
ah, ||combinatorics|| is evocative of ||dp||, we're in for a fun time
wait, input size is ||brute-forceable||
||naive code|| turns out super clean lemon_fingerguns
sees part 2
๐Ÿ˜ฎโ€๐Ÿ’จ knew it won't be this easy

noble skiff
#

such a slog, I had day 23 done fo ra while but I basically re-implemented much of the logic for part 1 and 2

#

and squeezing them together turned out to be way harder than anticipated

ruby sedge
#

hi

pine ravine
#

i think i did aight

pine ravine
sleek cave
#

and then i realize it's brute forceable :P

#

this year's day ||16|| would be a good example

#

i had a pretty clean implementation for the ||laser and mirrors logic|| as well, so that was fun & nice

stoic moat
#

is this a virus?

atomic cairn
stoic moat
atomic cairn
stoic moat
#

no no no like i sent code but its too long

#

and its broken

stoic moat
#

please

atomic cairn
#

Probably not allowed due to

#

!rule 5

marsh currentBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

atomic cairn
#

First thing i see is a nitro farmer

stoic moat
#

its not help

#

i just need to know what it does to my pc

#

!rule 3

marsh currentBOT
#

3. Respect staff members and listen to their instructions.

stoic moat
#

am i gonna get banned

atomic cairn
#

You are probably better off waiting for a mod to see this so they can tell if its fine to help or not

atomic cairn
#

I have never seen anyone get banned for something like this

hollow summit
#

!rule 5

marsh currentBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

stoic moat
stoic moat
#

idk if its a virus or not

ashen lichen
#

It's not a virus, just some not-so-nice code

stoic moat
ashen lichen
#

Things that would get you banned from discord real quick

stoic moat
ashen lichen
#

Yes, which won't actually work and will just get you banned

stoic moat
ashen lichen
#

Don't run the code, simple as that

stoic moat
#

can i show u the file in dms?

ashen lichen
#

I don't want the file

#

Don't try to nitro mine

#

It's as simple as that

stoic moat
stoic moat
#

i just got send a .exe

#

and i ran it

#

i didnt mean to

ashen lichen
#

Welp, moral of the story, don't run unknown code, and most definitely don't run unknown executables ๐Ÿ‘€

stoic moat
ashen lichen
#

Impossible to know by just looking at the code it spat out, the executable could have done anything

stoic moat
#

!rule 5

marsh currentBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

ashen lichen
#

From this server? No, from discord, well that depends on if you used the nitro miner or not ๐Ÿ‘€

stoic moat
#

and thats in the code

ashen lichen
#

Anyhow, if you want to ask more stuff, probably best for an off-topic channel

#

This isn't quite a topic for here ๐Ÿ‘€

stoic moat
#

i have a really expensive pc

ashen lichen
#

I ain't touching a random exe ๐Ÿ‘€

#

I don't have a sandboxed environment setup for that

stoic moat
#

fuck

#

ok

hollow summit
ashen lichen
stoic moat
agile silo
#

how did you do day14 part 2 without mutating the string?

#

should i use lists of chars?

simple raven
#

I used a numpy array of chars, but list of chars would work as well

agile silo
#

i think it's quite bad that python doesnt allow string mutation

simple raven
#

so you don't like using strings as keys in your dictionaries?

rapid wolf
#

I did with string slicing personally

agile silo
mossy basin
#

i didn't make any string copies

agile silo
#

if you make list(a) and a is [[]], does it make a shallow copy?

rapid wolf
#

yup

agile silo
#

you have to make a list() out of each individual one, I suppose

simple raven
agile silo
#

well, not in python. I was talking about other programming languages such as rust

#

but Ig it's kind of a different programming language, and it is not trivial to implement mutations in strings

#

yea

#

in rust for instance you wouldnt be able to mutate the string if the dictionary owns it

#

but there is the possibility of string mutations

simple raven
#

I looked it up, rust saves an immutable copy of the string when it is used as a key, I suppose that's a decent workaround

#

then you can modify the string without affecting the key

agile silo
#

yea, basically the map takes ownership of the string

rapid wolf
#

Yeah, that's not all that possible in python

agile silo
#

i am ||mutating the grid every cycle and comparing the result to the first grid to see when i find a cycle||

#

turns out i am not finding a ||cycle||

#

as i said, the grid is a list of lists of chars

#

i checked that my code correctly performs the cycle

#

so im guessing maybe im doing something inneficient

simple raven
agile silo
stoic moat
#

is this real?

#

Some People Were Asking Why is The File Is .exe

Its Because If I Set It As .py People Will Have To Install python , modules required , pip but still people wont believe me so i will be giving source code of bot below this message.

agile silo
#

@simple raven any idea?

simple raven
agile silo
#

i never dfound the first loop (cycle)

simple raven
#

(where I use cycle -> the 4 shifts, loop -> series of cycles that return to the same position)

simple raven
agile silo
#

oh

simple raven
#

to see if any of the previous happen to have the exact same configuration as the new one

#

that's how you find the loop

agile silo
#

i thought it was enough storing first cycle

#

but yea, what you say makes sense

agile silo
#

after doing all iterations, i have to tilt north and count, just like part 1, right?

agile silo
#

but it says you need to count the rocks in north support beam

#

oh, you just count the rocks in each line

#

also, am i supposed to iterate anymore after finding the cycle? I mean, are next iterations all going to leave the rocks in same position?

surreal meadow
#

can anyone review my shitty day 23 solution it doesnt work for shit

#

only works pt 1

simple raven
surreal meadow
noble skiff
pine tiger
surreal meadow
cyan sleet
#

you can be more clever about compressing the graph to make the brute force more efficient, but that's about it

surreal meadow
#

yup

cyan sleet
surreal meadow
#

but my code would take like 30 minutes solve

#

what means NP?

#

anyways how long will the site be up ?

cyan sleet
#

to put NP-hard in very rough terms we don't know of any efficient solution to this problem

#

aoc? it's always up

ripe meteor
#

The channel is archived but that wont happen till feb

surreal meadow
#

damn, i hope im a whole lot smarter for next years aoc

#

just gotta get more experienced

ripe meteor
#

There are 7 more years for you to practice on

cyan sleet
#

so the insight for 23 is basically that you can compress things to a pretty small graph

#

maybe 30-40 nodes

#

rather than 1000s

surreal meadow
#

yeah i already wrote the code to find the nodes

#

which was easy

surreal meadow
#

is 23 harder than the average aoc challenge?

cyan sleet
#

so you already have the smaller graph with 30-40 nodes?

surreal meadow
#

yeah

cyan sleet
#

i.e. just keep the ||intersections||

surreal meadow
#

just counting neighbors

#

yup

cyan sleet
#

hmm, it shouldn't be super slow then

surreal meadow
#

just ||counting neighbors for every non #|| tile

#

nah my old code was trash

#

what im making shouldnt take more than 30 seconds to run honestly

cyan sleet
#

there is a simple improvement you can do:
||if you can reach the target, go to the target and don't consider other paths from that point||

meager sundial
#

hello I want to learn python but I have no idea where to start.

rancid creek
rancid creek
marsh currentBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

meager sundial
#

thx for the advice

pine viper
cyan sleet
#

this is not even remotely the right channel

zenith elbow
#

I was reminded of the puzzle from one of the early days of 2022

#

the golfers used ord & mod to do it

sleek cave
pine tiger
#

aww the logo changed back

sleek cave
#

nooooo

pine tiger
#

oh they changed it back what

agile silo
sour bone
#

!charinfo ืึท

marsh currentBOT
lucid narwhal
#

hey nice

sharp tapir
#

hey

#

can anyony advise me on how i could complete part 2 of day 11 of advent of code?

#

# helper function for column side expansion 
def columnExpansions(galaxy_loc):
    count=0
    for i in expansion_clist:
        if i<galaxy_loc: 
            count+=1
    return count

# helper function for row side expansion 
def rowExpansions(galaxy_loc):
    count=0
    for i in expansion_rlist:
        if i<galaxy_loc: 
            count+=1
    return count

expansion_rlist=[]
with open('Day 11\input.txt','r') as file:
    lines= file.readlines()

    #identify rows that are empty
    for i in range(len(lines)): 
        if '#' in lines[i]:
            continue
        else: 
            expansion_rlist.append(i)

    print(expansion_rlist)

    #identify columns that need to be expanded by creating a list that has all the indices listed out 
    expansion_clist=[] 

    #identify the columns that are empty
    for i in range(len(lines[0].strip())):
        column=[x[i] for x in lines]
    
        #keep track of columns to be expanded 
        if '#' not in column:
            expansion_clist.append(i)
    print(expansion_clist)


coords=[]
for i in range(len(lines)): #gives the y coord
    temp=[]  #to store both x and y coords
    cleaned_line=lines[i].strip()
    for j in range(len(cleaned_line)): #gives the x coord
        if cleaned_line[j] != '.':  #if we find a galaxy, we know its x,y but we need to expand the y by 1m*the number of empty columns before its location
            num=columnExpansions(j)
            num2=rowExpansions(i)
            temp=[(j+100*num),(i+100*num2)]  #j+1m*how_many_numbers_in_clist_smaller_than_j_index
            coords.append(temp)
print(coords)

sum_paths=0
for i in range(len(coords)):
    temp=0
    for j in range(i,len(coords)):
        x=abs(coords[i][0]-coords[j][0])
        y=abs(coords[i][1]-coords[j][1])
        temp=x+y
        sum_paths+=temp

print(sum_paths)
#

this is what i have

#

but im off by some annoying amounts in the testcase

#

waht do you think it is im doing wrong?

#

like looking at it by eye it seems fine

sharp tapir
#

Solved

north silo
#

How did everyone find this year? I feel like it was a bit harder than previous years. ๐Ÿ˜„

#

I had to peak at the spoiler channel for ||day 21 part 2|| and ||day 22 part 2||.

pine tiger
#

couple of weird problems mixed in w some ez ones

dim pivot
#

yeah

#

very mathy

cyan sleet
# dim pivot very mathy

I can't remember, which ones were mathy other than the semi-bs "lol, periodic special case"?

cyan sleet
#

oh right

#

linear algebra day

cold cove
#

How everyone is getting assigned "Advent of code completionist"?

covert arrow
#

and joined the leaderboard?

cold cove
#

No, i am solving from 2015, didnt focus on the 2023 yet

cold cove
covert arrow
#

You also need to finish 50* on 2023

cold cove
#

since its already january?

covert arrow
cold cove
covert arrow
#

just link your account (/aoc link <aoc username>) and join the leaderboard (/aoc join)

#

If you have 50 stars in 2023, the bot should give it to you automatically

cold cove
covert arrow
#

#aoc-bot-commands

livid gull
#

Am i pink ?

#

oh nice :))

rapid wolf
#

you can complete the puzzles at any time

ivory vigil
#

If you're within 24 hours, you get a rank/time. Otherwise, anytime and the time is just 24hr+

novel verge
#

How can i make an android app for autoclicking in python i mean also so you could move around the box kind od like with a screen recorder i prefer python but if it's imposible or really HARD i can do a other language

novel verge
#

Ok

#

Sry

velvet basalt
#

who know code combaat dm me

#

i neeed help

cyan sleet
#

channel topic pls

wide canopy
#

When will aoc 2024 come?

zenith elbow
zenith elbow
#

speed up the release?

ocean karma
zenith elbow
#

haha

#

have you completed all previous years?

#

tbh completing the puzzles as they are released only has the advantage of being on the leaderboard, and discussing with others live

feral hazel
#

is revival of code happening this year as well?

wispy glacier
earnest belfry
#

Is it spoilers to talk about the 2023 problems?

hollow wharf
earnest belfry
#

ok thank you

atomic cairn
#

did aoc-lube's fetching stop working after day 18 for anyone else or just me?

ivory vigil
atomic cairn
#

No clue day 18 and below still work

mossy basin
mossy basin
#

np

radiant apex
#

hey, i'd like to know : i started advent of code but haven't finished it yet because i suck at python, will it still be there throughout the year ?

sharp panther
#

yep, you can access any puzzle anytime, even from 2015

gusty heart
#

what this channel for

#

?

queen relic
#

cannot import name 'is_sequence' from 'tensorflow.python.util.nest'

#

somebody help me

gusty heart
#

@queen relic what dis channel for

queen relic
gusty heart
#

i have a doubt

#

its a small script cuz im a beginner but

#

shouldnt this be saying ur bad?

queen relic
gusty heart
#

ok lemme change it to 6

#

nothing changed

#

@queen relic

queen relic
#

i didnt have any idea i am sorry

gusty heart
#

wow

#

u beginner too?

queen relic
#

yeah maybe

gusty heart
#

im getting help in python help

earnest belfry
#

there is a thread for solutions; you might want to delete this because spoilers

ivory vigil
gusty heart
#

ye i deleted num

#

cuz it was my last error

ivory vigil
gusty heart
#

what even is advent of code

ivory vigil
#

Click the link to find out?

#

Or even type it into Google

#

Any time you are wondering "what even is <something>", odds are really, really good that you can just Google it and get a good answer.

gusty heart
#

i dont google would know about it being ur bad and ur good it hasnt even seen my exact code prob

#

ill do it later

earnest belfry
#

no worries I didn't know at first either

#

good luck with the AoC

hazy yacht
#

thx

cyan sleet
gusty heart
#

ohhhh

#

nvm i still dont know what this channel is for

ivory vigil
gusty heart
#

o

ivory vigil
#

I thought that topic made that pretty clear...

gusty heart
#

@ivory vigil what do i do on the website

#

OH

#

ALL AT CAME UP WHEN I CLICKED THE FIRST LINE

ivory vigil
#

๐Ÿ‘€

gusty heart
#

ye thats way too hard for me

ivory vigil
#

The difficulty varies a lot. codingquest.io is a similar concept but easier.

gusty heart
#

well im a beginner so i dont even get level one @ivory vigil

ivory vigil
#

Most years day 1 is simpler. I think 2023 was the hardest day 1 ever.

gusty heart
#

ye id what button to click this is complicating

atomic cairn
#

Day 6 was the easiest puzzle i have ever seen since i did kata 8 half a year ago lol

cyan sleet
#

channel topic pls

spice kettle
ivory vigil
ivory vigil
atomic cairn
#

I haven't done that yet

#

Rn im working on day 19 p2

#

I skipped day 12 and 17

ivory vigil
#

I'm still working my way through my write up for 2023. Once I'm done that, maybe I'll work more on prior years.

wispy glacier
#

what kind of write ups do you do?

topaz perch
#

Hi

ivory vigil
#

Hello

earnest belfry
#

You might want to delete that because spoilers. There are individual threads for each problem with talk about solutions and whatnot. This is like the main channel to ask questions about the thing as a whole.

hollow wharf
#

at least part one

atomic cairn
#

Oh ye

#

That was pretty easy ye

#

Part 2 also wasn't very hard

echo wave
zenith elbow
burnt cargo
#

Is the AoC good for new beginners that are learning py or better to have more knowledge first?

echo wave
ripe meteor
#

Its good if you're learning another language but for complete beginners i wouldnt say so

#

You could definitely try it out

#

But i wouldnt tell a complete beginner to do it

burnt cargo
#

I see, thanks for your comments lemon_pleased

cyan sleet
#

though...this year had some kinda special initial few problems

atomic cairn
#

I dont reccomend day 5 part 2 to an absolute beginner lol

#

I would skip that one

atomic cairn
#

Ok wtf is day21.2

#

my brain is fried

south jetty
#

hello bluds

pine tiger
#

||is there something you notice about the input #?||

white laurel
#

why it is not in order ?

#

should i solve next 4 or 24 ?

woven solar
#

this is a picture, matching the protagonist's journey in the story. in day 3 they take a gondola up to the water source.

#

the tasks were opened in, well, the day order. after 3 comes 4.

earnest belfry
#

These elves are really messing stuff up.

ivory vigil
hybrid lake
#

Is there any way to get past years problems of AOC

#

?

woven solar
#

they're all on the site, yes

ivory vigil
sleek cave
#

@low condor https://dmoj.ca/problem/ccc14s4
an old foe comes back ๐Ÿ˜ฉ will i prevail or will i once again spend 6.5 hours to no avail and sleep on it for two years?!

low condor
#

that is how I feel about that

sleek cave
low condor
#

heh

sleek cave
#

(my optimised reactor reboot code takes 2s, puzzle input had 420 cuboids)

low condor
#

what language are you writing these in?

sleek cave
#

python lmaooo

low condor
#

oof

sleek cave
#

i know i shouldn't use it for competitive

low condor
#

big oof

sleek cave
#

but i don't know anything else ๐Ÿ˜ฉ

#

OH OH OH

#

my contest grader uses PyPy

#

kalm

low condor
#

I was just about to suggest that

#

But it might be useful to learn a fast compiled language

sleek cave
#

for sure

#

i'm taking a java course next semester

#

but high school cs courses are ๐Ÿฅด

#

whatever i'll take some time to get java down

#

don't wanna mess with C yet bc low level scares me

low condor
#

The one I would suggest is Rust

#

Go would probably work fine too

#

But Rust is approaching C speeds whilst being memory safe if you just stick to safe Rust

sleek cave
#

i'd definitely like to learn rust

#

i don't think my contest supports it though

low condor
#

Ah that is unfortunate

sleek cave
#

yeah no

#

womp womp

#

i'll still learn it Sometimeโ„ข๏ธ

#

it looks cool

low condor
#

I'm writing a program in Rust atm

#

a wc clone

sleek cave
#

what is wc?

low condor
#

Bash/Unix tool for counting words/lines/bytes/chars in a file

sleek cave
#

oh sick

#

whaaat

#

i never knew that was a thing

#

would've saved me all those "word counter" (and "line counter") google searches lmao

low condor
#

Learning bash tools is so important lol

#

Like if you want to search for a string in a file, there's a good chance that grep is what you need - you don't want to waste time busting out a full language if you don't need it

sleek cave
#

i should watch an overview video on bash tools

low condor
#

coding challenges is good - but learning things like bash can be more practical over time

sleek cave
#

i might've stumbled upon an awesomely clean solution to reactor reboot wannabe

#

but i have to go out ๐Ÿ˜ญ

low condor
#

ah - tragic

sleek cave
#

hate it when you're so close to a solution then life tells you to go outside lmao

spice kettle
#

guys

#

I want to make a code which can make multiple files

#

here is the code

#

how I can import fileName to the location of file

strange zinc
#

might be the incorrect channel for this. But you can use string concat or format. Either one should be fine

cyan sleet
sleek cave
#

reactor reboot wannabe is harder than i thought

#

retiring for tonight, will work out the kinks tomorrow

earnest belfry
#

I feel like AoC lures you into a false sense of security.

shell finch
#

what is AoC is it always going on?

earnest belfry
#

No, it happens at the end of the year.

#

@shell finch AoC is Advent of Code.

#

It's like an advent calendar but with programming problems.

#

And it's a contest. There's a leaderboard and everything.

#

You get more points the faster you complete the problems.

#

But you can still do it just for fun.

low condor
leaden maple
#

import random
def number_guessing_game():
print ("f,Time to guess the number between 1 and 10")

secret_number =random.randint(1, 100)
attempts = 0
max_attempts =14

while attempts < max_attempts
attempts += 1

#

am new and i need help

#

what should i add to the guessing game

#

and why cant i do print its like a error

lucid narwhal
low condor
lucid narwhal
#

well in context of aoc's year wise i suppose

low condor
#

I know what you mean though

lucid narwhal
#

:p

low condor
#

Doesnโ€™t feel like last year

modern terrace
#

latest AoC?

lucid narwhal
#

yessir

low condor
#

Itโ€™s like - if itโ€™s after midnight and you ask your phone to set an alarm for 7am tomorrow - itโ€™ll actually set one for 7am today which is what you actually want

#

Same thing with AOC - it feels like it was this year but it was technically last year

lucid narwhal
#

happens when i plan events and cause misunderstandings when i am awake after midnight texting :p

modern terrace
low condor
#

Galaxy-brain level thinking there

untold citrus
#

Is 3 years of python good enough to have an job about it?

ripe meteor
untold citrus
#

Oh my bad

quartz slate
quasi beacon
#

Python?

#

Obviously ๐Ÿ˜ญ๐Ÿ˜ญ

rancid creek
hollow wharf
earnest belfry
earnest belfry
low condor
#

Right - Iโ€™m primarily referring to P2 there

earnest belfry
#

And again with day 4.

low condor
#

Also I think we are talking about the same years

#

There is no โ€œthis yearโ€

earnest belfry
#

hah right

#

another year older

low condor
untold citrus
#

Alrighty thanks!

earnest belfry
#

@low condor Are there any problems from 2023 that you particularly enjoyed?

low condor
#

Hmm ๐Ÿค”

#

Not last year I think

#

(I made the error too lmao)

earnest belfry
#

Problem 3 was interesting for me but I had a lot of fun rediscovering Python with it.

low condor
#

Previous years had some fun ones though

earnest belfry
#

It's been a long time since I programmed anything seriously.

low condor
#

Day 3 was interesting to see how a lot of people botched it IMO

#

Trying to do it without preprocessing first seemed like a terrible idea

#

But a lot of people did that

earnest belfry
#

I wanted to challenge myself and try it but I kept failing.

#

premature optimization ftw

low condor
#

Day 3 I think really shows who thinks about data structures and who doesnโ€™t

earnest belfry
#

yes

low condor
#

With the right data structure itโ€™s very easy

#

Or, if you are one of the leaderboard people you can probably do it in a harder but quicker way

#

But the easiest way is to ||map full numbers and symbols to coordinate ranges || or something equivalent

#

Once you have that itโ€™s then very easy to interrogate that to get what you need

earnest belfry
#

Yeah that was my idea using ||finditer because the returned iterator has a span method that gives them to you||.

#

I probably could have done it more nicely though.

low condor
#

To be honest ||regex|| just makes it very easy. You can do it without that but it wonโ€™t be as nice to read

earnest belfry
#

regex ftw yeah

#

I used to be really into Perl so I would say I've got a good grasp on it.

magic oxide
# low condor But a lot of people did that

in my defence i got challenged to do it with convolutions so i tried to do it without preprocessing
which led to me making a solution with preprocessing just so i could debug my solution without preprocessing

low condor
#

Ah perfect

earnest belfry
#

hahaha

#

ultimately I was befuddled by an off-by-one (fixed it and got the star) but in the meantime I wrote something to use termcolor and colorama to highlight the input visually so I could count it myself.

low condor
#

Lots of people had an off by one that day

#

Of the people that didnโ€™t preprocess

#

Cos I read a lot of solutions that iterated by line and attempted to read a number by stopping when they found the presence of a non-numerical char on that line

earnest belfry
#

oh for the rows. I could see that happening.

low condor
#

Not considering the case where the number is right up at the edge of the line

earnest belfry
#

Can I post a link to a pastebin here if I put it in spoiler tags?

magic oxide
earnest belfry
#

No I'll go to the appropriate channel.

#

right

marsh currentBOT
#

:incoming_envelope: :ok_hand: applied timeout to @burnt zephyr until <t:1706028560:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

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

vast thicket
#

Yo

#

how are yall

hollow wharf
#

i see this \ in some scripts and i cant find it on my keyboard

#

where is it

hollow wharf
#

Next to the enter key

toxic olive
#

what is this?

atomic cairn
sleek cave
#

geometry is actually the bane of my existence

low condor
#

heh

sleek cave
#

looks like reactor reboot wannabe gets the best of me

low condor
#

reactor reboot strikes again

sleek cave
low condor
#

NO THANK YOU

sleek cave
#

lmao

low condor
#

I am done with these types of problems lol

#

I still need to understand how my current solution works

sleek cave
#

lmaooo yeah there was that

#

oh well

merry palm
#

Hey can anyone help me with some code?

sleek cave
#

i'll sleep on it some more and come back when i'm feeling ready for a rematch

sleek cave
#

i'm actually so done with anything that overlaps

#

atp show me any non-disjoint set of intervals, rectangles, or god forbid, cuboids, and i'm getting flashbacks

low condor
#

I've moved on from AOC

#

Time to code more practical things

sleek cave
#

man i'd love that ๐Ÿ˜ญ

#

but the universities i wanna go in really like this programming contest

#

hm

#

i guess they would like practical projects too lemon_thinking

#

it's all a balance

#

right now i have one more month before the contest so gotta train

low condor
#

fair enough

sleek cave
#

reactor reboot wannabe

#

is a question four ๐Ÿ˜ญ

#

what the hell does a question five look like then?!!?!?!

#

and everything to be done within three hours

#

some people are actually crazy

low condor
#

i do not pity you lol

#

just so you know I got a Python job with just 3 afternoons of Python

#

I'm feeling quite fortunate about that fact now

sleek cave
#

wat ๐Ÿ™‚

low condor
#

yup

sleek cave
#

that's actually sweet

low condor
#

true story

sleek cave
#

did you have lots of other experience?

low condor
#

well, I had the rest of my degree - mostly non-programming. And a few weeks of coding small scripts for a final year project

#

but that was it

#

3 afternoons of actual learning

sleek cave
#

dang

#

that's awesome

#

what was the job you got if i can ask?

low condor
#

a Python job :)

#

Also when I interviewed I didn't know what a class was

#

that was my level

#

I also didn't know what return did

hollow wharf
low condor
hollow wharf
#

how did u get it

low condor
#

A good degree and doing well with soft skills in the interview

#

And remembering random Tom Scott videos

hollow wharf
#

how long have u been coding

low condor
#

6 years now?

hollow wharf
#

wow

placid plume
#

Hello, there

#

I am a newbie here and finding new python job now.

#

If anyone have similar job, please let me know.

livid gull
#

This is advent of code

pine tiger
#

๐Ÿ’€

tough ingot
#

Does anyone know how to fix this:

#

print("What's your name?")
name = input()

if name == 'Bob':
print("Go Away!")
else:
print("Hello", name)

import time

time.sleep(1)

print("My name is BOT")
time.sleep(3)
print("You are about to type in a password, get ready!")

time.sleep(1)
print("Are you ready!")
input("Press Enter to continue")

time.sleep(1)
print("3")
time.sleep(1.3)
print("2")
time.sleep(1.3)
print("1")
time.sleep(0.8)

password = input("Password:")
time.sleep(0.5)
print("Uploading to servers...")
time.sleep(1.5)
print("Uploading data...")
time.sleep(1)
print("Password Successfully Saved! ")
time.sleep(2)

print("Log in with your new Password")
login = input("Enter Password:")

if login == login:
    print(name, "Has Successfully Logged In!")
else:
    print("Wrong Password!")
feral hazel
# tough ingot print("What's your name?") name = input() if name == 'Bob': print("Go Away!...

if login == login
this line is comparing the newly inputted password to itself instead of the saved one so you get logged in no matter what you input

o also if you need help again there's a dedicated channel for it https://discord.com/channels/267624335836053506/1035199133436354600
it would also help to describe the problem you're having (it might even help find bugs :D )
this channel is for discussing advent of code

#

!code too

marsh currentBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

spice kettle
#

guys is anyone have a termux experience?

low condor
empty galleon
#

Basic ai give code please

#

Example code

earnest belfry
#

This is the Advent of Code channel, not a help channel.

empty galleon
#

๐Ÿ˜ฆ

tawny bloom
#

what's this advent of code channel for

young tree
iron shadow
#

Nice house! However, this channel is for discussing advent of code. One of the off topic channels might be better for this

glacial granite
sleek cave
# low condor

deciphering somebody's solution right now. the way history is repeating itself is crazy ๐Ÿ˜‚

hollow wharf
#

Hi, anyone here did 16?

#

im not understanding the example

#

the 7th line starting at 0

#
|v-.\^....
.v...|->>>
.v...v^.|.
.v...v^...
.v...v^..\
.v../2\\..
<->-/vv|..
.|<<<2-|.\
.v//.|.v..```
#

i don't understand whats going on there

#

gets to '|' then goes down, gets to '-' goes right, gets to '/' goes up, '/' again i gess to right again, then \ goes down, '|' makes it go all down outside the thing?

cyan sleet
#

no, you're missing some stuff

#

the beam splitters send stuff in both directiona

#

and idk what you mean about the last |

#

you would encounter a - at that point pithink

hollow wharf
#

i mean i don't follow the >>

#

so the first '|' sends down, right?

#

the '-' sends left and right

#

the first '/' sends up, the second '/' sends right, the \ sends down

#
.|...\....
|.-.\.....
.....|-...
........|.
..........
.........\
..../.\\..
.-.-/..|..
.|....-|.\
..//.|....
#

@cyan sleet i am not seeing how this makes the previous screen

#

i haven't even tried to implement it cause of it, im obviously missing sth

cyan sleet
hollow wharf
#

but im not seeing how the second screens ends up in the first

#

does it wrap?

cyan sleet
#

first few steps, didn't draw yellow beams fully because it would be messy af

hollow wharf
#

but you are missing a line there

#

in between the '/' and \ on the purple line

#

the example has a bunch of "v" going down which i have no clue how they got there

#

also the green ones

#

whats that about

#

disregard that, i will look at it later more in depth, i'll probably try to implement it first

#

im obviously missing sth

#

no use in following up now

cyan sleet
#

that will later hit the | and go down

#

putting yellow and red in

#

it gets messy ๐Ÿ˜…

hollow wharf
#

oh

#

i see it now

#

its the '-' on the 9th line

#

@cyan sleet thank you

#

you actually drew it before but i didn't see it

#

i was obsessed with that row of the red line and couldn't see the whole picture

earnest belfry
#

Which problem is this for?

cyan sleet
earnest belfry
#

It's ok to talk about it here? I thought this was the general channel.

low condor
earnest belfry
#

ok thanks

#

the topic says "general discussion for all non-solution and non-spoiler things" so I didn't know if there was some unwritten understanding of something different. thanks for clarifying.

#

not trying to be a content cop or anything

wispy glacier
earnest belfry
#

@low condor I refactored my stuff using timeit btw :D

#

I'm going to refactor it further so I can just use the same driver for all solutions. I have to look up the syntax for interfaces in Python first though.

low condor
#

Using something like that itโ€™s easy then to plug those into timeit and so on

earnest belfry
#

because it's fun to overengineer

#

:D

#

and I've never done interfaces in Python

#

probably better to do it simpler but I'm not competing anyways so time isn't really an issue I guess

low condor
#

Fair enough - if you want to go down that approach

#

In which case youโ€™d be looking either at abc module or typing.Protocol, depending on whether youโ€™d want to use type hinting or not

earnest belfry
#

I've seen some people who code quickly for different competitions. It's amazing how fast they work and solve issues.

low condor
#

Oh yeah itโ€™s crazy - I can never do that

earnest belfry
#

Yeah they are like video game speedrunners with all sorts of shortcuts.

#

It's like athletic programming.

crude idol
#

damn

earnest belfry
#

I've seen some crazy solutions in C to some ACM programs for example.

#

like all sorts of bit manipulation tricks

#

reading from an array, processing the data, and storing it back in the same array all in the same loop

low condor
#

ACM?

earnest belfry
#

association of computing machinery

low condor
#

Oh

earnest belfry
#

I was in student ACM back in university

#

they do programming competitions

#

it's fun

#

Oh! I just found out why nobody knows about ACM vis-a-vis programming competitions anymore.

#

from Wikipedia: " From 1977 until 2017 ICPC was held under the auspices of ACM and was referred to as ACM-ICPC"

#

ICPC is international collegiate programming contest

low condor
#

Literally heard of none of these

earnest belfry
#

and the last time I participated in a contest was like 2016

#

haha

low condor
#

Clearly Iโ€™ve been in my cave too long

earnest belfry
#

ACM is the organization that hands out the Turing award

#

ACM has lots of special interest groups

#

If you want to publish a new algorithm you publish it in one of their journals

#

SIGGRAPH is huge

#

lots of conferences too

visual rivet
#

Guess this is the most appropriate channel to ask.
Is there any app out of there, which in a similar manner like Duolingo, can help training in small portions and data science challenges to help developing the skillset without digging into projects of any sort?

ivory vigil
#

Not quite on topic ๐Ÿ˜‰ This is the Advent of Code discussion channel. For discussing AoC.

visual rivet
#

Well, it was a guess ๐Ÿ˜‰

cyan sleet
#

idk how you made that guess

visual rivet
#

Looking at all the other channels and not finding a better match.
They all discuss about coding, but the sole that has an element of short quizzes is this one, hence I though somebody could have known.

Apparently it's not the case

cyan sleet
#

Off-topic would have been a sensible choice if you didn't find anything specific

hollow wharf
#

a-nnenฤฑzu

#

sฤฑkฤฑyฤฑm

solar basin
#

can anyone help me create a simple python project

#

i havent been able to create it

#

well the project is simple

earnest belfry
visual blaze
#

umm how to join advent of code?

#

it says The Python Discord leaderboard for 2024 is not yet available!

hollow summit
#

Advent is a season observed in most Christian denominations as a time of expectant waiting and preparation for both the celebration of the Nativity of Christ at Christmas and the return of Christ at the Second Coming. Advent is the beginning of the liturgical year in Western Christianity. The name was adopted from Latin adventus "coming; arrival...

visual blaze
hollow wharf
#

so, you can solve past problems

#

of aoc 2023

#

it's new

visual blaze
dreamy ocean
#

I wanna track my CPU temps with 0.96" OLED I2C display (128x32) and a Waterproof temp thing.

The only problem is on my fith pin its already being used when i need to use that specifc one.
Image

#

how would i do it

rapid wolf
#

As far as I can tell that's a +5V pin, so you can connect it to both

#

Your breadboard has each column connected

#

So use both holes, or the big connected row with the red line next to it

dreamy ocean
#

ah sorry

pearl swan
#

Ye

hollow wharf
night harbor
#

hi

carmine falcon
#

look at LM35 pin configuration

#

you have to connect voltage to left pin and output to your microcontroller analog input pin and gnd pin to to gnd

#

then you have to read analogue value using micropython as an analogue value from your microcontrooler analogue pin .. remember value output is analogue

#

10uVolt analog output per degree of celcious temperature

#

you have to read using polling method evey few moments as per your need

dreamy ocean
warped pagoda
#

Hi

strange zinc
#

Hallo

minor cave
#

joe_salute today's the last day for AoC Completionist role

ivory vigil
#

What's that?

strange zinc
earnest belfry
livid gull
#

And the last time it shows up

earnest belfry
#

ah cool

#

@livid gull Do you know if these channels will remain open or be archived?

vast thicket
#

bal

#

lol

#

idk why

#

but

#

in 9 hours

#

i have to go to school ๐Ÿ™‚

#

it starts at 6 am

#

yall americans are lucky

#

its starts at 9

#

anyways

earnest belfry
ivory vigil
# vast thicket its starts at 9

America has multiple timezones. Most the population lives in EST or PST, with a start time of either 9pm (lucky) or midnight (not as great)

magic oxide
#

๐Ÿ˜ญ

livid gull
#

Its fine they havent noticed were good for a few more hours

hollow wharf
#

is there any good tutorial/education channels for data sc.?

raven parcel
hollow wharf
modern terrace
#

i'm gonna be the default name color once more

minor cave
#

I apparently left the completionist role until after Valentine's day last year....... so y'all get another week

ivory vigil
#

@minor cave that requires joining the leaderboard first, which needs to happen in 2023?

iron shadow
#

you can join our leader boards in Nov, Dec and Jan

mossy trout
#

Can Someone please expalin to me

#

Im soooooo lostttttttttttedddddd

#

we create a new node and make the new node point to waht the curr is pointing too

#

so isnt it bascially pointing to itself

livid gull
#

This is advent of code

nova thunder
#

what is wrong in this?

uneven vortex
hollow wharf
cyan sleet
#

how the fuck do people end up asking for help for unrelated stuff here?

#

the title is so clearly not "generic help channel"

hollow wharf
wispy glacier
#

discord suggests random channels to users to check out

zenith elbow
#

they should display the modal dialog on the channel description when the user checks out the suggested channel pithink

#

in fact, would be best if this was done when any channel is opened for the first time

earnest belfry
lusty rover
#

I'm against role-locking, it just adds complexity
Especially with the new onboarding
Does Discord recommend channels that you haven't checked in your id:browse ?

earnest belfry
#

Discord hasn't suggested any channels for me but everything is checked it seems.

#

I'm using Discord in my browser though so I don't know if it's an app-only feature.

#

I can see how it would make the on-boarding more complex but it might be less confusing in the long run to choose from a smaller pool of channels.

#

I don't know how much of a problem it actually is though or if it even needs to be addressed.

#

I think it's nice to hold someone's hand when they first join the server especially if they don't know what they are doing.

jade flint
#

when is learning enough

earnest belfry
jade flint
soft grail
#

im working on day 3 and I thought I had the solution, double checked it against the example input, fgives me the number i expected, but the answer Im getting with the full input is wrong. Gonna have to take a deep dive into the debugger and see where its going wrong ๐Ÿ˜ฉ

earnest belfry
#

Day 3 was interesting.

autumn kayak
#

Anyone have Full stack tips and tricks server . If you have guys please send me

frank girder
#

What is "Advent of Code"?

low condor
gray willow
autumn kayak
#

@gray willow yes mam I want to ask that what side of full stack development i masters means frontend or backend to get a higher paid job

gray willow
#

if we will talk about an startup base companies you need to work on both frontend along with backend. so you need to know some basics in frontend, and backend is most and high payable then frontend.

#

get some basic knowledge of frontend, do some basic projects and mostly focus on backend.

ivory vigil
#

This channel is specifically for Advent of Code discussion.

autumn kayak
#

@gray willow ๐Ÿ‘ ๐Ÿซก ok mam

rotund spade
hidden musk
#

i mean. if you're using clojure, yes

rotund spade
#

I am using python so far

hidden musk
#

then you should probably use neither of those

#

python has std-lib concurrency features

livid gull
#

nooooo

#

my aoc :c

earnest forge
#

I guess it's time to turn off golf bot

old badge
#

๐Ÿ‘‹๐Ÿฑ

magic oxide
#

so who's doing roulette this year

sullen adder
coarse wagon
#

its called a_white_stars googling and bs-ing your way thru it a_white_stars

drowsy bone
sullen adder
#

ig i'll stick to just python and c++ ๐Ÿ˜”

coarse wagon
#

I am personally planning to try using a esolang I made

#

which reminds me, I still need to add file reading support

mossy basin
tulip elbow
karmic sequoia
#

aoccccccccccccccccccccc

minor cave
#

&aoc c

shut trellisBOT
#

The Advent of Code event is not currently running. The next event will start <t:1733029200:R>.

hollow summit
#

45 minutes left until first puzzle

#

๐Ÿ”ฅ

cyan sleet
#

always yes

normal dragon
#

Yeaaaah. Whoโ€™s ready

twin widget
#

guys

#

guys at least one of you have to be in top 100

#

jajafja

covert arrow
#

Hello everyone

woven oriole
#

hello

cyan sleet
#

oh right, leaderboard stuff

woven oriole
#

what does roulette mean here

feral hazel
#

heya

trail flare
#

yay another year for me to stay on top of this for the first ~10 days or so, then have to focus on other stuff

cyan sleet
#

language is given to us when the problem releases

woven oriole
#

ah

cyan sleet
#

(it's my terrible idea of a fun time)

woven oriole
#

fun

#

planning to use aoc-lib this time

#

nvm not much time to setup

minor cave
cyan sleet
#

oh god

#

how does one run vimscript in a sensible way pithink

coarse wagon
#

I think I wrote (non trival) vimscript once

#

Iirc it was to insert the current word under the cursor at the top of the file with some text prefixed

#

Iirc it was to insert the current word under the cursor at the top of the file with some text prefixed

#

Wait did discord just

trail flare
#

so you could (probably) put your code in there and then just open vim

earnest forge
#

Glhf everyone!

covert arrow
#

Glhf!

feral hazel
#

glhf!!!

coarse wagon
#

Yhe gl

#

I'm going to bed

minor cave
#

&aoc c

shut trellisBOT
#

The Advent of Code event is not currently running. The next event will start <t:1733029200:R>.

earnest forge
#

50/51 let's go

covert arrow
#

I got reading comprehensiond again

topaz summit
#

<@&518565788744024082> seems like the ping didn't work so, go

minor cave
somber trench
#

What is the language roulette?

hallow birch
#

it did, in fact, work

surreal sky
#

Oh wow its officially December. How much time flies

thorn terrace
#

Sheesh

cyan sleet
#

ok rouletters, for your own sanity

function Solve()
  :w! output
endfunction
vim input -u main.vim -c 'call Solve() | :q'
old badge
#

oh fuck

late frigate
#

classic day one case where fixing the tooling took longer than writing the solutin

sullen adder
#

damn i messed up getting my input and got a slow solve ๐Ÿ˜”

minor cave
potent pumice
topaz summit
cyan sleet
#

to quote my github repo readme

magic oxide
#

I would be here but I'm in the middle of the jlpt exam

night berry
#

day 1 finished

woven oriole
#

rip rank

potent pumice
#

in this channel the bot doesn't have mention everyone perms

woven oriole
#

p1 it was 733 then it died

remote beacon
night berry
remote beacon
#

it just started . did you use AI

night berry
#

nope

woven oriole
#

i think aoc is very anti ai already

#

the amount of shit lore unless you tell it the context

simple bison
#

where's the golfing thread ๐Ÿ‘€

karmic sequoia
#

aoccccccccccc

cyan sleet
#

you can solve the early ones stupid fast

minor cave
simple bison
#

yayyyyy :)

woven scaffold
#

Just remembered this channel exists, how did you all do on the global leaderboard today

hollow wharf
#

I am doing the first puzzle

#

rn

long egret
minor cave
simple bison
#

I named a variable "as" because I've been writing too much Haskell recently and stared at it for two minutes before I realised what the syntax error was ๐Ÿ˜ญ

woven scaffold
#

For some reason advent-of-code-data said I'm not logged in, so that slowed me down a bit

karmic sequoia
#

oh yeah chat these are stupidly easy

hallow birch
sullen adder
#

wow someone did both parts in under two minutes ๐Ÿ‘€

twin widget
minor cave
karmic sequoia
#

okay maybe i dont wanna do language roulette

karmic sequoia
#

hax

sullen adder
#

what the hell

minor cave
#

we have quite a few regular global leaderboarders hanging out here during AoC

normal dragon
#

Putting the competitive in competitive coder!

karmic sequoia
#

this isnt competitive prgoraming though

twin widget
viscid elbow
normal dragon
#

LOL there's a leaderboard. Ergo, it's competitive coding

open magnet
#

Oh my itโ€™s that time already?!

sullen adder
#

how is it even possible for a human to read the problem, download the input, type and run the (correct!) solution, and submit output in only a few seconds??

peak dock
#

because im going to say AI otherwise

woven scaffold
sour phoenix
#

Woot

woven scaffold
#

Did anyone here manage to leaderboard today?

karmic sequoia
#

There has also been criticism of competitive programming, particularly from professional software developers.[21] One critical point is that many fast-paced programming contests teach competitors bad programming habits and code style (like unnecessary use of macros, lack of OOP abstraction and comments, use of short variable names, etc.).
uh oh

#

this may be me

slender ravine
#

D1 completed, but leaderboard already filled, 3mins late to wake-up tho

sour phoenix
#

Iโ€™m qianxyz, I saw someone mention me

sullen adder
woven scaffold
twin widget
#

guys someone of you got place in top 100?

karmic sequoia
sullen adder