« first day (2923 days earlier)      last day (675 days later) » 

12:38 AM
@DJMcMayhem int f(int a,int b){return(b&-!(b&1))+((b+1)&2)/2^((a-1)&-(a&1))+(a&2)/2;}
Or if they're nonnegative, int f(int a,int b){return(b&-!(b&1))+(b+1)%4/2^((a-1)&-(a&1))+a%4/2;}
int f(int a,int b){return(b%2?0:b)+((b+1)&2)/2^(a%2?a-1:0)+(a&2)/2;}
int f(int a,int b){return(b%2?0:b)+(b+1)%4/2^(a%2?a-1:0)+a%4/2;} // nonnegative only
@Veskah path-of-the-wildebeest-where-trapped_v2.svg - I transposed x and y
@Deadcode Noice
1:02 AM
I can't find the dot lol
Top middle :)
It took me until 300% zoom to see that orange thing
You can edit the source to make it larger... change the value of r in <circle cx="192" cy="8" r="0.125" fill="red"/>
1:18 AM
int f(int a,int b){return(b%2?0:b)+b*3/2%2^(a%2?a-1:0)+a%4/2;} // nonnegative only
A: Sandbox for Proposed Challenges

JacksonSolve the Catalan Conjecture! Let's say we have a number n, if it's even n = 2*n and if it's odd n = 3*n+1 For example: 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 you stop when you reach one because it will loop forever after that: 1 -> 4 -> 2 -> 1 Input any natural number. Your code can be a f...

2:01 AM
@Deadcode The yarn on a 3x3 cube starts at the center, spirals around the top face, then spirals across the outer faces down to the bottom face, until it reaches (0,0,-1), then goes to (0,0,-2)
Okay. I considered that too.
But it's much less like a ball of yarn.
I don't really know what to call it
2:32 AM
@lirtosiast Would it be acceptable if it covered faces using a back-and-forth snake pattern instead of a spiral? Its Chebyshev distance would still be nondecreasing.
1 hour later…
3:36 AM
Q: If there is "a winner for every language" in a code golf challenge, does competitiveness matter?

tuskiomiThe consistent attitude with regard to the golf language situation is that for every challenge, each language is a category, and subsequently there is a 'winner' for each language. This is also a very very popular opinion with regard to the new user experience. There is a problem with this idea...

Aw yeah, Participation Ribbons, boyos
4:25 AM
I suddenly just got +100 reputation for an association bonus
What is an association bonus?
Basically you haven't been a rude dude so you get to bypass the need to grind rep for basic features on new SEs
Like commenting needs either 50 or 75 rep, I forget which
Q: What is the association bonus?

Tanuj WadhwaI was just awarded +100 reputation on all of my Stack Exchange accounts. What is this bonus for? It simply says "Association Bonus" on my reputation overview. Return to FAQ index

TL;DR: when you reach 200 rep on any site on the network, all your accounts on all sites get +100, because reaching 200 rep is a decent sign that you know enough about how SE works to not need the training wheels of <100 rep on any site
4:47 AM
@Mego Oh okay, thanks!
5:42 AM
A: Sandbox for Proposed Challenges

JacksonSuper Permutations Find the super permutation for a set of size n. A super permutation of a set is one string that contains all permutations of that set. Here is a helpful video by Matt Parker Example For a set of size 2 all the permutations are AB, BA but the super permutation is ABA because ...

@Deadcode Of course. There are other solutions too, and I want part of the challenge to find the golfiest one.
3 hours later…
8:27 AM
Q: Earphone disabler

MonolicaWrite a simple python script that plays the system sound from windows speaker even if earphones are connected. For example, you should be able to play music from windows speaker and should be heard by someone who is not wearing the earphones connected. This should disable the earphone functional...

1 hour later…
9:34 AM
Q: Remove [windows-system] tag

Adámwindows-system was just created for a question put on hold as unclear, and I see no reason to have OS-specific tags. Indeed there are none for any other OSs.

