« first day (3978 days earlier)      last day (863 days later) » 
00:00 - 12:0012:00 - 00:00

12:00 AM
0
Q: AoC2021 Day 20: Wonky license check

BubblerPart of Advent of Code Golf 2021 event. See the linked meta post for details. Related to AoC2018 Day 8. The license file for an imaginary software system is defined as follows: The entire file is a sequence of non-negative integers. The entire file defines a tree of nodes. Each node in the tree...

 
A lot of the normal ones seem geared towards SO: "Complete eight consecutive reopen reviews, where the majority of voters agreed with you.", "Have five of your answers accepted by others in the same day.", "Write 10 positively-scored answers on open questions in one day."
 
Huh, the title is wrong again
frick
 
12:12 AM
@NewPosts @Bubbler ?
 
12:48 AM
What are the differences between (?:..) and (...) in regex?
 
depends on the flavor, ?: is sometimes a non-capturing group iirc - i.e. it matches that group and saves it but ignores it in the eventual match
 
Example using regex101.com?
 
@Riker personally I prefer the spicy flavor of regex
 
in that context, ? sets the 'flags' for the parentheses, and : sets 'doesn't capture'
 
capturing? what is capturing in regex?
 
12:51 AM
@Fmbalbuena if you don't know what capturing is, i recommend reading a basic overview of how regular expressions work first
but as you can see in that regex, there are 3 sets of parentheses - but the first set has ?: and is therefore noncapturing
so it marks it as part of the match but not a 'group'
(i don't have a particularly good regex guide in mind so google is more helpful than asking me for one, I think)
 
(?:b)a* and (b)a*?
 
those are both groups - hte first is a non-capturing one, second is a normal
 
oh that is incredibly unfortunate. i was trying to make a test case for the lit-up room problem as an edge case that broke my first solution and ended up making ascii art of what looks way too close to being a swastika for me to suggest it for the problem ._.
 
that would match ba with any number (including zero) of a, but the groups of the regex wouldn't include the b
 
@hyper-neutrino that's a ಠ_ಠ from me
 
12:54 AM
note: noncapturing groups are close to useless if you're not using other groups, i believe
like, there's no point - it doesn't affect whether or not the string matches or not directly
 
if you aren't capturing some other groups you lose nothing by using capturing groups where you don't use what they capture
 
@emanresuA :|
 
@hyper-neutrino that reminds me of a puzzle app which includes a puzzle kind which is literally the same as the challenge - if you set the grid to the min size and set square cover to 95%, you'd see that shape sometimes
Simon Tatham's puzzle pack for Android
It's been patched though
 
@emanresuA what's your opinion on my io format (empty=0 light=15 wall=16)
 
1:00 AM
trying to lit up the room with vyxal
 
@Riker Noncapturing groups are very useful when it is modified with * or + where capturing isn't quite what you want, and capturing impacts performance
 
@Bubbler when you're not using normal groups does the former matter? second makes sense good pt
 
e.g. (ab*)+ vs. (?:ab*)+
 
*matter, not pattern
 
in regex, 10*1$ checks if the number is odd or even (binary)
 
1:03 AM
Also noncapturing groups don't consume a slot of captured group, which is limited (often 100) in most regex engines, though you're probably doing something wrong if that actually matters
 
1:17 AM
@hyper-neutrino If you mean by whether that's valid,
> You may take input as a matrix of characters or integers, [...]
 
ok, cool
 
1:37 AM
@Fmbalbuena you only need the 1$ part (otherwise it won't match 1)
@cairdcoinheringaahing "Use Dark mode"
 
@cairdcoinheringaahing I've done #3 once or twice...
 
The only way to do it here is to post to old challenges and hope you get an upvote on enough of them
 
alephalpha is speeeeeeed
 
@cairdcoinheringaahing We've had 10 challenges in a day a few times recently, but that's including challenges that get closed
The last time we consistently had 10+ challenges per day was 2017
In fact, the last time we had 70 or more challenges in a week was the first week of August 2017 :/
 
10 challenges a day is actually too much, one can't consistently try all of them unless they have absolutely no life
 
1:50 AM
i think we have a good amount of people like that here
 
Especially now that its the winter (or summer) break for anyone in school/uni :P
 
according to universitiesaustralia.edu.au/our-universities/…, it's on average not summer break for australian unis rn
 
wdym? it is summer break rn
 
^ (except I'm not in uni)
 
huh. ¯\_(ツ)_/¯ idk i thought your breaks didn't exactly line up with the inverse of ours but i guess i'm misremembering
 
1:55 AM
i've been on break since mid november lol
 
oh wait, these must be the breaks that occur between term ends and starts, and ofc holidays are extra breaks anyway
 
correct
 
am smrt
 
Idk about Lyxal but we get mid-dec to start of feb off
 
cuz it just so happens that my term is ending now so the winter break isn't so much a special winter holiday as just "the term's over and won't be starting til after the break" (for me at least)
 
1:56 AM
@emanresuA that used to be me
 
Yeah, Christmas :P
 
Aren't australian school holidays a week off NZ's?
 
idk I'm not in school anymore
 
@hyper-neutrino could you send me that test case before i post my sol
 
this is just an extension of the "CGCC is busier during the week than the weekend" behaviour
 
2:06 AM
@UnrelatedString i didn't actually finish it i was halfway through and realized it was kinda sus
 
ic
i'll just post then
 
and also it doesn't even necessarily countercase my old solution
 
i just realized my solution was brok and fixed it and in theory it should work
 
@UnrelatedString Wow thta's nice
 
2:08 AM
basically ripped off my solution to an older challenge lol
 
oh wtf
 
this lol
4
A: In Flanders Fields

Unrelated StringJelly, 18 14 bytes UÄUaÄa2 ZÇZoÇ_ Try it online! -4 bytes because I figured out what I did wrong with my cumulative sums Input and output is as two-dimensional lists with . mapped to 0, + mapped to 1, and * mapped to 2. (The footer on TIO converts automatically for convenience.) ...

 
@Bubbler Many of us here meet that requirement :p
 
@hyper-neutrino it's summer at winter and vice versa for them, so they have a much longer holiday around december
 
ik the summer winter flip i just misremembered the details of the break cuz like
i know their terms don't line up with us (i think they're near opposite because of the flip)
but i am stupid and forgot you can have breaks without it being between terms
 
2:21 AM
CMM: can I upvote this with an alt account, since it's not my challenge?
 
I upvoted it, so I'd say no
 
ok
 
i wonder how often Z(monad)Z is used in jelly
 
Hm, got trialogue
 
...good question actually
 
2:25 AM
also i had a suspicion your sol wasn't correct and i am disappointed to say i was right
 
@hyper-neutrino 7 times in the corpus I have
 
I guess not much because you already have various pairs of built-ins that operate on rows and columns, and you can often get away with each
 
it's a damn good thing we've got some pairs of things where one does one thing over rows and the other does the same thing over columns but i'm not sure how much it comes up outside those
also fwiw i am thinking of a 1 byte under-transpose in perhaps
 
yeah i asked cuz i was wondering if a quick to do it would be useful :P
 
2:26 AM
under transpose saves a byte only when the monad being transposed is an atom
 
well technically it could save more if the monad being transposed is three links
because there is no 5x link combiner to do ZABCZ [?]
 
specifically if it's being grouped already that is, i assume
 
and instead of doing like ZABC[3]Z[3] you could do ABC[3][?]
 
also in the case of a dyad but that seems
rare
 
Hmm probably yeah
 
2:28 AM
or specifically a dyad in a monadic chain
 
oh true if you want to do this dyadically to like flip both the left and right side the current method is something like ZdZZ i think?
 
@hyper-neutrino ...how the hell did i not think of that counterexample
 
@pxeger (those are ÄUIÇÇÇÇ)
 
@UnrelatedString it took me a while too and i even roughly knew what i was looking for
 
frankly i'm surprised none of the existing test cases caught that now that i realize the problem
wait no
the sixth one does catch it
i'm fucking blind lmao
 
2:32 AM
LOL
how did i not notice
if you steal »×¥@\Ṛ$⁺ from the light-up section of my program you get a solution that's only 2 bytes longer than your current
and if I steal your second line instead of using my weird zip method I get a solution that's 2 bytes shorter than my current
 
actually, there are a few more: _Ṃ$€ Ç€ Ṣ€
 
and then we'd end up with the same sol kekw
 
i think i have some other idea half formed
 
also ’Ạ instead of i1 is the same byte count and gets you nicer-looking output
 
2:34 AM
true
or even just... 1e
 
@hyper-neutrino Often enough for me to add a quick for it in my fork
 
i
'm going to edit that in without a fix actually
 
@cairdcoinheringaahing oh lol
@UnrelatedString ... frick
i was like "damn e@1 would look nice but i1 is shorter so screw output consistency"
💀
 
we are so good at jelly
 
(Kind of, it's closer to <link>Z$2¡, but very similar)
 
2:35 AM
You're better than I am
 
@cairdcoinheringaahing oh i see
 
The trick is to pretend you know what you're doing enough that people assume you do :P
These atoms here are very... atomy :P
 
also today i had the fun experience of rediscovering that does NOT group the duplicated link so if you want to quick a doubled link you have to $ it again yourself
or just use 2 + upside down exclamation mark
 
@hyper-neutrino Oh my god, I hate that so much
 
it can be useful
 
2:37 AM
it's arguably more useful than the other way around
because if it did group, you would not be able to split it up
 
I legit changed it in my fork to group, and that's one of like 3 non-backwards compatible changes I made
 
i think i've used ⁺€ once or twice
 
but since it doesn't, you can a) group it back together yourself pretty easily, 2) just use nrepeat x2
 
I think I added Ð small plus to behave as the old small plus did
 
2:40 AM
that would make sense
 
...it just occurred to me, does base jelly really not have any 0-arity digraph quicks
i guess that's not too weird since it doesn't have a lot of digraph quicks to begin with
 
Something from Jelly that I'd really like in Vyxal: dyadic filter.
 
Is that like JS's .filter?
 
what exactly does that do
 
i suppose filter the second arg after applying a function to the first and second
 
2:44 AM
In jelly you can do stuff like L=¥Ƈ
(Filter by length is equal to other argument)
In Vyxal you have to use the register or similar annoying wizardry.
 
oh wait i read that backwards
 
@UnrelatedString What would they do?
 
that is a good question
 
The only zero arity quicks are the ones that call other links
 
zero arity as in "not taking any other links", not "resulting in a nilad", right?
 
2:47 AM
having a version of that duplicates the second-most-recent link could be useful but as a digraph it would be pretty marginal since if you're spending two bytes it's only a gain if you have to use a helper link for something else
yeah
 
shhh
we don't mention that here
@emanresuA so does that mean it'd be triadic?
 
what no
 
I propose a whole set of jelly-link-as-stack manipulation quicks
 
2:52 AM
Oh wait yes actually
 
> other argument
that means there's a function, an item to filter, and one other item to compare against
 
Yeag
Note: Function gets dyadified
 
@Bubbler if we add enough, we could make Jelly parsing Turing-complete!
 
0
Q: Nesting list `n` amount of times

U12-F̉͋̅̾̇orwardGiven the input of n and value. The code is supposed to nest the single element list with value n times. This is code-golf, so the shortest code in bytes wins. Test cases: n = 1, value = 'a': ['a'] n = 2, value = 'a': ['a', ['a']] n = 3, value = 'a': ['a', ['a', ['a']]] n = 4, value = 'a': ['a', ...

 
@hyper-neutrino okay yeah i give up i'm stealing this lol
 
3:09 AM
lol
 
@NewPosts I think it might be because it's 3am, but I cannot get a solution working to this :/
 
i have one but it involves using absolute references with superscripts and an eval STDIN so like
basically not even jelly at this point
 
because it keeps giving me [[[[[[1, 1], 1], [1, 1]], [[1, 1], 1]], [[[1, 1], 1], [1, 1]]], [[[[1, 1], 1], [1, 1]], [[1, 1], 1]]] for 1 x6 no matter how i reorganize it
well this question is going on HNQ 100%
 
i think i have something
 
3:15 AM
oh wait my sol isn't even valid cuz it doesn't wrap the n=1 case
 
are you sure it doesn't just look like it doesn't
i haven't actually looked myself
wait i completely misread the challenge i don't have something
 
When OP answers their own question, incorrectly...
This doesn't work for n=1pxeger 27 secs ago
 
okay i have a 5 byter
reminds me of the guy who self answered with a c# snippet that was missing necessary imports
 
CMQ: Is HTML "coding"?
 
I say yes
TIL we have a tag
 
3:21 AM
yes, even if HTML isn't a programming language you are writing something that is code i.e. "A system of symbols and rules that serve as instructions for a computer." (thefreedictionary.com/code)
 
@NewPosts FWIW, this was posted by a hat hunter :P
 
this challenge's inconsistency annoys me
 
I find it perfectly consistent
 
Jelly's problem with strings vs characters might be the issue @hyper-neutrino
 
actually wait it's not inconsistent
just that just about every golfing language dies because you can't repeat pair
 
3:23 AM
use a number so you don't get any string vs character fuckiness
 
whereas languages that can't do that efficiently and just ternary anyway are perfectly fine
 
-1 byte by remembering how ¡ works ;P — caird coinheringaahing 3 mins ago
 
someone should answer with Haskell's replicate and claim that Haskell list is essentially nested pairs :P
 
i could've sworn i tried that at some point
 
@UnrelatedString :P
 
3:24 AM
ẋ,@/ works too anyway and i like it better
 
oooh
i thought i tried that
nice
 
Damn, I tried that with x and it didn't work
 
@hyper-neutrino I literally just thought of that approach :P
 
Wait, why didn't it work
 
i definitely tried something with both
 
3:25 AM
x doesn't work on numbers for some reason that i don't really understand
 
I'm too tired for golfing
 
whatever i did worked fine for everything except n=
 
wait, yes it does
 
3:28 AM
@NewPosts @DLosc i have 16 for this one, but i think there's a better way
 
@hyper-neutrino wait no yeah this still doesn't wrap the deepest one
 
well i came up with tio.run/##KyjKL8nP@59m@7/…
which is... literally just redwolf's js program but with extra brackets because proton sucks
for whatever reason a => b = c => d will try to assign c => d to a => b
 
@Razetime ok, now at 12
 
i hate this abomination of a language i've created
 
3:36 AM
woah, does Proton have something like while comprehensions?
 
Doesn't look like a comprehension but just a while statement followed by an expression without separator
which is cursed
 
yeah
you don't need to put semicolons, those are available for clarity
but if you put two statements next to each other it just assumes you meant to separate them
also if you put two expressions together in a function call it just assumes you meant them to be separate arguments because commas are also optional
 
uh
 
Sometimes proton is better than JS or Python... Sometimes it's worse than both
 
3:38 AM
it's golfier when it works
n=>v=>((a=>[v,a])*n)([v]) i'm still quite happy with the way this works
 
why is function multiplication a thing?
so is addition composition?
 
it's very important
 
Why did you replace your Jelly answer, and ignore caird's 4-byte suggestion?
 
because neither my original nor the 4-byter were valid
 
can't believe I just got recommended an elsa-gate style video on youtube
 
3:50 AM
@hyper-neutrino oh
 
4:19 AM
CMC: Most irrelevant xkcd
(No using xkcd.surge.sh)
 
a relevant xkcd would be irrelevant here because you asked for irrelevant xkcds, and an irrelevant xkcd would be what you want and therefore it'd be relevant.
 
Great, I've been paradoxed
 
4:43 AM
You know you're in need of some organization when the only thing on your to-do list is "write to-do list"
 
Todo: Determine if my todo list is done.
 
5:03 AM
Todo: Todo: Todo: Todo: Recursion limit exceeded
 
Dec 13 '20 at 4:57, by Lyxal
note to self: make a note to self saying "note to self: make a note to self saying "note to self: make a note to self saying "note to self: make a note to self saying "note to self: make a note to self saying "note to self: make a note to self saying "note to self: make a note to self saying "note to self: make a note to self saying "...
 
Lol, ninjad by a year and a week
 
I am speed
 
5:36 AM
Today I made a crossbow in minecraft that shoots donkeys instead of doing something productive
2
See I meant to make it shoot dragon fireballs but I hit enter too early on the autocomplete
 
lol, nice
 
 
2 hours later…
7:27 AM
Uhm I want to ask a question on code golf.SE
:)
 
Make sure you use the sandbox to get feedback from people to help iron out any flaws
 
8:07 AM
i hate school
 
@PyGamer0 I just came from school Bruh.
 
even me lol
 
8:25 AM
Haha imagine having to go to school
4
 
Summer holidays go brr
 
oh wait you live in NZ
my winter holidays is a week away :/
 
0
A: Sandbox for Proposed Challenges

emanresu ADumbo octopus flashing time code-challenge Day 11 of this year's AoC was about a grid of bioluminescent dumbo octopi. I'll try to explain how this works, click on the link for a better explanation. You have a 10x10 grid of octopi which slowly gain energy and flash when fully charged. Each octopus...

 
@PyGamer0 Yeah, summer holidays are a bigger deal here - they're as long as your winter holidays (I think)
 
@PyGamer0 in the UK I'm pretty sure school holidays started at the end of last week
are you in a country that doesn't widely celebrate Christmas?
because to have holidays starting on xmas day would be very weird here
 
8:54 AM
I may not even have winter holidays because i didn't pass my chinese :(
 
9:14 AM
8
Q: Why is stock market crash so bad?

HairiMany folks speak about potential stock market crash when central back raise interest rates. I am not a graduade economist nor I pretend to understand it, but I am definitely curious about whats happen because it affects me. A lot. I have two questions: Why FED/ECB/whatever raising interest rate...

Hm, wonder why... /s
 
Does BQN have a matrix multiplication builtin?
 
that feeling when you spend ages trying to golf a program, and produce like 20 variants, all of which are the same length and no shorter
 
9:43 AM
@pxeger for me holidays start from 24th
and it is for 1 week
i think its my school cause my friend's holidays have started
but another friend has exams currently
@emanresuA 1 week?
are you spying on me irl?
 
I was just guessing, and wrong
(Our winter holidays are two weeks)
 
I am confusion
2
New Zealand eggsplain
 
@emanresuA my summer holidays were 2 months (when i was smol)
now its gonna be a single month
 
We have 2-week holidays between terms, 6-week summer holiday from mid-dec to end of jan.
 
@emanresuA 6 weeks o_o
which grade are you in?
 
9:53 AM
High school
 
@cairdcoinheringaahing I'm pretty sure the Nile exists
 
@emanresuA i meant exact number
isnt rwp in 10th?
Oct 8 at 4:29, by Redwolf Programs
I'm in 10th grade now, so just over two and a half years.
 
@pxeger (and last I checked, it was in a liquid state)
 
i am pretty sure there are 69 states of matter
 
@PyGamer0 10th grade in america is different from year 10 here :P
 
9:58 AM
wat
wtf
whytf
 
The education system in New Zealand is a three-tier model which includes primary and intermediate schools, followed by secondary schools (high schools) and tertiary education at universities and polytechnics. The academic year in New Zealand varies between institutions, but generally runs from early February until mid-December for primary schools, late January to late November or early December for secondary schools and polytechnics, and from late February until mid-November for universities. In 2009, the Programme for International Student Assessment (PISA), published by the Organisation for...
I need sleep, o/
 
o/
ok so i give up, i think age is the better option to compare
 
10:16 AM
Do the questions on code golf generally receive so many upvotes?
 
@emanresuA same here except sometimes it was 3 weeks between terms
 
11:17 AM
@Wolgwang relative to...?
 
@JoKing Most of the SE sites
 
i think so yeah. At the very least, they recieve more answers, and there's a core set of users for which pretty much all questions are relevant
i don't really participate on the other sites though, but just having a look now, i see a lot of 0-1 upvote questions
 
11:51 AM
0
A: Sandbox for Proposed Challenges

CreaZyp154Schrödinger's cat program When first run, the program will have a 50/50 chance of doing the following: A cat program A standard cat program: read STDIN and put it on STDOUT. Nothing (no-op) The programs just halt (the cat is dead). The behaviour is permanent: Once the program choose between the t...

 
00:00 - 12:0012:00 - 00:00

« first day (3978 days earlier)      last day (863 days later) »