« first day (3037 days earlier)      last day (92 days later) » 

7:32 AM
@Neil curious to see how well Charcoal can perform here codegolf.stackexchange.com/questions/99735/walk-the-words
1 hour later…
8:51 AM
@BassdropCumberwubwubwub here's a fun variant where l and r map to 45-degree turns: Try it online!
A: Sandbox for Proposed Challenges

someoneEnumerate Pythagorean triples code-golf The task is to create a program that either outputs Pythagorean triples forever so that each triple is outputted in a finite amount of time or, given a integer \$n\$, outputs the \$n\$-th (in 0-based or 1-based indexing) triple in any numbering that assign...

@Neil Nice, I like the possibilities of Charcoal. Well done on the 29-byter!
@BassdropCumberwubwubwub although Charcoal does have Direction variables, the best I could do with those was 30 bytes: Try it online!
...wait can I use a multidirectional there?
yes, 27 bytes!
9:08 AM
@Neil Would be nice, looks like 05AB1E has a shorter solution already
I'm sure you can improve it more. You can't let 05AB1E win on a challenge like this ;)
It's honestly astounding to me how you can pull off such solutions in such a short timeframe
Both languages look like black magic to me
I'll add an explanation after I've tried getting it down some more. Not happy with the last part
There was a bug in yours? @Emigna looks like you're tied now
Yeah, I forgot about the case-insensitive part
9:13 AM
Well I gotta run, feel free to ping me when there's a winner, otherwise I'll change the accepted answer to Charcoal since that was posted earlier
Aye :) I'll see if I can beat it
ah, it turns out that Charcoal accepts rdlu directly as computed directions, that saves a whole 7 bytes!
Awh, doubt I can beat that
9:38 AM
there goes another byte
another byte bites the dust
10:12 AM
@BassdropCumberwubwubwub in the meanwhile, maybe the tick should go elsewhere... ;)
10:44 AM
given a tic-tac-toe position, determine if its a valid win for one side. A valid win is a winning position that could have actually arisen in real play
what do I need to do to get this unclosed? I think I addressed all the concerns. codegolf.stackexchange.com/questions/185842/…
11:26 AM
@Anush 1000th digit is a 3, not a 4
11:49 AM
@primo oh! Is that due to rounding? I mean I just copied it from maple
Q: Convert between Korean two-set keyboard and qwerty keyboard

LegenDUSTIntrodution Let's talk about Korean keyboard first. As you can see in Wikipedia, there is Kor/Eng key to change between Korean and English key set in Korean keyboard. Korean sometimes types wrong : attempt to write in Korean in qwerty keyboard or English in two-set keyboard. So, here is proble...

12:09 PM
Whoops, I accepted the charcoal answer again. Great job to the both of you, nice trick to use a dictionary word @Emigna
It was Grimy's idea :) Very clever use of a word I'd never heard of before (ubridal)
12:22 PM
@xnor I'm going to let it fall by the wayside, unfortunately. Sorry about that. Except a new one shortly. — connectyourcharger 13 hours ago
That's a shame.
CMC: Given two lists A and B of equal length, (stable) reorder A according to the order in B. E.g. A=[10,20,30,40] and B=[21,43,32,54] the order in B is first-smallest (21), third-smallest (43), second-smallest (32), fourth-smallest (54); so reorder A by taking its first element (10), then third element (30), then second element (20), then fourth element (40) for a result of [10,30,20,40]
(stable means that if B has duplicates, we take them in order of appearance)
12:52 PM
Surprisingly difficult
Stupid PowerShell
Why does $a|sort{Random} work, but $a|sort{$b[$i++]} not?
@Adám I'm assuming that's just {⍺[⍋⍵]} in Dyalog? Didn't test
1:11 PM
Q: Maximum summed sub sequences with no two numbers sharing the same digit

bizidenSuppose there are 5 positive integers in an array or list as 14, 12, 23, 45, 39. 15 and 12 cannot be taken in the subset as 1 is common in both. Similarly {12, 23}, {23, 39}, {14, 45} cannot be included in the same subset. So the subset which forms the maximum sum is {12, 45, 39}. The maximum s...

