#AdVENt of Code

1 messages Β· Page 3 of 1

high lintel
#

olivia is AWFUL

warped dust
#

&string[index..]

somber smelt
#

.wk Benedict

slender pythonBOT
somber smelt
#

BENEDICT

#

.wk BENEE

sullen fiber
#

fake fan

slender pythonBOT
#

πŸ‘‘β€Šβ€…β¦Copemon⁩ - 515 plays
β€…2.  ⁦enjaitus⁩ - 484 plays
β€…3.  ⁦Glytcher⁩ - 430 plays
β€…4.  ⁦notwally(ΒΏ)⁩ - 182 plays
β€…5.  ⁦Wowie⁩ - 179 plays
β€…6.  ⁦Musab⁩ - 169 plays
β€…7.  ⁦bunnie⁩ - 168 plays
β€…8.  ⁦izzy.⁩ - 160 plays
β€…9.  ⁦patrick⁩ - 127 plays
β€…10. ⁦Smug⁩ - 124 plays
β€…11.  ⁦Emprid⁩ - 116 plays
β€…12.  ⁦bandit<3⁩ - 111 plays
β€…13.  ⁦Xan⁩ - 96 plays
β€…14.  ⁦blinf⁩ - 95 plays
**β€…199.  ⁦fieryplace πŸŽ„πŸͺ΅πŸ”₯⁩** - 0 plays

warped dust
#

&&&&&&&&&&&&&&&&&&&&&&&&string[index..] == &&&&&&&&&&&&&&&&&&&&&&&i.0

sullen fiber
#

fake fan

warped dust
#

its true

somber smelt
#

THIS BOT IS SO WRONG

sullen fiber
slender pythonBOT
#

Sorry, you are not added to this server yet. Run /refreshmembers and try again.

high lintel
#

true

sullen fiber
#

.u

slender pythonBOT
weary carbon
#

nvm it does but it spawned a new error

warped dust
#

*************&&&&&&&&&&&&&

slender pythonBOT
#

βœ… Cached memberlist for server has been updated.

This server has a total of 1980 registered .fmbot members.

high lintel
#

.u

slender pythonBOT
sullen fiber
#

.fmbot li pali...

somber smelt
#

.u

slender pythonBOT
#

βœ… Cached playcounts have been updated for FieryFlames based on 1244 new scrobbles.

warped dust
#

*&*&*&*&*&*&*&*&***&*&&&*&*&***&&&

somber smelt
#

OH MY GOD

sullen fiber
#

o pali wawa mute

somber smelt
#

.wk Olivia rodrigo

slender pythonBOT
#

πŸ‘‘β€Šβ€…β¦escar⁩ - 4081 plays
β€…2.  ⁦mosdzx⁩ - 2901 plays
β€…3.  ⁦lyndsey!!⁩ - 1987 plays
β€…4.  ⁦Blueberry Bubble Tea⁩ - 1218 plays
β€…5.  ⁦kie⁩ - 1143 plays
β€…6.  ⁦Bananas⁩ - 1082 plays
β€…7.  ⁦Pitachu⁩ - 1025 plays
β€…8.  ⁦Clyde⁩ - 1007 plays
β€…9.  ⁦Amyrian⁩ - 943 plays
β€…10. ⁦maxic⁩ - 786 plays
β€…11.  ⁦papito⁩ - 753 plays
β€…12.  ⁦Hazel⁩ - 667 plays
β€…13.  ⁦notwally(ΒΏ)⁩ - 601 plays
β€…14.  ⁦ajg⁩ - 598 plays
**β€…56.  ⁦fieryplace πŸŽ„πŸͺ΅πŸ”₯⁩** - 160 plays

high lintel
#

ΓΌ

warped dust
#

mi pali e mama sina

sullen fiber
#

ilo nasa

weary carbon
#

okay thats better

sullen fiber
#

NO

#

DO NOT

somber smelt
#

.wk BENEE

slender pythonBOT
#

πŸ‘‘β€Šβ€…β¦Copemon⁩ - 515 plays
β€…2.  ⁦enjaitus⁩ - 484 plays
β€…3.  ⁦Glytcher⁩ - 430 plays
β€…4.  ⁦notwally(ΒΏ)⁩ - 182 plays
β€…5.  ⁦Wowie⁩ - 179 plays
β€…6.  ⁦Musab⁩ - 169 plays
β€…7.  ⁦bunnie⁩ - 168 plays
β€…8.  ⁦izzy.⁩ - 160 plays
β€…9.  ⁦patrick⁩ - 127 plays
β€…10. ⁦Smug⁩ - 124 plays
β€…11.  ⁦Emprid⁩ - 116 plays
β€…12.  ⁦bandit<3⁩ - 111 plays
β€…13.  ⁦Xan⁩ - 96 plays
β€…14.  ⁦blinf⁩ - 95 plays
**β€…90.  ⁦fieryplace πŸŽ„πŸͺ΅πŸ”₯⁩** - 5 plays

weary carbon
#

.u

slender pythonBOT
#

βœ… Cached playcounts have been updated for etstringy based on 64 new scrobbles.

high lintel
#

5

slender pythonBOT
#

Sorry, you are not added to this server yet. Run /refreshmembers and try again.

somber smelt
#

YOU LIE

warped dust
#

to owned jumpscare

somber smelt
#

LIE LIE LIE

warped dust
#

wth

weary carbon
#

.w underscores

slender pythonBOT
#

πŸ‘‘β€Šβ€…β¦angel⁩ - 2624 plays
β€…2.  ⁦Den⁩ - 2400 plays
β€…3.  ⁦slow descent⁩ - 2197 plays
β€…4.  ⁦sea⁩ - 2140 plays
**β€…5.**  ⁦mae⁩ - 2011 plays
β€…6.  ⁦leo⁩ - 1948 plays
β€…7.  ⁦kate⁩ - 1833 plays
β€…8.  ⁦aris⁩ - 1463 plays
β€…9.  ⁦CrosstownAce⁩ - 1441 plays
β€…10. ⁦blahaj.zip⁩ - 1163 plays
β€…11.  ⁦vap⁩ - 1024 plays
β€…12.  ⁦Skye⁩ - 915 plays
β€…13.  ⁦Seru⁩ - 734 plays
β€…14.  ⁦lazer⁩ - 722 plays

