« first day (3968 days earlier)      last day (869 days later) » 
00:00 - 17:0017:00 - 00:00

12:00 AM
0
Q: AoCG2021 Day 10: Memory reallocation routine

BubblerPart of Advent of Code Golf 2021 event. See the linked meta post for details. Related to AoC2017 Day 6. A debugger program here is having an issue: it is trying to repair a memory reallocation routine, but it keeps getting stuck in an infinite loop. In this area, there are n memory banks; each m...

 
AoCG notice: Challenge posting volunteers appreciated for 11th and 12th (details in the link)
2
 
I can do the 11th
And most probably the 12th
 
12:34 AM
@lyxal It's not free though, right?
 
@rues I think they'd still do the 3 month free trial credits
 
Hmm, I guess I'll sign up when I really need it then
Probably right before an English essay is due
@DLosc Don't worry, it's perfectly possible to marry again without a divorce and still avoid polygamy. You just need to, ahem, make sure your current spouse disappears somehow
 
12:56 AM
CMC: print infinite digits of e (array or float)
 
Hmm, I think it's the first time to see a git commit hash starting with 11 digits (ref)
2
 
Sandbox posts last active a week ago: Introduction
 
@OldSandboxPosts conclusion
@Bubbler I see your 11 and raise you a 12
2
 
0
Q: Calculate the truncated log2 of some unsigned integer

Nigel BessDefinition Given some number, x calculate the smallest number i such that 2i≥x. In other words, calculate the number of bits needed to represent x as an unsigned integer. Input Input will be an unsigned 32-bit integer. Output Output will be an unsigned integer (8-bit, 16-bit, 32-bit etc. are all ...

 
@lyxal Oh lol, you win
 
1:10 AM
It's actually rues who won lol
 
I am good at 12 abuse :)
Ugh, I can't wait for my name to change back to user
"rues" is such a dumb name
Hey hyperneutrino, could you 11 my name to "HALP DA MODS 11'D MY NAM"? :P
 
@NewPosts shouldn't the output for 15 be 3?
Actually nvm I just can't read
 
@rues why 12?
 
Just a TNB-specific joke
11 is mod abuse, 12 is room owner abuse
 
@rues here or all sites
 
1:17 AM
Wait can you actually do that?
Just here, then, I have a reputation to maintain on other sites lol
 
i mean if you want ಠ_ಠ just because i trust it won't be taken seriously and our site has a positive mod-community relationship overall (i hope)
 
I want :P
!
 
enjoy ಠ_ಠ
 
11 11 11 11 11
 
1:43 AM
I can't believe this question stayed up that long and got an answer with 23 votes
 
and just look at how much arguing there is in the comments for each answer
kinda crazy there was a time people wouldn't have just thought, maybe the question is the problem here
 
I love that one of the answers is in JAVA (no, not Java)
 
and is also a snippet
 
2:00 AM
tfw most of the answers aren't following the language requirement kekw
 
typical old posts
 
@HALPDAMODS11'DMYNAM that's south of where I am
No wait I thought you meant the heavy rain in Sydney
Lol I didn't actually check the link
 
I was like bruh why you asking about weather for
 
I have no idea what's going on Down Under lol
 
2:04 AM
Not realising you were actually talking about something completely different
 
I don't even know what's going on where I live :P
 
kekw
@HALPDAMODS11'DMYNAM what's worse is that this links to a message where I say I'm in the east coast of Australia lol
Which is also why I got a little bamboozled
 
Wait it does?
 
2:19 AM
At least it does for me
 
I thought it linked to the garfield quote
 
It doesn't actually highlight it lol
Because mobile chat bad
 
Desktop site ftw
 
yeah it links to the garfield quote
why is it that when i see the words "garfield quote" i just immediately think "why is it called an oven when you of in the cold food of out hot eat the food"
 
@Bubbler Makes sense tho, as without it, you could edit in any tag you have a gold tag badge in, then hammer the wuestion
 
2:30 AM
Yeah true
 
