#AdVENt of Code
1 messages · Page 14 of 1
yeah I don't do that
I also made that function in yesterdays problem
Easier to conceptualize for me
stealing it was easy
i just have 4 separate functions that walk in the different directions
thats too painful
on the same array
guh no
i just copy pasted the same func and changed the ranges and +1 to -1

was super quick to do
and way easier than actually rotating it
I tried that but I hate 2d vecs
And it wasn't working
So I just started over and rotated
A lot easier to read too
for down and up yes
kinda same but it's fine
yeah lol
yes
JavaScript promise rejection: [object Object]. Open browser console to see more details.
guh i hate seeing 40yos online cause it reminds me that one day I will also be that old @steady fog
I decided to not
do you relate
I know
ven is already too old
you must accept it ven
insane
yop
ven will be obese in 2053
Is it not using sparse index
whats that
UPGRADEE YOUR CAR GOER
mantika storage will be consumed by cargo
@steady fog how do u call a spaniard who has no car
Volkswagen
nop
mantikamobile
is there time command for windows
oracle has linux
I ran on my own pc
THIS IS WINDOWS
manti insane
mantika will install Linux @real hinge @real hinge
YOP
join us
BAD
MYL APTOP
dont have any storage for that
I was using linux from my sd card but it kept breaking
dont have much space in nvme
I didn't mean dual boot 
mantika uses 1980 laptop
https://github.com/uutils/coreutils I was gonna use this
but doesnt have time command
wait I can run exe files from wsl

thats slow
fast imo
71ms in kotlin
considering I recreate array on each rotation
and im not mathing everything im running the last few loops too
so do i
then how
Probably shell builtin
there is no way jvm app is faster than native code
It is if you write your code in a good way
you do
DO
I will close my dms
mantika loves support
@tranquil vapor I heard someone saying they like rust in university
decided to stay away from him
actually rust isnt bad
but rust lovers are usually insane
(tyman not included)
what about rusher
yes
@real hinge you should be president
soon
talk to him and tell him why java is way better than rust
he will understand
@real hinge guh I have neuroscience exam in an hour you will do for me
WHY
dont you study computer science
just die before you grow old
so shrimple
i can do for you :3
(i will draw penis on every question)
wait I can optimise my advent of code solution better
i clone array each time before putting it in hash but instead of clone i could just use hash manually
as in i don't need to clone at all
im not home rn but will test later
inb4 0ms runtime
me randomly getting this idea while waiting for my food
huh
are you insane too
depends
did any of yall use .sortedDescending on each row split by # and then just join the row back on #
How are we measuring sanity
Love
wtf same speed
ig cloning array is fast
I wonder if you can calculate hash somehow faster
maybe instead of reading entire array just use some lines
it should be unique probably
yeah thinking about it it's just cloning 100 arrays of 100 bytes (10kb)
should be really fast
actually maybe llvm detected what im doing and changed it to a single memcpy
@tranquil vapor you
should i do imgui or gtk4
for potential DE
https://github.com/rogchap/v8go javascript de javascript de
nice my dumbass tilted to the west instead of north
how
idk i didnt read
also its not bruteforceable is it
||or we doing loop detection?||
||do||
awesome!
|| idk of any better way to do it, so yes that's what I did ||
hi ven
zeet
hello!!
yea i just stole the last part from you bc im too dumb to do the calculations rn
good enough
hewo
what language
clash royale
based
clash royale based
ive only been using crystal for the last few 😭
hi japanese person
crysta
im not actually japanese💀
i uninstalled it cause it was making me really angry
hi weeaboo then
i don't mind losing
but losing against some terrible fucking player who only won cause all his cards are 2 level higher and then he throws the king laughing emote like he's the real deal gets my blood boiling
its so badly explained
decent game ruined by greedy company being greedy episode 28938292929
i always use the king laughing emote
i have an emote
(i dont play ranked)
it's a good emote but u don't get to emote if you only won cause you're p2w
ven have you tried elixir youd probably likei t
genuinely my deck is level 13/14 and I consistently played against people with max level 15 deck cause im very good at the game so im high
it's like the game punishes you for being good
cause you gotta suffer cbt every game if you're good