Crown stolen by angel with 2624 plays!
Previous owner: slow descent with 2197 plays.

weary carbon
#

daamn

sullen fiber
#

2023 soon

warped dust
#

u can just ==

somber smelt
#

@sullen fiber FEMBOT LYING???

sullen fiber
#

holy crap i will never listen to underscores again

#

my scrobbles for her is a power of 2

high lintel
#

πŸ€“

weary carbon
#

LMAO

#

.w glass beach

slender pythonBOT
#

πŸ‘‘β€Šβ€…β¦flag ⛄⁩ - 2696 plays
β€…2.  ⁦leo⁩ - 2478 plays
β€…3.  ⁦slow descent⁩ - 1551 plays
β€…4.  ⁦Sharky⁩ - 1444 plays
β€…5.  ⁦thejekky_br⁩ - 1425 plays
β€…6.  ⁦KingAssripper⁩ - 1425 plays
β€…7.  ⁦mΜ΅Μ₯͊aΜ΅Μ“ΜŽΕ™ΜΆΝ α»‰Μ·Μƒβ© - 1317 plays
β€…8.  ⁦Sly⁩ - 1229 plays
**β€…9.**  ⁦mae⁩ - 1227 plays
β€…10. ⁦jay !?⁩ - 1187 plays
β€…11.  ⁦Vray⁩ - 988 plays
β€…12.  ⁦func⁩ - 766 plays
β€…13.  ⁦Nktekit⁩ - 637 plays
β€…14.  ⁦zipra⁩ - 613 plays

sullen fiber
#

idk actually

warped dust
sullen fiber
#

maybe relink ur fm

#

enjoy reindex

native pewter
#

.w crystal f

slender pythonBOT
weary carbon
#

why he just there 😭

native pewter
weary carbon
#

why he teeny 😭

sullen fiber
#

.w clarence clarity

slender pythonBOT
#

πŸ‘‘β€Šβ€…β¦ornibswag⁩ - 716 plays
β€…2.  ⁦Meiyou⁩ - 561 plays
β€…3.β€„β€…β¦Κš kaestral ɞ⁩ - 285 plays
**β€…4.**  ⁦vap⁩ - 263 plays
β€…5.  ⁦kohai⁩ - 227 plays
β€…6.  ⁦aris⁩ - 218 plays
β€…7.  ⁦poison⁩ - 161 plays
β€…8.β€„β€…β¦πŸ•“ Iris πŸ•“β© - 158 plays
β€…9.  ⁦Harzo⁩ - 109 plays
β€…10. ⁦Shigqat-chan⁩ - 103 plays
β€…11.  ⁦Keira⁩ - 92 plays
β€…12.  ⁦relyq⁩ - 76 plays
β€…13.  ⁦leo⁩ - 65 plays
β€…14.  ⁦Migi⁩ - 55 plays

high lintel
#

.wk bladee

slender pythonBOT
#

πŸ‘‘β€Šβ€…β¦shie⁩ - 23725 plays
β€…2.  ⁦wndy⁩ - 19055 plays
β€…3.  ⁦t⁩ - 16587 plays
β€…4.  ⁦sabian.⁩ - 14594 plays
β€…5.  ⁦saint moth⁩ - 13855 plays
β€…6.  ⁦Implacity⁩ - 13753 plays
β€…7.  ⁦taro⁩ - 12990 plays
β€…8.  ⁦raine⁩ - 12093 plays
β€…9.  ⁦Goozma⁩ - 10747 plays
β€…10. ⁦tenta⁩ - 10695 plays
β€…11.  ⁦claymore⁩ - 10514 plays
β€…12.  ⁦%?!⁩ - 10173 plays
β€…13.  ⁦BoHa⁩ - 9585 plays
β€…14.  ⁦msy⁩ - 8419 plays
**β€…33.  ⁦fwjfiqwjiijqdqkdjodqadjioqw)⁩** - 2726 plays

warped dust
#

33

high lintel
#

WHQT

somber smelt
high lintel
#

i was lije 8

sullen fiber
#

.w jane remover

high lintel
#

wtf

slender pythonBOT
#

πŸ‘‘β€Šβ€…β¦sea⁩ - 7505 plays
β€…2.  ⁦claymore⁩ - 2130 plays
β€…3.  ⁦swimp⁩ - 1857 plays
β€…4.  ⁦Den⁩ - 1179 plays
β€…5.  ⁦geni⁩ - 978 plays
β€…6.  ⁦leo⁩ - 941 plays
β€…7.  ⁦dargy⁩ - 759 plays
β€…8.  ⁦t⁩ - 539 plays
β€…9.  ⁦Punchhy⁩ - 505 plays
β€…10. ⁦aris⁩ - 489 plays
β€…11.  ⁦Creativezito⁩ - 403 plays
β€…12.  ⁦vife⁩ - 400 plays
**β€…13.**  ⁦vap⁩ - 367 plays
β€…14.  ⁦taro⁩ - 341 plays

Crown stolen by sea with 7505 plays!
Previous owner: swimp with 1857 plays.

warped dust
#

u need to up ur listenin

weary carbon
#

.w xaev

high lintel
#

so many mentally ill people joined

slender pythonBOT
#

πŸ‘‘β€Šβ€…β¦Aktimoose⁩ - 4315 plays
**β€…2.**  ⁦mae⁩ - 1090 plays
β€…3.  ⁦:3⁩ - 1005 plays
β€…4.  ⁦Adonis⁩ - 991 plays
β€…5.  ⁦ren // rave // v2⁩ - 706 plays
β€…6.  ⁦nodu⁩ - 615 plays
β€…7.  ⁦justen⁩ - 594 plays
β€…8.  ⁦Mars⁩ - 533 plays
β€…9.  ⁦snowsey ❄⁩ - 499 plays
β€…10. ⁦Meiyou⁩ - 387 plays
β€…11.  ⁦Jake⁩ - 382 plays
β€…12.  ⁦infinite phantasm⁩ - 373 plays
β€…13.  ⁦juno⁩ - 271 plays
β€…14.  ⁦rqz⁩ - 257 plays

