#advent-of-code
1 messages ยท Page 23 of 1
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.
python is my go to. Then other languages after that
fenix and i used python for the prolog day and for 25
i forget which was prolog. 5 maybe?
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.
that's only half right? Each day has 2 solutions
What was the language for day 25 ?
each day but 1
py
so long ago I have already forgotten
oh LOL
49? use a different language to parse too :P
the only challenge I use for AOC is to do it all without additional packages
Doesn't matter how many languages I used I'll never be as cool as the guy that did them all in intcode. ๐
Riyal
That sounds rough.
๐ฎ
it is...
havent finished this year yet. will try at some point
i spend too long on visualizations to do extra challenges ๐ฆ
There was a couple libs I played with just for fun like shapely and networkx that I didn't need.
your visualizations are brilliant though. Tops to you
i didn't know the language enough to use any libraries ๐ฉ
z3 was the only external lib I didn't write an alternate solution for.
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
Noice.
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
i know where to start, i just haven't started
Think about the things you don't like about python and how you would improve on them.
at least i know the books
no strict type hinting... ๐
Compilers: Principles, Techniques, and Tools is a computer science textbook by Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman about compiler construction for programming languages. First published in 1986, it is widely regarded as the classic definitive compiler technology text.It is known as the Dragon Book to generations of co...
that's python's strength!
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
I would suggest crafting interpreters instead tbh, the dragon book isn't that great at getting you to actually write a language.
due to that, pyright has become a favourite for me
inb4 i just make worse version of julia
julia is nice
I guess I did that
on top of 25 langs

