#advent of code 2025
1 messages · Page 1 of 1 (latest)
real
i forgot i still cant talk in programmning
You went to day 6 ?
im like very busy tomorrow i probably wont do it as soon as it comes out
I didn't commit more than day 1 💀
https://github.com/Julienraptor01/Advent-of-Code/tree/main/2024
thx
01.js: Lines 43-47
/**
* @param {number[]} leftList
* @param {number[]} rightList
* @returns {number}
*/
typescript is this way —> 
i think i want to do it in ocaml this year
I'm just gonna do golf python again, if I have time
Frick typescript
I did code it in pure browser javascript
I'll probably start on wednesday since I'm in poland
im doing kotlin but no java stdlib
AI ✨ of code
i forgot about AOC
i’ll do a language a day but only good languages
@native maple for a day i should do it in Apple Shortcuts for the laugh
@fallen lily
@terse edge @native maple @frigid socket c++ or c#
not sure which lang i want to use yet
use the one you're less familiar with
cs
i've never even compiled c# before 
read docs
advent of code 2025
anyone made a leaderboard yet
leaderboards carry over
@native maple iM gonna use kotlin
I spent all my time working on actual projects that arent icy or a rust aoc framework
are u doing random language or
@native maple
nah
just kotlin
Maybe i will solve it in random lang after kotlin
but prob not
i see
ro ie is doing it later
@native maple
i have c in my list i hope i wont get it 
lol
advent of faint
T-1:00
Meow
oh its wrong
WHAT
Gleam doesn't have loops
Isn't gleam a functional Language
it seems so but idk why i always thought it wasn’t
Dotnet is taking 5000 years to download and cmake invokes fear in me
I will keep with my kotlin
I have a years worth of util classes already
Even though im not doing this year, i hope 2/3 of the days wont be grid-based
now i wait 5 mins
How would you tell the difference between 2l long literal and 2l identifier
5 mins COOLDOWN AGAIN
AAAA
its so over
i think I know what the issue was
and its really stupid
and not my fault
totally
If this is gonna be wrong im gonna crash out
noT enough
i thought this means ||"be careful not to count the 0 multiple times when rotation > 100"||
ok good to kown part 2 took everyone 40 minutes
i’ve been trying to solve it in gleam for the last hour why is ts so hard 😭
what if i just do it in python and then rewrite in gleam 
normal functional lang
i just didn’t expect gleam to be functional language idk why
i did it in python and it works with the example but not with the actual numbers 💔
look at my spoiler
got p1 in seconds and took forever on p2
is it for first puzzle?
thats p2
oh okay
i solved it yay
turns out for some reason the text i pasted was trimmed out 😭😭😭
done in elle
||```rs
use std/prelude;
fn solve(string[] lines, bool p2) {
pos := 50;
hits := 0;
for line in lines {
if line.is_empty() { continue; }
way := line[0];
step := i32::parse(line += #cast(string, 1));
for _ in 0..(p2 ? step : 1) {
pos = (pos + (way == 'L' ? -1 : 1) * (p2 ? 1 : step)) % 100;
if pos == 0 {
hits += 1;
}
}
}
return hits;
}
fn main(string[] args) {
lines := io::read_to_string(args[1]).split("\n");
$dbg(solve(lines, false));
$dbg(solve(lines, true));
}
@terse edge whats ur solution
what's the empty line detection for
my ide automatically inserts a newline at the end of the file when i save any file (if there isnt one already) and i cant turn that off
guh
oh it still works without the check
curious
i lied
i can turn it off
awesome
yeah code style consistency
@terse edge is that the vercel logo 😭
I BEAT EAGELY IN DELTA TIME
why can discordrn syntax highlight elle
i set it to rust syntax highlighting
not original sol
i did +/- diff for p1, tried that for p2, realized i misunderstood the task and dId the +1 loop
yes its a nextjs app that I vibecoded
havent changed the favicon
pretty good
doing it in elle is surprisingly easy lol
its a modulo correcting for negative numbers
feels just like python just a little more ass to work with strings
no shit you spent 30000 hours making an awesome lang
@native maple aoc will unlock at 10 for me
after dec 7
-# 
wtf
it unlocks at 5am for me still
surely this cant have taken you 40 mins
I vibecoded p1 and the ai failed to do p2
,
probably if i read the entire text i would realize what was asked
will do that tomorrow
probably if you dont vibecode it you can get a decent time lol
i was joking
so was i smh
but tbh thats like average
Ban Eageler
p2 took a while for a lot of ppl
Watching out for bilboofan
i did both parts in like 20 mins i think?
yeah because im working in elle
i read count every 0 pass and assumed it meant "count all the rotations that will cause at least one 0 pass"
there could totally be a random thing that completely throws me off and it just doesnt work or it takes 5 years to solve or segfaults or all of the above
so i have no reason to go fast
lmao horror
is it just me that cant login with gh
to AOC
failed to authenticate. (access_token request returned 429 Too Many Requests)
worked fine for me
going well so far
try again now
Rust
Rust
Rust
this is not your house
WHEN THE INSTALL IS IMMUTABLE
what are you trying to saY with this
i might do rust on a later day
I'll probably use higher level langauges as the challenges get harder
rn I'm trying to open a file in assembly
I've never done it before 😭
maybe I should've made it easier by embedding the text in the binary
the hardest thing i found about assembly is debugging it
maybe i should use a debugger ui instead of gdb
license Elle under oql @native maple
what is oql
shitty license
opinionated queer licence
listening
@brazen salmon
are you allowed to use mit licensed dependencies if you use a license like this
i would love to use something like this https://anticapitalist.software/
or this
yeah that seems right
eagely ban eta wen
bun0 ban eta when
theyre the same thing
1. The above copyright notice and this permission notice shall be included in all copies or modified versions of the Software.
2. The User is one of the following:
a. An individual person, laboring for themselves
b. A non-profit organization
c. An educational institution
d. An organization that seeks shared profit for all of its members, and allows non-members to set the cost of their labor
3. If the User is an organization with owners, then all owners are workers and all workers are owners with equal equity and/or equal vote.
4. If the User is an organization, then the User is not law enforcement or military, or working for or under either.
@native maple use this
that's just MIT lmao
oh i see
and whatever other evil companies
that's awesome
im gonna use this
ok but companies can still get around that
how
microsoft can open a non profit organization funded by microsoft and use this in their code
https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en this is cool too but it doesnt limit military use
theres prob a better worded license that avoids that
true
and if they have to gO thruogh the effort of opening a non profit just to use my software thats already enough damage done
i don't think the millitary is gonna use your bad code
LMAOO
the software shall be used for Good, not Evil. the original author of the software retains the sole and exclusive right to determine which uses are Good and which uses are Evil.
ik, but they might use rosies
true...
Did vee tell ou to harass me
@native maple what does this mean Users of this work are obligated to freely provide public access to AI scripts written to be used by this work.
solution
"any of their subsidiaries"
This license is granted to everyone except for YOU, PHIL (bullied me at school)!!
part 2 might be easy tbh
That's not the right answer; your answer is too high. If you're stuck, make sure you're using the full input data; there are also some general tips on the about page, or you can ask for hints on the subreddit. Please wait one minute before trying again. [Return to Day 1]
read the entire task and read it carefully
i wasted 40 mins on it
cause I misunderstood
||what if you go over it multiple times in 1 iteration||
yeah i figured that out
i think i found issue
this shouldn't happen (it started at 0)
finally works
That's not the right answer. If you're stuck, make sure you're using the full input data; there are also some general tips on the about page, or you can ask for hints on the subreddit. Because you have guessed incorrectly 4 times on this puzzle, please wait 5 minutes before trying again. [Return to Day 1]
kill yourself
everyone has a different input
awesome
I MANAGED TO READ THE FIRST CHARACTER
WOOOOOOO
i am reviewing logs
@terse edge i am AI generating examples and it works
but not on my real input
im gonna kms
what happens when you go R19423
L30
R48
L5
R60
L55
L1
L99
R14
L82
R19423
||pt1 3, pt2 200||
maybe spoiler it?
its not readable enough to immediately tell someone what the solution is
and its the harder but faster approach
true
I should set my alarm so I can do aoc before work
Won't be able to do it until pretty late tonight
@native maple why do u have srcht mirror
Why is there only 12 days this year
It takes a ton of my free time every year to run Advent of Code, and building the puzzles accounts for the majority of that time. After keeping a consistent schedule for ten years(!), I needed a change. The puzzles still start on December 1st so that the day numbers make sense (Day 1 = Dec 1), and puzzles come out every day (ending mid-December).
Ohhh makes sense
Understandable and all but does he not get full time job money from aoc
that's just donations...?
(p1 spoilers) functional programming is kinda fun but i feel like im doing it so unidiomatic
why not
i think this is ok
p2 is where it gets more funny
look at his sponsors list dude
sony, spotify, jane street
all sorts of companies sponsor this
yeah i’m still not done with p2
I just finished it
||```js
@Initialize {
let file = ObjFile_Create(OBJ_FILE_TEXT);
let res = ObjFile_Open(file, GetCurrentScriptDirectory() ~ "./inputs/1.txt");
if (res == false) {
RaiseError("failed to open the file");
}
let rotation = 50;
let zeros = 0;
let lc = ObjFileT_GetLineCount(file);
ascent (line_idx in 1..lc) {
let line = ObjFileT_GetLineText(file, line_idx);
if (line[0] == 'L') {
rotation += atoi(erase(line, 0));
zeros += floor(rotation / 100 + 0.0001);
} else if (line[0] == 'R') {
if (rotation == 0) {
zeros--;
}
rotation -= atoi(erase(line, 0));
zeros += floor((100-rotation) / 100 + 0.0001);
}
rotation += 1000;
rotation %= 100;
}
RaiseError(zeros);
}
i hate how it's actually feasible with danmakufu
tho still prefer scratch
i like how there is a different "for loop" for ascending and descending ranges
what language is this
oh my god yesss
danmakufu
it has some caveats, for me part 2 took a bit
bruuuuuuuh
it's not particularly hard to grasp the concepts
i don't really do asm much, I just learnt a little bit
btw do you link with libc or no?
no
mad respect
😭 i'm just doing this because i thought it would be fun
dw i bet it'll get easier for the next days for you
calling C functions from asm would be a challenge of its own lol
cuz you'll have your number parsers and printers and shit by then
I did find out a bit about that
it'd also defeat the whole purpose
well good luck
thank you
i'll need it
tbh i think i will switch to c if it gets too hard
or maybe some more interesting high level langauges
this is kinda bad but as long as it works yk https://github.com/ficcialfaint/advent-of-code/blob/master/2025/01/src/one.gleam
alright it's time to spin the wheel for tomorrow
what the hell is coffeescript doing thhere