Crown stolen by Aktimoose with 4315 plays!
Previous owner: :3 with 1005 plays.

weary carbon
#

godda,mn

sullen fiber
#

thats a lot

#

i forgot xaev is up asf

#

hes on propyl now or smth

weary carbon
#

yea they released some cds and vinyl with em

#

my playlists r something

high lintel
#

imagine coming here to talk about a clever aoc solution then bam .wkamf

weary carbon
#

advent of code thread is new general

high lintel
#

real

sullen fiber
#

general for real mfs

neon ore
#

who needs general when you can aoc

#

(i dont even care about aoc)

weary carbon
#

any chat is general chat if you try hard enough

sullen fiber
#

@warped dust i need a better :βŠ™::

#

:βŠ™:: so unreadable

somber smelt
weary carbon
#

i still dont know wtf a usize is

sullen fiber
#

its the size of ur compilation target's pointers

warped dust
#

u64 on 64 bit machines and u32 on 32 bit

sullen fiber
#

so on a 64system its a u64

#

and its a num::complex::Complex on a quantum computer

weary carbon
#

ohh okay

#

runtime error 😭

sullen fiber
#

IM CRACKED

#

@warped dust IM CRACKED

#

≑(⍜(⊑0)(+): Β±-⍘[βŠ™βˆ˜].)

#

THIS SHIT FUCKED UP

warped dust
#

INVERY ARRAY

sullen fiber
#

im gonna look at this code in 2 hours and have no clue what it does

warped dust
#

how

sullen fiber
#

cus planet notation in array

warped dust
#

WGAT IS INVERSE ARRAU

sullen fiber
warped dust
#

LMAo

#

it just dumps stack

sullen fiber
#

yop fire

warped dust
#

inv vap

sullen fiber
#

DNOOT

native pewter
#

rini dumping vap,,

sullen fiber
#

void goes to prison

native pewter
#

what

sullen fiber
#

join ".." .

native pewter
#

alr what language we doing today

warped dust
#

inv join

#

is there inv jojn

sullen fiber
#

doubt

warped dust
#

free parser

sullen fiber
#

so good

#

im scared this wont work on my input

warped dust
#

try inv join

weary carbon
#

i somehow made a hallucinating program that gives a different output each time

sullen fiber
#

TRY SO STUPID

warped dust
#

noo

#

i mean do it

sullen fiber
#

oh

#

no inverse found

#

πŸ’”

warped dust
#

πŸ’”

#

shambles

sullen fiber
#

omg where works

#

on matrix

#

so good

#

love this linague

weary carbon
#

gold star ⭐

high lintel
#

wooo

sullen fiber
#

NICE

proper totem
#

day two with both stars, no c boilerplate needed this time - can be compiled with nasm -f elf64 day_02.asm && gcc -Wall -no-pie day_02.o

#

I am not going to bother spoilering this xd

tranquil vapor
#

WTF

#

insane

sullen fiber
#

jeeez

proper totem
#

hyperfine can't even time this accurately because it's too fast

sullen fiber
#

how do u decide

#

when to use weirdly named registers

#

and when to use numbered ones

proper totem
#

they're the same (mostly)

#

the numbered ones were added when CPUs changed to 64 bit

proper totem
#

i just want to know how fast it is cri

tranquil vapor
#

did u really learn asm

native pewter
#

sadness julia is so easy

sullen fiber
#

teach me i wanted to learn

tranquil vapor
sullen fiber
#

and do today

#

but i gave up

#

JULIA LANG

tranquil vapor
#

julia looks kinda fine

proper totem
native pewter
tranquil vapor
native pewter
#

and 1 based arrays

tranquil vapor
#

it seems kinda similar to ruby

sullen fiber
#

yae stupid 1 based vectors

#

it has good math stuff

#

which might be epic for aoc

native pewter
sullen fiber
#

it has arr[end]

#

kinda real

native pewter
#

also @ stuff kinda cool idk

sullen fiber
#

real

weary carbon
#

secret weapon

sullen fiber
#

rus

neon ore
#

rust is cool but my brain is too small

#

(and for some reason rust-analyzer shits itself after two minutes and i have to restart vscode)

sullen fiber
#

@native pewter should i julia

#

i should

native pewter
weary carbon
#

i love ⌘ + shift + p restart ts server

native pewter
#

funny looking x

tranquil vapor
#

ask

weary carbon
#

wish i could help but im struggling enough as it is lmao

high lintel
#

im gonna try to do tmrw in zig

weary carbon
#

just finished day 2 yayyy

tranquil vapor
#

gj :3

solemn python
#

If you still need it I can help

#

.split?

#

πŸ‘

warped dust
#

wtf

native pewter
#

no idea how go modules work but somehow managed to make a module with tests

#

go is cool i guess but my solution in julia was cooler cuz i can just put everything in one file

native pewter
#

like in kotlin it just makes weirdly unnecessary directories

solemn python
#

wrote a benchmarker b/c why the hell not

#

thats 10k runs with 1000 warmups

warped dust
#

hop on hyperfine

solemn python
#

much slower for day 2

solemn python
#

so hyperfine would have included the network request and stuff

warped dust
#

network request

#

ur insane

solemn python
#

rusting

warped dust
#

bro is not

solemn python
#

its fun overcomplicating an extremely simple thing ok

warped dust
#

im a trans girl and i disapprove of your rust code. you should be ashamed

#

quit it even

solemn python
#

nop

#

you will suffer

warped dust
#

never heard of .sum

solemn python
#

happy?

#

