« first day (3791 days earlier)      last day (124 days later) » 

7:16 PM
A: Sandbox for Proposed Challenges

AviFSLargest Number with No Repeating Digit Pairs Inspired by the problem with the same name on Puzzling SE. You are to find the largest number that only uses every digit pair once, in a given base. For example, in ternary we have 2212011002. We can do this greedily by simply starting with the large...

7:27 PM
@SandboxPosts I'm totally read to cheat and post this as is, I just have one question:
As is, I only ask it to work with bases 1-10, because including alphanumeric bases makes it needlessly complicated and detracts from the main point, I think.
But, there's the possibility of taking input as an ordered list of symbols in the base, and making you use that
So for ternary the input would be 012
And for hex it'd be 0123456789ABCDEF
if you want bases higher than 10, you can just use a list of integers
oh damn, that was stupid
so for hex it'd be [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
good point
Well do you think that adds anything?
Or shall I just leave it with only bases from 1-10
It's not like there's any way to take advantage of 1-10, and I doubt encoding it will save you bytes
i mean, you could just output the decimal representation of the number, lol, and then i see no problem doing arbitrarily higher bases
7:30 PM
So shall I just leave it simple as is?
No no, that would certainly detract I think
Isn't there something about not obfuscating the point of the challenge with something else cumbersome?
There are some langs with built-ins for base conversion
And some where that's obnoxious
That should be left to a challenge about base conversion, no?
@AviFS Eg. why we ask people not to make us parse input, unless parsing is the point of the challenge
well then there isn't really a point in making the challenge about a number IMO
What do you mean?
you could just say "output the lexicographically greatest list that contains every pair of values from 1 to N (or 0 to N-1, same thing) without repeating any pairs"
It's more about generating a series than a number
Yeah, exactly haha
and you could even accept a list as input rather than N
7:34 PM
That's what it is, just in fewer words
@hyper-neutrino I do!
That's totally the point
The fact that it represents a number is irrelevant
I think it's just cleaner to talk about it as the biggest number
Than the lexicographically greatest
It's slightly more interesting and relevant-sounding that way, too
@DarrelHoffman Hey! Sorry my internet went out for a bit
the thing is solutions will likely just construct the digit list and then index it back into the mapping, which is an unnecessary extra step
Ugh, texts got scrambled
hold on
So to clarify, I'm personally against taking just 16 as input and requiring the person to do it in hex.
to be fair, I am considering this based on code-golf standards, not so much staying true to the original idea/concept
7:41 PM
But I'm entertaining taking 0123456789ABCDEF as input
And I'm also against requiring post-processing to convert the number into decimal. More interested in just treating it like a sequence-generating thing
And forgetting that it represents a number
Oh, FYI, there's an OEIS for this: oeis.org/A034712
Also oeis.org/A034711 for the base 10 representation
No way! Nice find
Woah cool
It's funny bc I made a note to myself to submit it to the OEIS
I always check first, but I just figured they wouldn't have it
Never doubt the great OEIS
@hyper-neutrino Agreed, I'm sure they will
They only bothered going up to base-8. Not sure if they do alphanumeric ones on there?
I suppose the question becomes whether to ask for hex and take the output like
But I don't think that adds anything
And then you have to start worrying about clear delimiters
I think it's kind of fun as is where you can have any gibberish irregularly mixed in
So long as it's not a digit 0-9
I'm curious to see if anyone comes up with something neat abusing that
Yeah, it kind of just separates the languages that have built-in higher base support from those that don't...
7:46 PM
well, any language can have higher base support if you just use an array of digits
Though it might've been fun to see it taken all the way out to base 36...
Well less so if we take [1,16,4,3,14,2] rather than A4F291
and outputting the number from 0-9A-Z is just an index-into-list which is boring
and converting to decimal is just a convert-from-base which is boring
@DarrelHoffman Yeah, it would. But I feel like it's a net loss
So are we happy with the I/O scheme, then?
If so, I'm posting it right away!
I'm confident with this one aside from that. Bye-bye Sandbox
Okay by me...
7:49 PM
Sounds good! Thanks for your feedback and reflection @DarrelHoffman & @hyper-neutrino
And for coming to join us in TNB, welcome!!
Alright, here goes:
Q: Largest Number with No Repeating Digit Pairs

AviFSInspired by the problem with the same name on Puzzling SE. You are to find the largest number that only uses every digit pair once, in a given base. For example, in ternary we have 2212011002. We can do this greedily by simply starting with the largest number, and then adding the next largest n...