Of those languages, where they all new (or most) new for you? Any that stood out as being "fun" to learn
raku
we didn't do raku
so these are the langs
day 11 could've been raku though
ones I've used a decent amount before:
bash, lua, java, C#, C++, Rust
i was really impressed by the functional languages
didn't see any nim this year
ones I've touched some before:
haskell, perl, php, go, ruby, kotlin
yeah, scala and (especially) elixir were very enjoyable
f# was cute. the languages that let you have support of a big ecosystem like scala are great
actually usable + functional
clojure too
oh yeah, better ocaml
F# shill now?
some of the syntax was just odd though
i think i did not understand how to call functions
did you do clojure for lisp day?
meanwhile I did clisp like a cave man ๐
the parentheses dream did not come to me
(decided (to (not (want to die))))
I actually starting getting annoyed at some of the verbosity of later days
granted, it's in part because harder puzzles, but also less functional
composability and pipes and chaining ๐
I wonder how much lisp has changed since I last used it ~30 years ago.
I suspect not too too much.
i've said it before but clojure's reducers are soooo nice
like a cooler version of GNU parallel
Hopping on a plane in about 8 hours. Passport still missing. Should I panic now. Think I'll finish my coffee first.
i'm sure it'll turn up ๐ฅด
Yeah. The question is whether it will turn up today. ๐
didn't you guys exit ๐
They sure did but im an eu citizen
I'm traveling from USA -> EU -> UK on an old UK-still-in-the-EU passport. ๐
mum's 75th bday.
yo do you happen to know someone who does explain the aoc puzzles from the math view?
HyperNeutrino?
update: 2 hours to go, and I just now found it. Pretty much right where it was supposed to be but got overlooked the first 12 times that drawer was looked in. =/ Panic ended. โ
can't read anything nowadays without a flash to an aoc problem
thought this message was about some graph traversal ๐
in a way it is. ๐
Wasn't there a puzzle a year or two ago that was something akin to papers please?
2021 d14?
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 
sees part 2
๐ฎโ๐จ knew it won't be this easy
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
hi
i think i did aight
idr which day but one had a part 2 that was brute forcable in under 5 seconds with something a 101 student could write but if they only added 1-2 more digits it would have involved crazy maffs
some days honestly have that vibe. where upon first glance, i'm like "oh no part 2 is crrrraaazy ๐ฉ"
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
is this a virus?
i cant send messeages becuase i pressed upload as file now its gltiched
Maybe you get a timout for sending a file idk if thats allowed
please help me
please
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
First thing i see is a nitro farmer
no one told me it was a thingy like that
its not help
i just need to know what it does to my pc
!rule 3
am i gonna get banned
You are probably better off waiting for a mod to see this so they can tell if its fine to help or not
Nah
I have never seen anyone get banned for something like this
!rule 5
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
i know
It's not a virus, just some not-so-nice code
what does it do
Things that would get you banned from discord real quick
so like nitro mining?
Yes, which won't actually work and will just get you banned
WIll it leave anything on my pc?
Don't run the code, simple as that
can i show u the file in dms?
i didnt
i dont know what it is
i just got send a .exe
and i ran it
i didnt mean to
Welp, moral of the story, don't run unknown code, and most definitely don't run unknown executables ๐
it was a .exe that opened up cmd prompt and it had that a .py file that i think was the code i posted so is that .exe just the python code or is it something more malicous
Impossible to know by just looking at the code it spat out, the executable could have done anything
am i gonna get banned?
!rule 5
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
From this server? No, from discord, well that depends on if you used the nitro miner or not ๐
pretty sure the .exe ran the python code becuase it popped up with the Large ASCII text that said "Wingsminer"
and thats in the code
The exe could have done anything else before, during or after running the Python file
Anyhow, if you want to ask more stuff, probably best for an off-topic channel
This isn't quite a topic for here ๐
can i invite u to the server and can u figure out what the .exe is idk if this is the best server to ask this but will you?
i have a really expensive pc
I ain't touching a random exe ๐
I don't have a sandboxed environment setup for that
run it on one of your rockets
Ah yes, murder ๐
will running MRT on full scan delete the bad stuff the .exe is doing
how did you do day14 part 2 without mutating the string?
should i use lists of chars?
I used a numpy array of chars, but list of chars would work as well
i think it's quite bad that python doesnt allow string mutation
so you don't like using strings as keys in your dictionaries?
I did with string slicing personally
you can use them even if they are mutable
i didn't make any string copies
if you make list(a) and a is [[]], does it make a shallow copy?
yup
you have to make a list() out of each individual one, I suppose
can you give me an example of a mutable string that can be used in a dictionary-like structure?
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
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
yea, basically the map takes ownership of the string
Yeah, that's not all that possible in python
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
why would you expect the cycle beginning to look like the first grid? (if by "first grid" you mean the puzzle input)
no, i mean: I compute first cycle, store that in a var first and then compare the following iterations to it
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.
@simple raven any idea?
are you continuing with the cycle simulation even after you found the first loop?
i never dfound the first loop (cycle)
(where I use cycle -> the 4 shifts, loop -> series of cycles that return to the same position)
oh I see, well you need to compare each new cycle to all of the stored cycles from previous computations
oh
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
after doing all iterations, i have to tilt north and count, just like part 1, right?
no, don't do an extra tilt
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?
can anyone review my shitty day 23 solution it doesnt work for shit
only works pt 1
the next iterations after finding a loop will go over the steps of the loop until you reach the end of that loop, but you want to know after N number of cycles, which part of that loop will you end up in
https://paste.pythondiscord.com/FB2A
heres my shitty dfs
fwiw it's not a copy, the string gets moved into the dict
Also, I wouldn't really say it's a workaround; it's kind of the opposite.
Making your dict's only keyed on immutable types is a workaround for not being able to prevent them from being mutated, only when they are in the dict
does it work on the sample?
yeah but im learning graph theory to make a better solution
fwiw there isn't any magic graph theory to find here that neatly solves the problem
you can be more clever about compressing the graph to make the brute force more efficient, but that's about it
yup
(I say this because this problem is NP-hard)
but my code would take like 30 minutes solve
what means NP?
anyways how long will the site be up ?
to put NP-hard in very rough terms we don't know of any efficient solution to this problem
aoc? it's always up
The channel is archived but that wont happen till feb
damn, i hope im a whole lot smarter for next years aoc
just gotta get more experienced
There are 7 more years for you to practice on
so the insight for 23 is basically that you can compress things to a pretty small graph
maybe 30-40 nodes
rather than 1000s
i know how to go about finding the distance of the edges and then dfs has so much references online theres no point not glancing at it
is 23 harder than the average aoc challenge?
so you already have the smaller graph with 30-40 nodes?
yeah
i.e. just keep the ||intersections||
hmm, it shouldn't be super slow then
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
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||
hello I want to learn python but I have no idea where to start.
did you mean to ask in the advent of code channel? Maybe #python-discussion would be good.
!resources is a good place to start:
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
thx for the advice
could some review this code? im still a beginner would be highly appreciated https://paste.pythondiscord.com/UN4A
this is not even remotely the right channel
I was reminded of the puzzle from one of the early days of 2022
the golfers used ord & mod to do it
https://dmoj.ca/problem/ccc18s3 didn't expect full aoc mode from a computing contest ๐
aww the logo changed back
nooooo
oh they changed it back what
im in #algos-and-data-structs trying to find what im doing wrong with day 16 part 1
!charinfo ืึท
\u05d0 : HEBREW LETTER ALEF - ื
\u05b7 : HEBREW POINT PATAH - ึท
\u05d0\u05b7
hey nice
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
Solved
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||.
couple of weird problems mixed in w some ez ones
I can't remember, which ones were mathy other than the semi-bs "lol, periodic special case"?
did you forget d24
How everyone is getting assigned "Advent of code completionist"?
Have you linked your AoC account?
and joined the leaderboard?
No, i am solving from 2015, didnt focus on the 2023 yet
Is that how i would get the role?
You also need to finish 50* on 2023
But can i get onto leaderboard by that???
since its already january?
you just need to complete the stars and join the PyDis leaderboard
Can u please help me further on this? I am getting interested in it more than ever
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
oh nice lemmi try running the first command, one LAST question, where would i run the command? here?
#aoc-bot-commands
you can complete the puzzles at any time
If you're within 24 hours, you get a rank/time. Otherwise, anytime and the time is just 24hr+
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
channel topic pls
channel topic pls
When will aoc 2024 come?
it happens every December, 1st to 25th, where a new puzzle would be released each day. but you can do the problems from the past events any time you wish on https://adventofcode.com
can we speed that up?
speed up the release?
speed up time and get there already
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
is revival of code happening this year as well?
yes most likely! sometime in the summer. most likely after the end of our code jam
Is it spoilers to talk about the 2023 problems?
you have a thread for each day of the year 2023 and 2022
ok thank you
did aoc-lube's fetching stop working after day 18 for anyone else or just me?
Do you need to reload cookies?
No clue day 18 and below still work
that's because the previous days are cached if you already fetched them, probably your user token expired
Alright thanks for the info
np
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 ?
yep, you can access any puzzle anytime, even from 2015
cannot import name 'is_sequence' from 'tensorflow.python.util.nest'
somebody help me
@queen relic what dis channel for
well i dont know exactly but in my point of view it discussion for any doubts in our programming
i have a doubt
its a small script cuz im a beginner but
shouldnt this be saying ur bad?
maybe gave value rather than 5
i didnt have any idea i am sorry
yeah maybe
im getting help in python help
there is a thread for solutions; you might want to delete this because spoilers
You can't complare num and 5 because num was never defined
This channel has a topic which shows what it is for: discussing Advent of Code (http://www.adventofcode.com)
what even is advent of code
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.
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
mbmb didnt know
thx
there is a channel description...
It's about discussing Advent of Code, ie http://adventofcode.com
o
I thought that topic made that pretty clear...
@ivory vigil what do i do on the website
OH
ALL AT CAME UP WHEN I CLICKED THE FIRST LINE
๐
ye thats way too hard for me
The difficulty varies a lot. codingquest.io is a similar concept but easier.
Most years day 1 is simpler. I think 2023 was the hardest day 1 ever.
ye id what button to click this is complicating
Try day 6
Day 6 was the easiest puzzle i have ever seen since i did kata 8 half a year ago lol
channel topic pls
I can't find it actually xD
General discussion channel for all non-solution and non-spoiler things for Advent of Code.
Day 6 was my fastest part 2 solution. I solved day 21 p1 faster than day 6 p1 though
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.
what kind of write ups do you do?
https://github.com/IsaacG/Advent-of-Code/blob/main/2023/notes.md -- contains spoilers!
Hi
Hello
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.
day 15 was the easiest imo
at least part one
Where exactly could I be posting it?
#aoc-solution-hints allows spoilers. Or the corresponding thread for that day under #1047673173447020564
Is the AoC good for new beginners that are learning py or better to have more knowledge first?
Give a few of them a try and see if you are able to solve them, when you run into issues try to solve them, you'll learn something most likely either way.
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
I see, thanks for your comments 
the first few should be fine
though...this year had some kinda special initial few problems
hello bluds
||there's some funny math you have to do||
||is there something you notice about the input #?||
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.
These elves are really messing stuff up.
The storyline has you going to the top then back down
they're all on the site, yes
Yes. Visit the problem page.
@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?!
heh
(my optimised reactor reboot code takes 2s, puzzle input had 420 cuboids)
what language are you writing these in?
python lmaooo
oof
i know i shouldn't use it for competitive
big oof
I was just about to suggest that
But it might be useful to learn a fast compiled language
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
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
Ah that is unfortunate
what is wc?
oh sick
whaaat
i never knew that was a thing
would've saved me all those "word counter" (and "line counter") google searches lmao
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
mhm i heard about grep, just never dug into it
i should watch an overview video on bash tools
coding challenges is good - but learning things like bash can be more practical over time
i might've stumbled upon an awesomely clean solution to reactor reboot wannabe
but i have to go out ๐ญ
ah - tragic
hate it when you're so close to a solution then life tells you to go outside lmao
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
might be the incorrect channel for this. But you can use string concat or format. Either one should be fine
know thy tools
reactor reboot wannabe is harder than i thought
retiring for tonight, will work out the kinks tomorrow
I feel like AoC lures you into a false sense of security.
what is AoC is it always going on?
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.
Actually last year I think it started off far more difficult than I expected - day 1 was the hardest day 1 ever
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
last as in 2023 or 2022 ๐
This year is 2024 - what would that make last year? :P
well in context of aoc's year wise i suppose
I know what you mean though
:p
Doesnโt feel like last year
latest AoC?
yessir
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
happens when i plan events and cause misunderstandings when i am awake after midnight texting :p
how about set an alarm for everyday then delete it after it rings
Galaxy-brain level thinking there
Is 3 years of python good enough to have an job about it?
Read the channel description
Oh my bad
what coding program??
1 month of python should be enough. What you really need is more programming experience.
i belive its VS Code
There are individual threads for each day to post your solutions. This is more of a channel to talk about the event in general.
That's interesting. I guess it depends on the author's mood haha. For me day 1 this year was super easy for part 1 (to the point I was like "is that it?") but then part 2 hit me from behind with a steel chair.
Right - Iโm primarily referring to P2 there
And again with day 4.
I got a job with 3 afternoons of lessons in Python. Anything is doable :)
Alrighty thanks!
@low condor Are there any problems from 2023 that you particularly enjoyed?
Problem 3 was interesting for me but I had a lot of fun rediscovering Python with it.
Previous years had some fun ones though
It's been a long time since I programmed anything seriously.
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
I wanted to challenge myself and try it but I kept failing.
premature optimization ftw
Day 3 I think really shows who thinks about data structures and who doesnโt
yes
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
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.
To be honest ||regex|| just makes it very easy. You can do it without that but it wonโt be as nice to read
regex ftw yeah
I used to be really into Perl so I would say I've got a good grasp on it.
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
Ah perfect
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.
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
oh for the rows. I could see that happening.
Not considering the case where the number is right up at the edge of the line
Can I post a link to a pastebin here if I put it in spoiler tags?
#1180738420272799814 might be a better place
: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.
Next to the enter key
what is this?
Every day of december on the advent of code website a new puzzle gets posted and those are discussed here
okay
three days later
geometry is actually the bane of my existence
heh
looks like reactor reboot wannabe gets the best of me
reactor reboot strikes again
shall i pass the torch to you? :P https://dmoj.ca/problem/ccc14s4
NO THANK YOU
lmao
I am done with these types of problems lol
I still need to understand how my current solution works
Hey can anyone help me with some code?
i'll sleep on it some more and come back when i'm feeling ready for a rematch
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
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 
it's all a balance
right now i have one more month before the contest so gotta train
fair enough
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
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
wat ๐
yup
that's actually sweet
true story
did you have lots of other experience?
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
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
bro how ๐ญ
How what?
how did u get it
A good degree and doing well with soft skills in the interview
And remembering random Tom Scott videos
how long have u been coding
6 years now?
wow
Hello, there
I am a newbie here and finding new python job now.
If anyone have similar job, please let me know.
This is advent of code
๐
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!")
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
guys is anyone have a termux experience?
This is not the right channel to ask help questions
๐ฆ
what's this advent of code channel for
For discussions related to https://adventofcode.com problems
Whatโs with it ?
Nice house! However, this channel is for discussing advent of code. One of the off topic channels might be better for this
sorry chris, thanks for the compliment
deciphering somebody's solution right now. the way history is repeating itself is crazy ๐
inclusion exclusion based
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?
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 
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
technically also up, but outside the grid
first few steps, didn't draw yellow beams fully because it would be messy af
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
you see the top yellow line going to the left?
that will later hit the | and go down
putting yellow and red in
it gets messy ๐
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
Which problem is this for?
16
It's ok to talk about it here? I thought this was the general channel.
If itโs just a clarification to the understanding of the problem then itโs fine to be here
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
if aoc were actively running we'd probably ask to use #aoc-solution-hints for this
@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.
good to know, thanks
Great to hear :)
You could do full interfaces for classes and the like - but why not keep it simple? Letโs say that for every script, thereโs two functions - part_1 and part_2, which take in an input and return a string of the solution
Using something like that itโs easy then to plug those into timeit and so on
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
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
I've seen some people who code quickly for different competitions. It's amazing how fast they work and solve issues.
Oh yeah itโs crazy - I can never do that
Yeah they are like video game speedrunners with all sorts of shortcuts.
It's like athletic programming.
damn
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
ACM?
association of computing machinery
Oh
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
Literally heard of none of these
Clearly Iโve been in my cave too long
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
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?
Not quite on topic ๐ This is the Advent of Code discussion channel. For discussing AoC.
Well, it was a guess ๐
idk how you made that guess
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
Off-topic would have been a sensible choice if you didn't find anything specific
can anyone help me create a simple python project
i havent been able to create it
well the project is simple
This channel is for advent of code, you probably want #python-discussion
alr cheers
umm how to join advent of code?
it says The Python Discord leaderboard for 2024 is not yet available!
aoc hasn't started for this year yet
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...
Okay thankss
aoc starts in december
so, you can solve past problems
of aoc 2023
it's new
okay
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
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
Also, this is a better question for #microcontrollers @dreamy ocean
ah sorry
hm okay thanks
Ye
Yes
hi
Are you using LM 35 temperature sensor?
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
I was trying to
Hi
Hallo
today's the last day for AoC Completionist role
What's that?
The last day to get it you mean?
And the last time it shows up
ah cool
@livid gull Do you know if these channels will remain open or be archived?
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
@vast thicket https://www.livescience.com/51777-school-start-times-states.html <- earlier than you think
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)
๐ญ
๐ญ
Its fine they havent noticed were good for a few more hours
is there any good tutorial/education channels for data sc.?


