« first day (3598 days earlier)      last day (42 days later) » 

12:34 AM
Q: Triangulating Angles

SuperZooper3Prompt: You are given two sets of XY coordinates along with two angles (all are floats): X1 Y1 A1 X2 Y2 A2. The angles are relative to world coordinates: 0 being straight up or north and going clockwise. Your program or function has to return a set of two floats of the XY coordinates the two angl...

12:52 AM
Ugh, spent 10 minutes golfing an answer from 2015 by 17 bytes than realized it failed half the testcases
Actually make that 24 bytes
I'm considering writing a working answer, but it'll probably just end up like my xxd answer and nobody'll even see it.
2:02 AM
Foolproof way to guarantee you triple check the test cases: Dennis has a 4 byte Jelly answer and your Jelly answer is 3 bytes and doesn't use any features added since he posted
2:46 AM
@RedwolfPrograms so how did the bet go
3:03 AM
Q: Python if statement not working

ColtonI am following a YouTube tutorial: https://youtu.be/1PDyuk84icQ trying to make a math game. The code i copied from the video is not working, if I get the multiplication problem correct I get the "else" trigger. I have tried a different IDE, and reinstalling python. import time import functools ...

@Razetime I'll probably never know because my teacher ended up having to quarantine so we did virtual school the whole time. I got a 90% for my grade, so she must have thought it sounded at least a little humanlike :/
3:29 AM
so wait
what did I bet on
the teacher discovering it, or not?
I honestly don't even remember :p
lemme check
hmm so my winning criterion was that the teacher would notice
Dec 2 at 2:50, by Redwolf Programs
Just suspect that I didn't write it :p
so you win it lol
Probably wouldn't have had the same result if I used the next result I'd gotten, "Swindle this man's despot eye thee, and the ivory saws others came too heavy cannon whale" :p
which answer do you want a bounty on
3:44 AM
We'd agreed on 50 rep, right?
it was 100
I think that's one of the more entertaining bounty messages I've seen :p
SE should allow adding bounty messages to answers
like when you hover over the +100 it should show the message
maybe I'll request that in codidact
I wonder if SE stores the bounty messages. Maybe it'd be possible to make a userscript
checking api
3:56 AM
Odd, the bounty message doesn't show up in the timeline, seems like the "comment" field to the right would be the perfect place for it
It's not in SEDE either
It only seems to have a featured questions thing
but no bounty message thing
Might be worth suggesting in meta, that would be a pretty cool feature
@sporeball still looking for the coordinates question?
haven't heard that sound in so long that it scared me
yes, i'm still looking for it
oh the twang sound when you get mentioned
4:06 AM
Q: Reversible hex dump utility (aka `xxd`)

PleaseStandxxd is a utility, bundled with vim, that has been used to encode answers to code golf problems on this site. It converts a binary file into a hex dump and back again. Implement the xxd and xxd -r commands in the programming language(s) of your choice. Scoring is based on the character/byte lengt...