An exception for on this site, given the unique nature of the tag, would be nice tho
 
User A adding it and user B closing is always OK, right?
 
i wonder
do y'all mind if we do a little science
my plan: i will reopen this question, submit a suggested edit from an alt account, have a gold code-golf tag badge holder Accept & Edit it, and then try to hammer it
if this works, it is technically a vector for abuse (although a rather elaborate one, compared to just retag+closing it yourself which takes about 5 seconds)
 
@hyper-neutrino I'm for this science
 
That would be quite noticeable I think
 
2:43 AM
yeah
the reviews generated would definitely raise a huge amount of red flags (not literal ones)
alright, @lyxal (since you responded first) can you Approve + Edit (just like add a newline or smth) this review item?
 
step 1 done
dupe target?
 
oh uh just do this one
dead challenge and my lowest scored one lol
 
 
ah, okay, this makes sense
 
> Your code-golf badge usually lets you single-handedly close code-golf questions as duplicates and reopen them. However, since you participated in editing this question's tags, this privilege doesn't apply this time.
 
2:46 AM
cool, just wanted to find out :P
 
science accomplished
 
10/10 edit
 
And the results are?
 
2:57 AM
10 mins ago, by lyxal
user image
 
@UnrelatedString Good, so I'm not the only one
 
3:29 AM
0
A: Sandbox for Proposed Challenges

Redwolf ProgramsQuickly pour liquid nitrogen I have a container of liquid nitrogen, but nothing to measure it with. I do have some containers, whose volumes I know, and I know how much I start with. My goal is to fill any container with a given amount of liquid nitrogen, with the fewest possible pours. Important...

 
3:47 AM
@SandboxPosts the real question is who let redwolf purchase liquid nitrogen?
 
I made it out of thin air
 
@SandboxPosts the real question is who let redwolf purchase make liquid nitrogen?
 
lyxal's fridge is strong enough to make liquid nitrogen out of air
 
then the real question should be how did redwolf use my fridge I suppose
 
Ignore me hides in cabinet
Aaron let me in
How a plat operated a key I'm still not sure of, but then again they usually don't type or golf code either
Wait weird..."code golf" if it's a noun, and "golf code" if it's a verb
Although "golf code" could be code of golfing, as in golfed code
"code golf" for the thing we do, and "golf code" for the thing we make
 
3:57 AM
@RedwolfPrograms *sigh* I'll go call animal control
 
Hey, I have Aaron held hostage in here
 
that's not aaron
aaron's in the sink
 
D:
I can't go back to prison!
 
don't worry you won't be going to prison
you'll be sent to our testing facilities for experimentation
I hope you like sweeden lol
 
Sweden's actually pretty cool
But anyway, I gtg for the next half hour or so o/
(To Sweden of course :p)
 
4:00 AM
@RedwolfPrograms duh, why else do you think the organisation decided to base our most classified research operations there?
 
