#AdVENt of Code
1 messages ยท Page 16 of 1
yea this is what i meant
earlier
by u need corner information
i was gonna do that with a kernel but
shoelace better
so good
@real hinge do AOC for me
nevefr
guhh I have to sleep
i should too
night night
I need to get interior dots location
I will just hardcode ig
deat
it was worknig fine on example
yeah floodfill will cause problem in part2
how big grid do I even need to for t hat
this is insane
this says I have to use math
rather than creating a array
I have a idea
what if while going up or left I calculate the top number of dots
but hmm
bro
if i calculate the shoelace inline it works
but if i put it in a fun it doesnt
or im just cooking
AAAAAAAAAAAAAAAAAAAAAAAAA WORKING WITH RANGES IS PAIN
I'd rather watch skibidi toilet than going to university
Or at least for specific lessons
then dont go
are u in uni already
have to
Yes
drop out
Oldest*
Yyoppp
@sullen fiber this u
id rather be unemployed than waste another 4 years in school
esp compsci
guys they secretly updated chatgpt
https://chat.openai.com/share/0cc74b4f-a395-433d-b770-afa6d3fe8d31
No but that person is cracked at thinking with arrays
They aren't in the discord either
uh how are gonna live then
also even though I hate university rn I believe there will be good stuff in 1-2 years
Move to kazakhstan
70โฌ / month rent 3 bedroom app
Thats what they tell everyone
in 2 years theyll say well now you might as well just finish it
I wouldnt want to move somewhere completely foreign
at least rn
no thats not what I hear
thats what I believe
rn we have bunch of math and physics
but in next year we will get rid of most useless lessons
I will even have chance to find people like me
I dropped out cause it was useless and cancerous
i can teach myself more useful things in 1 weekend than university does in 1 month

if you find it cancerous yea
I dont go university to learn something too
in 4 years not 1 month
from the uiua server: most sane day 18 solution
uiuable
I think I will skip todays part 2 too
runs perfectly on example but wrong in real input
and I have literally 0 idea whats the issue
GOOD
you love edge cases
You are using i32 and not i64
no I am using i64
Is it off by 1
nvm I solved part2
NO
I AM NOT USING INSANE C
if ranges.iter().any(|f| (f.direction == 'U' || f.direction == 'D') && f.start.0 == x && (f.start.1 == range.end.1 || f.end.1 == range.start.1)) {
continue;
}
the problem was this
even if I explain it will look dumb but basically my code was invalidating this
even though it shouldnt
idk how it didnt cause issue on example but it caused after
so confusing whatever
i am
insane
ifunny
ven is funny
@tranquil vapor youuu
do you know how to C
i need to make dynamically expanding 2d array
for day 18
it starts off as 1x1
first instruction digs 6 to the right
can't
use different language or C++
or use boost
whats boost
BDFDB port to C
GUH
actually nvm boost is C++
you need to add some libraries or write ur own arraylist / linked list

how do i do my own
write from scratch with malloc and memcpy and stuff
okay
idk
bad language
everyone should use
#include <stdio.h>
#include <glib.h>
int main(int argc, char** argv) {
GList* list = NULL;
list = g_list_append(list, "Hello world!");
printf("The first item is '%s'\n", (char *)g_list_first(list)->data);
g_list_free(list);
return 0;
}
here
what is glib
gnome thing
husk
malloc
yes do this
realloc by a big number every time you add to it
2m illion
nuh uh
yop
nuh uh
yea
i as in sqrt(-1)
except i^x is undefined unless x is 2
or 4
no
no
no its defined for all complex values of x
shut up
๐ญ
@sullen fiber vap
typedef struct {
bool **map;
int width;
int height;
} map;
``` something like this should work @tranquil vapor ?
let him grid
please use malloc
there should never be ** in your c code
huh
like betaveros once said
malloc still just gives you a pointer
die("wtf")
**map is just 2d array
@tranquil vapor hi
YOU DONT
making real array or floodfill
both are terrible
part2 will make you hate yourself
be based and dont use a grid
what if its an exponent ๐๐
its c not python
&mut &mut **x
@warped dust
zz
vapporized
I was about to say you're 2 hours late and then realized I'm actually in EST now
guh
hm p1 seems easy
But it's also late here so I'm doing it tomorrow probably
Along with yesterday
And that dumb pathfinding one hopefully
Outside
@real hinge Inside
Where are you
Tyman got kidnapped
gone
Ohio
It's winter break
I'm visiting family
Yes Ohio is very husk worthy
Yea
String manip
||```ts
const s = _part.replaceAll('=', ':')
const part: Record<Prop, number> = eval((${s}))