i'm gonna be the default name color once more
I apparently left the completionist role until after Valentine's day last year....... so y'all get another week
@minor cave that requires joining the leaderboard first, which needs to happen in 2023?
you can join our leader boards in Nov, Dec and Jan
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
what is wrong in this?
Continue and break outside of a loop
thats not even python code
how the fuck do people end up asking for help for unrelated stuff here?
the title is so clearly not "generic help channel"

discord suggests random channels to users to check out
they should display the modal dialog on the channel description when the user checks out the suggested channel 
in fact, would be best if this was done when any channel is opened for the first time
Would it be feasible to restrict channel access to certain roles? E.g. if I want to access the AoC stuff I'd have to choose the AoC role? I've seen that sort of thing on other servers.
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 ?
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.
never stop learning
inspirational words from a wise man
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 ๐ฉ
@soft grail #1180738420272799814 is there if you want to peek at other solutions
Day 3 was interesting.
Anyone have Full stack tips and tricks server . If you have guys please send me
What is "Advent of Code"?
It's a set of programming puzzles every Xmas. adventofcode.com
what type of tips and trics are you asking, as you will get some knowledge about full stack once you will start working on a big project that require fully backen logic frontend database access and so on you will slowly get expert as a full stack. if you have any other confusion you can ask.
@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
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.
This channel is specifically for Advent of Code discussion.
@gray willow ๐ ๐ซก ok mam
Should I use it instead of gnu parallel?
Check #async-and-concurrency
i mean. if you're using clojure, yes
I am using python so far
then you should probably use neither of those
python has std-lib concurrency features
I guess it's time to turn off golf bot
๐๐ฑ
so who's doing roulette this year
do you need to know 25+ programming languages? ๐ค
its called
googling and bs-ing your way thru it 
To distract thyself from more urgent problems
ig i'll stick to just python and c++ ๐
I am personally planning to try using a esolang I made
which reminds me, I still need to add file reading support