there's so many coordinates questions
time to learn SEDE
4:21 AM
This has the most fascinating google trends region map I've ever seen...from the numbers one to five, there seem to be certain regions with more interest in one of them than normal.
One = Southeast Asia
Two = South Asia
Three = Ireland/UK
Four = West Europe
Five = Africa
4:41 AM
@Razetime Learning SEDE is essentially learning SQL with a couple extra features.
It's very useful
In fact, SEDE queries are the primary way I find invalid answers to flag.
It's a primary way to find old questions to answer in certain languages for me
10:00 to AoC #5!
4:54 AM
dang it
wow way to screw me over se chat
i had "posted" 5 and it said "unexpected error"
I'll let you have the next one
finally lol
4:56 AM
What's the little drawing by the numbers?
4:57 AM
The ASCII art by the countdown
3 3s. Isn't that magical
@RedwolfPrograms it's usually some sort of image that you see completed at the end
like one year it was a tree
Hey! You were several seconds early!
@pppery you gotta be quick to survive in these parts
I like how competitive this has gotten :p
4:59 AM
I won't be surprised if a chat mod kicks in and moves all these countdown chat to trash
@RedwolfPrograms now y'see, I woulda won if not for my internet temporarily dropping out
@Bubbler Why?
I choked so hard on part 1
5:07 AM
and then had server issues on part 2
Okay I ain't getting top 100
feels good
@Lyxal I sent that 6 minutes ago
I got R and L backwards on part 1 lmao
5:08 AM
I tried to make the FBLR right while my test case was loading
and it was big success
i got 11th and 20th
the funny thing is im not even on pc rn
@UnrelatedString its ok i choked hard too
deadass kinda wish i'd used a golflang for once
because binary is a biiiit easier in a golflang
i got f aand b mixed up
5:09 AM
bruh i had to use devtools
try doing that
okay wait it's not just server issues because my message there just failed to send lmao
on mobile data too :( not being at home kinda sucks
519/402 :/
something went wrong with my internet the moment i hit submit on par 2
5:10 AM
anyway i came here cuz i tied with hyperneutrino
where'd he go anywya
same thing happened to me
oh oh you know what i could have done instead of four fucking replaces
no, it's just AOC being slow
oh yknow what
i could have used join lmao
with str
5:11 AM
i completely messed up part 2 the first time
I used f=(s,n=0)=>(s[0]=="B"&&(n+=2**(s.length-1)),s.length==1?n:f(s.slice(1),n)); to find the row/column numbers
@ASCII-only same
same as well
5:11 AM
i did not catch that yours is not on the pass
ya same
228 on part 1, 629 in part 2
Python has str.translate, no?
It does
but it was easier to do 2 replaces than futz around with translate.
wait a minute
just hang on a second
5:12 AM
hey, i did 2 replaces too
i can just convert the strings from a bijective binary?
it's not bijective binary
it's just binary
not even bijective, it's simple binary
5:12 AM
I wasted SO much time
and everyone else it doing it the easy way
Here's me trynna do it with lists
I used a recursive function and thought I was doing it the smart way :/
The entire wall of text is vaguely but gradually indicating that
5:13 AM
I fell from 2nd to 3rd on the private leaderboard
if python had nice functional support then you could just use a fold to convert
i wonder how i got so high today tho
I'd do str.translate then int(xxx,2) if I'm on Python
wait there's a str.translate method
i used four replaces
5:14 AM
me too
i used js like a normal person
so i used two replaces
reduce and map would probs work too
For JS I'd do one pass of reduce, yeah
hell i might have gone faster in haskell
This time I'm pretty sure many novices are failing to see it's binary
but are there that many novices on the leaderboards
5:16 AM
(and we're all smart in that respect)
i'm on a voice call with one
@Bubbler That's ridiculous. It's even in the title of the day
> Day 5: Binary Boarding
he actually started at midnight for once
and he's still on star 1
funny thing is i only read the spec till im sure enough that i get it right
"Binary Space Paritioning" doesn't exactly lead one in the right direction
5:17 AM
for me it was the 8 seats per row that confirmed it
oh wait
he was about to do slices until i pointed out how the id is determined
today was enough to get me onto all time leaderboard???
day 2 was enough to get me there
@Lyxal ok sure "Binary Space Paritioning" doesn't, but 128 rows and 8 seats per row is a bit more of a giveaway
Ooh, I'm slowly rising in the private leaderboard
5:21 AM
tbh i forgot this leaderboard even existed
I was more focused on the idea of binary searches than binary bases
@ASCII-only "keeping rows 0 through 63" doesn't exactly lead to the thought of binary either
Yeah, I didn't even think about it
: seatcode ( string -- value )
  "FBLR" "0101" zip substitute bin> ;

: day5-silver ( strings -- highest )
  [ seatcode ] map supremum ;

: day5-gold ( x -- y )
  [ seatcode ] map dup minmax [a,b] swap diff ;
unfactored code for today
@Lyxal hey i mean binary search is binary base
@ASCII-only not the way I learnt it
5:22 AM
@Bubbler what's this
I know it as: cutting a list in half until the needle is found
1509 people have completed star 1 but not star 2
how though
they're probably mentally thrown/discouraged from part 1
5:24 AM
"cheated" star 2 by creating a range of [min,max] and set diffing
i literally used the most naive way
Not everyone's rushing to be on the leaderboards, and not everyone's fast at typing and/or problem solving
ah well
either that or i guess they didn't make a seat -> id conversion in part 1
For part 2 I just got the min and max, made an array for each value in between, and then did a .find for the the one that didn't exist in the input
5:26 AM
for part 2 i messed up and found the max was 860
ugh finally done
(since that was where the console.logs ended)... and i just set max to that, changed to a doesn't contain search instead of a contains i - 1, i and i + 1 search
with about 5 internet dropouts, 2813/3344
Every time I loaded a page it took like 20 secs
It's like they're trying to screw up people's boilerplates
I haven't use parts from other days at all
The inputs have all been formatted differently
5:29 AM
what kind of boilerplate are you trying to use
it's always like this
i have boilerplate to split by line but
except for yesterday those empty lines threw me for a loop lmao
im not on pc so didn't have any boilerplate
at all xd
@ASCII-only that's my setup too
when I did AOC in 2019 the only parts I ended up reusing on two or more days was the intcode interpreter and a BFS algorithm.
5:30 AM
@Lyxal then it's fine here, no?
my boilerplate is the one line ls = [l for l in iter(input,'')] which is a comprehension so i can stick somrthing else in there on the fly lmao
i have the most cursed boilerplate ever
i can link to past days' solutions but idk what stance is on linking spoilers here
@pppery and even then, half the time you weren't just feeding the input straight to the intcode interpreter
there is no such thing as a spoiler here
we are all Fast™️
5:32 AM
cursed solutions here
@Lyxal cringe.py is an appropriate filename
@UnrelatedString that's why I named it so
My speaker has just given up on producing the twang noise for every comment at this point
@ASCII-only are you making a point of not using newlines or is the website just eating them
i dont use newlines
5:34 AM
The only valid boilerplate is the one that reads a file in full, two solution function skeletons, and a script that runs them on the file
cuz im cursed
heres day 5 guys remember not to cheat
I just do even more cursed ES6 one liners
thats my entire console history lol
@RedwolfPrograms you dont understand did you not see the one letter function names
oh also look at like the day 1 solutions
eval ftw
5:36 AM
.map(Number)? Isn't .map(n=>+n) shorter?
maybe slower to type
depending on the typer
At this point I just need to bind my unused keys to map, filter, and =>
yea i type words better than i type complex expressions
don't even need .map(Number) really as any self-respecting js golfer can tell you, just use - rather than +
Wait, would .map(eval) work?
5:38 AM
Dang, time to go back and golf half my JS answers on the site
I usually don't golf my existing answer until someone else points out
Oh, 100k solvers for day1 part2. That's a record
while on the topic of your js answers... for the reversible xxd one i feel like using ((i,j)=>i.toString(16).padStart(j,0))(i,7) might be shorter. who knows
For what part of it?
5:47 AM
you use it twice, one with 7, once with 2, not at pc so cant properly test if its shorter
similarly, for l>31&&l<127?String.fromCharCode(l):"." the && can most likely be replaced with &, the String.fromCharCode can maybe be moved outside the ternary: String.fromCharCode(l>31&l<127?l:46)
Already got that golfed, and I think your first idea should save a few bytes
oh wait
then just call it with 2 for the second time, removing the second lambda entirely?
Didn't think about that
Actually it looks like the curried one is the same length since it's called twice and takes an extra byte to call
Wait never mind, I get what you mean with calling it with 2 for the second time
Q: Formula Manipulation?

Jon SnowI have a formula => a^2 + b^3 = c^2. How would I print the values of a and c, such that it works with the formula above, also the value of b is given. Example: B = 3; 3 ^ 2 + 3 ^ 3 = 9 + 27 = 36 = 6 ^ 2, so we print 3 and 6 [If there are several solutions, print any one of them - doesn't matter.]

finished part2 yay
5:58 AM
:o that took a while
Looks like those changes saved 8 bytes
TIO says 10 wait no thats when counting the charcode changes you alr did
And also broke stuff
I must have messed it up
Oh, I got the j and i backwards
6:02 AM
oh the /16 is nasty
@ASCII-only had breakfast lol
Not really competing for ranks anyway
-8 bytes
Nice to meet you @ASCII-only
6:03 AM
charcoal's a fun language
I've used it a little
abandoned tho. f
@ASCII-only Thanks for all the golfing help, looks like a total of 20 bytes were golfed down
What was the change?
6:14 AM
decode, [^:] -> <space>.
ok so not 100% sure that one works lol (edit: probs doesn't)
@ASCII-only happens, still competitive tho
"competitive" :p
anyway, what brings you back here? :P
just the aoc leaderboard
6:17 AM
i literally tied (same second) with hyperneutrino so i came back here
tckmn is really fast
kinda is. in my defense, half the time i start a couple mins late
Just found a way to golf another byte but I really don't want to edit the post again :p
wanted to do some cool matchAll flatMap golf but turns out it's longer :(
6:33 AM
@RedwolfPrograms ok I'll edit it lol
It's fine, I'll do it in the morning :p
6:49 AM
i was playing Splatoon 2 until 25 minutes in AND i'm a slow problem solver. this is not ideal
i think on this leaderboard i'm going to end up staying in last place, among those of us who continue to solve all the puzzles on time, for the rest of the month
@sporeball no I am competing for last place as well
i had this tab open waiting for you to respond and the sound STILL scared me
@sporeball mute all audio
what a concept
I know
very helpful
7:10 AM
@sporeball ayy
@sporeball get pinged.
this is the most pings i've ever received
@sporeball would you like more?
@sporeball because I can give you more
@sporeball and I've got a friend who can help me give you more
depends on if anyone asks you to stop
7:36 AM
@sporeball are you gonna ask me to stop?
i really don't care too much, but somebody else may very well call it "too many"
@sporeball well I'm gonna wait until then
8:15 AM
@Lyxal lol
8:49 AM
Oh lol there's barely anyone here
Nevermind someone just came in
Maybe that's how one makes a room more active.
Comment on the emptiness and someone enters
doesn't work on discord somehow
Have you tested it?
lot of times
8:54 AM
just makes people wanna be even more quiet
Well maybe it's a StackExchange thing.
Actually maybe it's just a TNB thing
hmm who knows
I tested my theory in another chatroom
But nobody came
good research
8:57 AM
2 hours later…
10:29 AM
I got the 69th star on the seriously repo
10:59 AM
huh, even Raymond Chen is citing MDN as a source. Does MSDN not have any documentation about Microsoft's browser's errors?
2 hours later…
1:07 PM
Q: Table plate passing game

questioner2n number of people get togather at dinner . Assume a person is named A. The chef calls out a number k .Now A passes the plate to the person next clockwise and says 1 the next person passes it to the person diamtricaly or radially opposite really and says 2 and this is again one after the other r...

3 hours later…
4:24 PM
Is the captcha on answering a global thing or something CG-site specific?
I think at some point I can be trusted to not be a robot …
It usually happens if you've been "loitering" on the question
4:43 PM
Just because I read questions multiple times to be sure. :-) I thought it might happen, because I have most JS scripts disabled. Will try to disable more than to ban that loitering detection.
2 hours later…
6:44 PM
I usually see the CAPTCHA when I paste a solution in then immediately submit it without typing anything else
That is very botlike behavior
That is a very experienced codegolfer behavior.
what, no typing up an explanation? shame
I always post first, then edit in the explanation. This saves me writing an explanation if someone ninjas me.
7:28 PM
Q: Advent of Code, Day 2, Part 1

SixtyfiveToday, my girlfriend and I started with this year's Advent of Code to improve out Python. So far we only did Day 1 and the first part of Day 2. The latter, I found to be very fun, so, to spice it up a little, with a tip o' the head to Eric Wastl, here's my attempt at turning it into a Code Golf c...

8:16 PM
@Adám It's botlike from the point of view of the non-codegolf-aware SE network's algorithm.
Of course.
8:30 PM
@UnrelatedString yea cuz cough sane people put TIO links and explanations
@xash for me it only happens when i post two solutions to the same question in quick succession so idk
@ASCII-only Uh, sane people use TIO to generate the entire post, ready to paste in.
8:51 PM
@Adám sure, doesn't generate the explanation tho
2 hours ago, by Adám
I always post first, then edit in the explanation. This saves me writing an explanation if someone ninjas me.
9:29 PM
I predict that by the next AOC challenge, there will be 52,200 people who have completed #5
(Either part one or two)

« first day (3598 days earlier)      last day (42 days later) »