Any other tags you can think of?
@cairdcoinheringaahing Wow, I never knew there was one like this. But no, the bases are a red-herring
7:53 PM
It's just the max digit you should use in the lexicographically greatest sequence where all two adjacent pairs are unique
Yep, I just read "bases" and went, oh, that tag :P
> If you feel like a challenge, you can take octal as input. I won't complain!
Haha, thanks
It's true
I've no idea why I just said thanks tbh, but thanks... I guess
7:54 PM
I get the joke here (and I like it), but it wouldn't surprise me if some people (annoyingly) take it literally and ask what the input should be for e.g. 4
Just a warning :P
@Wezl Number has the same red-herring problem. It's not realllyyy anything to do with a number. But I think I'll add it anyway
@Wezl Don't see that one. Doesn't feel like counting
@AviFS yeah I meant more like
@Adám It's more that all of a sudden I realised I had two that I could post.
@Wezl Interesting, that never would've occurred to me. But you're right
> This challenge is intended to be solved by sorting, ordering, or otherwise organizing some set of data.
@Wezl Huh. The things you come up with!
They both sound soooo wrong to me at face-value
I don't think greedy works
7:59 PM
But again, it makes sense!
> A permutation is a particular ordering of some list of objects. Problems tagged with permutation usually involve finding or generating permutations, including anagrams of text.
I'll add them both
Tag wikis really need improvement, I just haven't managed to convince myself to go on an editing splurge like I did on meta
That's all 5, thanks everyone
yeah greedy definitely doesn't work
@cairdcoinheringaahing But I think those two are great, that's what convinced me to use the tags!
@hyper-neutrino Oh?
trivial brute force is possible but like O((N^2)!)
@AviFS try binary
we start with 11
8:00 PM
I think so
then we can't add 1 so we have 110
then we can add 0 or 1 so we greedily add 1
1101 leaves us with only three pairs, no 00, and no way to continue
Oh wait, good point
Turns out when you post two questions in one day, you repcap.
8:01 PM
I'll take that out
Bye for now
you could greedily insert items by inserting each next pair in the rightmost slot though
@Ausername Haha, I found that out too the hard way : (
I'm soooo close to 1000...
@hyper-neutrino Oh?
8:02 PM
for ternary, for example
start with 22
then, we insert 21 at the rightmost valid slot and get 221
wait this won't work either
brute force it is
@Ausername At least you get a badge for repcap : p
@hyper-neutrino No no, there's an algorithm
it's probably less golfy though :P
@AviFS 3 in fact :P
Pretty simple one
I like how every answer for N includes most of the answer for N-1, except the last digit...
8:03 PM
And then 2, to loop back to the beginning
Do you see the pattern?
@DarrelHoffman same, but too lazy to write code
1000 rep here we comeeee
I will see allll the downvotes
there aren't many to see usually :p
@AviFS There's a userscript for that :P
anyone want to write Is there a triangle in this grid?
or...Is there a straight line on this grid?
8:09 PM
@cairdcoinheringaahing Ohhhh... that's lame
@Wezl We don't have one of those?
@hyper-neutrino Man that was fast!
after i saw the pattern it became easy :P
And you golfed it down so quickly! How long does that part take?
It is easy, haha
i wrote it out golfed
8:11 PM
@Wezl Rep farming?
i don't write code and then golf it, i just write it out golfed and then compress it even more later if possible
and then when i write ungolfed and commented solutions, i manually ungolf it :P
python is my go-to lang, but i don't know how to golf it at all
Writing ungolfed code is painful
certainly not like that
8:13 PM
imagine having a go-to language without go-to
after I golf in python for a bit, spacing around operators looks wrong
@Wezl This is def not where I'd go for rep farming. What kind of monster are you?
Ugh...does anyone else think this is completely unreadable?
Yes, it's JS.
@AviFS Can we return [0,0] for 1 and an integer otherwise?
8:17 PM
One more upvote away from 1k!
Anyone feeling generous?
I hate when people add so much structure and abstraction and stuff that the actual code is broken up into ten thousand little one line functions
@RedwolfPrograms Seriously, though, what about is unreadable?
@RedwolfPrograms I mean, they're very liberal with their comments and whitespace, but that code looks pretty reasonable to me
@cairdcoinheringaahing For which?
@AviFS For the largest number one
As long as they've published the docs somewhere, there should be no problem
8:18 PM
Every single line of that involves thirty assorted functions, so you have to go hunting through all sorts of stuff just to find the real meat of the code. It's like eating crab legs but the crab has forty thousand legs and they each only have a tiny string of meat inside them.
My Jelly answer finds the smallest number :/
And there's so many huge multiline comments for tiny things it obscures the readability
@RedwolfPrograms yeah, but golfed code doesn't really make it more readable
I'm not talking about golfed code, I just had to read through that to find something
8:19 PM
@RedwolfPrograms Upvote for that priceless analogy
@RedwolfPrograms There's a few with unnecessary extra lines such as this, but comments are good
@cairdcoinheringaahing I'm somehow not getting it
Oh wait
Where are these one-liners with thirty assorted functions?
You mean return [0,0] for unary
@AviFS If the input is 1 for this, the output should be 00. That's not an integer, so can we return [0,0] instead?
8:20 PM
and something like 221210210 for ternary
@cairdcoinheringaahing Ah sorry, no if that complicates things I'll take that out as a requirement
@user I'm heavily over-exaggerating, it's usually just one or two :p
@AviFS Yes, the integer 221210210 rather than [2,2,1,2,1,0,2,1,0]
And I was going to add a footnote that said 0 is okay too
this sort of stuff is horrible
Oh wait, no
They're different numbers in unary
I'll just take that out
Not worthwhile
8:22 PM
@RedwolfPrograms I mean the names make it understandable enough for me
@Wezl Well if it weren't for that comment, how on earth are you supposed to figure out code is a status code, of all things? :p
@cairdcoinheringaahing You only need to do it for bases 2-10
@AviFS Definitely seems like an unnecessary edge case
Readable variable names make half of those comments useless
Does JS have something like JavaDoc?
8:22 PM
It hadn't occurred to me it'd complicate things
@cairdcoinheringaahing But you're still printing it in it's native base, right?
So are you just multiplying by 10 and then adding the next digit?
@AviFS Well, HN has outgolfed my invalid Jelly answer, so I doubt I'll give it a go :P
@Wezl lol this is worse
@AviFS ooh, nice. i was actually gonna suggest that maybe
I'm curious how treating it as a number could be a good idea
Sounds good
I counted up and found the first integer that fit the conditions
But that only gets the smallest, not the largest
8:24 PM
Shall I change it to the smallest then, haha
@Wezl That's the closest to i++ // increment i I've ever seen lol
@cairdcoinheringaahing wouldn't that take you til the heat death of the universe then lol
Count down then : p
or am i misinterpreting
@hyper-neutrino ...maybe
8:24 PM
From infinty
jon skeet could do that
Honestly, you could
# finishes for 2 in a second, but doesn't get close to 3 :P
It'll never be bigger than the answer for 9
So you can count down
Fine with me
it would never terminate xD but it's code-golf, that's theoretically valid
8:26 PM
Well, it takes 45 bytes to compress the answer for 10 (the lowest upper bound), so I'd have to make an effort to get a proper upper bound :P
well, it's a base-related problem. just waiting for bubbler to come destroy by jelly sol
Let me just filter each integer from \$10^{102}\$ to \$11001\$ and get the max :P
Handy chart: Start on whatever row you want, read until the end, add another copy of first digit:
That might be exploitable
@DarrelHoffman You just had to give that away : p
8:30 PM
Oh, should I delete the post?
Nice observation!
No no, just teasing
Nice find
I have a chart that goes all the way up to Z, looks much better with leading spaces, but not sure how to do that in chat...
I was thinking of making one that just encoded that number and the indices at which to chop it according to the input, just for kicks
you can monospace in chat using the 'fixed font' button on the right when you multi-line a message
Leading spaces makes the descending digits in each row line up.
8:32 PM
But it looks like you'll beat me to it!
@DarrelHoffman No way! Serious dedication right there. You can upload files, maybe?
I did click fixed font, but it killed my leading spaces.
(Didn't take all that long, once you know the pattern)
Or just Ctrl-K and take up the the screen! It'll be nice to not be the one hogging half of it
Mess around in the Sandbox to get it right, then post it in here
8:33 PM
Guys, I'm at 1000!!!
Haha, thanks guys! I'm happy, too
Just because of the downvotes, though
Which I evidently could've used a userscript for...
thanks @cairdcoinheringaahing :p
Yeah, Ctrl-K, just like the Fixed Font button, kills leading spaces.
Ctrl + K is just a shortcut for the fixed font button, right?
8:36 PM
That works.
Pingano with the meta ping sound is so weird
I really like it though
(async () => {
    var context = new AudioContext();

    var ping_sound = null;

    var grab_ping_sound = async () => await new Promise((r) => {
        var xhttp = new XMLHttpRequest();

        xhttp.onload = () => {
            context.decodeAudioData(xhttp.response, (buffer) => {
                ping_sound = buffer;


        xhttp.open("GET", "/chat/meta2.mp3");
        xhttp.responseType = "arraybuffer";

(Test here)
ok the SE ping sound is like
just one tone so it's relatively normal
the really low notes are super cursed because the timing gets stretched out too
if you hold Z and D down at the same time (and your keyboard can handle that properly) you get train sound
You can try the SO one by changing meta2 to so, but it's a bit boring :p
8:43 PM
Hmm, now I can see that someone downvoted Mr. Binary Counterman, I wonder why
Perhaps the name, haha
most challenges end up getting a downvote or two. it's nothing you need to worry about :p
'Course! Just wonder why
the weighting of votes is really imbalanced anyway - five downvotes are needed to nullify one upvote (when it comes to rep gain)
And why they don't leave a comment
heh. leaving comments when downvoting has been... a contentious topic of discussion for as long as I can remember and probably as long as SE's been around
8:44 PM
Moist random downvoters don't
@hyper-neutrino True! But doesn't it cost 10 rep to leave one
@RedwolfPrograms what about dry ones?
WW said something pretty good about not leaving a comment when downvoting that I like a lot, let me just find it
On mobile lol
8:45 PM
Or does it just cost 2 rep
it costs 1 to downvote an answer and 0 otherwise
> I usually leave a comment when I think that there is something that I would change to make the thing I downvoted better. I don't really have suggestions for these answers. What I would like is for them to be more inventive or clever, or to not exist at all. In short I would like them to be less bad, which is to me what a downvote says on its own.
To me I feel that leaving comments that don't offer anything constructive can come off as vindictive or targeting. I really don't have a personal issue with anyone there, nor do I want to start any sort of argument.
From here
thank you SE chat for putting "see full text" on something that doesn't change when you click "see full text"
Ugh, and I think the chat improvements userscript gets rid of the quote formatting for (see full text) messages :/
If I think I can see something that makes a bad (IMO) post better, I'll leave it. If not, I'll just silently downvote and move on. Obviously not everyone is like this, but ¯\_(ツ)_/¯
I wonder if there's a math.mp3
8:50 PM
I know SE says we should use downvotes more often, but what good do they actually do on a site like this unless you're trying to close it?
downvoting on CGCC is... very different
I can't think of a case where I'd downvote
i downvote a challenge that is not objectively bad but that i dislike
i will not point to examples as that would be impolite
I know the rep change is insignificant but it still feels punitive
I will always downvote a challenge that changes to invalidate my answer
8:50 PM
oh yeah, that ^ for sure
I would downvote that way if they didn't lose rep
i don't really downvote answers - if i think the challenge is too trivial, i'll downvote the challenge, and if the answer shows no effort i'll usually just leave it
@hyper-neutrino I'd love to do this
i used to downvote answers that were invalid alongside voting to delete, or alongside flagging spam, but as you can imagine, that's no longer really applicable
How would an inquiry about removing downvote rep-cost for CGCC be received in meta?
Is it even possible to do site-specific?
8:52 PM
I'd love to downvote everything that I find uninteresting
Which is a hell of a lot
We've been told that point blank by a Cm - it's Nerf all or nothing
But on the scale that I'd do it, it doesn't feel justifiable
That's a bummer
Is it a possibility tech-wise?
in general I just don't (and wouldn't advise doing either) searching for things to vote on, i just vote on things as i come across them
8:53 PM
Or are site-specific rep things not implemented
TBH I wish downvotes were -10
@hyper-neutrino I don't either
@RedwolfPrograms But then we'd use them way differently
Not just when things are uninteresting
@AviFS I know this is an "ivory tower" kind of view - but try to ignore reputation. It's nice to see the number go up, its extra nice to see the little green +10 (or whatever) and its even nicer to see the "You've earned badge/privilege" green thing. But, try to prioritise actions that improve the site over the little dopamine rush from getting rep/the sadness from losing rep. I still do the same - I hesitate before dv'ing answers because I lose rep, I double check before bounties etc. But prioritising quality actions over rep-centric actions does, in the "long" term, lead to getting more r
It'd keep my rep at a nice multiple of ten though :p
@cairdcoinheringaahing In this case it's not the point I lose by downvoting, but the points they lose
8:56 PM
think of it this way - if rep is an incentive, downvoting someone is a disincentive
Ah, in that case I have a different paragraph to type out :P
So even if I stop caring about rep, I can't possibly expect that everyone else has two
i downvote posts i would rather people not produce :p which isn't too common
@cairdcoinheringaahing Haha, sounds good!
It feels unpleasant to be downvoted without explanation and lose rep, and whatever is gained doesn't feel worth the cost
it feels unpleasant for the number to not be a multiple of 10
8:57 PM
I do that for most kinds of reviewing
Unless something actually bad happened, I only leave a starred review if the stars I'd give them wouldn't lower their average
That is, if I'm going to give them more or equal stars
Unless there's a good reason, it just doesn't feel worthwhile
Especially with reviews when their livelihoods can be at stake
(Uber will stop showing you to as many people if you go below 4 stars, I think)
And the cost to their career/prospects, for them and whoever they're trying to support, doesn't to me seem worth potentially saving a few people from one 20min ride with a slightly moody driver, for example
Anyway, CGCC is not that
But that's my general view
true, but the whole field is competition and it makes more sense to promote better people over worse people - and with the rest of the Q+A, to promote better answers over worse answers, for example. but yes, affecting people's livelihoods is definitely a consideration
@AviFS Unlike a lot of sites with some form of "approval" vote (likes, retweets, etc.), SE has "disapproval" as well, specifically to discourage poor behaviour. If a post isn't, in your eyes, something you want to see again elsewhere, downvote it. And yes, it's discouraging to the person who posted it - but that's kinda the point. And I'd much rather receive the odd downvote on an overall positively received post than have someone meticulously describe everything they dislike about what I did
a hyper-competitive or restrictive job market that ends with people unable to support themselves is a whole other can of worms though, and I'd rather not get into socioeconomic/political discussions :P
anyway i gotta go for now. o/
true, i didn't mean to! 'til later hyper
Downvoting is your way of saying "No, please don't do this again", and people are free to take that how they will. Fingers crossed, most people don't focus on a single negative in a field of positives, and downvotes have more weight in numbers, but some will, and it's best to explain what a downvote means to those users
9:03 PM
@cairdcoinheringaahing True, but I don't thumbs down on YouTube either
In principle and at a thinking level, I think I wholeheartedly agree. But on an emotional level, it's never felt worthwhile in the moment
yeah I'm not sure what exactly downvotes mean on YT
Do we know what they mean on SE?
Aside from closing eventually, probably just reduces visibility, no?
And lets the person know everyone hates them, haha
> this question does not show any research effort; it is unclear or not useful
> this answer is not useful
Those are the tooltips you get by hovering over the downvote button. On most SE sites, that is 100% what they should be used for
Oh, I thought he meant he doesn't know what their effect is
for example I downvoted an answer which was irreducible (no whitespace etc.) but which made zero golfing attempt
9:07 PM
But if they were new? I'm too soft I guess, haha
@AviFS Downvotes on YouTube can be a good thing, as user engagement - any user engagement - can be seen as good to The Algorithm.
Showing people controversial stuff gets more views and ad revenue I guess
Twitter seems to thrive off that business model: p
Reddit literally has a "Sort by controversial" mode :P
9:32 PM
COVID test is not fun with allergies
MUAHAHAHAHAA. behold, my æae masterpiece: pastebin.com/raw/tuyzwRCC (took me forever to make this)
i lost all my bookmarks so sorry :)
wait why am I RO here o.O
@RedwolfPrograms this is sort of my warmup for CBL. I made this language.
@ThomasWard You're a mod :P
9:39 PM
also, I forgot one thing in the code
ah right, interesting that it shows me as RO everywhere now xD Looks like i failed at the universe and missed a feature implementation by SE. :)
Mods have RO powers on all chat rooms aside from chat.meta ones (need to be an MSE mod), or the chat.stackoverflow ones (need to be an SO mod)
we also have the vicious chat-system-wide "BE SILENT" tool as diamonds... shiftyeyes
haaaa, that's funny, there's actually a Powershell interpreter in TIO xD
@cairdcoinheringaahing you can tell how long it's been since i've actually surfaced and paid attention to the chat system by how much i'm forgetting xD
@RedwolfPrograms ... unless you wrote the code ungolfed to begin with and then golfed it... hides

« first day (3791 days earlier)      last day (124 days later) »