you have basically three different versions of js on there 
i mean coffeescript is kinda a different language no?
anyways i hope dart isn't horrible
all i know about dart is flutter
sure why the fuck not
also if you went with objective c have fun writing it on a non apple platform 
(unless you are an apple user 👎👎)
i guess maybe it's usable with openstep
or something
i never worked that out
apparently its quite hard?
idk i didnt find it hard and my solution is like 10 lines
ok i lied its like 30
ocaml
||```
let emod a b =
let r = a mod b in
if r < 0 then r + abs b else r
in
let times = ref 0 in
let dial =
String.split_on_char '\n' input
|> List.map (fun line ->
let line = String.trim line in
(line.[0], String.sub line 1 (String.length line - 1) |> int_of_string))
|> List.fold_left
(fun acc (char, count) ->
let new_acc =
match char with
| 'L' ->
times :=
!times
+
if acc = 0 then count / 100
else if count >= acc then ((count - acc) / 100) + 1
else 0;
emod (acc - count) 100
| 'R' ->
times := !times + ((acc + count) / 100);
emod (acc + count) 100
| _ -> assert false
in
new_acc)
50
in
@feral valve @terse edge global variables
cool
can’t you talk in #🪅-progaming
not advent of code related
NO
like while loop dial += 1 or something?
wdym brute force you get rate limited every submit
why are these all real languages?
add uiua, lean, idris
yes
reasonable runtime?
yeah, 0.003315seconds
i only added ones that are either well known and have lots of documentation or something i wanted to try before
the compiler probably optimised it to a math solution lol
well then let me talk in programming please
no
what did you get silenced for lol
you ever tried a lisp? they’re really cool
the syntax is scaring me and i think the tooling won’t be so good
case in point: yapping about elle in this thread
its.. not like i have anywhere else to talk about it?
im sorry but i didnt create this problem i just want to talk about elle
your own server, dms, etc
is it strictly prohibited to talk about it here
i barely send like 100 messages a month about it anyway im too busy to work on it as much as i used to
it always feels like my presence here is directly against you and i dont get why i cant just live in peace
is what im doing that much of a threat or annoyance to the server lol
to be clear people are allowed to talk about their personal projects in that channel... right?
yes if it's not all they ever talk about
rosie has always treated programming like it's her personal blog/talk channel and that is just annoying
anyway let's keep this channel advent of code related
Time to do AOC day 1 
horror font
this is mildy cursed ngl
What cursed language is that
ocaml with a preprocessor
Cursed
I'm doing kotlin this year because cmake scares me, but I want to do c++ as well
Hopefully my grid class will be helpful this year
Maybe I'll throw rust on top of that 
meson is pretty nice
also makefile is easy for simple things
(with no deps)
Yeah, I have some makefile + flake projects
But the issue comes with the fact that I do most of my dev on my windows laptop and Linux desktop 50/50
I can run makefiles on windows
just raw dog clang++
But then the deps become an issue
That's pretty much what a makefile does
just running compilers directly is easy though too yeah
they link for you
so convinient
I even have a script to generate compile commands.json from a makefile on winfows 
instead of using proper cmake presets i have a script to run cmake -B build with the correct args
unrelated but i just remembered 
🐻
Yeah
I use that on linux
It doesn't support windows
Compile with -Mj then run this 
$ErrorActionPreference = "Stop"
[System.IO.FileInfo[]] $paths = Get-ChildItem -Path dist -Filter *.json -Name -Recurse -ErrorAction SilentlyContinue
if ($paths.Length -eq 0) {
Write-Error "No compile_commands.json files found in dist directory."
exit 1
}
$paths = $paths | ForEach-Object { "dist/$_" }
"[$(Get-Content $paths)]" -replace '.{2}$', ']' > .\compile_commands.json
Cursed but works
Good
It's cursed
Fun fact! You can't pipe binary data
Powershell hard wraps text in pipes at 80 characters
(the issue on their repo says this is fixed but it still didn't work for me)
seems nice how it can have types? then again what if you doing with your shell scripts
tbf i don't really use plain shell scripts often
You need the types so it doesn't cooerce into a string
Also the lsp is pretty good
i would probably just write a script and run it with node
i wish Ocaml had a print anything function
can't you printf "%a" foo.pp
using languages like C where you can't just print anything made me realise how good we have it in languages that do
rate this solution
||```sh
sed -e 's/(.)(.)/\1 \2 lEx/' input_1.txt | tr LR '01' | dc -e '[s_l_%s%l%l%[l_+]s0>]sR0sZ50sP[s@s&l&2_1+l@*lP+100lRxsPlP0[lZ1+sZ]s"="lZpsZ]sE[?lXx]sXlXx'
oh my god
ok
ill do it
i havent checked the problem yet but what i hate about doing aoc in uiua is that parsing is soooooooooooooooooooooooooo bad
I love printf
erm you don’t need to spoiler it 
Order of magnitude of the answer is technically a spoiler, though a very tiny one
but the puzzle inputs are different for everyone anyways so what’s the point
But the order of magnitude is usually the same
part 1 is so easy but i cant parse a goddamn thing 😭
kill me
i hate p2 because i'm stupid and also i'm doing it in javascript which does those kind of things
i think my first one is sane, but i don't even want to see my second solution anymore
you will use 
spoiler it
the browser can't run ts
I'm on 120 bytes, but don't have time to optimize it
i’m pretty sure it’s previewed on desktop
just the link to the input
isn’t it?
is it annoying to anyone else or just you
rosies elle blog is the direct cause of multiple people starting their own compilers and learning abuot it
good framework language jumpscare
why would you need lsp for assembly tho
almost all istructions are like 3-4 letters long anyway
vouch
tho i should get back to it at some point
when in doubt just add an epsilon
Omg this is cursed
I swear i'm just gonna do it in assembly
At least i'll have sane integer division
Use bigint
i have spent like hours on part 1
assembly was the other option i was considering
C'mon
but danmakufu is funnier and requires less mental toll
do it in roblox studio
that's just lua with extra steps
uiua comeback
i think there are also extra features? but i think there's an open source lua fork / implementation which has the extra features they use anyway
im so rusty
i wish there was a luau to lua compiler
@lusty atlas CBT ||```
P ← ⨬¯∘ =@R ⊙⋕ °⊂ # parse number
S ← ⬚50 (◿100+) # spin the dial
C ← ⊢ °⊚ # count zeroes
C S&rlP &fo "day01/input.txt"
@terse edge @terse edge bqn soon
Wot
I have spent minutes on part 1 if not seconds
But on part 2 my most naïve solution had a flaw then i overcomplicated it then i did some shit then i did cursed stuff and then i gave up, did go to reddit and literally saw the solution i wanted to do but written in some cursed ass way that was unreadable and noticed that for debugging i was working on a slice of 150 of the inputs and that's why values where crazy so i closed reddit, refixed my whole thing like i wanted to do it and then it worked, but i won't send it here until it's written in a way where there isn't thousands of if for special casing
Because i literally went the if spam way to basically represent all code paths instead of like actual nice logic
too lazy to do any other lan
lang
was gonna do esoterics but meh
i am doing it in asm
I was trying to warn you
Want to do it in esoteric, better, do it in javascript :3
just use a bigint
my most naïve solution had a flaw then i overcomplicated it then i did some shit then i did cursed stuff
that's just 50% of programming, the other 50% is just googling stuff
want help?
-# tf is a big int ? /j
It's compatible with Number stuff right ?
uh.. not really
Nah having help is fine
Yoinking someone else's logic isn't imo
well, you can just convert any number to a bigint
and back
and you can also parse a bigint from a string
and bigint constants just have n added to the end
Number begone then, welcome BigInts
Floats are a mistake, fixed point is more precise
js is strange the Number constructor returns NaN if invalid, BigInt constructor throws a SyntaxError
nah ok ig it does make sense, apart from the fact Number should probably just throw an exception too
yeah i realise but it doesn't feel like great design
though it certainly is javascripty design
Floats are a good deal older than js
like how out of bounds indexing returns undefined (idk of any other language that does this apart from lua
)
javascript likes to make errors silent but deadly
though it is convinient sometimes

Errors as values as a service
in java for example there's NumberFormatException which feels saner
like what if you want to support writing NaN and be able to distinguish things which are actually invalid
js
of course the solution to all problems is discriminated unions
that would be even better than exceptions
i have an idea
how did i even do this
oh
put some debugging code in the wrong function, now it prints every number as a char
ok, if i add my debugging code to the right place it stops the infinite loop
maybe i should keep the debugging code then
(it actually makes the program exit too early)
reminds me
imma do an nvim config for kotlin
but not today
i cant use my computer
i dont want to use intellij tho
neither do i
is the nvim java lsp good
but i can't get anything better without losing feature i rely on
when i manage to set it up, i have enjoyed jdtls
be warned
it is a pain in the fucking ass to setup
what i ran MasonInstall once and it was good
i have everything configured with nix except for nvim lol
intellij should add a feature that requires semicolons in kotlin
i hate semicolons
i dont 🥰
does nothing but make writing code annoying
yeah i'm removing semicolons
switch to helix
greatest decision of my life
i got here by bashing my head against the debugger until it made sense
also i think you forgot you're using kotlin
why?
you could change that if chain to a when statement
oh
i only ever think of when as switch
like that?
oh wait
i think i can simplify even more
if you look at my solution you can simplify quite a lot
||```kt
part2 {
var current = 50
var count = 0
turns.forEach { turn ->
val prev = current
count += abs(turn) / DialNums
current += turn % DialNums
if (prev != 0 && current !in 1..<DialNums) count++
current = (current + DialNums) % DialNums
}
count
}
i think i'm going to keep it here
oh wow the decorators look really nice, how does it work
it's mostly the same as yours except for me not ||modding current by DialNums||
very cursed
DialNums is just 100
yes
i just put it in a constant
in normal languages we call them annotations
js/ts/python use decorators
jvm uses annotations
i said normal languages
I've used both for years im allowed to make fun of them
i like the annotations i made, but my favorite part is being able to use a generic for the type of input i get
you can find the cursed code for @UseFile here
https://github.com/sadan4/AdventOfCode-kotlin/blob/main/src/main/kotlin/Solution.kt#L21-L32
Solution.kt: Lines 21-32
private fun <T> generateInput(fn: KFunction<*>): T {
val fileName = (fn.findAnnotation<UseFile>() ?: UseFile("input.txt")).fileName
val f = File("src/main/kotlin/solutions/y$year/d$day/$fileName")
val ret: Any = when (fn.parameters[1].type.jvmErasure) {
File::class -> f
String::class -> f.readText()
List::class -> makeLines(f.readText())
else -> throw RuntimeException("Unsupported type: ${fn.parameters[0].type.jvmErasure}")
}
@Suppress("UNCHECKED_CAST")
return ret as T
}
Solution.kt: Lines 43-63
val time = measureNanoTime {
try {
ret = fn.call(this, args)
try {
val expected = fn.findAnnotation<Solved>()?.answer;
if (expected != null) {
if (ret?.toString() != expected) {
didPart1Fail = "Expected $expected, but got ${ret?.toString()}";
} else {
didPart1Fail = "OK"
}
}
} catch (e: Throwable) {
ret = "Error checking part 1:\n${e.stackTraceToString()}"
didPart1Fail = "ERR";
}
} catch (e: Throwable) {
ret = "Error running part 1:\n${e.stackTraceToString()}"
code++;
}
}
wait
the class doesn't need to be generic
i get they type from the function
guhhhh
oh wait it does
because the methods are inherited
it's actually really easy to get into the habit of adding them
and then accidentally add them when writing python/go/kotlin, but oh well
That's pretty much where I am at lol
protip use semicolons in asm to do multiple things in the same line
mov rax, SYS_WRITE; mov rdi, STDOUT
(do not view this with syntax highlighting
Don't worry, discord mobile has my back on that (no syntax highlighter at all)
@vague knoll what language are you using this year?
there's none for me on desktop either
i already said quite a lot of times and people pobably think i'm boasting but assmebly
it's not a good idea
getting late and i still haven't finished part 1
If you are using vencord and have shiki enabled it loves to break all the time for some reason
the problem is its just really easy to make mistakes which are really hard to debug
Is there no dwarf debugging for assembly
my parser suddenly gives up in the middle of the file and idk why
Tbh why not just use c with no libs or smth
crazy how something as simple as
||kt part1 { var current = 50 turns.count { turn -> current += turn current % DialNums == 0 } }||
is still so much assembly
Would seem like the same level of challenge, but a lot less infuriating
well it was working... but i notice it stops working in the middle of the file
compared to this i mean 😭
obvs in a big program no gc makes things harder
but for simple programs it is pretty easy generally
Tbh I never really considered memory for AOC
Just malloc and don't worry about free

that's actually not a bad idea though
in a short running program memory leak is fine
I mean if you know the lifetime of your program will be the same as the lifetime of your memory. Why worry about it
leaking everything is ultimate memory safety
I mean, isn't that kind of the viewpoint rust has?
Rust doesn't view memory leaks as unsafe iirc
when the program runs in under a millisecond a memory leak means nothing
Yop
My kotlin answer ran in like .5ms
(for part 2)
both parts of my solution run in microseconds
i bet my assembly solution is slower than jvm

i didn't put any effort into optimisation
Are there no optimizing compilers for assembly
im not on the jvm 
Wing insane doing kotlin native
I need my jvm reflection
no i mean im straight up running it natively
like its just a regular executable
I think I will make a c++ AOC thing soon™
I am using gdb to debug and it works well enough
but there is a real art to getting the code to break in the right place
which is hard when things just randomly happen in the middle of execution
i wish debuggers could travel back in time
wonder how long it'll take until the puzzle is just solving a maze
hmm ig that's gotta be possible in theory
just like how in emulators you can reverse time to make playing a game easier
I know v8 can do that
You can restart any stack frame that isn't interrupted by an async/await block
oh looks like gdb can do that
cool
but it's not like it can un-print stuff
or un-read a file
surely

or is it just magic
can it reverse aging too
gdb devs are wizards
this is a life saver
why is this so painful
swift for today
Evil
lmao are you doing it with typescript types
average ts code
??????????????
I do
@native maple are you doing what I think you're doing
https://git.nin0.dev/nin0/aoc-2025 ignore all the shit
ill clean up later
1/ has my solution
?
lemme try without spoiler
thehe start of the file won't have any spoilers
it's just syscall declarations
Any errors in console
ohh
maybe vencord bug
i can send this image...
can send from moonlight
but it doesn't embed 😭
what's a better file extension
👺
AI ✨sm
@vague knoll love?
open with reddit
oh
STDERR is defined to the same thing as STDOUT
there was a reason i did that
i don't think it's needed any more
ok well
safe to say i wont get the solution for the full input
@lusty atlas @terse edge rate
my favourite functional programming language
ok ive figured out a better way to do mod
@native maple @vague knoll i think i will just impl a literal dial
||go up one and if it reaches 100 go back to 0||
are you stuck on it even thouigh you were using a high level language
yes
pt 2
it works on most examples but not my real input
tomorrow which lang should i do @vague knoll
not asm
actionscript
||turns out i overcomplicated my result - i guess you don' tneed to count all the times the dial goes past 0 without landing on it?||
huh
you kinda need to do that
||well it was way too high when i did that||
||and it looked like in the example that isn't what's meant to happen?||
||part 2 right||
||noo part 1||
the kode tode cannot read
||did i do part 2 early||
||yes 😭||
lmaaoo
||@vague knoll loves||
||ig :snackstare:ive up @vague knoll||
I'm currently down to 98 bytes, a very good number
||```py
v=50
n=m=0
for L in open(0):
for i in[L<'R']int(L[1:]):v+=1-2i;k=v%100<1;m+=k
n+=k
print(n,m)
@brazen salmon i am binary searching my input to see which is fucking with my results
nop, meson is utter trash
https://mesonbuild.com/FAQ.html#why-cant-i-specify-target-files-with-a-wildcard
i need that for my projects
cmake supports it
make supports it
Yeah, build system that doesn't support globs is not usable
also no make backend kinda 
That part I'm fine with
@fallen lily fix my solution
The whole two-stage compilation model is just cringe
Though, it sounds like it's still two-stage, just with ninja as backend
is that part 2, 1, or both?
Both
isn't this really discouraged in cmake though
don't get me wrong i love it when i don't have to list all my source files 
i finally figured out part 1
i figured out part 2 before part 1 😭
yes but at least it's possible and supported
also guhhhhhhh
meson does seem to actually tell you how you can do it
fun fact! a shell script is not cross platform
so does cmake
i've never seen any big projects using globs
most (read: all) of my projects aren't big enough where i need to move away from globs
With some minor tweaks (and a much uglier output format) I'm down to 96 ||```py
v=n=0
for L in open(0):
for i in[L<'R']int(L[1:]):v+=1-2i;k=v%100==50;n+=k*1j
n+=k
print(n)
at most, there will be a couple dozen files
for me it just seems like a minor convinience on a small project
@vague knoll might try writing a js solution and see if it runs
more than a minor convenience to me
cool
clangd is insane
i agree, it's trash because they say the syntax is unpleasant and i disagree with them, i actually like to write makefiles
tbh i dont them not having a make backend that much
its no globbing support that's a dealbreaker for me
they do scale well imo as long as project has very strong structure :copium:
maybe it doesn't scale that well... but i like writing makefiles tho
maybe not if you have as many deps as the average node or rust project
yeah they are elegant
yes about that, frick dependencies
idk what this person has against makefiles
like isn't this so nice
and i don't even need to do anything when i add new files
i'm using a makefile for aoc
i really just threw this together
i don't make use of LDFLAGS
it's always with -g
is delete_on_error even the correct name
well.. always use that thing whatever it's called
idk
it was so annoying when my codegen stuff had issues and only partially wrote stuff

because i was first echoing // THIS IS MACHINE GENERATED
idk maybe it's a skill issue
https://www.gnu.org/software/make/manual/make.html#index-removing-targets-on-failure
If .DELETE_ON_ERROR is mentioned as a target anywhere in the makefile, then make will delete the target of a rule if it has changed and its recipe exits with a nonzero exit status, just as it does when it receives a signal. See Errors in Recipes.
who needs a task runner
@ivory knot love?
gradle is cool, i support gradle
ununder actually works???
Gradle for c++ sounds cursed
im going insane
but groovy gradle tho, i don't like kotlin gradle
it's doable
used for android pretty frequently actually
im losing it
is this windings ?
😭
It's if wingdings was a proglang
i didnt know @pale stirrup made a programming language
i'm dividing by 10
day 2 in 4 hours and you're still not done
just do a little xor eax, it'll be nice
i've got the solution i just wanna print it
@vague knoll would you consider using godbolt cheating to do this
no
true
how
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
because part 1 confused me and i made it harder than it needed to be which coincidentally was what they wanted for part 2
what the cursed thing did you do
also my final solution after having cleaned up my horrible p2 code
I should say, my initial part 1 solution immediately worked for part 2
my part 1 solution needed to be fixed so it actually worked for part 1
that makes more sense
swapped to fmtlib and things work fine 
@fallen lily fix my solution
send code
were you not able to get p1?
there is no p2 code?
i got p1
yes thrre is p2 code
Satan can’t read
actually my fn name is misleading
it solves 1 and 2
split into 2 fns
look at Dial.swift
dont worry, you can't understand it anyway
Code.kt: Lines 47-71 - :warning: Zero width spaces present
||```kt
override fun part2(input: TInput): Any? {
var cur = 50;
var zeroCount = 0;
val parsed = input.parseInput();
for (_i in parsed) {
var i = _i;
if (abs(i) >= 100) {
zeroCount += abs(i) / 100;
i %= 100
}
val old = cur;
cur += i;
val new = cur;
when {
// noop
old % 100 == 0 -> {}
new % 100 == 0
|| new / 100 != old / 100
|| new / 100 == 0 && new.sign != old.sign -> {
zeroCount++;
}
}
}
return zeroCount;
}
HOW ARE THERE ZERO WIDHT SPACES
inconsistent semicoloning
Satan must die
Sadan just got Slimed by Nin0.
@fallen lily
listen
never
wait
i never pushed the better code
Code.kt: Lines 43-67 - :warning: Zero width spaces present
||```kt
}
@UseFile("./input.txt")
@Solved("6289")
override fun part2(input: TInput): Any? {
var cur = 50;
var zeroCount = 0;
val parsed = input.parseInput();
for (_i in parsed) {
var i = _i;
if (abs(i) >= 100) {
zeroCount += abs(i) / 100;
i %= 100
}
val old = cur;
cur += i;
val new = cur;
when {
// noop
old % 100 == 0 -> {}
new % 100 == 0
|| new / 100 != old / 100
|| new / 100 == 0 && new.sign != old.sign -> {
zeroCount++;
}
Code.kt: Lines 43-67 - :warning: Zero width spaces present
||```kt
}
@UseFile("./input.txt")
@Solved("6289")
override fun part2(input: TInput): Any? {
var cur = 50;
var zeroCount = 0;
val parsed = input.parseInput();
for (_i in parsed) {
var i = _i;
if (abs(i) >= 100) {
zeroCount += abs(i) / 100;
i %= 100
}
val old = cur;
cur += i;
val new = cur;
when {
// noop
old % 100 == 0 -> {}
new % 100 == 0
|| new / 100 != old / 100
|| new / 100 == 0 && new.sign != old.sign -> {
zeroCount++;
}
cpp
@frigid socket you love c++ path concat operator
aoc/solver/src/commonMain/kotlin/solver/solutions/Day01.kt: Lines 13-19
||```kt
part1 {
var current = 50
turns.count { turn ->
current += turn
current % DialNums == 0
}
}
**aoc/solver/src/commonMain/kotlin/solver/solutions/Day01.kt:** Lines 21-33
||```kt
part2 {
var current = 50
var count = 0
turns.forEach { turn ->
val prev = current
count += abs(turn) / DialNums
current += turn % DialNums
if (prev != 0 && current !in 1..<DialNums) count++
current = (current + DialNums) % DialNums
}
count
}
```||
im going insane do i actually have floating point precision problems
oh my god i cant read
no this is stupid phrasing
where would floats come into play
why
im winging it
ill probably vibe code d1p2 @molten bolt
oh jkjk
i did use AI to generate some example inputs and solutions @pale stirrup
yk
under un
Okay
Der
Okay
google sheets
p1:
||```cpp
=REDUCE("50,0",split(A2,"
"), lambda(t, v, let(r, index(split(t,","), 1), count, index(split(t,","), 2),
distance, iferror(find("R",v),-1)*regexextract(v,"LR"),
newr, mod(r+distance, 100),
join(",",newr, count + (newr=0))
)))
p2:
||```cpp
=REDUCE("50,0",split(A2,"
"), lambda(t, v, let(r, index(split(t,","), 1), count, index(split(t,","), 2),
dir, iferror(find("R",v),-1), distance, dir*regexextract(v,"[LR](\d+)"),
newr, r+distance, zero, if(newr>=100, floor(newr/100), if(newr<=0, not(r=0)+floor(abs(newr/100)))),
join(",", mod(newr, 100), count+zero)
)))```||
hi
I love not being able to do AOC until tomorrow