delete
should spoiler that actually mb
just > < yea
part2 is 
nuh uh
@steady fog Greetings mantikafasi,
My name is Richard, and I'm the Community Manager at FetchAI. I am currently excited to announce an extraordinary opportunity which is especially for the committed moderators of the Reddit community.
We have set aside a total of 10,000,000 $FET for an exclusive airdrop to Reddit Moderators worldwide. This initiative is our way of showing gratitude and also to inspire continued support and participation in the dynamic blockchain and AI space.
Click Here To Join Airdrop Event
Thanks for being a part in the Reddit community, and we eagerly look forward to your participation in this unique airdrop.
Apologies for any inconvenience, but our Reddit account is currently shadowbanned, and we're working to resolve this issue.
Kind regards,
Richard
Community Manager at FetchAI
women
true
god mornin goovnecord
OMG IT SPELLS XMAS
@hazy sinew help me fix my day 17 algorithm when
what lang
rust
oh wow
part 2 is super unuiuable
part 1 was only slightly uiuable
today is a typescript day
no
i only did part 1 in day 5
i did the full day 5 in TS too lololol
||range processing|| in uiua sounds sooooo painful
it might just seem intimidating but be very easy
but TBH i dont wanna find out
Today p2 doesn't seem that bad honestly
I'm just going to throw some recursion at it and hope it works
Recursion is so funny
todays p2 is TERRIBLE
part1 is just regular xmas variable mapping and loop over
then part2 is whole different logic 
Yeah it's completely different but I think I know a smart way to do it
i think its just day 5 again from the looks of it
you cant do it in non smart way anyway 
unless 300 years
@real hinge
you
ok time to typescript today
no uuaisu?
Not uiuable
actually
this might be uiuable
i thought about it while doing laundry
ูฑููุญูู ูุฏู ููููููฐูู it is uiuable
oh lovely i cant react either
every time i start today's part 2 i get bored and do smth else
bleh
maybe the next one will be more interesting
@sullen fiber
hi
no
its 1 trillion elephants i think
except its not detecting a loop

oh
I'm like confused on the flow of data in this days aoc
how to structure it in my code
if you need help with part 2 i havent solved it yet but im pretty sure you just have to ||day 8 part 2 this, the last nodes connected to rx are all conj, you wait for them to all be high and then calculate||
got it
there's no answer lmao
shits just stuck bro
[๐ 6:28:03 AM] โน [dev:watcher:change]: 2023/20/src/main.rs
yea its too big
what did you do
look at ur input
notice that ||rx connects to exactly 1 inverter||
||that inverter connects to exactly 4 inveters||
solution: ||each of those 4 inverters is in a separate subgraph, they are separated into 4 subgraphs all connected via broadcast||
I'm doing this in typescript
||oh shit it does||
I was doing it in typescript but saw p1 and thought why not golf it with rust
bad idea
i am predicting a berlekamp massey day
yop
rust is cool and all but ur not bruteforcing this
code
I'm using my own aoc runner
but there's cargo watch, install that
tomorrow is gonna be linear feedback shift register with some goofy new rule and the input is gonna be a short binary number and were gonna have to figure out how to get it
#no_std is king
I am downloading watch module
bad
mantika will do tomorrow's in rust no_std
nop
never
ok my p2 sol doesn't work
or it works but looking at my code so far, seems horribly optimized
brb
Everyone stop doing aoc
I'm too drunk to do today
Please wait 8 hours
guh does that mean stuff can get multiple inputs
how do I even do that
WHATS THE MEANING OF MEMORY
AAAAAAAAAAAAAAAAAAAAAAAAAAAA
this is so stupid
I will write my code keeping in mind that only conjuction can take multiple inputs
hopefully others are only one
It checks the memory, if all are high it sends low, if all are low it sends high
@tranquil vapor it happened again
its sending random output 