aoccccccccccccccccccccc
&aoc c
The Advent of Code event is not currently running. The next event will start <t:1733029200:R>.
Yeaaaah. Whoโs ready
Hello everyone
hello
not any roulette players
oh right, leaderboard stuff
what does roulette mean here
heya
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
25 days, 25 languages
language is given to us when the problem releases
ah
(it's my terrible idea of a fun time)
#aoc-announcements a bit early for these first few days
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
cursory glance at docs looks like .vimrc is vimscript
so you could (probably) put your code in there and then just open vim
Glhf everyone!
Glhf!
glhf!!!
&aoc c
The Advent of Code event is not currently running. The next event will start <t:1733029200:R>.
<@&518565788744024082> Good morning! Day 1 is ready to be attempted. View it online now at https://adventofcode.com/2024/day/1. Good luck!
50/51 let's go
I got reading comprehensiond again
<@&518565788744024082> seems like the ping didn't work so, go
What is the language roulette?
it did, in fact, work
Oh wow its officially December. How much time flies
Sheesh
ok rouletters, for your own sanity
function Solve()
:w! output
endfunction
vim input -u main.vim -c 'call Solve() | :q'
oh fuck
classic day one case where fixing the tooling took longer than writing the solutin
damn i messed up getting my input and got a slow solve ๐
As a fun challenge for folks who have been doing AoC for awhile, we challenge people to a use a different language each day
thank
Ah, that's cool
can't remember if the implementation edits the role to make it mentionable or if the bot needs everyone mention permissions for this channel lol
the bot's message is yellow for you?
to quote my github repo readme
I would be here but I'm in the middle of the jlpt exam
day 1 finished
rip rank
in this channel the bot doesn't have mention everyone perms
p1 it was 733 then it died
CAP
it just started . did you use AI
nope
i think aoc is very anti ai already
the amount of shit lore unless you tell it the context
where's the golfing thread ๐
aoccccccccccc
you can solve the early ones stupid fast
I'll get it started now
yayyyyy :)
Just remembered this channel exists, how did you all do on the global leaderboard today
same
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 ๐ญ
For some reason advent-of-code-data said I'm not logged in, so that slowed me down a bit
oh yeah chat these are stupidly easy
can this be pinned?
No, I meant your message worked, mb
wow someone did both parts in under two minutes ๐
what's the language
Vimscript. I'll be posting the languages in #aoc-announcements and moving Sir Robin's daily ping to that channel as well
okay maybe i dont wanna do language roulette
hax
what the hell
we have quite a few regular global leaderboarders hanging out here during AoC
Putting the competitive in competitive coder!
this isnt competitive prgoraming though
it is
he did the first part in 4 secs, that's insane
LOL there's a leaderboard. Ergo, it's competitive coding
Oh my itโs that time already?!
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??
Don't recognise the name, so I'm going to guess no
Woot
Did anyone here manage to leaderboard today?
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
D1 completed, but leaderboard already filled, 3mins late to wake-up tho
Iโm qianxyz, I saw someone mention me
i managed to get top 1 against me, myself, and i ๐
I don't understand this criticism really
guys someone of you got place in top 100?
you evidently havent done competitive programming
i thought the benefit was the problem solving skills not perfect code style?