1:30 PM
@primo it was ...37 at the end which I had rounded up to 4. Thanks for spotting that!
if anyone would be kind enough to reopen codegolf.stackexchange.com/q/185842/9207 I would love to see some answers!
A: Sandbox for Proposed Challenges

stackzebraGiven a position of a chess piece and another square, determine if the chess piece attacks that square Input Input would be in the form Qe4 c6 Where the first term denotes the piece and its position and the second term is the square we're interested in. Labels for pieces are: K - king ...

(thanks to whoever voted to reopen just now.. one more to go!)
we need more like that
1:48 PM
@Anush "must output the first 1000 digits in less than 10 seconds" you should clarify that that's for the specific input 1000 if the answer goes down that route
@dzaima Sorry I don't understand. Doesn't "the first 1000 digits" already say that?
@Anush sort of, but it could also be interpreted as you needing to output the first 1000 digits in 10s for an input of 10000
is my edit ok?
thanks for reopening it
now we just need answers :)
maybe I should add ?
bounty added, as promised
1:54 PM
@J.Sallé {⍺[⍋⍋⍵]}
2:36 PM
@Adám why are there little sailboats in your code
@Skidsdev Those, my friend, are Concordes taking off.
They're obviously trees. That's where the APL Orchard is.
or are they old-school vertical windmills?
@Skidsdev They are actually upgrades.
@Adám R←⍋Y This notation means that takes Y and returns R, right?
2:42 PM
@Skidsdev Yes, exactly.
Heh, accepted answer that isn't up to specs
array of rank greater than 0 Is rank like the dimensions of it? IE an array of rank 0 would be a single scalar value, an array of rank 1 would be a conventional directional array etc?
@Skidsdev You got it, spot on.
So.. is it essentially just a sort? Or am I missing something?
@Skidsdev It as a grade; the indices that would sort.
2:52 PM
Hmm, so rather than actually sorting the array, it just outputs the indices of the sorted items
@Skidsdev indices for the sorted items. ⍋⍋ gives the indices of the sorted items after they are sorted.
@Adám Wouldn't that always just be 1,2,3...n?
@Skidsdev No I mean for each element in their order of appearance, the position it ends up in after the sort.
@Adám I think I understand. So for the example given in the docs, array M, the list of strings "Goldilocks", "porridge" etc. ⍋M = 4 1 3 2, So would ⍋⍋M be 2 4 3 1?
@Skidsdev Yes. A.k.a. the inversion of a permutation.
3:06 PM
@Adám Okay, i understand how it works now. Re-implemented it in JS just to make sure I actually understand what it's doing, and at the very least I'm getting the same results :P
Thanks for the explanation and patience! :)
@Skidsdev My pleasure.
@Skidsdev I'm just curious if you realise what amazingly powerful tool you just implemented. Much more versatile than sort.
@Adám I don't think I do, I can't think of many usecases off the top of my head, so it seems like a fairly niche function. Admittedly my JS approach is pretty naive
Also is much shorter than g=x=>x.concat().sort().map(i=>x.indexOf(i));
@Skidsdev E.g. The perfect shuffle of two lists (optionally of unequal lengths) is the concatenation of the lists, indexed by the grade of the concatenation of the lists' enumerations. (A,B)[⍋(⍳≢A),(⍳≢B)] in APL.
Ooooh are we getting one more person down the APL rabbit hole? :D
@Adám I was with you right up until concatenation of the lists' enumerations
3:17 PM
@Skidsdev ≢A gives you the number of major cells in A (or the number of elements if it's a simple vector). Then, generates a numeric vector starting from the index origin, which is 1 by default, and ending with that number. So, if A ← 5 6 3 2 8, ≢A is 5, and ⍳≢A is 1 2 3 4 5.
ah I see
so ≢A is basically length (for simple vectors at least), and is basically range
Yup, precisely.
and does the comma between the 2 concatenate them?
(⍳≢A),(⍳≢B) this comma
Yes, dyadic , concatenates
3:33 PM
@J.Sallé I had to run to pick up mu family at the train. On the way I thought I should have asked J.Sallé to explain that to Skidsdev if necessary. Nah, he'll know to pick it up… Thanks!
Hahahah yeah, I thought you were busy when you stopped responding so I picked it up
3:47 PM
@Skidsdev Try entering in the Search field of this page.
@Adám oh wow, seems quite useful
@Adám Well, here's my somewhat naive gradeUp implementation in JS
@Skidsdev Wait, that fails on duplicates.
@Adám example?
@Skidsdev no idea what part of this makes it fail, but it doesn't match my impl
@Skidsdev Try it online! Compare with TryAPL.
3:58 PM
@Adám that's correct though, no?
@dzaima No, always returns a permutation vector.
@Adám JS uses 0-based indices, not 1-based
@Skidsdev This then.
@Adám that matches though
@Adám yep, which is what the JS is outputting
4:00 PM
@dzaima @Skidsdev Yeah, sorry, I somehow thought I got [1,2,2]. Juggling too many strawberries.
> Juggling too many strawberries.
First I've heard that expression.
Same, and I love it
@dzaima gah I forgot JS is monumentally stupid with sort()
sort() optionally takes a predicate to be used to sort 2 items at a time
I meant that literally:
user image
if you don't give it one, it sorts based on the string representation of the items
meaning 43 is sorted before 5
@Adám Im quite jealous
@Skidsdev My sons got awarded in school for their exceptional behaviour, so I'm rewarding them.
4:06 PM
@dzaima This will work for numerical arrays
@Skidsdev Right, I remember that when looking into what other languages do, as research for TAO.
@Skidsdev Sure, but then it doesn't work on strings and arrays.
@Adám I can make it work on all of em, but it'll take a bit more work
@Skidsdev We could make this a main challenge for our collection.
@Adám It'd make a pretty decent main challenge actually, here's my JS so far that should correctly sort any 1d array
oh hmm the link is too long
@Skidsdev Press Shift+Enter, then paste the link.
4:18 PM
for some context on JS's sort method:
If the predicate return is `> 0`, `a` is sorted before `b`. If the predicate return is `< 0`, `a` is sorted after `b`. If the predicate return is `== 0`, `a` and `b` are considered equal
@Adám Yum!
@Skidsdev That's a lot of… code. This is how it is implemented in ngn/apl.
@DJMcMayhem Possibly. I didn't even have a taste before my family gobbled them all up. ;-)
I have myself to blame — I was TNBing.
@Adám dont' let us distract you from precious strawberries!
@Skidsdev Too late now. Next up: avocado dip.
I don't think I'm a very picky person. But I can't stand avocados
4:24 PM
Mmm, not a fan of avocado
They're a terrible meme, but delicious.
Dec 27 '18 at 21:26, by DJMcMayhem
Avocado is disgusting.
You haven't tried my dip. Anyway, not ready yet (and afaik, none of you are in London):
I can't stand the horrible mushy texture
4:25 PM
@Adám I am!
Different london though
@Skidsdev London, Ontario?
@Adám I'm going to visit London in a month!
@DJMcMayhem You're welcome to stop by. LeakyNun visited me a couple of times.
Have to admit, as much as I dislike avocado, my fiancee made avocado egg mayo/egg salad once and it was really good
4:31 PM
@xnor Re: the "Point out a string character" challenge -- codegolf.meta.stackexchange.com/q/1292/42963
hi all
I strongly dislike avocados but damn, gimme guacamole and I'm a happy camper.
heyya anush
does anyone know how hard tic-tac-toe is to play if you have an n by n board and you have to get m<=n in a line?
@Adám Whoa, you got loicenses for all them knives, gov?
4:32 PM
See I don't like guac either
@Anush depends on what you mean by "how hard"
@Skidsdev well 3 by 3 is completely trivial
is 4 by 4 still completely trivial?
@Anush depends on your threshold of completely trivial. How do you quantify the difficulty?
Number of possible final board states, maybe?
@Skidsdev a 5 year old of average intelligence can learn to force a draw in 3 by 3 tic tac toe :)
or number of possible winning board states
@Veskah I don't think that's quite necessary for peeling knives. My watermelon knife, on the other hand… ;-)
4:35 PM
can the same be said for the 4 by 4 version?
@Anush Do you know the game Pente?
@DJMcMayhem I didn't before now!
My favorite strategy game by far
I was thinking of a general tic tac toe challege
It's like 5x5 tic tac toe on a massive board, but you can capture enemy pieces according to a particular rule. If you capture your opponents pieces 5 times you win
4:36 PM
@DJMcMayhem Sounds cool. I am reading the wiki page
I wonder if there's somewhere to play it online...
a PPCG challenge!
@Anush I would imagine the value of n doesn't contribute much to the difficulty of the game, just the length of it. Whether m == n however, is a more important question
An m,n,k-game is an abstract board game in which two players take turns in placing a stone of their color on an m×n board, the winner being the player who first gets k stones of their own color in a row, horizontally, vertically, or diagonally. Thus, tic-tac-toe is the 3,3,3-game and free-style gomoku is the 15,15,5-game. An m,n,k-game is also called a k-in-a-row game on an m×n board. m,n,k-games are mainly of mathematical interest. One seeks to find the game-theoretic value, which is the result of the game with perfect play. This is known as solving the game. == Strategy stealing argument == A...
@AdmBorkBork thanks!
I feel we need an m,n,k challenge on ppcg
4:40 PM
@Anush to create, play, or solve one?
@Anush KoTH?
here is a tricky one, given a board position output if it is a valid win, where valid means you could have got to the position by normal play
@DJMcMayhem that would be super cool!
we haven't had a "is this checkmate" challenge yet have we for chess?
It would be interesting if you made it a 3-player game, which totally changes the strategy. So then if you are fighting opponents A and B, and A is much stronger and you can't win, you'd prefer to help B since that increases your relative score more
does each player take turns to play?
I've once played an hour-long 3 player game since it's a lot harder to gain an advantage.
4:43 PM
where p is player count
what about a koth where p is the bot count and m, n, and k are calculated from p
I wonder if there's a certain p value where the optimal strat shifts to "ignore your opponents"
Anyone want to play a quick round of pente?
@DJMcMayhem no time right now, but that looks a lot like Go
They look similar, but play differently
5:00 PM
@Veskah 1
Classic Connect-One
@Veskah Dibs on starting!
I think that would count as what you call a "solved game" :P
5:16 PM
Hmm, what about this: Given m, n, and k, determine how many valid winning positions there are
for example: for k = 1 there are m*n valid winning positions
or in other words, on a grid of size m by n, how many possible ways are there to lay out a straight line of k cells
3 hours later…
7:48 PM
A: Sandbox for Proposed Challenges