how did I even went out of memory bounds in rust
LMAO
NOW IT RUNS FOREVER
WHY IS THIS TOTALL RANDOM
AAAAAAA
I DONT EVEN USE UNSAFE
WHY IS THAT
is this correct
we get the previous inputs from ...
the top gate checks if all are high, if so it sends low to the or
the bottom gate checks if all are low, if so it sends high to the or, and to the flip flop
the xor checks if the previous state and current state changed
if it did, it sends high to the nxt
if nxt receives high from the xor that means it received a signal from the conj, that signal is in the or gate
send that code like wtf did u do
"memory safe" they said
Once I get back home
im guessing u probably cast a pointer to an usize
Nop
i did that on accident once
We'll ser
I've just found out this actually doesnt work at all for the opcodes. everything compiles just fine, except.. its not matching the enum value at all. instead, it's trying to match the function pointer of the variant constructor, which was truncated to a single byte with no warnings whatsoever (okay clippy seems to warn you, but it didnt because it was a macro. it also doesnt explain whats wrong at all: https://rust-lang.github.io/rust-clippy/master/index.html#/cast_enum_constructor)
i really hate rust actually
some_func as usize is perfectly valid
it casts the pointer
also listen to clippy itll probably scream if u do smth like this
What does this bot have against normal embeds
cuz they're bad
a usize*
normal fedi embeds are terrible
Fair enough
wetdryworld has improved embeds cause essem made them better
but most fedis have terrible embeds m
Does the bot use AP
?
you will read source code
That's dum
ok go ahead implement activitypup and every quirk from every instance just to make one kind of request
that you probably cant
Yes it does though
how is that implementing activitypub
application/activity+json is the AP content type
it uses signed fetch and fetches node info for name
It fetches the activitypub representation of the user
i mean how else would it fetch it anyway
malware
just the corresponding apis
... the point of activitypub is that it's a standardized protocol
aaaanyways
Adventing ๐
she advent on my cod
this is masto api
she advent on my code till I leaderboard [extremely loud incorrect buzzer]
guess the user one isnt but hte post is
PR breaking changes that deliberately make AoC harder for everyone but you
Ven fix rust compiler when
guys i was gonna bruteforce part 2 of today on a breadboard with logic gates but turns out i cant because the SPEED OF LIGHT is too LOW
WAIT
Thats smart
But what does that mean
this is for example
u can use a breadboard and logic gates to solve today
but because theres 200 trillion iterations and the speed of light is 300million m/s, at 1GHz (60 hours to compute) i can use a max of 30cm of cable
because otherwise itll take longer for the signal to travel than for the button to press at 1ghz
not even accounting for logic gates and flip flops not being instant
LIKE WHAT
bro said static ref contents
literally static CONTENTS: &str = include_str!("input.txt")
done
no lazy static
you are insane
AND FORMAt YOUR FUCKING FILE
mantika rust is even less readable than normal rust

didn't know that was possible
that moment when code runs on example but runs forever on real input
so basically still unreadable
if (name == thisguyneedshigh && origin.state && origin.name in thingydabobs) cycles[origin.name.drop(1)] = bonks
i have the uncontested best variable naming
go
go
go map it
whats even the point
just read the damn input.txt bro
or stdio
argued with friend
part 2 is womp womp
Terrible
Idk what I did last time but it was forcing me to use unsafe when declaring global variables
So I went lazy static
But it turns out I didnt need it 
just std::fs::read_to_string("input.txt").unwrap/expect broooooo
readtostring very bad
guh part1 looks easy
but I have zero motivation to do it 
same
the solution to day 20 part 2 is actually just ||spelled out in the input as a binary number||
||notice the towers, the incoming to conj are 1 and outgoing are 0, broadcast receiver is LSB, and the binary number is the cycle length, this works for any number prime, even, odd||
@tranquil vapor insane
landed in 1.11.0
lets gooooo
soon you will see in your email revert #14104 new pr #14153: fix #14104 regression
Better example for 2023 21 part 2
||Inputs for 2023 for this day always have direct paths from the start point to the edges clear.
Despite this, the example they give you doesn't have a clear path to the edges
...........
.....###.#.
.###.##..#.
..#.#...#..
....#.#....
.##..S####.
.##..#...#.
.......##..
.##.#.####.
.##..##.##.
...........
```||
In part two, being able to assume ||there is a clear path to the edges|| dramatically simplifies the logic needed to solve, so here is a modified example input along with its expected outputs:
||```
...........
......##.#.
.###..#..#.
..#.#...#..
....#.#....
.....S.....
.##......#.
.......##..
.##.#.####.
.##...#.##.
...........
50 -> 1878
100 -> 8237
500 -> 188489
1000 -> 746036
5000 -> 18801528
||
yop
googling crystal is also hard
cause you will find actual crystals and accessories and stuff
so bad
i already did julia
oh this is just for aoc
I just keep the api reference open
actually gonna publish the docs as a vitepress site
would be better with nicer search
Have you ever heard of reading error messages
forcing to use unsafe isnt a error
The error is that you can't do that safely
Which means you are doing something wrong
It just suggests that if you really need to do that then use an unsafe block
I mean idk
if it cant get done safely maybe it cant?
What were you trying to do
My guess is it's just you not knowing how rust works
OF COURSE I DONT
I literalyl started using rust with 0 knowledge on aoc
guhh
but I am starting to some stuff
borrow stuff make sense now
But anyways globals aren't a thing in rust really
You just have constants and statics which this explains decently
VEN
I WILL MURDER YOU AND YOUR AUTOMOD FOR RUST LANG DOT ORG
i thought i was good at math but i had to write this down to check if i can simplify it
Rust by Example (RBE) is a collection of runnable examples that illustrate various Rust concepts and standard libraries.
Murdering is bad
wrong
I finally finished day 17
The problem holding me back was so dumb
in my method for generating valid connections, I have a rule that prevents backtracking (going back onto the node we were just on)
that uses the Node's direction property
I had the direction property for the start node set to north, so when it looked at going south for the first step, it said no, that's backtracking
I solve it in
300ms for part one
1100ms for part two
i should solve everything in wgsl
what is a north carolina problem
lots of news reporting on that
north carolina doesnt exist
i could use dfdx to get a neighbouring pixel
never
soon
@real hinge I will write unsafe code
Good
how is today's
aoc
I just use statics
wow advent of parsing again
nothing, i was just slow today 
first day in a couple of days i've woken up at 6am for it, was busy for a few days
maybe a bit rusty
what about day 20 part 2
theres a cheese
this is how ur graph looks
||the 4 towers are binary numbers, the arrows that go TO the conj are 1 and the ones that go FROM the conj are 0, the top one with 2 arrows and broadcaster connection is LSB, its odd and the numbers are prime and coprime (they dont have to be but they are)||
||the lcm of the numbers is the sol||
lol wtf
did people realise this when it actually came out or only afterwards
that's cracked
havent heard of anyone who realized
you could just do that on paper
maybe some electronics engineer did
cause its an lfsr and it always has this property no matter what
if you sinplify it to just a few gates youll notice
damn
if there was a part 3 it would be heres a huge number, construct an input such that it outputs this number
i wouldve had an implementation ready
cuz its just berlekamp massey with custom logic
giving the aoc guy ideas
part 3 on dec 25th
btw https://www.youtube.com/watch?v=_oNOTknRTSU entertaining talk imo
Eric Wastl provides an intriguing backstage pass to the world of 'Advent of Code'. Offering a glimpse into the creation, challenges, and intricacies of this coding phenomenon, Wastl shares the stories and decisions that shape each puzzle.
For those eager to uncover more behind-the-scenes magic of coding challenges, tretton37.com awaits.
also you can construct the input using 58 xor gates and 58 flip flops (real ones, not aoc ones)
seen that
pulling out the fpga
or using 4 lfsr ics
but we dont have those
and im not gonna build 58 xors and 58 flip flops on a breaboard
and it would take about a week to bruteforce because the speed of light is too low
lmfao
btw does anyone know if the last few days are always all hard
first time i've made it this far in an aoc year lol
they are yes
@timid veldt @dense vault @fallow fern @tardy ore @golden belfry
you have kotlin in your name
how do i check if a method has an annotation if its wrapped behind an abstract class
uiaia so bad
you pinged everyone but me
oops
what a stressful day
you just do.
what did you two do for p2
go through every brick and count how many will fall?
it takes a bit to run tho
theres better solutions but i didnt write onr
mantikas pc will be unable to handle
no im asking your approach to p2
i went through every brick and counted how many will fall
2 * (x - y) - z
yeah ik
it will cost unless u want to simulate
@hazy sinew did u bruteforce p2
no lol
i had multiple optimized bruteforces ready but never let it run for more than 6 minutes
(big mistake)
cost me big time
yeah my bf finished in 14min but i wrote some garbage to avoid call stack overflow
what lang
||you can delete most nodes because they are just straight paths so you teleport from 1 corner to the other||
ah
was that really optimal enough, i thought of it but i ||thought it wouldn't make much of a difference since i would have to check whether the paths have any potential intersections||
how long does yours take to run
1 second
damn
well more like 2
meh
p1 is easy
p2 requires waiting 7 minutes or ||adjacency graph||
since it will take you more than 7 minutes to write the code
waiting 7 minutes is better
yes but i didnt know it was 7 minutes
@teal mountain HELP WTF
why
have u seen part 2
no
I haven't done the last 7 or so days
having to do a new language each day and figure out wtf the challenge is too hard
crying
||you need to find a position and velocity to throw a rock from so it hits every single hailball in 3d space with coordinates between 200 and 400 trillion||
which is why i had to use python because it has ||sympy, kotlin does too but i didnt know about it||
most of the leaderboard used mathematica or z3
insane
does it give u all the points
||it sounds like just solving for plane and then solving for quadratic||
wdym
idk i didnt read the puzzle
jesus fucking christ
i haven't gotten out of bed yet
i'm gonna kms if i try doing this in ts
holy shit it almost works
you can solve today using chinese remainder
this didnt work
i'm gonna have to do z3 too yeh
i feel like there's a mathematical sol to this but i have no idea what it is
there is and i tried both versions of it, one of them i posted above (off by 494) and the other just didnt work, i couldnt find any matching prime factors
z3 is a math solution too except its just equations and you solve for x y and z by bruteforcing
floating point precision
Love
uop
I need two more stars aaaa
ok cool done
so true
i think its on purpose cuz last year the leaderboard was taken by ppl using ai
and writing scripts that automatically submit anwers from chatgpt's api lol
I have found chatgpt is utter ass at basically all AOC problems, 2015, 2022, 2023
Maybe that's because I only ask it when I am desperate and have been working for multiple hours
i think it was gpt3 actually
chatgpt is dumber
it was working though but maybe its just so many people trying
gpt 4 works on most days besides 20s and part 2s of 15+
as you can see by the leaderboard
day 15 part 1 was solved in like 50 seconds and part 2 in 35 seconds
I asked gpt to troubleshoot my code
(it failed all the times)
Actually I asked copilot which is gpt4 afaik
So doubt
i hate ai people so fucking much
why would you ruin fucking advent of code for everyone
you don't gain anything, you just ruin it for everyone else
it is quite funny tho
next year it wont be bearable
but this year it was silly
what a loser
we need to normalise bullying aibros
bro relax its not like it made a difference
u dont see anonymous user #640116 anywhere on the total leaderboard
yea im not defending nordine lotfi (he placed on leaderboard like 20 times and none of those were outside the podium)
hes the one that got day 15 in 1 minute
but day 1 in 12 seconds is pretty funny
doesn't load
true
tbh for first 100 they should submit proof that they done it
I wonder if ai will be able to do all of it next year
comparing gpt 3 and 4 there is already insane enough difference
tbh day 15 part 1 was hella easy
if you read the question fast enough its possible to do it in 51 seconds
yes ik i did it in 1m36s
but part 2 is not possible in 35s
i finished part 2 in 3m58s and got sussed out
definitely
yeah thats true
you can do every day both parts of all years with ai if you give it 1 sentence of help
u cant tell me this isnt ai
yeah first one is definiletly

THAT PIPE MAZE
i mean if #1 is ai that makes no difference because nobody lost points due to it
insanity
if everyone loses 1 point it makes no difference
i think eric should go the route of https://codingcontest.org
they explicitly allow ai but the problems are designed to break it
so if you dont know what youre doing ai isnt useful
but if you do know how to solve the problem and using ai to write code fast its really good
how do they break the ai tho
aoc texts went insane this year too
eric said he did everything like normal
huh
idk but we spammed gpt 4 last time and got to level 5, theres 8 lvls
#1 did lvl 7
#2 did lvl 6
I really felt like wording was horrible in first days
later it got more normal but at that time problems become harder
it was a simple bfs around an island while touching specific points, but i wasnt very good back then so i didnt know how to do it
this year felt a bit easier in the teens, harder at the start and end
yeah
it reflects quite well
didnt get a single point before day 8, and only got lb once after day 15
I have never got worldwide lb
why is it not normal already
@steady fog do day 26
never
I thought it was already normal
advent of code more like adveeee ๐ญt of code
wrng channel
hi