4:10 AM
CMC: Given a string of lowercase letters and spaces, surround 3 random (every word has an equal chance of being chosen) words (words = groups of letters that don't include spaces) in [] and uppercase all words not in square brackets
for example, if youve lost control of your life then you've just gotta grab it by the silly strings might turn into IF YOUVE LOST CONTROL OF YOUR [life] THEN YOU JUST GOTTA GRAB IT BY THE [silly] [strings]
 
4:34 AM
0
A: Sandbox for Proposed Challenges

alephalphaSymmetries of a 2d array code-golf array matrix classification Given a 2d array, what symmetries does it have? Let's only consider reflections and rotations. We can classify 2d arrays into 10 classes, according to the symmetries they have. These 10 classes correspond to the 10 subgroups of the d...

 
@RedwolfPrograms nah, im just chillin
 
5:25 AM
argh why arent my imports working
 
TNB is kinda similar to zoo
 
do elaborate
 
we have cat, karby, wolf, lyxal( assume lyxal is a species that isn’t human) and we have identicons
 
lol
and what am i?
 
also humans if you ask
@PyGamer0 you are gamer
 
5:34 AM
what keyword did you use to generate that?
 
new room name: The Ninteenth Byte Zoo
 
@hyper-neutrino ?
 
pygamer's pfp is generated by that one AI i think
 
yes
 
oh
 
5:35 AM
lyxal generated it for me
 
i thought it was drawn by someone
 
@hyper-neutrino he used my name
 
@hyper-neutrino Same lol, except I stuck a hat on i
 
lyxal, emanresu's and mine are generated by ai
aipfpgang
 
5:38 AM
is this the next catboy/girl
 
mine was randomly came from discord bot
 
@dzaima does CBQN support windows (mingw / msys2 to be more specific)?
will building work on cygwin?
 
@hyper-neutrino clearly not because people don't actually use them except for 3 people
 
@PyGamer0 join the apl farm
 
?
 
5:53 AM
WSL
Use cBQN on wsl
simplest way to do it
 
@RedwolfPrograms Hey, geroff or I'll clear(this)
 
i'm more likely to not use a command line utility if it's windows only than if it's linux only and i'm on windows
 
@Razetime oh i dont want to switch to wsl
 
you pretty much need wsl
 
you want wsl
it's nice
 
5:57 AM
me when macos
 
:/
 
macos build should be possible.
 
@lyxal Retina, 25 bytes
 
6:27 AM
> IF YOUVE [lost] CONTROL OF [your] LIFE THEN YOU'VE JUST GOTTA GRAB IT BY THE SILLY [strings]
lost your strings?
 
no
@PyGamer0 context
 
7:01 AM
@PyGamer0 I haven't myself done anything to try to support it, so just use WSL
 
7:39 AM
So y'all know how words in sentences can have their inner letters scrambled and you can still make sense of it?
 
How are these two messages related?
@lyxal Your clock is eight minutes fast
 
lyxal, looks like it didn't work for this
 
@emanresuA It's the nice numbers but with the inner digits scrambled
@emanresuA no, it's when a timer is set to go off
 
8:13 AM
CMP: if you could choose whether or not the "share" button included your user ID, what would you pick?
 
@hyper-neutrino I don't know if you've noticed, but I always manually remove the user ID from the share URLs
 
I haven't noticed actually :P I do do that sometimes although I don't care as much about it so I usually forget
 
I've considered making a userscript to remove it, actually
 
i just made a userscript to detect it in mod messages because we were discussing this in the TL and how you could accidentally reveal who you were
 
all ways round it seems like a bad idea tbh
it exists only for the "share a link which is later clicked by XYZ unique IP addresses" badges, right?
(and probably also general analytics/tracking)
 
8:19 AM
... exactly
 
@hyper-neutrino Wdym "reveal who you were"
 
the badge thing is probably the main thing
@emanresuA mod messages are private
 
^, ^^^^^
 
sorry, anonymous
but if the message you get has a site link and it has the user ID attached to it
it likely gives away which mod sent the message
 
Wait so, in TL you can't see who you're talking to? Sounds kinda annoying for discussion.
 
8:20 AM
> i made a userscript to detect it in mod messages
no, I was talking about mod messages
 
Oh, do you mean flag responses + stuff
 
mod messages are a way for mods to privately contact users about moderation problems
 
no, I specifically mean mod messages
 
@pxeger Oh ok.
 
like, the things we send people privately for things that need to be brought up privately, or when suspending people
 
8:21 AM
(I've never had a mod message actually, how do you receive them?)
 
like, what do you have to do to get them, or what do they look like
 
the latter
do they just appear like as inbox notifications?
 
Yep
 
this is what it looks like to us
this is what it looks like to you
you get an inbox notif of type "moderator message" from "<Site name> Stack Exchange Moderators" and the text has the cut off version of the message
 
seeing the minecraft icon on your taskbar reminded me:
 
8:25 AM
and if the mod doesn't uncheck the box, it also sends you an email
 
anyone hear about the log4j 0day affecting Minecraft (and a huge number of other things)?
 
correction - the checkbox doesn't exist in the UI anymore, but it's still a client-side field so you can manually disable it or use a userscript to bring it back
this is useful when the message is only being sent to issue a 1-year suspension to spam accounts because destroying them is relatively pointless, and emailing them isn't useful
 
what's the 209 in the URL? Is it just like a message ID?
 
probably means the 209th message sent on this site, yeah
 
> very serious moderation issues only
Science is very serious
 
8:27 AM
yes
i forget what i even was testing with that
 
Also go sleep
3am is very early in the morning
 
yeah, too early to go to sleep yet
 
Teens these days with their unhealthy bedtimes
 
arent you a teen
 
i don't remember if lyxal is younger or older than me lol. i'm pretty sure younger but i forgor
 
8:36 AM
@hyper-neutrino we're basically the same age
 
8:48 AM
I'm a similar age to pygamer (I think)
 
whats your age
@pxeger what happens if i disable the garbage collector gc.disable()
do i manually delete my variables with delete?
 
¯\_(ツ)_/¯ Python is weird
 
@PyGamer0 ???
 
click on execute
 
8:56 AM
yeah but why?
 
Oh yeah, that trick.
 
well i took pxeger's code and just added list around range
 
@Fmbalbuena It's basically making artificial ranges by making the properties of an integer correspond to global varaibles
 
oh thats how it works
 
0..r is parsed as 0.0 .r, taking ther property of a float
 
8:57 AM
Oh!
so technically function composition can be made in python using this method
 
Which would normally be undefined and throw an error, but pxeger's code catches accessing those properties of a float and creates a range from that to the value of the variable.
@PyGamer0 ¯\_(ツ)_/¯ Ask pxeger
 
ok how to check if an object is a function?
in python
 
6 mins ago, by emanresu A
@PyGamer0 ¯\_(ツ)_/¯ Ask pxeger
I know a bit of python
 
checked on SO
types.FunctionType
 
That's what Vyxal uses, but I wasn't sure if that was python in general
 
9:08 AM
hi all
 
@emanresuA i almost did it
 
I have a list of pairs in Python. Each entry is (integer, datetime). I want to compute the sum of the integer value for each hour. How can I do that?
 
@Fmbalbuena no it is not
 
@PyGamer0 why?
 
9:13 AM
because......idk lol
 
@Bubbler At my job we had a bug one time where if the first 20 places were all digits the build would fail. I spent a long time trying to fix my code before we figured out the issue was my commit hash.
 
@PyGamer0 isinstance(obj, types.FunctionType)
@emanresuA that is python in general - I had to look it up myself lol
 
@lyxal you got ninja'd
 
9:32 AM
@PyGamer0 I figured I'd also include the usage of isinstance
Because that's the better way to check type
 
9:53 AM
@Adám is the reason why Courier New is soo thin, is the same reason as to why SAX2 and APL2741 are thin?
 
Yes.
@PyGamer0 From Wikipedia:
> Courier New appears as a system font on many electronic devices. This Courier variant was produced for electronic use by Monotype. Its thin appearance when printed on paper owes to its being "digitized directly from the golf ball of the IBM Selectric" without accounting for the visual weight normally added by the typewriter's ink ribbon.
 
why is it still used?
 
You're asking me?
 
i havent found a bolder version of it
@Adám yes
 
Well, people have gotten used to it. It instantly conveys the "court document" or "screen play" feeling, and then that familiarity perpetuates.
That said, several updated versions have corrected the line weight.
See e.g. Courier Prime.
 
10:09 AM
> gibibyte
 
@Adám ok ty
 
o/ (slep)
 
,/
 
10:26 AM
CMC: Implement the de casteljau algorithm
 
@pxeger It’s crazy, I can’t even tell why putting a url in works like that
 
@HALPDAMODS11'DMYNAM what happened to you lol
 
Dumb joke
It looks like log4j just likes to load classes from random urls. Very smort
 
wait how did you change your name
 
10:38 AM
I didn’t, hyper actually 11’d it
 
wait why
 
Ok it looks like log4j doesn’t try to really load classes, but it tries to deserialize that object, letting it run code
@PyGamer0 Because I asked him to
 
9 hours ago, by rues
Hey hyperneutrino, could you 11 my name to "HALP DA MODS 11'D MY NAM"? :P
ok i have seen the true power of mods
HALP MEH WETH MAH METH PRABLAM: WAT IZ 1+1????????? (good joke ik)
PLZ HALP MY LIF DEPANDZ AN IT
 
Please keep the noise down.
 
@pxeger oh yeah i heard that there is a minecraft vulnerability but nothing else lmao
 
 
1 hour later…
11:57 AM
@UnrelatedString I heard on Reddit that it shouldn’t impact you if you have a higher Java version (11 or sth)
 
is there a good online site to set up a simple yes/no poll? doodle is good for selecting dates
 
@Anush Google Polls? :P
 
12:17 PM
@cairdcoinheringaahing The new summary page actually looks a lot better now. i've changed my downvote on the meta to an upvote
now we wait for the other 200 people to do the same lol
 
It's an unusual position for me I would say, but I find myself aligned with the frothing SE mob this time.
The old page was good, I didn't have any issues with it, and this one is rather bad.
 
i don't actually really remember enough about the old page, except the top Rep/Badges/Impact section
 
Really? I used that page all the time.
 
ah, you know what, i'm just looking at the summary section. the rest of the pages aren't that great
still too much padding, wtf
 
Yeah. I can see like 4 things at a time.
 
12:30 PM
It does look okay on mobile, though
 
Yeah, because it's made to work on mobile.
 
12:42 PM
@AlanBagel does that exist?
 
@Anush no
 
1:32 PM
@RedwolfPrograms this is an interesting question, and me and some other people discussed it trying to decide which puzzle games had more consistent rulesets. we did not reach any conclusions
 
3 hours ago, by PyGamer0
CMC: Implement the de casteljau algorithm
CMC: ^
 
1:45 PM
@PyGamer0 vtc as unobservable requirement
 
@Neil ??????
 
@GrainGhost The only issue with the old page is that it was awful on mobile. If they had gone into this with the mentality of "How can we minimally adapt this current page to work on mobile?", it would've been much better
 
2:06 PM
@Anush strawpoll
 
2:36 PM
-206
Q: New responsive Activity page

Dan CormierUpdate 2 - December 8, 2021: We’ve shipped a bunch of refinements over the last 24 hours or so. We’re going through the bugs and design requests and marking them with the proper tags. There’s a lot here, so it’ll take us a minute. We’ve done the following to address your design feedback in the ne...

^ the net score LOL
 
0
A: Sandbox for Proposed Challenges

Alan BagelChunk Sort a List code-golf sorting Your task is to input a list of integers and chunk sort it. You may assume the input list can always be chunked into groups of 1, 2, and 3. Definition Chunk sorting (a term I made up for the purpose of this challenge) is the action of first chunking a sequence ...

Planning to post this soon. ^ Feedback is welcome.
 
2:58 PM
@Razetime thanks! Someone has told me that doodle can in fact do it too but I can't see that
 
@Bubbler The odds of that are around 0.002%
 
@PyGamer0 you just get memory leaks
I don't think del changes much, it doesn't forcibly free the object, just removes a reference
 
so how to prevent memory leaks when its disabled?
enable gc again
 
don't construct cycles and let refcounting do the work
(good luck with that, though)
 
6 hours ago, by PyGamer0
@emanresuA i almost did it
@pxeger ^ can i somehow make that work properly?
 
3:07 PM
@PyGamer0 Yeah super cool.
 
i wish that there was a simple programming language that was very hackable
i should try to create a practical language
 
@PyGamer0 lisp?
 
@pxeger thanks!
@pxeger lisp is hackable?
like i can change builtins?
 
with macros, you can change literally everything
I don't think you can actually change builtins, but you can rewrite them
you can make all instances of (+ 1 2) be rewritten into (* 1 2) which basically changes the builtins
 
@pxeger #define printf cout in C...
 
3:14 PM
 
@PyGamer0 the . operator has the wrong associativity
 
oh
right to left?
 
so you're getting (f . g) . h not f . (g . h)
because f . (g . h) is what f . g . h normally means
and you can't do f . (g . h) because of Python's syntax
 
yes :/
 
@pxeger but can you do a = g . h; f . a?
 
4:05 PM
@pxeger wait aren’t they the same?
 
yeah
I think the conclusion is actually that this method is enormously jank and it shouldn't work at all
 
@PyGamer0 How does that even work?
I sense Lombok-level black magic
 
@HALPDAMODS11'DMYNAM types.FunctionType.__dict__ is the attribute namespace of the class of functions
but it's a read-only proxy
 
so gc.get_referents(types.FunctionType.__dict__)[0] gets underlying namespace dict object which you can write to, since the only object to which the proxy refers is the actual dict
 
4:14 PM
Interesting
 
sys.settrace(____fn_com);F=sys._getframe();F.f_trace_opcodes,F.f_trace=1>0,____fn_com sets a "trace function" so that every ____fn_com is called once between execution of every single opcode by the interpreter
 
Oh i think i saw you use settrace once before
 
type(n, (), {"__get__": lambda d, v, t: ...}) creates a new class with a __get__ method and then () instantiates that class
 
Couldn’t one use the class keyword syntax instead?
 
the resulting object is called a descriptor, which is complicated, but basically whenever an attribute lookup returns a descriptor object, the descriptor's __get__ method is called and its return value is used instead of the descriptor itself
@HALPDAMODS11'DMYNAM no, because something something closures yes; I just realised that the type() way also breaks because of python closure jank and that's the source of the bug - it wasn't the associativity
anyway, the final step is every time the trace function is called, it adds a descriptor to FunctionType with the name of each currently defined global variable n, so that (any function)'s .n attribute returns the composition (lambda *args: v(globals[n](*args)))
 
4:42 PM
@AlanBagel It's similar to this (chunk sizes always go 1,2,3,1,2,3,etc and adding a "sort each"), but it doesn't look like a dupe of anything I can find, and it looks clear to me
CMC: Output the sequence of possible lengths of inputs to @AlanBagel's challenge (1, 1+2, 1+2+3, 1+2+3+1, 1+2+3+1+2, ...): 1, 3, 6, 7, 9, 12, 13, 15, 16, .... Standard I/O
 
@cairdcoinheringaahing How many numbers are required?
 
It's a sequence challenge, so either nth number, first n or all indefinitely. Your choice
 
0
Q: Chunk Sort a Sequence

Alan BagelYour task is to input a list of integers and chunk sort it. You may assume the input list can always be chunked into groups of 1, 2, and 3. Definition Chunk sorting (a term I made up for the purpose of this challenge) is the action of first chunking a sequence into groups of 1, 2, and 3 in a cycl...

 
@cairdcoinheringaahing Python, 35 bytes
@cairdcoinheringaahing should be 18, not 16, right?
 
@pxeger Yep, my bad
 
4:52 PM
ninja'd by 5 seconds :p
wait, mine is wrong, isn't it
 
My western gun is not the fastest :(
 
alright, I found a really cursed 10-byter :P
 
@hyper-neutrino explanation?
 
I've already golfed my answer by 50 bytes lol
It's also currently a funny number
 
4:59 PM
@NewPosts @AlanBagel Can we have a trailing empty list (e.g. [5, 9, -2, 8, -6, 4, 5, 9, 1] -> [[5], [-2, 9], [-6, 4, 8], [5], [1, 9], []]?
 
@cairdcoinheringaahing No
 
That's not a list of length 1, 2, or 3 ;)
 
Now I actually have to try to beat HN rather than just use an edge case :P
 
00:00 - 17:0017:00 - 00:00

« first day (3968 days earlier)      last day (869 days later) »