(I actually hadn't, thank you)

warped dust
#

let _ = 😭;

solemn python
#

I don't give a shit if it flushes correctly

#

if it works then great

#

if it doesn't, it doesn't really need to panic or be handled Β―_(ツ)_/Β―

native pewter
#

julia faster than rust??? can u believe it!

solemn python
#

I also wasn't going for speed

native pewter
#

neither was i

solemn python
#

I was just curious how mine did

native pewter
#

my solution garbage asf || ```julia
function two(in)
acc = 0

for line in split(in, "\n")
    minRed = 0
    minGreen = 0
    minBlue = 0

    for draw in split(split(line, ": ")[2], "; ")
        for cubes in split(draw, ", ")
            spl = split(cubes, " ")
            num = parse(Int, spl[1])
            if spl[2] == "red" && num > minRed
                minRed = num
            elseif spl[2] == "green" && num > minGreen
                minGreen = num
            elseif spl[2] == "blue" && num > minBlue
                minBlue = num
            end
        end
    end

    acc += minRed * minGreen * minBlue
end

return acc

end

high lintel
#

this is like exactly my solution but julia

#

word for word bar for bar

native pewter
#

whyd you copy from me?

#

you weirdo

warped dust
#

i search for uiua and a random ass .doc from a brazillian hospital titled "information for compulsory hospitalization" shows up

#

@sullen fiber you need that

native pewter
#

@rotund moth

rotund moth
#

Thx

warped dust
#

i accidentally clicked on it and it doesnt show up anymore

native pewter
#

uiua users (vap)

tranquil vapor
#

but i used a hash...

#

instead of three vars

warped dust
#

vap made me realise i can just check rgb

#

first char

tranquil vapor
#

true

#

also i parse the game number

#

but it's not even needed cause it's just incremental...

warped dust
#

yea

tranquil vapor
#

they should make it random

#

so you have to parse it

warped dust
#

real

tranquil vapor
#

it doesn't even force you to split by ; technically

#

or split at all

#

you could just matchAll \d+ [rgb]

native pewter
#

wonder whether its more performant to regexp than split

proper totem
#

for my asm solution I just scan until I find a digit (that's not the game ID) parse the number then get the color by checking the first letter of the color

#

didn't end up doing any additional string allocation

#

if i get some free time tonight I want to update my ts solution to behave the same way and see how much time it shaves off

sullen fiber
sullen fiber
#

I didn't even finish that day

#

I must leave bed and do

warped dust
#

forcing you to do compulsory hospitalization

sullen fiber
#

Help

somber smelt
#

@sullen fiber are you feeling jolly yet

sullen fiber
#

They're obsessing over a whitename

#

Help

somber smelt
#

its absurd

sullen fiber
#

Mommy and daddy are fighring

somber smelt
#

they are dragging it so much

sullen fiber
#

I wanna go home

#

@warped dust I legit never thought about firmware

#

Firm

#

Soft hard

warped dust
#

yop thats actually why

#

its inbetween

native pewter
sullen fiber
#

Alternating

native pewter
proper totem
sullen fiber
#

@warped dust OH MY GOD

#

||i tried doing the canvas strategy like u saw but then on the real puzzle it would be like a 20000x20000 matrix of float64s||

#

||so i ended up just using cross on the line segments||

hazy sinew
#

you can just put everything in fun main() if u want to

somber smelt
#

what abt u

proper totem
#

you used a lot of string splits right

somber smelt
#

yes its like 99% that

proper totem
#

I did string splits too

somber smelt
#

might be string splits + struct initalization

proper totem
#

i'll get my aoc repo updated sometime later today probably

#

but in the meantime

#

bleh

native pewter
proper totem
somber smelt
#

i think i might be able to optimize more if i used substrings instead of splitting

#

lemme try

proper totem
#

I also cut out storing any data I didn't need to

#

I forgot I did that last night

native pewter
#

ah it had an extra newline

#

i dont account for thsoe

proper totem
#

oop

#

yeah my ide likes doing that and I can't be bothered to find the setting to turn it of xd sorry

native pewter
proper totem
#

that's not too bad

native pewter
#

yeah julia is quite performant

warped dust
#

trailing newline is good if you dont use trailing newlines you are evil

native pewter
#

i do use trailing newline but

#

dealing with that shit on input is too much hassle

warped dust
#

skill issue

proper totem
#

using my cheaty solution trolley

warped dust
#

language issue actually

#

reading line by line shouldnt make the trailing newline return ""

proper totem
#

writing this in assembly is going to make me go insane i am already thinking in x86 instructions

sullen fiber
#

love

native pewter
somber smelt
#

i have decided i will not optimize my shit

#

i think its def to do with initializing structs and/or strings

native pewter
#

light memory usage :3

sullen fiber
#

LITERALLY HOW

somber smelt
native pewter
somber smelt
#

mine used like 300mb max

sullen fiber
#

guys im gonna time my javascript solution

native pewter
somber smelt
#

o

sullen fiber
#

get real

#

javascript is faster than assembly confirmed

#

this is why our operating systems should be written in javascript

somber smelt
#

idk how my shit is going so slow like i know its not optimized but 20s?? 😭

native pewter
#

repl itsel already isnt small

sullen fiber
#

im gonna do today again in julia

#

learn

#

void will u help me >> >. . .

native pewter
#

sure :3

#

`using Test
@testset "works for example input" begin
input = read("example.txt", String)
@test one(input) == 8
@test two(input) == 2286
end

input = read("input.txt", String)
@info "Part one: $(one(input))"
@info "Part two: $(two(input))"
`

proper totem
#

using the large input?

sullen fiber
#

yea but the input is only like

#

100 games

proper totem
#

oh

sullen fiber
#

is urs bigger?

proper totem
#

100k games, that's what we've been benchmarking against xP

somber smelt
#

Part 1 took 4 ms, part 2 took 4 ms.

#

these are my normal timings

warped dust
#

help uiua is eating all my memor

proper totem
#

yummy memory

warped dust
#

still running

#

my computer froze and died

#

uiua sucks

delicate crane
#

When leaderboard in the discord

warped dust
#

had to reboot

#

@sullen fiber malware

sullen fiber
#

L:MAO WTf

sullen fiber
#

did u generate ur own input

proper totem
#

I did yeah

#

I haven't found someone who's providing large inputs for this year like they did last year so I made my own for today

sullen fiber
#

ok bet imma try it on julia

warped dust
#

im gonna try making it faster in uiua

sullen fiber
#

you actually prob can

warped dust
#

issue is i read the entire thing then do everything at oncd

sullen fiber
#

yea def

proper totem
#

yeah you can speed things up a lot if you use a scanning +incremental approach rather than full out parsing

sullen fiber
#

uiua has nice readuntil i think

proper totem
#

best readuntil

; skips characters in the input until the character given in parameter_byte is found
skip_until_char_loop:
  inc index
skip_until_char:
  cmp current_char, parameter_byte
  jne skip_until_char_loop
  ret
#

if nasm didn't have %defines so I could add names for registers i think i would explode

solemn python
#

Unfortunately not wahhgone

tranquil vapor
#

what...

sullen fiber
#

use splitn

tranquil vapor
#
if let Some(thing) = game_number.next() {

}
sullen fiber
#
let [game_number, _] = line.splitn(1, ":");
#

does that work

#

idk

tranquil vapor
#

or just

let first = game_number.next().unwrap();
#

if you're sure it will always exist (unwrap will panic if it's null)

#

just do one of the things I gave u

sullen fiber
#

true do vee

native pewter
solemn python
tranquil vapor
#

no edge cases so you can just unwrap everything xd

solemn python
#

I might switch to using ? though because it's easier to type

#

Anyways yeah a Split type is just a fancy iterator

#

So literally any method of grabbing entries out of an iterator will work

warped dust
#

hop on split_once

sullen fiber
#

split once thats what i wasthinking of

warped dust
#

a split type is just an iterator

#

not fancy

#

call .next again

warped dust
solemn python
#

.next() 1
.next() 2

warped dust
#

ty shut up

solemn python
#

ok

warped dust
#

let (num, string) = line.split_once(": ").unwrap()

sullen fiber
#

yea that

#

i thought split n was an option slice

#

death

#

dude i will prob have an easier time making my uiua faster than my damn julia

warped dust
#

do you guys not have ides or what

#

you type .split and split_once shows up there

sullen fiber
#

i would say real but

#

r-a so bad

warped dust
#

yop but rust is unusable without r-a

sullen fiber
#

i wonder

proper totem
#

has anyone tried rust rover from the silly brain company

sullen fiber
#

does uiua actually

#

run variables and store

warped dust
#

its horrible

sullen fiber
#

or does it eval when u use it

warped dust
#

i had the &ru \0 0 on a var

#

and then did it again to test

#

input was already empty

sullen fiber
#

u did it twice and it ran it twice?

warped dust
#

ya

sullen fiber
#

oh so it doesnt store

warped dust
#

no

#

like

sullen fiber
#

its like a macro

warped dust
#
L = S @\n &ru \0 0

<something something> &ru \0 0
#

and it wasnt doing anything

#

bc L took all the input

sullen fiber
#

oh

#

REAL

#

REAL

#

i bet it checks the function signature

#

and caches the value if its 0.0

#

0.0

#

0.0

warped dust
#

0-0

#

|o.0

sullen fiber
warped dust
#

peeking on the wall

#

vapsplainer

sullen fiber
#

N OOOOOOOOOOOOOOOO

#

untrue

#

nevr

warped dust
#

ur a dumbass

#

you dont use parens

sullen fiber
#

why rust no javascript

warped dust
#

exactly so you cant omit braces

#

because its STUPID

solemn python
#

Yes

#

You don't need parentheses for rust ifs

#

Which means you need to differentiate between the conditions and the blocks somehow

warped dust
#

yes theres only one way to write ifs

solemn python
#
if a == b println!("me when")
native pewter
#

im sorry

#

yall saw nothing

#

i forgor spoiler

unique hearth
#

@sullen fiber did day 2 now, what does yours look like?

sullen fiber
tranquil vapor
#

ADB.EXE JUMPSCARE

warped dust
#

REGEX

#

CHEATING

sullen fiber
#

i didnt use regex

#

cus cheating

#

also regex is gonna be real soon

#

new pr that adds real capture group

unique hearth
#

i didn't want to regex but the alternative i thought up is so bad

unique hearth
#

please tell me you didn't actually develop it like that

sullen fiber
#

STOP

#

STOP

warped dust
#

I did

native pewter
warped dust
#

okay initially it had one func

warped dust
native pewter
#

LMAO

sullen fiber
#

yes

#

thats what i did

#

just now

native pewter
#

most memory efficient uiua program trolley

sullen fiber
#

except it didnt freeze it killed after a few seconds

unique hearth
#

i really like how this works for grouping the various counts into an array

warped dust
#

i did ||* find :"rgb" with the first letter and the count on stack||

unique hearth
#

gonna kill the regex now because that really is not nice

warped dust
#

i wanna revise mine to make it more efficient and maybe shorter

sullen fiber
#

me trying to youtube

#

post input_large.txt

unique hearth
#

oh wait gimme the bigboy i wanna see how badly my machine explodes with it

sullen fiber
warped dust
sullen fiber
#

slow

warped dust
unique hearth
#

fear

#

uiua is using 7gb ram oh god

tranquil vapor
#

LOL

warped dust
#

most memory efficient

#

uiua sparse arrays when

sullen fiber
unique hearth
#

OH

#

that is

#

not nice

sullen fiber
#

kill

tranquil vapor
warped dust
#

i was forced to remove it

sullen fiber
#

@x is char

#

x

#

join @a @b would be "ab"

unique hearth
#

i am about to oom

warped dust
#

kasi you shouldnt be talking about these things publicly like that

harsh marsh
#

damn i forgot advent of code was a thing until today

sullen fiber
#

thjis ris real

#

hihi

native pewter
#

dont even have a zig solution trolley

#

and dhall isnt a language

warped dust
#

for role in rolls

#

sob

#

bro made a struct

proper totem
#

remember that the cubes are put back in the bag after each draw - ||you're looking for the max of each color drawn, not the sum||

warped dust
#

duuuh

#

(i did the same mistake at first

solemn python
warped dust
#

i have the best answer

#

i won aoc

#

try it and see

#

actually just read

tranquil vapor
#

for what

native pewter
#

you love @warped dust

#

elixir is actually nice i think?

#

more pleasant than whatever the fuck purescript was

warped dust
#

i love beam languages they're all deranged in their own way

sullen fiber
#

@warped dust

warped dust
#

so fast

sullen fiber
warped dust
#

you will do threading

sullen fiber
#

OMG

#

OGM

#

OMG

#

OGM

native pewter
#

thread u on a uhm

tardy ore
#

oh god uhhhhh

#

i am going to forget and not do any of them just like last year

#

nop

delicate crane
#

I may be late to advent of code because hbomberguy new video.

#

man in cave is something internet historian blatently plagerized from someone else

native pewter
#

pleh my zig solution is so cursed

#

im using 4 nested iterators to read from a stream ._.

solemn python
#

Nooooooo I'm not going to be home for AoC

fading mortar
#

I really hope day 3 isn't gonna have me do recursion lol

solemn python
#

Recursion is so fun though

fading mortar
#

wow nice parsing time

somber smelt
#

jesus christ this one seems annoying

fading mortar
#

Yeah

#

Thinking of how to seperate the number groups

#

hmm seems easy enough actually

#

just annoying

native pewter
#

oh new one.

#

blehhh i do tomorow!

warped dust
#

@sullen fiber i might be able

#

to use beam

sullen fiber
#

INSANE

native pewter
somber smelt
#

this one is killing me

native pewter
#

just use a hash set

#

shrimple enough

warped dust
#

okay i will do it in erlang

#

lmao the erlang lsp

#

is made by whatsapp

somber smelt
#

this one is kinda hell in switft

steady fog
#

@warped dust @warped dust @warped dust @warped dust @warped dust @warped dust @warped dust @warped dust @warped dust @warped dust @warped dust @warped dust @warped dust @warped dust @warped dust @warped dust

#

the rini rot

fading mortar
#

I think this one is gonna take a while

warped dust
steady fog
#

rinninininini

warped dust
#

zt

steady fog
#

hi

somber smelt
#

like idk

warped dust
#

erlang has an ACTUALLY good lsp ?!?!

#

crazy

steady fog
#

ruby is being dum

#

uhhh

#

give me lang to do

#

someone

fading mortar
#

huh bun spits out arrays differently than node in the console

#

cool

somber smelt
#

bruh this one fucking killed aoc for me this one seems so annoying

fading mortar
#

I think I'm gonna have to whiteboard this for a bit

somber smelt
#

why was day 1 so hard, day 2 so easy, day 3 fucking hell

steady fog
#

funny

#

im using golang for this

proper totem
#

today was fun

#

i will not be doing it in assembly blobcatcozystars

warped dust
#

i was about to say "did you already fuckin finish it in assembly"

somber smelt
#

this one has me fuckin stumped in swift

warped dust
#

@sullen fiber today is kinda fire for uiua tbh

somber smelt
#

i know i can do it but its all so unpretty

sullen fiber
#

IT IS

#

IT IS

proper totem
sullen fiber
#

||cant wait to run katlyn's large input on gpu||

steady fog
#

i will nuke rini

fading mortar
#

why tf can't this spoiler correctly

#

oh cus || in code

#

bruh

proper totem
#

an hour and a half for the first and probably six hours for the second day

#

I could do today in assembly but i'd have to do pointer math and that kind of stuff in assembly which. I don't really want to do.

steady fog
#

sounds fun

solar tide
warped dust
#
2> lists:map(fun(X) -> case X of "." -> 0; _ -> 1 end end, "...*..").
[1,1,1,1,1,1]
#

rate

solar tide
#

where's the leaderboard channel

steady fog
#

end end

fading mortar
#

I am going to sleep

delicate crane
#

how the fuck do Zain and katlyn always finish before me

delicate crane
warped dust
#

oh my god

#

@sullen fiber guess the less than or equal to operator

#

in erl

sullen fiber
#

!>

#

is it that

#

that would be so funyn

warped dust
#

=<

sullen fiber
#

WTF

warped dust
#

yes.

sullen fiber
#

?#$@

warped dust
#

this langauge

#

is isnaen

#

@high lintel help

neon ore
high lintel
#

=<

steady fog
#

@high lintel fawner

#

hey girl

neon ore
#

= angry face =< sad face

steady fog
#

@neon ore hi

neon ore
#

hihi

steady fog
#

sunni

sullen fiber
#

ANSWER TOO LOW

#

FUCK FUCK FUCK

proper totem
#

I should turn mine into a function so I can run it 293487892374 times and get an average

#

yeah that one is an outlier

#

everything else i get with the one offs is slower

sullen fiber
#

WHAT AM IREN IWSFTDODOING WERONG

#

im gonna peel my skin

high lintel
high lintel
warped dust
#

i have already peeled off my skin

warped dust
#

πŸ™„

delicate crane
#

=/=

steady fog
#

ok i got part 1

#

im going to kill rini NOW

solemn python
#

Advent of code really is making me write the dumbest possible rust code possible

#

it works but only after I tweaked it a ton of times hoping it fixed itself

#

at least this one is easy to visualize for debugging

sullen fiber
#

oh my god im

solemn python
#

do I know how my code works? barely

sullen fiber
#

actually braindead

solemn python
#

does it work? yes

warped dust
#

erlanging all over the place

high lintel
#

OMFGGGGGGGGGGGGGGGGGG

#

I HATE

#

range inclusive comes to bite me AGAIN

#

kill rust

#

i keep forgetting that .. does not mean ..=

sullen fiber
#

im done

solemn python
#

that annoyed me a few times too

#

and then I had the whole deal of trying to conceptualize "2nd character" vs "1th index" and how the hell ranges work on top of all of that

#

plus the deal with regex ranges inclusivity because I used regex to extract all numbers (im lazy ok)

sullen fiber
solemn python
#

I'm so happy for you (what the hell is that supposed to mean)

solar tide
#

language of the deranged

tranquil vapor
#

how banger is the new aoc

#

on a scale from 1 to 10

#

hiiii fawnieee

hazy sinew
#
    override fun solvePart1(input: File): Int {
        val grid = Grid.of(input.rl())
        return grid.filterConsecutive { it.toString().matches("[^0-9.]".toRegex()) }.mapIndexed { point, _ -> point.getNeighbors().mapNotNull { grid.numberAt(it) }.distinct() }.flatten().sumOf { it.toInt() }
    }

    override fun solvePart2(input: File): Any {
        val grid = Grid.of(input.rl())
        return grid.filter { it == '*' }.mapIndexed { point, _ -> point.getNeighbors().mapNotNull { grid.numberAt(it)?.toIntOrNull() }.distinct().let { if (it.size == 2) it.product() else 0 } }.sum()
    }

Day 3 in one line (i had to cache the grid parsing to make it 300ms instead of 7 seconds because if i dont, itll parse the grid every time it wants to know a number

#

(i basically outsourced everything into utils but 1 line is 1 line)

tranquil vapor
#

what does ur pfp say

tranquil vapor
#

oh it's just the taliban flag

#

most normal vencord user

hazy sinew
warped dust
#

@sullen fiber fix my code

hazy sinew
tranquil vapor
#

you should maybe change it if u don't wanna be banned

hazy sinew
#

if i get banned for having the declaration of faith as my pfp so be it

#

it has nothing to do with terrorism

#

The Shahada (Arabic: Ψ§Ω„Ψ΄ΩŽΩ‘Ω‡ΩŽΨ§Ψ―ΩŽΨ©Ω aΕ‘-Ε‘ahādatu; Arabic pronunciation: [aΚƒΚƒahaːdatʊ], "the testimony"), also transliterated as Shahadah, is an Islamic oath and creed, and one of the Five Pillars of Islam and part of the Adhan. It reads: "I bear witness that there is no deity but God, and I bear witness that Muhammad is the Messenger of God."
The S...

hazy sinew
#

check top or else youll check mid

warped dust
#

true

sullen fiber
#

is this erlang wtf.

warped dust
#

yes

hazy sinew
#

who tf decided to do orelse and not "or" or "||"

warped dust
sullen fiber
#

ORELSE

#

WHO DESIGNED HTIS

warped dust
#

but it doesnt short-circuit

hazy sinew
#

or as a binary operation?

warped dust
#

yea

#

orelse andalso

#

lmao

hazy sinew
#

so if u use or its gonna be slower or what

warped dust
#

yeah cuz it can stop at first row it finds

#

i have no idea why they didnt just make or always short-circuit

hazy sinew
#

thats a goofy implementation

#

where would you ever need it to not short circuit

rain bloom
hazy sinew
#

its a bit too long to be that

sullen fiber
#

too many damn word

rain bloom
#

yeah

warped dust
#

erlang is so funny

hazy sinew
#

but then just do it like everyone else with | and || or make it check if its evaluating an expression and base it off that so you can have the same keyword do 2 things

warped dust
#

you terminate statements with periods, join expressions with commas, and related statements need semis

hazy sinew
#

or make | the bitwise or and or the short circuit boolean or

warped dust
#

true

hazy sinew
#

if you want 2 on 1 line use semicolons but dont force semicolons

tranquil vapor
#

if that's not the case then that's fine

warped dust
#

oh my god finally

#

pt 2 now

tranquil vapor
#

lmao

#

rini did u sleep alr...

hazy sinew
tranquil vapor
#

or are u still awake

warped dust
#

still awake

hazy sinew
warped dust
#

yeah

#

hell

tranquil vapor
warped dust
#

I MUST ERLANG

hazy sinew
#

tbh its not that hard to redo it by symbols, i also did it my numbers in pt1

steady fog
#

@warped dust Sleep girlie

tranquil vapor
#

alexandria ocasio cortez can wait can wait...

warped dust
steady fog
#

@tranquil vapor do AOC in powershell

warped dust
#

rate

#

rate

hazy sinew
#

if you do symbols in p1 you have to check for duplicates without taking it out the same number in different positions

steady fog
#

rate

tranquil vapor
steady fog
#

insane

#

@tranquil vapor Run

real hinge
#

again

tranquil vapor
hazy sinew
#

should i do this year only with oneliners

real hinge
#

I bet it will be very fun this year

#

impossible

tranquil vapor
hazy sinew
#

1 line and no semicolons

tranquil vapor
#

you will learn powershell

steady fog
#

venshell

real hinge
#

@tranquil vapor rusher made me use rust

#

I am suffering

steady fog
#

@real hinge you are rusty

real hinge
#

NO

#

DONT WANT

hazy sinew
real hinge
#

wait this isnt supposed to work

tranquil vapor
hazy sinew
# steady fog yes

looking forward to day 25 in erlang because you ran out of normal languages

real hinge
#

@steady fog this is you

hazy sinew
tranquil vapor
high lintel
tranquil vapor
#

I WASTED SO MUCH TIME

real hinge
tranquil vapor
#

UNTIL I REALISED

steady fog
tranquil vapor
#

i manually stepped line by line

#

until I noticed the overlap bug

high lintel
#

just do example first 😭

steady fog
high lintel
tranquil vapor
high lintel
#

it did...

steady fog
#

@high lintel hey girl

tranquil vapor
#

NO IT DIDNT

#

...

hazy sinew
#

yes it did

tranquil vapor
#

my code worked on the example then exploded on the actual thing

real hinge
#

it didnt as far as I remember

hazy sinew
#

oh yeah maybe if the only number is eightwo

high lintel
hazy sinew
#

it didnt have that

real hinge
#

maybe they updated later

tranquil vapor
high lintel
#

2nd and 4th line

#

WDYM

tranquil vapor
#

cause my code matched eight and three

#

which is correct

hazy sinew
#

yea but it doesnt include the case of just something liek twone being 21 and not 2ne

real hinge
#

because you get first and last

high lintel
#

yea ig

real hinge
#

it doesnt matter if two disappears

tranquil vapor
#

yeah what manti said

hazy sinew
#

day 1 should be any langugae that has .replace

tranquil vapor
#

it only causes issues if the overlap is at the end

hazy sinew
#

not python

tranquil vapor
#

i didnt use replace

#

i just used regex

real hinge
#

you should do aoc without regex challenge

#

happy parsing

tranquil vapor
#

true regex is kinda cheating

high lintel
#

mine didn't work cuz i used replace so i knew from example

real hinge
#

it would be hella painful otherwise

tranquil vapor
#

i won't use regex from now on

#

cheat

real hinge
#

me when 30000 .splits

high lintel
#

not even

tranquil vapor
real hinge
#

no I am not talking about day1

steady fog
real hinge
#

I didnt use regex on day1

steady fog
#

regex so bad

tranquil vapor
#

you could literally just

line.matchAll(/\d+ [rgb]/g)
real hinge
#

but on day 2 its kinda needed

high lintel
#

yea there were a bunch of splits in day2 but it really isn't that big of a deal to use regex imo

real hinge
#

if you are using some language like python or js its not really big deal yea

#

but I can imagine it being painful on rust and other low level languages

warped dust
#

doesnt work πŸ’”

#

erlang so bad

tranquil vapor
#

you could do day 1 with a for loop

steady fog
#

orelse

#

RUST

#

KILL

tranquil vapor
#

won't even get overlap issues with that

real hinge
#

okay I take my word

steady fog
#

@tranquil vapor do part2 for me

real hinge
#

I just did find and rfind

#

then put all found elements to some vector

#

ordered and did the thing

tranquil vapor
#

manti u will do aoc in ruby

real hinge
#

too late

steady fog
#

I was gonna do Ruby today

real hinge
#

I decided to use rust

tranquil vapor
#

Ruby is very good language

steady fog
#

but I couldn't get lsp working

tranquil vapor
steady fog
#

@tranquil vapor @tranquil vapor@tranquil vapor I used go today

tranquil vapor
#

GOOD

real hinge
#

but other than that good blobcatcozy

steady fog
high lintel
#

ruby can be so insane i fear sofia's ruby

steady fog
#

who

warped dust
#

:33333

steady fog
#

@warped dust sofa

warped dust
#

no..

tranquil vapor
steady fog
tranquil vapor
#

i just made it a point to use as little of them as possible

#

the anti lisp

steady fog
#

love

real hinge
steady fog
#

lisp so bad

tranquil vapor
#

instead of ```rb
File.foreach file do |line|
end

```rb

File.forEach(file) { |line|

}
``` or ```rb
File.foreach(file) do |line|
end
steady fog
#

I would prefer bracket at end of first line

#

looks weird before stuff

tranquil vapor
#

tbh ruby is kinda insane

#

it has like multiple valid syntaxes for everything

real hinge
#

@tranquil vapor do day 3 when

#

gearboxes wait for you

tranquil vapor
#

im breakfasting rn

#

soon

steady fog
#

I haven't done

real hinge
#

do

steady fog
#

part 2

tranquil vapor
#

zt go sleep

#

it's like 5am for u

steady fog
#

yop

proper totem
real hinge
#

what the hell

#

why assembly

#

do you hate yourself

proper totem
#

it's fun :3

steady fog
#

@proper totem hi

proper totem
#

hewos @steady fog @steady fog @steady fog

steady fog
proper totem
#

:spoob:

steady fog
#

spoob

warped dust
#

FINALLY

steady fog
warped dust
#

@sullen fiber rate my answers

native pewter
#

2/10

warped dust
#

maaaaaaaaaaad

real hinge
#

rini wrote it in erlang

#

I would give 3/10

native pewter
warped dust
#

ur so mean

native pewter
#

dont need to do a lot of string manipulation

#

||

function one(input)
    acc = 0

    nextToSymbol = Set{Tuple{Int,Int}}()
    lines = split(input, "\n")
    for i in eachindex(lines)
        for j in eachindex(lines[i])
            char = lines[i][j]
            if char == '.' |fucking hell so bad why do i have to do this| (char >= '0' && char <= '9')
                continue
            end
            push!(nextToSymbol, (i, j + 1), (i + 1, j + 1), (i + 1, j), (i + 1, j - 1), (i, j - 1), (i - 1, j - 1), (i - 1, j), (i - 1, j + 1))
        end
    end

    for i in eachindex(lines)
        num = ""
        isPart = false

        for j in eachindex(lines[i])
            char = lines[i][j]
            if char >= '0' && char <= '9'
                if ((i, j) in nextToSymbol)
                    isPart = true
                end
                num *= char
            else
                if isPart && length(num) > 0
                    acc += parse(Int, num)
                    isPart = false
                end
                num = ""
            end
        end

        if isPart && length(num) > 0
            acc += parse(Int, num)
            isPart = false
        end
        num = ""
    end

    return acc
end
``` ||
tranquil vapor
real hinge
#

what is 6pak expecting

tranquil vapor
#

@elfin umbra

warped dust
#

new vpak

tranquil vapor
#

gondola lift time

#

dude

#

ruby extension broke

#

its so over

#

it has some stale dir saved

#

ruby_lsp_2023

#

where is it pulling that from

#

ohhh

#

its borked

#
File.write("C:\Users\Banana\stuff")
#

it doesnt double escape

#

so it becomes File.write("C:UsersBananastuff")

warped dust
#

windows

tranquil vapor
#

it worked yesterday..

#

linux time bleh

warped dust
#

what ruby lsp are you using none of them worked for me

tranquil vapor
#

shopify

#

so bad

#

terrible

#

its really bad its essentially worthless

#

no autocomplete

#

i dont remember it being bad

#

OH MY GOD

#

ITS JUST BROKEN EVEN ON LINUX

#

DOGSHIT

#

WHAT IS THAT DIRECTORY

#

WHY ~/bin

#

RUBY

#

HOLY SHIT @warped dust

#

but it still sucks

warped dust
#

how do you feel knowing erlang has better lsps than ruby

tranquil vapor
#

this is decent

#

the shopify one is hot garbage

#

this makes syntax highlighting better

hazy sinew
native pewter
tranquil vapor
#

terrible

#

we hate shitify