<@&1015072428843601962>i.xen do you do advent of code
GUH DISCORD
all im hearing is excuses bestie
@bronze sage
ye
send ur repo

nerdddddd
advent of guh
I'm focusing on competitive programming. s
damn real nerdd
stlaleker
smhymyhead
actually im focusing on nothing
so true,
@native pewter did u do today
she did
@steady fog@steady fog@steady fog
@solemn python its time
yeah it literally gives you the algo
its just funny its called the "HASH" algorithm
this looks terrible
why
night night
guh
i need to rename my files
stupid nim doesnt like the file name
its so dum
mantika moment
Holiday ASCII String Helper Manual Arrangement Procedure, or HASHMAP for short
guhh
me reading part 2:
i think it legitimately took me about 8 minutes to start writing code, idk if it's the fact that i woke up late but this was impossible to understand
im still reading it
ive been
trying to use regex
to change all my filenames
this is hell
i havent even started the aoc
I dont get how we know which box to put
never
@real hinge will do
never
how insane is part 2@real hinge
little bit
The arrays in Nim are like classic C arrays, their size is specified at compile-time
NO
it doesnt seem terrible but I dont one thing
NO.
you will go bald
its a reading comprehension
it's called whitespace
p2 passes test but breaks on input
mantika moment
please give hint to edge case
you love seq
whats that
https://nim-by-example.github.io/seqs/ dynamic length array
oh
it's the ||hash of the label||
but thats too big
misinfo
oh wait
took me legitimately 10 mins to understand why they were ||putting stuff in box 0 when the hash of the first one was 30||
I tried the number
@real hinge im so powerful
no
if you use a scripting language we will deduct some time
any interrepted language loses then
will you have a consistent run platform or just what people report
no i mean just for us
make 
create a docker that will run our code and rank by it
send ur switch case
const [, label, operation, num] = /(\w+)(=|-)(\d*)/.exec(str)!
const box = hash(label)
if (operation === '=')
boxes[box][label] = Number(num)
else
delete boxes[box][label]
send full code ig
||```ts
function hash(str: string): number {
let out = 0
for (const char of str) {
const charCode = char.charCodeAt(0)
out += charCode
out *= 17
out %= 256
}
return out
}
export function partOne(input: string): number {
return _.sum(input.split(',').map(hash))
}
const boxes: Record<string, number>[] = Array.from({ length: 256 }, () => ({}))
function a(str: string) {
const [, label, operation, num] = /(\w+)(=|-)(\d*)/.exec(str)!
const box = hash(label)
if (operation === '=')
boxes[box][label] = Number(num)
else
delete boxes[box][label]
}
function focusingPower(box: Record<string, number>, boxIndex): number {
return Object.values(box).map((v, i) => (boxIndex + 1) * v * (i + 1))
}
export function partTwo(input: string): number {
// ! not 212832
input.split(',').map(a)
// console.log(boxes, .isEmpty)
// console.log(.reject(boxes, _.isEmpty).map(box => Object.values(box)))
return .sum(boxes.map(focusingPower).map(.sum))
}
212832
I figured it out
I got myself timed out by calling myself the R word
and how does that affect your puzzle output
I put my ||boxes in a global variable
const boxes: Record<string, number>[] = Array.from({ length: 256 }, () => ({}))
||
and I didn't reset the value between the test and the real
today is a nice break from whatever the hell the past few days were
its not super hard, just a fun little task to do
I like it
No no, I just called myself dumb for not thinking of what I did as a source of a problem
ur running test and real in the same instance???
you love rust arrays
Average timing: 478.799µs ± 379.391µs
though of course we can't really compare running on diff computers
shrimply run on vps
wonder how fast this runs on my rpi
people submit their code and it runs it
love
your hash function is also same as mine
im scared that mantika will ddos my vps again
some time ago mantika ran smth insane on my vps and it used three billion percent cpu and exploded everything
run it all in docker so someone doesn't do a funny
i forgot what
crypto miner
mantika is rich now
I'm ratelimited by 5mins now so fuck lol
its almost as if the hash function is just 3 math operations and there is only like one way to do it
I was multiplying focal length by lens index and forgor the box index
and I could easily tell it was wrong b/c it failed the example
no I was thinking earlier if there's another way
I got tripped up by assuming the labels would always be 2 characters
they arent??
i just took the substing before = -
my tests pass but my answer is somehow wrong
PASS Test Example #0 > Result: 1320
AoC is an elaborate crypto miner
zz=6,nh-,zdlgcf-,pvgpn=8,gbfl-
he is making bank off of all these solutions
I switched to regex when I realized they varied
I needed to see if the operation was = or -
no good character to split on
I check it, then split
no regex involved
if the last char of the string is a '-', then its a minus operation
otherwise, split by =
yall avoid regex like the plauge when its stupid simple and fast to write
but is it fast to execute
(no)
makes aoc not fun
I used a bit of regex before but that was a more complex string
how
actually
I can easily improve my code now that I think about it
and only iterate over the str once
I have most of regex that I use by heart so its 0 mental effort
regex too easy to write
the fun comes from solving the puzzle not parsing strings so you can solve the puzzle no?
now I can go lazy for another 23 hours
then use regex so you can do it faster?
i havent solved day 4 pt2
regex is slower than split eitherway
if you need to do thausands of checks it becomes problem
(not a case in this problem)
I haven't done d12p2
but bleh I am trying to avoid regex as much as I can
why tho
brought it down 100 microseconds
I only use regex if its really hard to parse
what language
rust
how do you bench btw
I am literally incapabile of getting a time like that

I made my own benchmarking thing inside my project b/c my program spends time fetching inputs and parsing cli stuff so hyperfine wouldn't be accurate
oh
max minus avg is not standard deviation
if the solution is fast enough, the +- is higher than the avg
cargo has bench command from what I seen
if you fetched inputs in a script it would probably be easier
but I still couldnt figure out how to use
cargo bench not stable
it throws errors saying its unsafe 
I know its not standard deviation
I know how stats works
thats just what I named the variable
its max(max_time-avg, avg-min_time)
I should make it std deviation though, good point
but as I said, "its also a really bad benchmarker"
i didn't remake the entirety of hyperfine
but I like my cool auto-fetcher :(
also it lets me overcomplicate things which just adds to the fun of AoC for me
@solemn python how fast is your day 10 p2
I mena its useful but you only need to fetch once 
not everytime you run
I had to add multithreading to mine to make it bearable
what method did you use
Average timing: 83.987228ms ± 79.745833ms
28 seconds
you will react with ❌
you can do that????
primarily counting enclosed pipes
isnt it the average of the difference of all values and the average of all values
yes try it
wha
thats the number it gives after the +-
the std deviation of [1, 1, 1, 1, 1, 1, 1, 1, 1, 100] isnt 89 is it
horror did u brute force day 10
I don't calculate std deviation rn
so probably idk, ill make it use the std deviation formula later
you can do something other than checking if every tile is an odd number of pipes(from the ones that are in the loop) away from wall?
I saw the odd pipes away trick but I didn't want to use it because I never would have thought of it
my solution is flood fill
- Store all of the pipes in the loop
- Set every other tile to
. - Expand the grid by 2, keeping all pipes in the loop connected
- Flood fill starting from (0,0), keeping track of which empty tiles were there before and which were added after expansion
- Subtract the amount of original empty tiles in the beginning with the amount flood filled
- Thats your answer
- i just didn't do pt 2
- i doubt you need to thread that, it should be fast🤔
^ my method
or is this another scripting language sucking at performance moment
wait I just realized a way to optimise my code a tiny bit
doubt it would make much of a difference (in the nanoseconds probably) but some of my logic is pointless
expand by 2 like outward in every dimension?
like how my ruby solution today took 15 seconds and i thought my code was bad but then i rewrote it in crystal and it finished in 0.2ms
DO NOW
I don't write any compiled languages
learn one it's worth it :3
wait crystal is compiled?
almost identical
ok so I should just do AOC 2024 in crystal
u can rename .rb to .cr and change a few lines and it runs
yes
crystal has comparable performance to rust
I dont even write much js in my day job anymore
mainly ruby
basically I actually used some logic to connect the pipes correctly when the flood fill doesn't even care what type the pipe is, as long as it isn't a . it will see it as a wall
like check the diff in the readme, that's all i had to change to port my solution from ruby to crystal (actually the diff is the reverse)
https://codeberg.org/Ven/AdventOfCode/src/branch/main/2023/day14
it is nice to visualize if I want to do that in the future tho I guess
wait nvm im dumb
I can't do that
ignore me
removed type annotations?
compiled language without required typing aintnoway
whats chomping do
chomp
chomp
huh
ruby NOT insane
/run ```rb
print File.readlines "file0.code"
puts
print File.readlines "file0.code", :chomp => true
Here is your rb(3.0.1) output @tranquil vapor
["print File.readlines \"file0.code\"\n", "puts\n", "print File.readlines \"file0.code\", :chomp => true\n"]
["print File.readlines \"file0.code\"", "puts", "print File.readlines \"file0.code\", :chomp => true"]```
just doesn't include the newlines
crystal has chomp enabled by default (good imo)
who tf wants newlines at the end of each line when they use .readlines
or java
ruby good
is there like
Crystal on Rails?
ror fans when i rail thei
@warped dust @warped dust @warped dust @warped dust
it also chomped the parentheses apparently
make
parentheses-less programming looks so funny to me
parentheses are optional in ruby
I am not deticated enough to do that
it's even funnier when u chain function calls
/run ```rb
puts "i am crazy".upcase.split.reverse.join
Here is your rb(3.0.1) output @tranquil vapor
CRAZYAMI
and also part of the reason I hate converting build.gradle to build.gradle.kts
upcase
yus
ven loves groovy
Seems like amber is the closest thing to Rails
crystal ecosystem is kinda small
sadly
the language isn't very popular for some reason foreign to me
so many people love ruby and crystal takes ruby and makes it super fast
so crystal was destined to blow up, yet didn't?
I doubt amber has a hotwire/turbo equivalent, so I don't think it would be viable for me to switch for any of my rails projects
yeah likely not
it's also not as battle tested
crystal is awesome but idk if using it in production is the best idea
id personally just use it for hobby projects and it seems amazing for clis (even prod clis)
Big companys rely on and contribute to the RoR ecosystem, so it will always be good
that being said, even shopify cant make a functional linter for it that doesn't crash every 10 minutes in a production scale project
and there is no way to lint .html.erb for indentation and ruby style at the same time
many complaints
Average timing: 374.616µs ± 164.242µs
there
standard deviation now
is everyone happy
better than writing backend in JS, which is the only other option my job will listen to
(d15p2)
YEAHH I NOTICED THAT
the ruby lsp is pretty shit
even though ruby is popular
its way better than it was before shopify came along
crystal lsp is even worse than ruby but that's understandable cause it's literally just made by people in their freetime
but ruby?? huhh??
anyyywayy yeah definitely give crystal a shot!! it's basically just ruby (with small changes like removal of for statement, required explicit typing for arrays, map, set, etc declarations, some minor naming differences, and ofc a different ecosystem) but blazingly fast
betterruby
crystal is duck typed so you hardly ever actually need to specify types which is kinda insane
rubettery
you only need to type containers / data structures which is understandable cause of memory management reasons
what's duck typed
if it quacks it's a duck
okay
does crystal have a good gems for
- making easy CLIs like https://www.npmjs.com/package/prompts
- hot reloading (or is that not really a thing in compiled langs)
Wikipedia
hot reloading is generally not a thing in compiled languages
but it depends what u mean by hot reloading
type, look at terminal, see output and test result
oh u can easily have that
require "option_parser"
OptionParser.parse do |parser|
parser.banner = "Welcome to The Beatles App!"
parser.on "-v", "--version", "Show version" do
puts "version 1.0"
exit
end
parser.on "-h", "--help", "Show help" do
puts parser
exit
end
end
this looks pretty cool
I mean cargo watch exists
part of stdlib
Which isn't hot reloading but any watcher thing will work
The Beatles App
I would use
@tranquil vapor should DE have precompiled core, or require core + whatever the user adds
I wanted to do some AP stuff but then realized how complex it all is
Maybe at some point
AoC is taking up my motivation for the month
I mean like this type of cli
why does sharex record audio of twitch, rude
most likely
answer
puts and gets
totk
yop
It takes me like 3 days to make my repo so I will wait to do crystal either
- this February and I will do like 2015
- next year
I will use js for UI and have it launch crystal
I wanna make kotlin lib for https://upower.freedesktop.org/
I made the most boring repo ever for the first few days and have slowly been improving it between days
At some point before the end I'll probably have hot-reloading or at the very least a nice file watching setup
I found a hot-reloading crate a bit ago
https://bruijn.marvinborner.de/ @sullen fiber
Functional programming language based on pure De Bruijn indexed lambda calculus.
Hint: Click on anything you don't understand.
I clicked on De Bruijn indexed lambda calculus and it did nothing
crystal is like half dead
really unfortunate
vencord will revive crystal
it is used in production by a lot of companies
anyway rewrote my git history to scrub off input.txts
martenframework is also rails like, if you want something hanami like (haven't heard this name in long) there's lucky
woaa
@tranquil vapor aoc
today is easy
I bet tomorrow will be terrible
16th day is always bad
ur bad
i mean last year 15 was bad too
so who knoes
and honestly id love a dfs
nerd!
I wonder what happened on 2015 day 19
4 hours
that sounds insane
2018 day 15 too
and this years problems were comparably way easier
which is scary
i think it might just be that advent of code was not very popular back then?
@real hinge ghost ping 
what about 2018 15
2.5 hours 
caught in 420p
which one is ghost
one of it is this
other one is thi
discorc moment
The rest of the times are pretty short though
Looks like 8881 people did p2 that day
2146 did p1 only
^ which is most definitely an outlier
ahahah
I wasnt really expect this to be a thing
guh wth is this
is discord going to make regional pricing worse like steam
@vapid ice
mantika
dzirwa
oh lmao
steam recently switched to LATAM USD which was their own currency
horror
so I thought we were going down on discord too
||make a list of lists||
||yea it's just that I'll have to do the replace logic||
Maybe it's easy let me see
I was gonna do list of lists
but unless its static array it would break all the indexes
so i did hashmap
also I think hashmap isnt slower if you use integers
since it probably doesnt hash it
Actually
||I could just index all the labels first and then treat box slots as a matrix||
or you could NOT iuia
nah
wait fuck iforgot i have to keep track of slots
day ruined
wait
||simply will keep another matrix of update times||
nvm list of lists easier
a WHAT
yea actually i lied list of lists isnt easier
||top is last-updated and bottom is lens values||
for the example
||its not that hard to turn the top matrix into slot numbers: ⊙≡(⍜▽(+1⍏) ≠0.) ⊃(∘|×≠0)||
i found an easier way
to do wat
Ө=Жلل إِلَٰهَ إِلَّا ٱللَّٰهُ
cyrillic what
that wont work
i mean it probably could
guhh been debugging this cus it works on example but not input crying crying crying
I noticed you can HashMap::with_hasher() from autocomplete earlier, I wonder if you set the hasher equal to the HASH algorithm if that would work
Probably wouldn't be faster in any way, bit it would be a cool way to do it
lmao best analogy
maybe today isnt uiuable
OKAY ADVENTUS OF CODUS TIME @real hinge
doooo
Nahhh today super Uiuable
I'm just not goated
wwyd jf i uiuad u
not goated with the uiua sauce :c
I WILL FUCKING COME TO YOUR HOUSE
today uiuable
AND MAKE YOU SHUT UP ABOUT UIUA FOREEEEVER
It's too late
come to my house :3
I even got people in Uiua discord saying Uiuable
we can make out to crystal code
U can't stop it now
Oh this lang is super indev
But not active
Rip
Could have been so good
i just uiud your mom @sullen fiber
SOOOOON
ven cant figure out how to make the hash function
guh i havent looked yet
if it doesnt produce duplicates it would work probabyl
HashMap::with_mantika()
actually it should work if there is dupes
I still havent figured out how to debug rust
I just use prints 
I think I needed c++ debugger extension or smthn but it didnt work
STOP USIN RUST
wee-wuh
I will after aoc
tbh I am not gonna lie
rust really has lots of cool stuff while being fast
crystal way cooler 
but getting used to stupid borrow stuff was horror
maybe
gleam is also fun
rust literally has any function you would need
did a gleam run today
rust fans when i borrow their girlfriend as mutable
and unwrap
TRUE
cant mutuably borrow more than once at a time
I tried gleam but i can't do it on a single file
rust fans when their girlfriends are not Ok
dumbas
skill issue
gn
night night
STOP
YOU ARE ADDICTED
guhh advent of code tryhards will die
Nop
I just want to see how much I can go until I fed up
I always wake up in 7:20-8 AM
Aoc just fits exactly into the time I wake up
imagine waking up and immediately thinking CODEEE CODEEE
when i wake up i am sooo lazy
today honestly not uiuable scroll up
I usually eat coco pops first
cannot borrow null
@real hinge wake up and assist me with advent of code
i need ur help
so hard today
OH MY GOD
PART 2 IS READING COMPREHENSION
i feel like im in math class again
oh god theyre just describing a hashmap
# what i had
boxes = StaticArray(Box, 256).new([]) # INSANE IT USES THE SAME ARRAY FOR EACH BOX
# the fix
boxes = StaticArray(Box, 256).new { [] }
yep.
read the docs first next time 
today was so easy i solved it in 33 lines of code
anyway part 2 is literally exactly how hashmaps work
they just use an array and calculate index in the array with a hash function
then to set / access keys it calculates the index, then checks each item at that index to see if it's the correct key
so literally the same concept as today's part 2

@sullen fiber PAAART TWOOO
SOOO UIUABLE
is the boxes/crates just an array
do u want me to sum up the text
yes
not really a spoiler, just part 2 exercise summarised:
||
you have an array of 256 boxes. each box is also an array
the steps are in the form LABEL- or LABEL=LOAD_FACTOR
you calculate the box index (boxes[i]) by running the hash func on the label, so box = boxes[hash(label)]
if the step has =load_factor you need to store the label and the load_factor in the corresponding box. if the same label already is in that box, replace the old one in place (same index)
if the step ends with - you just remove the corresponding box with that label
||
this part confused me so much but its irrelevant info just ignore it
boxe
Ya it's easy
I just have a bug and I was only at the library for a little bit
@steady fog did u solve
havent started
You can't do null pointers in rust
I do this but without aoc
uiuable
guhh hashmap uses both Hash and Eq for some reason so I can't base it completely off of Hash or something
(it isnt working)
(and im not making a Label struct just to implement Eq to make this work)
why would u even make a hash
this is really trivial with || Array<Array<Tuple<String, Int32>>>[256] ||
I was trying to be funny and make hashmap use a custom hasher (the hasher being the HASH algo)
wtf is that syntax
mmm id like an Array<T>[256]
lol not using a hashmap and instead using a const-sized array shaved off 100µs
crazy
uhhh
i just added the [] to indicate the fixed length (which makes it easier)
@tranquil vapor loves
rust so funny sometimes
if you do [Vec::new(); 256] it yells at you b/c of cloning or something
if I use nightly features I can do this 
normal
I can also move the generics to make it even more funny
there are so many cool unstable features they should just stabilize
can't be that hard right 
tyminky
what
you mean if let Some(thing) = thing { /* do stuff */ }?
but in match guards
today I learned match guards exist
idk, never seen it I guess
probably will use that a bunch tho
but anyways I was talking about try blocks and if let chaining mostly, those are the two that keep popping up for me
fuck it. im doing fortran
oh it doesnt seem bad
it seems easy
@tranquil vapor make pip not suck when
yeah part 1 seems really easy
probably part 2 will be some insane anti brute force again
part2 is probably husk
part 2 will be send 3 billion lights at once
and only energise fields where lights cross at 12:37 o clock
i should fix my schedule again and wake up at 6am like you
venny
fortran compiles so fast
wtf
@tranquil vapor
this isnt too bad
its so much easier than cobol
hm do I do loops (good) or recursion (evil)
loop
ok
this is also a text block but its a very comprehendable one
also this is kinda just pipes v2
lol
ok now do I use structs (good) or tuples (evil)
struct
👍
hmm my code is running forever
today was fun
i did recursion
see this is why
if you have bad recursion you will get stack overflow
if you have bad loop it will just run forever and you'll wonder if you need to optimize or if you're missing an exit condition
(/hj)
me using tuples for everything
my ass is not making a struct

WHAT IS THAT
me
zt finally learned how to take a selfie
yop
I created a glorious system
@warped dust are u proud of my match guards
i am so glad i did direction with ||vectors||
||```ts
if (point.v === '/') {
[dirX, dirY] = [dirY * -1, dirX * -1];
}
if (point.v === '\') {
[dirX, dirY] = [dirY, dirX];
}
the ONLY thing ||high school linear algebra|| has been good for
advent of parsing
I ran my solution and KDE froze
hm what language do I do today, crystal or rust
Help
LOL
Hop on ||[string, int32][][256]||
Also this is kinda what I used
ok crystalist time
oops
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
mantika moment
stay safe vaporizer
minky is so loud
I caused a severe case of memory leaking

I shouldnt be allowed to code in rust
I wrote worlds shittiest code
(it doesnt even work)
this is a normal amount of items to have in a vec right
totally
why wouldn't it
oh there it goes
but its kinda broken
it doesnt like the /
yay ifixed
program aoc
Use, intrinsic :: iso_fortran_env, Only : iostat_end
implicit none
integer :: io, iostat
character(256) :: line
open(newunit=io, file="./input/day-16.txt", status="old", action="read")
do while(.true.)
read(io, "(A)", iostat=iostat) line
select case(iostat)
case(0)
print "(A)", trim(line)
case(iostat_end)
exit
case default
write(*, *) 'Error in reading file'
stop
end select
end do
close(io)
end program aoc
``` @real hinge boo
love
5 extra places it shouldn't be

what
I printed the output grid and its the same as the example output grid
okay lets think simple
its a simple task
it should've worked
then why does it not work
on part2?
Average timing: 4.597045708s ± 197.73533ms
my thoughts on today
the 3 brands of AoC part 2s:
- An actual unique and interesting spin on the first part (extremely rare)
- "Do the last thing but more so you have to be smart about it"
- "Do the last thing but more so you have to be smart about it" but you don't have to be smart about it with any fastish language
rate new benchmark output
me when map is correct but its giving wrong result 🥹
I dedup the visited locations
insane
GUH FOR DEDUP TO WORK ARRAY HAS TO BE SORTED
INSANE
love