2 hours later…
11:12 AM
hi all
@Anush Hello.
11:25 AM
I was thinking of a challenge where you have to say the number of moves to mate for any 3 piece chess endgame
or output that it's not a forced mate
does that sound reasonable?
I suppose it has to be a restricted time code-golf challenge to make any sense
do you personally know of a good way to solve this problem, without brute forcing?
@primo The challenge is not really to find out the answers, which I think is easy, but to encode them in small space
three pieces is just two kings plus one other piece
oh, i was thinking 3 pieces per player
@primo that's much harder!
those databases exist and it would be great to be able to encode them in less space
but not as a first challenge :)
i think the problem should be simple enough that even brute force should be viable
11:37 AM
there is a challenge where the point is for the code to find the answer
there is another challenge, the one I had in mnid, where the answers are precomputed and the challenge is to make the code including the answers as small as possible
a code-golf challenge
queue=[{state = <input>, depth = 0}]
while queue not empty:
  state, depth = queue.next()
  if state is checkmate: print(depth) and exit()
  foreach move in validmoves():
    newstate = state.apply(move)
    queue.add({newstate, depth+1})
i think that could be made fairly short
yes that's the first challenge.. but not the one I wanted :)
both would be good in fact
12:14 PM
Q: How to measure the normalized correlation coefficient between two 3d objects using their vertices, on Mathematica?

Ghadir Dogim I tried using the function "Correlation" on mathematica but it says that it measure Pearson's correlation coefficient: Correlation[Flatten[Vertices1], Flatten[Vertices2]] where Vertices1 and Vertices2 are vectors of the vertices of the two 3D objects.

1 hour later…
1:15 PM
The most recent wave of fake news spread through facebook and messaging apps have forced the Brazilian Intelligence Agency to publish a note telling people that they did not, in fact, arrest venezuelan and cuban terrorists for sabotaging the recently ruptured dam in MG.
I mean people are so desperate to blame everything on the left that they just spread this kind of misinformation and get people killed because of it.
Sorry for the political rant in TNB but goddamn does that make me mad.
1:33 PM
A: Sandbox for Proposed Challenges

mdahmouneBinary UTF-8 quine quine code-golf kolmogorov-complexity Your task, if you wish to accept it, is to write a program that outputs its own source code in the binary UTF-8 representation. Rules You must build a full program. That is, your output has to be printed to STDOUT. The source must be ...

1 hour later…
2:58 PM
Q: There's a hole in the bottom of the sea

SokWhilst trying (and failing) have persuade my infant son to eat his dinner, I tried singing to him. Mid way through this song I realised the formulaic structure might lend itself well to code golfing! The task is to write a program or function which accepts no input and produces the following tex...