Daniel ScheplerOutput efficient Church encodings of natural numbers code-golf lambda-calculus The Church encoding of a natural number \$n\$ in lambda calculus is the higher-order function which takes a function \$f\$ to its \$n\$-fold iterate \$f^n = f \circ \cdots \circ f\$. For example, 0 = \f.\x.x 1 = \f...

when they say tic tac toe is a draw but not a strong draw, what does it mean?
Strong here, I think, means that even if mistakes were made earlier, perfect play will still result in a draw.
If I remember right.
8:42 PM
Hey guys, in codegolf.stackexchange.com/q/186005/6691 , do you think it is allowed if my program sometimes outputs an extra leading newline?
Also, is it allowed to assume that there are no more than, say, 98 words in the input?
Are trailing newlines allowed instead?
I could eliminate all those problems, but I don't see a short way to do it. I'm probably missing something stupid though, there's probably a solution without those artifacts that's also several characters shorter than what I'm doing.
The challenge says leading whitespace is allowed, so you're fine
Drat, the short one I have now assumes that there are no more than 98 words
9:16 PM
@Adám making avocado juice? :D
I thought memes have been banned!
1 hour later…
10:26 PM
@b_jonas You have to ask OP in a comment
For the second one, that's probably not allowed
*very, VERY likely
11:05 PM
@MilkyWay90 I no longer need a comment, I posted an answer.
@MilkyWay90 Hmm.
I need like four more bytes to make it work for arbitrarily many words. There's probably a much shorter way for the whole thing of course.
11:48 PM
@b_jonas Okay

« first day (3037 days earlier)      last day (92 days later) »