@Dennis You're a fedora expert, right?
3:21 PM
I use it for TIO. Not sure if that makes me an expert...
4:19 PM
Is the following best suited for CMC or main? Given two arrays recursively consisting of strings and such arrays, determine if they are "compatible". Compatibility is defined as having the same structure and all corresponding strings have the same length (though the content may differ. E.g. ["abc",["ab","de"] and ["azz",["ab","xy"] are compatible while ["abc",["ab","de"] and ["az",["ab","xy"] are not.
Maybe even more interesting to allow numeric values too?
5:00 PM
@Doorknob I found your family album: instagram.com/knoblox
and this is where I shamelessly say that they're all prettier than our Doorknob...
Including the chicken-head one.
well, except the bulldog-headed one
Aww, they're a doorbell.
5:18 PM
@Deadcode I got your pun within the first few seconds, I'm proud of myself:)
I haven't used it for 20+ years :) and suddenly this opportunity comes up!
2 hours later…
7:13 PM
CMC - Implement Jelly's X feature. "Choose a random item from z if z is a list, or from 1 to z inclusive if z is a positive integer. If z = 0, return z. Error if z is negative or a decimal." No peeking at Jelly source code.
> No peeking at Jelly source code.
lol why?
Well, you could just copy-paste it and that's dumb.
but it's not golfed anyway
also, the "no peeking" part truly comes from you, not from the spec :P
Are you saying Dennis didn't golf the Jelly source code? I ... that is ... brain explode
well, I have seen the source code... it's awful in some ways, but definitely not golfed, others (including me) have also contributed to it...
7:21 PM
I have 72 bytes in PowerShell Try it online!
also, you haven't really described X completely apart from copying it from the wiki... what should it do when given a single character? (A: it should error)
@EriktheOutgolfer That's neat. I had thought it was a one-man job. I didn't realize it was a community effort.
um, everything can be a community effort, that's the entire point of OSS :P
Yeah, but just because it is OSS doesn't necessarily mean that multiple people have contributed to it.
although Dennis himself has set some principles
no, it means they're able to contribute, and, well, unless the repo's owner has some sort of problem, they'll most likely welcome or amend your contributions
of course, that's not always the case with private repos
in fact, a very important reform in Jelly's history was done in part by dylnan
Neat error.
Step 1023461556224: Position 1022773981816 (max: 1081064466347); pruned to 910176625888 - wilderabeest (1,2 + 1,3 + 1,4) still chugging along.
@AdmBorkBork Perl, sub f($z){ref $z?$z->[int rand@$z]:int rand$z} takes either an int or an array reference
wilderebeest (1,2 + 1,3 + 2,3) goes at least beyond Step 149213413376, but didn't have enough RAM to continue.
@Pavel nvm doesn't have the <=0 behaviour
Perl is pretty bad at this whole "list or int" idea
It can't differentiate between an int and a one-element list
7:54 PM
@AdmBorkBork Yeah, lately, we've been adding more human friendly error messages. I particularly like when it pinpoints the exact problematic item.
At least it's better than GCC
> An error occurred.
8:13 PM
Nice. PowerShell has ... verbose, let's call it ... error messages. The challenge from a while back had PowerShell I think in the lead for longest error. I mean, even things like ARNOLD C and Shakespeare were easily beating it.
@AdmBorkBork template errors tho
Yeah, that's true. There's a lot of generic boilerplate on the error messages.
Brr is it frickin' cold here today.
The high today is -15F / -26C ... and that's without windchill.
That's what you get for deciding to live in Antarctica
Actually it's about the same as the Amundsen-Scott station.
So, there's that.
8:28 PM
Did you think I was kidding? xP
No, I suppose not. But I'm not a penguin, either.
it was like 27F this morning
so chilly :]
thank goodness it has warmed up to 30F
ignoring the snow squall warning everyone in the office just got on their phones
better make a NWS alert!
Well, if you only have one snowplow per county ...
this whole state is afraid of snow
Which state?
8:38 PM
been here for almost 4 years and every year people tell me that we get a lot of snow... I've lived in Ohio and New York. CT doesn't get shit for snow
I don't think I've seen more than 4 inches
@Poke Also, out of context quote of the day.
oh there's another alert
this is definitely a good use of the national warning service
national weather service?
Yeah, National Weather Service
9:13 PM
@Poke Ohio currently has gotten like 2 inches of snow total this winter
@Quintec Not northeastern ohio
9:39 PM
@lirtosiast I like that. Even better than a challenge for a specific spiral. Looking forward to seeing what approaches emerge. Also looking forward to the follow up challenges using one of the spirals provided to set more extensions of the trapped knight / wildebeest challenges
3D chessboard? :P
9:58 PM
is anyone here a git wizard
@EriktheOutgolfer Yes I've been wondering what the moves would be. The knight's move in 2d can be described as any square at a distance of the square root of 5 from the current square, so maybe that kind of description would be the easiest way to unambiguously describe the moves of a piece that moves in 3d
@Pavel I'm not a wizard, but I can Google
What needs knowing?
@trichoplax or simply one step in one direction and two in another lol
how does sparse checkout work
I've followed all the directions and it's not doing the thing
@EriktheOutgolfer Fair enough
oh nvm i'm an idiot
no it still doesn't work
10:02 PM
Are you trying to do this:
Q: Is it possible to do a sparse checkout without checking out the whole repository first?

dromodelI'm working with a repository with a very large number of files that takes hours to checkout. I'm looking into the possibility of whether Git would work well with this kind of repository now that it supports sparse checkouts but every example that I can find does the following: git clone <path> ...

@trichoplax No I was an idiot and typo'd sparse-checkout
only 10 minutes of my life lost
10 minutes is pretty good going :)
10:19 PM
Q: Do you think artificial intelligence is watching us on Code Golf and laughing at us?

user2966384The AI is is reading Code Golf and thinking, "hahaha not even close to the most efficient, suckers!!", "It took you that long to figure out how to get it down to one byte? hahaha" Do you think the AI is doing that?

10:34 PM
@bmo way more optimization on Alchemist pls. quine currently will not complete until after heat death of universe
and maybe tick counter too pls
@AdmBorkBork High of -13f here. Nothing like a mustache full of frozen snot
10:59 PM
@AdmBorkBork Charcoal's Random built-in does this except it uses the One True 0-based indexing.

« first day (2923 days earlier)      last day (675 days later) »