577
\$\begingroup\$

This "sandbox" is a place where Code Golf users can get feedback on prospective challenges they wish to post to main. This is useful because writing a clear and fully specified challenge on your first try can be difficult, and there is a much better chance of your challenge being well received if you post it in the sandbox first.

Sandbox FAQ

Posting

To post to the sandbox, scroll to the bottom of this page and click "Answer This Question". Click "OK" when it asks if you really want to add another answer.

Write your challenge just as you would when actually posting it, though you can optionally add a title at the top. You may also add some notes about specific things you would like to clarify before posting it. Other users will help you improve your challenge by rating and discussing it.

When you think your challenge is ready for the public, go ahead and post it, and replace the post here with a link to the challenge and delete the sandbox post.

Discussion

The purpose of the sandbox is to give and receive feedback on posts. If you want to, feel free to give feedback to any posts you see here. Important things to comment about can include:

  • Parts of the challenge you found unclear
  • Comments addressing specific points mentioned in the proposal
  • Problems that could make the challenge uninteresting or unfit for the site

You don't need any qualifications to review sandbox posts. The target audience of most of these challenges is code golfers like you, so anything you find unclear will probably be unclear to others.

If you think one of your posts requires more feedback, but it's been ignored, you can ask for feedback in The Nineteenth Byte. It's not only allowed, but highly recommended! Be patient and try not to nag people though, you might have to ask multiple times.

It is recommended to leave your posts in the sandbox for at least several days, and until it receives upvotes and any feedback has been addressed.

Other

Search the sandbox / Browse your pending proposals

The sandbox works best if you sort posts by active.

To add an inline tag to a proposal, use shortcut link syntax with a prefix: [tag:king-of-the-hill]. To search for posts with a certain tag, include the name in quotes: "king-of-the-hill".

\$\endgroup\$
2
  • \$\begingroup\$ What if I posted on the sandbox a long time ago and get no response? \$\endgroup\$
    – None1
    Commented May 15 at 14:05
  • \$\begingroup\$ @None1 If you don't get feedback for a while you can ask in the nineteenth byte \$\endgroup\$ Commented May 29 at 13:27

4831 Answers 4831

1
20 21
22
23 24
162
3
\$\begingroup\$

What's the odd one out?

\$\endgroup\$
2
  • \$\begingroup\$ Looks like this but a bit more interesting \$\endgroup\$
    – Razetime
    Commented Mar 9, 2021 at 13:35
  • \$\begingroup\$ Great challenge! Seems ready to be posted \$\endgroup\$
    – user100690
    Commented Mar 9, 2021 at 16:03
3
\$\begingroup\$

Sociable sequences

\$\endgroup\$
8
  • \$\begingroup\$ You probably need to describe what a proper divisor is. Separately, I'm not sure how great requiring infinite output is. I'd probably consider allowing another optional argument that limits how many sequences to output? \$\endgroup\$ Commented Nov 12, 2020 at 19:47
  • \$\begingroup\$ @FryAmTheEggman I've updated the challenge to be closer to the normal [sequence] I/O rules \$\endgroup\$ Commented Nov 26, 2020 at 15:23
  • \$\begingroup\$ So is 25 a 1-sociable number, since its divisors sum to 6, and then there's a cycle? \$\endgroup\$
    – user
    Commented Jan 6, 2021 at 21:04
  • 1
    \$\begingroup\$ @user No, \$25\$ is not a \$1\$-sociable number. "They are numbers whose proper divisor sums form cycles beginning and ending at the same number". \$25\$'s "cycle" is \$25 \to 6 \to 6 \to \cdots\$, which does not begin and end with the same numbers. I'll edit that in though \$\endgroup\$ Commented Feb 22, 2021 at 17:50
  • \$\begingroup\$ That "begin and end at the same number" is unclear. (it's a cycle, it neither begins nor ends) Perhaps "the initial number is inside the cycle". \$\endgroup\$
    – user202729
    Commented Feb 24, 2021 at 4:30
  • \$\begingroup\$ Should that "given value" be interpreted as "value that will be given as input"? \$\endgroup\$
    – user202729
    Commented Feb 24, 2021 at 4:31
  • \$\begingroup\$ That "does not diverge" sounds like a terribly hard conjecture... EDIT indeed it is. en.wikipedia.org/wiki/Catalan%E2%80%93Dickson_conjecture ("likely false"), and looks like that the sequence you came up with already have a name. \$\endgroup\$
    – user202729
    Commented Feb 24, 2021 at 4:32
  • \$\begingroup\$ with that, it's problematic, you'd better specify that "If there are \$ n \$ such numbers, the answer must provably finish printing them all without assuming the conjecture" -- although for most approaches it isn't that hard. \$\endgroup\$
    – user202729
    Commented Feb 24, 2021 at 4:38
3
\$\begingroup\$

Write an interpreter generator

\$\endgroup\$
14
  • \$\begingroup\$ Can an input contain one or more operations? like a + 1 - 4 * 8? Is input guaranteed to be valid? \$\endgroup\$
    – Wasif
    Commented Mar 22, 2021 at 17:11
  • \$\begingroup\$ @Wasif editing the answer \$\endgroup\$
    – user100690
    Commented Mar 22, 2021 at 17:12
  • \$\begingroup\$ Another suggestion, you might make it a code-challenge, where the objective will be to generate as short output as possible (Which means to golf the generated interpreter as much as possible), where the original source code length will not matter, so people can work for their code more peacefully, But code-golf (original challenge) one is good too. \$\endgroup\$
    – Wasif
    Commented Mar 22, 2021 at 17:14
  • \$\begingroup\$ @Wasif hmm... not a bad idea at all. This challenge does seem more effective with the code-challenge tag, I will edit that into the answer. \$\endgroup\$
    – user100690
    Commented Mar 22, 2021 at 17:17
  • \$\begingroup\$ @Wasif on second thought, I'm not really sure how you would actually test the length of the output... it would not be fair for one answerer to test with a 100-command language while another tests with a simple 1-command language. Thanks for the suggestion, but code-golf seems like the better option for now. \$\endgroup\$
    – user100690
    Commented Mar 22, 2021 at 17:19
  • \$\begingroup\$ OK, also how would handle destructive input like a / 0, which attempts to divide the accumulator by 0, which would result into crashing the interpreter? \$\endgroup\$
    – Wasif
    Commented Mar 22, 2021 at 17:22
  • \$\begingroup\$ the input is valid doesn't seem like a good enough description, let me change that \$\endgroup\$
    – user100690
    Commented Mar 22, 2021 at 17:22
  • \$\begingroup\$ "each command is one letter long." so, highest number of inputs are 26? \$\endgroup\$
    – Wasif
    Commented Mar 22, 2021 at 17:33
  • \$\begingroup\$ Can we pre-define the input array in the header section of Try It Online? \$\endgroup\$
    – Wasif
    Commented Mar 22, 2021 at 17:35
  • \$\begingroup\$ @Wasif yes, that can be inferred from that fact. Not sure what the header is, because I don't really use tio \$\endgroup\$
    – user100690
    Commented Mar 23, 2021 at 6:23
  • \$\begingroup\$ Header section means the part where you write code, is not added to the byte count. \$\endgroup\$
    – Wasif
    Commented Mar 23, 2021 at 6:52
  • \$\begingroup\$ Let us continue this discussion in chat. (Automatically comments were moved there because lengthy conversations cannot be run in comments) \$\endgroup\$
    – Wasif
    Commented Mar 23, 2021 at 6:52
  • \$\begingroup\$ I've edited this to a stub now that it's been posted \$\endgroup\$ Commented Mar 23, 2021 at 15:40
  • \$\begingroup\$ @ChartZBelatedly thank you, forgot to do that \$\endgroup\$
    – user100690
    Commented Mar 23, 2021 at 16:05
3
\$\begingroup\$

Keep PPCG running in Game of Life

\$\endgroup\$
5
  • \$\begingroup\$ "Minimally destroying CGCC", "Keep PPCG running". Hmm, someone doesn't like the name change :). May I ask why you have this proposal too, though? \$\endgroup\$
    – user
    Commented Mar 22, 2021 at 19:24
  • 2
    \$\begingroup\$ @OriginalOriginalOriginalVI Because the two tasks are different, and I very much doubt answers to the two will be trivially similar \$\endgroup\$ Commented Mar 22, 2021 at 19:38
  • \$\begingroup\$ Right now you could just place a glider in the box and it would run forever. Maybe redefine 'fixed position'? \$\endgroup\$
    – emanresu A
    Commented Mar 23, 2021 at 8:16
  • \$\begingroup\$ @Ausername "If any spaceships or patterns of infinite growth are generated, the board will never reach a "fixed state" and such cases are invalid submissions." A glider is a spaceship \$\endgroup\$ Commented Mar 23, 2021 at 13:13
  • \$\begingroup\$ Oh ok, didn't see that bit. \$\endgroup\$
    – emanresu A
    Commented Mar 23, 2021 at 19:37
3
\$\begingroup\$

Limit of lists

You're given a never-ending sequences of lists, each of which appends some number of values to the end of the previous one. That is, each list is a prefix of the next.

3
3,1,4
3,1,4,1
3,1,4,1
3,1,4,1
3,1,4,1,5,9,2,6
...

While some steps may leave the list unchanged, its length grows unboundedly, giving an infinite list in the limit. Your goal is to output this infinite list.

Note that you can't know a-priori how many lists you must read to get, say, the 5th value in the infinite list, just that you'll eventually hit a list with 5 or more elements.

Input and output:

The list elements are digits 0-9. You may treat them as characters if you wish.

The input and output are both infinite lists. These can be represented in various ways, and may be different for the input and output.

  • An infinite list or stream
  • A stateful method or black-box function that produces a new value with each call
  • Repeatedly reading from STDIN or writing to STDOUT, or file buffers or the like

A mapping from index to value isn't allowed for input or output. The output must be uniform, without chunks of digits grouped together.


Sandbox: Infinite list I/O is hard. Any suggestions?

\$\endgroup\$
3
  • \$\begingroup\$ "Your goal is to output this infinite list" - can you clarify that it's by taking later elements from the lists that get later and later in the input list - I had to read this several times to understand that. Also, while I don't think there's any getting around the infinite input requirement, perhaps you could change the output to standard sequence rules to make it more flexible? \$\endgroup\$
    – pxeger
    Commented Mar 27, 2021 at 18:04
  • \$\begingroup\$ Is the first list guaranteed to be one element long? Or can it be any length? Can it (and any subsequent lists) be empty? \$\endgroup\$
    – pxeger
    Commented Mar 27, 2021 at 18:09
  • \$\begingroup\$ You should probably specify the intermediate output/s needs to be as soon as it's available from the input infinite lists, or at least in finite time, so noone can submit tail -1 \$\endgroup\$
    – pxeger
    Commented Mar 27, 2021 at 18:21
3
\$\begingroup\$

cadaddadadaddddaddddddr - linked list accessing

\$\endgroup\$
8
  • \$\begingroup\$ Yay, a lisp challenge! Does each 'a' mean a car and each 'd' a cdr? \$\endgroup\$
    – user
    Commented Mar 24, 2021 at 21:56
  • 1
    \$\begingroup\$ @OriginalOriginalOriginalVI yeah, but I'm to lazy to have written a description in english so far. I guess I'll get to it eventually :P \$\endgroup\$
    – Wezl
    Commented Mar 24, 2021 at 21:58
  • \$\begingroup\$ Fortunately the common lisp hyperspec already describes the bulk of it well. \$\endgroup\$
    – Wezl
    Commented Mar 24, 2021 at 22:22
  • \$\begingroup\$ You might want to make the reference implementation a link to TIO (unless it doesn't work on TIO, of course) \$\endgroup\$
    – user
    Commented Mar 24, 2021 at 22:23
  • \$\begingroup\$ @OriginalOriginalOriginalVI Why? (I can't access TIO anyway) \$\endgroup\$
    – Wezl
    Commented Mar 24, 2021 at 22:25
  • \$\begingroup\$ Meh, I just don't like those code snippets, and it makes it easier to pull out of the question, modify the input, and stuff. These code snippets sometimes break for me. If you can't access TIO, though, it doesn't matter, of course. \$\endgroup\$
    – user
    Commented Mar 24, 2021 at 22:26
  • \$\begingroup\$ posted \$\endgroup\$
    – Wezl
    Commented Mar 25, 2021 at 15:04
  • \$\begingroup\$ I've edited this down to a stub now that it's been posted \$\endgroup\$ Commented Mar 28, 2021 at 14:01
3
\$\begingroup\$

Un-pipe an Elixir expression

\$\endgroup\$
5
  • \$\begingroup\$ It's unclear what kind of expressions we have to deal with, but it looks good, and interesting . E.g. do we have to handle expr |> function(with_one_parameter)? \$\endgroup\$
    – Wezl
    Commented Mar 25, 2021 at 15:27
  • \$\begingroup\$ @Wezl I was thinking the expression could be anything with printable non-whitespace ASCII but I realize now that could be problematic. I'll change it to be more restrictive. \$\endgroup\$
    – 79037662
    Commented Mar 25, 2021 at 15:30
  • \$\begingroup\$ @Wezl I specified that you may assume all functions will take only one parameter, so you do not have to handle expr |> function(with_one_parameter). \$\endgroup\$
    – 79037662
    Commented Mar 25, 2021 at 15:39
  • 1
    \$\begingroup\$ Why do some piped expressions have () and some do not? Are we meant to support both of these? \$\endgroup\$
    – emanresu A
    Commented Mar 26, 2021 at 4:45
  • \$\begingroup\$ @Ausername It's to demonstrate that both are valid, but as I state in the rules you need only support one convention. \$\endgroup\$
    – 79037662
    Commented Mar 26, 2021 at 13:17
3
\$\begingroup\$

What's my TIO uniqueness?

\$\endgroup\$
9
  • \$\begingroup\$ Oops, didn't read that \$\endgroup\$
    – user
    Commented Mar 23, 2021 at 20:59
  • \$\begingroup\$ Maybe you could say "undefined" instead of 0 in the sentence "The TIO uniqueness of a language for which this is impossible is 0". Also, do you want submissions to store all 680 language names in the code? \$\endgroup\$
    – Bubbler
    Commented Mar 24, 2021 at 23:58
  • 1
    \$\begingroup\$ @Bubbler Changed to undefined, it fits better. Yes, submissions should have some way of storing the names, be it in an external file or in the program itself etc. \$\endgroup\$ Commented Mar 25, 2021 at 0:02
  • \$\begingroup\$ @FryAmTheEggman Given that there are 680, I think it may be impractical to include the full list in the question, which is why I linked to this gist with all languages and their outputs \$\endgroup\$ Commented Mar 25, 2021 at 0:20
  • \$\begingroup\$ Ah, sorry, I missed the link. \$\endgroup\$ Commented Mar 25, 2021 at 3:44
  • \$\begingroup\$ "subsequence" tag? Why? \$\endgroup\$
    – tsh
    Commented Mar 29, 2021 at 8:58
  • 1
    \$\begingroup\$ @tsh Because the TIO uniqueness depends on the shortest substring that isn't common with any other language \$\endgroup\$ Commented Mar 29, 2021 at 18:49
  • \$\begingroup\$ but substring is not subsequence \$\endgroup\$
    – tsh
    Commented Mar 30, 2021 at 0:32
  • \$\begingroup\$ @tsh No, but [substring] isn't a tag, and [subsequence] is the best alternative \$\endgroup\$ Commented Mar 30, 2021 at 21:37
3
\$\begingroup\$

Rejecting invalid IPv4 addresses

\$\endgroup\$
4
  • \$\begingroup\$ You should generally include the definition of things like this directly in the challenge rather than just linking to a Wikipedia article on it, so people don't have to go to an external site \$\endgroup\$
    – pxeger
    Commented Apr 8, 2021 at 8:42
  • \$\begingroup\$ I think it would be clearer if you used boolean true/false for "is this valid", rather than "invalid" vs "valid". You might also want to change classification to decision-problem \$\endgroup\$
    – pxeger
    Commented Apr 8, 2021 at 8:46
  • \$\begingroup\$ @pxeger Thanks. Included both suggestions. \$\endgroup\$
    – rsjaffe
    Commented Apr 8, 2021 at 15:55
  • \$\begingroup\$ Is this means the input should always be a string / list of characters? May I take input as an array of 4 integers / a 32 bit unsigned integer / a built-in type for IP address (if there is one)? \$\endgroup\$
    – tsh
    Commented Apr 13, 2021 at 3:57
3
\$\begingroup\$

Interpret control characters like a terminal

\$\endgroup\$
4
  • \$\begingroup\$ As "your program does not need to interpret backslash escape sequences - the input will contain the literal control codes themselves.", I'd suggest actually including the characters in the test cases, or at least including a TIO link (or pastebin etc.) with the literal characters \$\endgroup\$ Commented Apr 12, 2021 at 13:14
  • 1
    \$\begingroup\$ @cairdcoinheringaahing \r isn't really usable on the web because it will be converted to a newline, and most languages have their own literal syntax for entering those characters anyway, so I think it wouldn't really help \$\endgroup\$
    – pxeger
    Commented Apr 12, 2021 at 13:18
  • 1
    \$\begingroup\$ Suggest a aaaaaaa\b\b\b\t case, do TAB fill them space? \$\endgroup\$
    – l4m2
    Commented Apr 15, 2021 at 4:17
  • \$\begingroup\$ @l4m2 thanks - that helped me discover some subtle bugs in my reference implementation too \$\endgroup\$
    – pxeger
    Commented Apr 15, 2021 at 9:01
3
\$\begingroup\$

You are kinda Replacable to Me

\$\endgroup\$
3
\$\begingroup\$

A Self-Referential Sentence

The Story


One day, you decide that you want a sentence that tells you where in the sentence the letter T occurs (excluding whitespace and punctuation). Out of curiosity, you try to make one. Messing around a little you get

T is the first, fourth, eleventh, sixteenth, twenty-fourth, ....

Oh dear, this sentence appears to run forever. But you now think you have an interesting number sequence, so you slap it into the OEIS search bar and lo and behold you find sequence A005224, Aronson's sequence. And better yet, an interesting code-golf problem that no appears to have posed before!


The Task

Your task is to write a program that takes in a single positive integer, n, as input and gives the position of the n-th "t" in the above sentence (indexing begins at 1 for the sake of this problem). For example, an input of 1 should return 1, while 2 should return 4. The input number will not exceed 4 decimal digits in length (i.e. the maximum input is 9999)

As always, the shortest code in bytes wins, and standard loopholes apply.


Tags:


The Meta

Ok, so I have a couple of questions, since this my first sandbox post.

  1. What can I do to flesh out this problem? This seems short, especially for a CGSE prompt. Should I somehow flesh out the heading fluff? Or should I add something more to the task itself?
  2. I was pretty thorough in my search of the sandbox and main site for similar problems, but I could always have missed something, so please let me know if this is a duplicate.
  3. Is the 4 digit input limit reasonable? Should I raise it or lower it? Remove it entirely? Since I'm not providing a file with ordinal strings, it seems like having a restriction on the size of the input is quite important.
  4. Finally, please let me know if there's any other glaring problems in this prompt, this is both a first draft, and my first attempt at a code-golf prompt (since high-school).
\$\endgroup\$
3
  • \$\begingroup\$ Nice first challenge! I'd suggest following the standard sequence I/O rules and allowing programs to output either the first \$n\$, the \$n\$th term or all terms. Additionally, forcing 1-indexing (for the sequence) doesn't improve the challenge any more than allowing either 0 or 1 indexing. I cannot find any challenge that could be a dupe through some searching, so this looks to be 100% original. Finally, I'd recommend including either test cases or the first 10 or so terms in the challenge body \$\endgroup\$ Commented Apr 24, 2021 at 16:21
  • 1
    \$\begingroup\$ @cairdcoinheringaahing 1-indexing is fundamental to the recursive definition of this sequence, as “T is the zeroth, third, tenth, twelfth, seventeenth, twentieth, …” is quite a different sequence (not just off by one). \$\endgroup\$ Commented Apr 25, 2021 at 18:25
  • \$\begingroup\$ @AndersKaseorg I meant 0 indexing in the input, not in the position of the T (e.g. n = 0 would output 1, n = 1 would output 4, etc.) \$\endgroup\$ Commented Apr 25, 2021 at 18:27
3
\$\begingroup\$

diddly darn posted

\$\endgroup\$
10
  • \$\begingroup\$ Tag chess? \$\endgroup\$
    – pxeger
    Commented Apr 12, 2021 at 6:43
  • 1
    \$\begingroup\$ My god, this is amazing. I can't wait to see the full version! \$\endgroup\$ Commented Apr 12, 2021 at 9:48
  • 1
    \$\begingroup\$ It's not clear to me what should be output in the non-deterministic cases. Do we have to output all possibilites? \$\endgroup\$
    – kops
    Commented Apr 22, 2021 at 23:35
  • \$\begingroup\$ Addtionally, what do you want the result of this to be: ,v, \n >,A \n ^<B (pastebin; is multline code possible in a comment?) Rules as written I think it's a tie since the center cell is reached twice but it's not clear this is desirable. \$\endgroup\$
    – kops
    Commented Apr 22, 2021 at 23:37
  • \$\begingroup\$ @kops it's okay for the board to result in a tie. \$\endgroup\$
    – lyxal
    Commented Apr 22, 2021 at 23:43
  • \$\begingroup\$ And the point is to output the result of the board, which may not be deterministic \$\endgroup\$
    – lyxal
    Commented Apr 22, 2021 at 23:43
  • \$\begingroup\$ So each possibility has to be output with the correct probability in the non-deterministic cases? And for the specific board in my second comment, it's very much morally an A victory, not a tie, but the technicality of passing through the same cell going in different directions makes it a tie in these rules which I find a bit weird. \$\endgroup\$
    – kops
    Commented Apr 22, 2021 at 23:46
  • \$\begingroup\$ @kops no it is not the probability but the result of running it once. That result may vary. And even though that may seem like it should be a win for A, it could be the result of some clever play from B to trick A into thinking they've won \$\endgroup\$
    – lyxal
    Commented Apr 22, 2021 at 23:50
  • \$\begingroup\$ @Lyxal I didn't mean to say the probability itself should be output, but that for each possibility, the probability of that possibility being output has to be correct? \$\endgroup\$
    – kops
    Commented Apr 22, 2021 at 23:56
  • \$\begingroup\$ @kops you only ever output one result - the winner of the game when evaluated. Because there are commands that change the direction, it can be impossible to 100% tell who wins. I was simply pointing out that there is more than one possible output for such boards. \$\endgroup\$
    – lyxal
    Commented Apr 22, 2021 at 23:59
3
\$\begingroup\$

Rob the King: Hexagonal Mazes

Consider the following hexagonal maze:

     E . \ . . .
    . . . \ . \ .
   . . . . \ . \ .
  _ _ _ _ . \ . \ .
 . / . . . . . . | .
. | . . _ _ _ _ / . .
 . \ . \ . . . / . .
  . \ . \ . . / . .
   . \ . \ . . . .
    . \ . \ / . .
     . \ . | . X

E represents the entrance, X the exit. |_/\ are walls and . are free spaces. In order to navigate from E to X, we can move to any free space in the up to 6 immediately surrounding spaces. The path from E to X, marked with P is:

     E P \ P P P
    . . P \ P \ P
   . . . P \ P \ P
  _ _ _ _ P \ P \ P
 . / . . . P P P | P
. | . . _ _ _ _ / . P
 . \ . \ . . . / . P
  . \ . \ . . / . P
   . \ . \ . . . P
    . \ . \ / . P
     . \ . | . X

This isn't the only path, but the others are trivial variations on it.


Cops

You are to write a function in Python 3 which takes a positive integer \$n \ge 2\$ and returns a hexagonal maze of side-length \$n\$, as shown above. The maze will meet the following criteria:

  • The only characters in the output are EX.|_\/, space and newline
  • The hexagon is shown as a hexagon. That means:
    • The first \$n\$ lines will have one more non-space character than the previous line (the first has \$n\$ non-space characters), separated by a single space, and offset from adjacent lines
    • The first \$n\$ lines have one fewer leading space than the previous line (the first line has \$n - 1\$ leading spaces)
    • The next \$n - 1\$ lines have one more leading space than the previous line
    • The next \$n - 1\$ lines will have one fewer non-space character than the previous line, separated by a single space, and offset from adjacent lines
    • Lines may not have trailing whitespace
  • The E is the first non-space character on the first line, and the X is the last non-space character on the last line
  • There is at least 1 valid path that connects the E and the X, only moving from one free space to an adjacent free space.

How your program generates these mazes is entirely up to you. It could randomly places walls in the grid, ensuring there is always at least one path left, or it could only block the center row except for one gap, or anything else.

You may return either a multi-line string, or a list of lines. Lines should have appropriate space padding at the start, and may have a consistent amount of trailing spaces. "Consistent" here means either the same number on each line, or padding each line to the same length.

The Robbers will be writing maze-solving programs that try to solve your mazes, so you should aim to generate mazes that are somewhat difficult to solve.

This is not , you are under no obligation to golf your submission.

Additionally, you may submit multiple submissions. You may not include anything in your submission that attempts to communicate with other submissions, attempts to interfere with other submissions or the controller or anything that could be malicious. If you do, your submission will be disqualified

Empty mazes of sizes \$n = 2, 3, 4, 5, 6\$:

                                                                 E . . . . .
                                           E . . . .            . . . . . . .
                         E . . .          . . . . . .          . . . . . . . .
           E . .        . . . . .        . . . . . . .        . . . . . . . . .
 E .      . . . .      . . . . . .      . . . . . . . .      . . . . . . . . . .
. . .    . . . . .    . . . . . . .    . . . . . . . . .    . . . . . . . . . . .
 . X      . . . .      . . . . . .      . . . . . . . .      . . . . . . . . . .
           . . X        . . . . .        . . . . . . .        . . . . . . . . .
                         . . . X          . . . . . .          . . . . . . . .
                                           . . . . X            . . . . . . .
                                                                 . . . . . X

Robbers

You are to write a Python 3 function that takes in the return value of a cop's answer. It may also take the number of sides, \$n\$, as an argument if you so wish. The input will only contain EX_|/\. and space, and newlines if inputting as a multiline string. It will either be a multiline string or a list of lines. Your function should handle both.

Your function should then output the maze with any valid path connecting the E and X using only connected free spaces. You may show the path with any character aside from EX_|/\., space or newline.

This is not , you are under no obligation to golf your submission.

Additionally, you may submit multiple submissions. You may not include anything in your submission that attempts to communicate with other submissions, attempts to interfere with other submissions or the controller or anything that could be malicious. If you do, your submission will be disqualified


Scoring

The scoring will take the form of a round-robin, similar to challenges. Every cop will be paired up with every robber, and the following will happen with each pair:

  • The controller will call the cop's function 5 times with \$n = 2\$ as an argument, saving each of the 5 mazes. The cop will have 1 minute to produce each maze
  • It will then pass each maze to the robber to solve. The robber will have 1 minute per maze to produce a correct output.
  • If all 5 mazes are correctly solved by the robber within 1 minute each, the controller goes again, but with \$n = 3\$, and so on, increasing the \$n\$ by one, until either:
    • The robber fails to solve a maze within 1 minute
    • The robber produces an incorrect solution to an input maze
    • The cop fails to return a maze within 1 minute
    • The cop returns a maze with no path

At this point, both the cop and the robber receive points equal to the highest \$n\$ that neither of them failed. If the cop failed, the robber receives an additional point, and if the robber failed, the cop receives an additional point instead.

If both the cop and the robber reach \$n = 50\$ without failing, they both receive \$50\$ points.

After all pairs have be run, the cop and robber with the most points are the respective winners


Meta

\$\endgroup\$
5
  • 2
    \$\begingroup\$ If you want to automate the scoring process, you might want to restrict the I/O further, e.g. only allow stdin/stdout as a hexagon-shaped multi-line string. (I'm suggesting stdio because I assume you want to allow different languages.) Looks interesting, though I have a slight feeling that a full Dijkstra impl in C will almost surely win as a robber. \$\endgroup\$
    – Bubbler
    Commented Apr 12, 2021 at 23:01
  • \$\begingroup\$ @Bubbler Good point, I've updated the I/O to be stricter. \$\endgroup\$ Commented Apr 12, 2021 at 23:22
  • \$\begingroup\$ @Bubbler I've decided to limit it to Python 3 functions, as I was struggling to make a controller that would allow any language to compete \$\endgroup\$ Commented Apr 23, 2021 at 15:49
  • \$\begingroup\$ It's a minor thing, but maybe change E and X to A and B? It seems more logical that way \$\endgroup\$
    – pxeger
    Commented Apr 24, 2021 at 15:52
  • \$\begingroup\$ @pxeger I chose E and X as "entrance" and "exit" respectively, but I doubt it'll affect any solutions as opposed to A/B \$\endgroup\$ Commented Apr 24, 2021 at 16:06
3
\$\begingroup\$

Interpret Gelatin

\$\endgroup\$
3
\$\begingroup\$

CDGLF:TMN2APL


Meta questions:

  • Is this a duplicate? (I've looked and there are several challenges with operator precedence, but there are large differences such as floor/ceiling and the output format)
  • How can I objectively define "equivalent expressions"? Should I write a reference interpreter or answer?
  • Would it be more interesting going the other way?
  • Should answers be required to reject invalid input? Seems not
  • Should I I've replaced the unicode operators ×÷⌈⌉⌊⌋ with ascii symbols */{}[].
  • Is the exponentiation operator necessary? (It might just make the challenge more cumbersome because of its different associativity)
\$\endgroup\$
6
  • \$\begingroup\$ It was previously APL2TMN. I'm changing it to TMN2APL to make it more interesting. \$\endgroup\$
    – Wezl
    Commented Apr 22, 2021 at 14:42
  • 1
    \$\begingroup\$ TMN's +-×÷ are left-associative, but in APL everything is right-associative. The equivalent of TMN 3-5÷2+1 in APL is (3-5÷2)+1; APL 3-(5÷2)+1 is 3-((5÷2)+1). \$\endgroup\$
    – Bubbler
    Commented Apr 22, 2021 at 23:41
  • 1
    \$\begingroup\$ Thanks, I completely forgot about associativity. I don't think my grammar handles it, however, so I'm not sure exactly how to resolve this. \$\endgroup\$
    – Wezl
    Commented Apr 22, 2021 at 23:44
  • 1
    \$\begingroup\$ Also, I suggest to state the output format (APL) in the same way as you did for the input format (TMN), and state the precedence and associativity (for both TMN and APL) separately in plain English for those who are not familiar with parser grammars. And I think input validation is unnecessary here. \$\endgroup\$
    – Bubbler
    Commented Apr 22, 2021 at 23:52
  • \$\begingroup\$ I think the Unicode operators definitely should be replaced with ASCII, because otherwise it's 10 bytes used on every answer. This would require you to remove or change the output syntax of exponentiation, but I don't really feel like it adds much tbh. \$\endgroup\$
    – pxeger
    Commented Apr 24, 2021 at 15:57
  • 1
    \$\begingroup\$ @pxeger I've changed it, and I agree. \$\endgroup\$
    – Wezl
    Commented Apr 25, 2021 at 0:53
3
\$\begingroup\$

Time bomb KoTH

\$\endgroup\$
9
  • \$\begingroup\$ Enforcing determinism prevents luck based winning, which I personally like. Adds a sense of balance. \$\endgroup\$
    – Razetime
    Commented May 1, 2021 at 15:59
  • 2
    \$\begingroup\$ Determinism also means anyone can run a simulation of the game on their own machine. The game then devolves into aggressive metagaming and iteratively updating one's bots to always beat the opponents'. If you decide to enforce determinism among the bots, you must have some outside source of randomness to prevent players from simply simulating the entire game and instead actually formulate a strategy that is robust enough to still work well in the face of unknowns. \$\endgroup\$ Commented May 2, 2021 at 9:57
  • 1
    \$\begingroup\$ I personally like a bit of non determinism to spice things up but then this came along. So you have to be careful. \$\endgroup\$ Commented May 2, 2021 at 9:58
  • \$\begingroup\$ @EnderShadow8 yeah I saw that answer. In the current design, the array for the numbers selected in the previous round will be initialized with random numbers on the first round, giving the initial seed of randomness \$\endgroup\$
    – leo3065
    Commented May 2, 2021 at 15:36
  • 1
    \$\begingroup\$ Another thing to consider: high numbers will have very small winning chances, and the entire game is biased towards low numbers (they come first, they don't subtract much, large numbers take many points on explosion vs large numbers give many points on success). So all "smart" bots will choose <= n / 2 numbers, but then the trigger will also be lower, so bots have to choose even lower numbers. That can lead to a case of positive feedback. It may or may not cause problems, but it may be good to keep that in mind. \$\endgroup\$
    – FZs
    Commented May 2, 2021 at 19:24
  • 1
    \$\begingroup\$ And to the determinism topic: a viable compromise between determinism and randomness could be made: making the only allowed non-deterministic part a seeded PRNG function provided by the controller. The PRNG seeds used for the official ranking are kept secret, but it's still possible to replicate the given match by using the same seed. \$\endgroup\$
    – FZs
    Commented May 2, 2021 at 19:58
  • 1
    \$\begingroup\$ @FZs That's true. I may need to buff the reward for larger numbers to encourage playing them. Also about the determinism topic, after some searching I found some method to provide a seeded random, and I think I'm going to try that. \$\endgroup\$
    – leo3065
    Commented May 3, 2021 at 7:41
  • 1
    \$\begingroup\$ More about the determinism: I decided to decide the secret seed before the challenge starts and provide the hash to prove that I won't change the key mid-challenge. \$\endgroup\$
    – leo3065
    Commented May 3, 2021 at 9:14
  • \$\begingroup\$ I've edited this down to a stub now that it's been posted to save space \$\endgroup\$ Commented May 3, 2021 at 14:17
3
\$\begingroup\$

Count up to 21

21 is a game my teachers had my classmates and I play in order to kill some time. The game works as follows:

  • All contestants stand in a circle. The aim is to count to 21, one by one.
  • At any time, any player may begin the counting by saying 1.
  • The plays then continue the counting by saying the next number. However, if multiple players say the number at the same time, the count resets, and someone has to say 1 again.
  • The first player who says 21 is "out", and the game begins again with the same contestants except for the "out" player(s)
  • The final player left is disqualified, and the entire game begins again. The last player not disqualified wins.

We are going to run a challenge, where bots aim to play this game.

You are to write a function in Python 3 that takes a list of lists \$L\$ as argument. Each list in \$L\$ represents a round in the game, with the last element being the most recent. The \$i\$th element of each list always corresponds to the same bot. Each list in \$L\$ will contain \$n\$ integers between \$0\$ and \$21\$, where \$n\$ is the number of contestants left in the game. The lists are either all \$0\$s, or are \$n-1\$ \$0\$s and a single non-zero value \$v\$.

If a list is all \$0\$s, either it is the first round, or the counter was reset in the previous round.

That function should then return either:

  • \$0\$, meaning that your bot stays quiet
  • \$v+1\$, meaning that your bot is attempting to guess this round

And that's it!


The competition will work exactly as described above. The controller will run 100 games. Each game will works as follows:

  • The first round begins with all \$n\$ contestants. They will count up to 21, eliminating each contestant as they count to 21, and resetting the count to 0. The final player left is then eliminated, and the next round with \$n-1\$ contestants is run. At the end, the final player left standing wins
  • The player with the most wins after 100 games wins overall

You may not include anything in your submission that attempts to communicate with other submissions, attempts to interfere with other submissions or the controller or anything that could be malicious. If you do, your submission will be disqualified

If any game has more than 10000 rounds, it'll be terminated and no player will win.


Example bot

This is Random:

import random

def bot(history):
	return random.choice([0, max(history[-1]) + 1])
\$\endgroup\$
12
  • 7
    \$\begingroup\$ Infinite loops might happen quite often \$\endgroup\$
    – rydwolf
    Commented Apr 28, 2021 at 1:51
  • 1
    \$\begingroup\$ @RedwolfPrograms Put a limit of 10000 rounds per game \$\endgroup\$ Commented Apr 28, 2021 at 20:32
  • \$\begingroup\$ TNB Feedback link \$\endgroup\$ Commented Apr 28, 2021 at 21:16
  • 2
    \$\begingroup\$ So, if next number is 21: Is there any reason a bot will not to say 21 in that round? \$\endgroup\$
    – tsh
    Commented Apr 29, 2021 at 1:30
  • 2
    \$\begingroup\$ I feel like someone's going to just add a bot to say every single number no matter what. \$\endgroup\$
    – emanresu A
    Commented Apr 29, 2021 at 10:54
  • \$\begingroup\$ @tsh If multiple bots say 21, none of them win and the count resets \$\endgroup\$ Commented Apr 29, 2021 at 11:51
  • \$\begingroup\$ Can you post the code to run the game so we can test our bots? \$\endgroup\$
    – WarpPrime
    Commented Apr 29, 2021 at 21:05
  • \$\begingroup\$ @fasterthanlight I haven't written the controller yet, so no \$\endgroup\$ Commented Apr 29, 2021 at 22:57
  • 2
    \$\begingroup\$ but if i will lost their turn if i dont say 21, and the worst case is a tie if I say 21? So any reason I try to be silent? \$\endgroup\$
    – tsh
    Commented Apr 30, 2021 at 5:10
  • 2
    \$\begingroup\$ Because there's no reason to not say 21, infinite loops are probably going to occur no matter what. You might want to consider adding a rule regarding this to prevent infinite loops (or if everyone but 1 says a number the bot who said 0 can be eliminated) \$\endgroup\$
    – WarpPrime
    Commented Apr 30, 2021 at 12:44
  • \$\begingroup\$ Just wondering, is saving state between different turns allowed? Or between rounds? Or between games? You also don't seem to distinguish between rounds and turns (i.e times when the count resets vs. opportunities to guess), which may cause confusion. Also, a suggestion: Maybe let each game have only a small subset of the bots as contestants, so that if there's that one bot who always says 21 as soon as possible, it would just harm itself rather than ruining the challenge. (Sorry for this long block of text.) \$\endgroup\$
    – user101133
    Commented May 4, 2021 at 3:42
  • \$\begingroup\$ Interestingly, this is completely different from the game of 21 I know. \$\endgroup\$
    – pxeger
    Commented May 23, 2021 at 15:57
3
\$\begingroup\$

Distance between vowels

Objective

Given two vowels represented in single IPA characters, calculate the distance between them.

Vowels

Vowels are characterized by three factors: Height, backness, and roundedness. Here, all vowels have the three characteristics as integers.

Unrounded vowels (z = 0)

    x=0       x=1       x=2       x=3       x=4
y=6 i(U+0069)           ɨ(U+0268)           ɯ(U+026F)
y=5           ɪ(U+026A)           ʊ(U+028A)
y=4 e(U+0065)           ɘ(U+0258)           ɤ(U+0264)
y=3                     ə(U+0259)
y=2 ɛ(U+025B)           ɜ(U+025C)           ʌ(U+028C) 
y=1 æ(U+00E6)           ɐ(U+0250)
y=0 a(U+0061)                               ɑ(U+0251)

(I know, Wikipedia states ʊ as rounded, but official IPA doesn't specify the roundedness of ʊ. It will be considered unrounded for this challenge.)

Rounded vowels (z = 1)

    x=0       x=1       x=2       x=3       x=4
y=6 y(U+0079)           ʉ(U+0289)           u(U+0075)
y=5           ʏ(U+028F)
y=4 ø(U+00F8)           ɵ(U+0275)           o(U+006F)
y=3
y=2 œ(U+0153)           ɞ(U+025E)           ɔ(U+0254) 
y=1
y=0 ɶ(U+0276)                               ɒ(U+0252)

Metric

Your metric \$d\$ shall fit the usual definition of metric:

  • \$d(v,w)=0\$ if and only if \$v=w\$

  • For all \$v\$ and \$w\$, \$d(v,w)=d(w,v)\$

  • For all \$v\$, \$w\$ and \$x\$, \$d(v,x)≤d(v,w)+d(w,x)\$

As an additional constraint, the norm \$\Vert\cdot\Vert\$ induced by \$d\$ shall satisfy:

  • For all \$x≠0\$, \$y\$ and \$z\$, \$\Vert(0,y,z)\Vert<\Vert(x,y,z)\Vert\$

  • For all \$x≠0\$, \$y\$, \$z\$ and \$k>1\$, \$\Vert(x,y,z)\Vert<\Vert(kx,y,z)\Vert\$

  • Analogous rules for the y-axis and z-axis

All of these apply only to the vowels above. All other inputs fall in don't care situation.

Rules

  • Input format is flexible. It may be two chararacters, or a single string containing two charcters. In any case, every input that doesn't fit in your format falls in don't care situation.

  • Output format is also flexible.

\$\endgroup\$
3
\$\begingroup\$

Memory KoTH

Memory is a game where a bunch of pairs of identical cards are laid upside down, and you try to find pairs while only looking at two at a time.

In this KoTH, the way it will work is:

The game will be played on a 4096-item array, and the "cards" will be integers 0-2047.

Each bot takes its turn in order. It has access to the results of previous moves (Up to its previous turn), but their only storage is a single integer.

Spec

The controller will be written in Javascript.

The bot has a move function, which must return two integers: The positions of both its guesses, in the form [g1, g2], where both are integers between 0 and 4095, and must not be gone already (see below).

The bot has access to:

The most recent move of every bot, including itself, in the form of an array of [g1,g2,r1,r2], where r1 and r2 are the first and second values revealed. The first item of this will be your bot's most recent guess, and the rest will be the other bots. This will be the global variable prev, and is readonly.

A picture of the entire grid, as a 4096-item array, left to right and top to bottom, where 0 means gone and 1 means still there. This will be the global variable grid, and is readonly.

An array of values that are gone. This will be the global variable gone, and is readonly.

A single ArrayBuffer(50), a 50-bit set of raw binary data. See the docs for help on how to access this. This will be the property this.storage, and can be used to store data.

Writing to globals is banned.

Game

The bots will take their turn in a predetermined randomised order.

If a bot's moves are two tiles with the same value, those tiles are removed from the game area, and that bot gets a point.

The game ends when all tiles are gone, and the bot with the most points wins. In case of a tie, the bot that is last in the randomised order wins.

Bots should be a Javascript object like:

{
  name: "A bot",
  move(){
    // insert code here
  }
}

Meta

Should I change storage limit or grid size?

\$\endgroup\$
18
  • \$\begingroup\$ Shouldn't the bot be able to see the values of gone items? \$\endgroup\$ Commented May 15, 2021 at 9:03
  • \$\begingroup\$ @CommandMaster True, will add. \$\endgroup\$
    – emanresu A
    Commented May 15, 2021 at 21:02
  • \$\begingroup\$ This doesn't really matter too much but if it were up to me, personally, I would change the storage limit from \$[1,2^{50}]\$ to \$[0,2^{50}-1]\$ so it's a bitstring of length 50 \$\endgroup\$
    – hyperneutrino Mod
    Commented May 18, 2021 at 6:10
  • \$\begingroup\$ @hyper-neutrino Oh yes, that's what I intended. \$\endgroup\$
    – emanresu A
    Commented May 18, 2021 at 6:11
  • \$\begingroup\$ What if two bots tie? \$\endgroup\$ Commented May 18, 2021 at 8:18
  • \$\begingroup\$ @StackMeter The one that is last in the randomised order wins. I'll add that. \$\endgroup\$
    – emanresu A
    Commented May 18, 2021 at 8:41
  • \$\begingroup\$ Wouldn't it be easier to use a Uint8Array rather than a Bigint? Purely for ease of use. \$\endgroup\$ Commented May 20, 2021 at 12:51
  • \$\begingroup\$ Also need to make it clear that writing to globals is banned, since that's a legal play right now \$\endgroup\$ Commented May 20, 2021 at 12:52
  • \$\begingroup\$ @EnderShadow8 Yes, writing to globals is banned. \$\endgroup\$
    – emanresu A
    Commented May 20, 2021 at 20:07
  • \$\begingroup\$ @EnderShadow8 How would I format this Uint8Array? Like how many items would it need to be restricted to? \$\endgroup\$
    – emanresu A
    Commented May 20, 2021 at 20:07
  • \$\begingroup\$ Up to you. It's just a more convenient method of storing data that's a certain size. \$\endgroup\$ Commented May 20, 2021 at 23:32
  • \$\begingroup\$ @EnderShadow8 Actually, I think a BigInt would be better for this challenge, as remembering a single tile is 23 bits, which would be confusing to fit into a Uint8Array. \$\endgroup\$
    – emanresu A
    Commented May 21, 2021 at 4:22
  • \$\begingroup\$ Just make it a plain ArrayBuffer and DataView. That's easier. I don't like using bit operations to extract data from integers. \$\endgroup\$ Commented May 21, 2021 at 4:42
  • \$\begingroup\$ @EnderShadow8 Ok. \$\endgroup\$
    – emanresu A
    Commented May 21, 2021 at 4:43
  • \$\begingroup\$ Are you considering giving the bot the result of its first guess before asking for its second? That would introduce a new layer to the strategy. Eg. explore on the first move and defend or attack on the second \$\endgroup\$ Commented May 21, 2021 at 5:04
3
\$\begingroup\$

Generate a UK number plate

\$\endgroup\$
5
  • \$\begingroup\$ I'd suggest saying AANNXXX or something like that instead of AA12XXX so it's clear the age identifier isn't always 12 (that's clarified later, but still). \$\endgroup\$
    – user
    Commented Apr 28, 2021 at 18:12
  • \$\begingroup\$ Just a note: the last 3 characters can't be either Q or I \$\endgroup\$ Commented May 1, 2021 at 18:13
  • \$\begingroup\$ @cairdcoinheringaahing I thought that too, but I found no mention of it in the government document so I kept it as the whole alphabet. shrug \$\endgroup\$
    – pxeger
    Commented May 1, 2021 at 19:37
  • \$\begingroup\$ There's a Q in the alphabet for the first letter, but then you say the alphabet, minus IJQTUXZ. \$\endgroup\$
    – Arnauld
    Commented May 5, 2021 at 18:13
  • 1
    \$\begingroup\$ @Arnauld yep, that shouldn't be there. Too much muscle memory from typing the alphabet correctly I guess :þ \$\endgroup\$
    – pxeger
    Commented May 5, 2021 at 19:15
3
\$\begingroup\$

I'm Lazy: Close my Parens

\$\endgroup\$
10
  • 1
    \$\begingroup\$ It's clear what to do with ], but what does [ represent? Is it the same as just (? \$\endgroup\$
    – DJMcMayhem
    Commented Jun 1, 2021 at 22:00
  • \$\begingroup\$ Why is ([(] invalid but [(] is not? Will there ever be multiple ] in a row? \$\endgroup\$
    – DJMcMayhem
    Commented Jun 1, 2021 at 22:05
  • \$\begingroup\$ @DJMcMayhem ([(] is invalid because it is the same as [(] but with an unmatched ( at the beginning since the ] only closes the [. There may be multiple ] in a row. \$\endgroup\$
    – Wezl
    Commented Jun 1, 2021 at 22:08
  • 3
    \$\begingroup\$ So basically ] matches as many open parens as possible until it hits a [ at which point it has to stop? \$\endgroup\$
    – DJMcMayhem
    Commented Jun 1, 2021 at 22:10
  • \$\begingroup\$ @DJMcMayhem yes. Should I add that to the question for clarity? \$\endgroup\$
    – Wezl
    Commented Jun 1, 2021 at 22:12
  • \$\begingroup\$ Yes, I think that would help. \$\endgroup\$
    – DJMcMayhem
    Commented Jun 1, 2021 at 22:17
  • 1
    \$\begingroup\$ Not sure if lisp tag is appropriate, because the challenge itself doesn't have to do with lisp. \$\endgroup\$
    – qwr
    Commented Jun 2, 2021 at 14:43
  • 2
    \$\begingroup\$ Tag: balanced-string? \$\endgroup\$
    – pxeger
    Commented Jun 3, 2021 at 10:47
  • \$\begingroup\$ @pxeger nice tag-finding skills :) I'll add that. \$\endgroup\$
    – Wezl
    Commented Jun 3, 2021 at 13:04
  • \$\begingroup\$ @qwr How else do I get the tag badge :P \$\endgroup\$
    – Wezl
    Commented Jun 3, 2021 at 13:07
3
\$\begingroup\$

But, Is It Art?

\$\endgroup\$
1
  • \$\begingroup\$ I think it is clear, but the second example of "is not equivalent to" is a little unnecessary in my opinion. \$\endgroup\$
    – Alex bries
    Commented Jun 2, 2021 at 10:03
3
\$\begingroup\$

Generalised multi-dimensional chess knight's moves

Posted

\$\endgroup\$
2
  • \$\begingroup\$ You know that the necessary conclusion is we do all the pieces - take my +1 and start the chain. \$\endgroup\$ Commented Jun 14, 2021 at 6:26
  • 1
    \$\begingroup\$ @StackMeter I don't think most of the pieces would be very interesting. Pawns in combination with details of what pieces are already on the board, maybe. Otherwise, it's just this challenge with some slightly simpler vectors \$\endgroup\$
    – pxeger
    Commented Jun 14, 2021 at 6:48
3
\$\begingroup\$

Write a C++ demangler

\$\endgroup\$
6
  • \$\begingroup\$ Is _ZN3foo3barE3baz -> foo(bar)::baz valid? \$\endgroup\$
    – tsh
    Commented Jun 7, 2021 at 8:39
  • \$\begingroup\$ That would be foo::bar::baz. The base identifier is baz, and it is prefixed with the namespace foo::bar. \$\endgroup\$
    – EasyasPi
    Commented Jun 7, 2021 at 14:27
  • \$\begingroup\$ Won't foo::bar::baz be _ZN3fooEN3barE3baz or _ZNN3fooE3barEbaz? \$\endgroup\$
    – tsh
    Commented Jun 8, 2021 at 6:14
  • \$\begingroup\$ No, nested namespaces are placed together without a separator. \$\endgroup\$
    – EasyasPi
    Commented Jun 8, 2021 at 12:39
  • \$\begingroup\$ Decided to remove the "if it doesn't start with _Z, then it is to be printed as-is" as that adds unnecessary complexity. \$\endgroup\$
    – EasyasPi
    Commented Jun 13, 2021 at 23:55
  • 3
    \$\begingroup\$ I've edited this down to a stub now that it's been posted to save space \$\endgroup\$ Commented Jun 17, 2021 at 20:30
3
\$\begingroup\$

Create word lightning

Posted

\$\endgroup\$
2
  • \$\begingroup\$ Trees can be taken in different formats, right? \$\endgroup\$
    – Wezl
    Commented May 14, 2021 at 13:35
  • \$\begingroup\$ yes, they can be taken in any suitable format. \$\endgroup\$
    – Razetime
    Commented May 14, 2021 at 13:47
3
\$\begingroup\$

Jump trajectory

\$\endgroup\$
3
\$\begingroup\$

Reconstruct a recursively prime-encoded integer

\$\endgroup\$
1
  • \$\begingroup\$ Looks great! At first glance seems easy but it's actually a little more difficult. I think it's ready to post, although you might want to wait a day or so. \$\endgroup\$
    – user100690
    Commented Jun 20, 2021 at 12:14
3
\$\begingroup\$

Splinter metagolf

\$\endgroup\$
2
  • \$\begingroup\$ An example for a short repetitive string would be nice \$\endgroup\$
    – pxeger
    Commented Jul 12, 2021 at 9:42
  • \$\begingroup\$ @pxeger Ok, I'll have a look. \$\endgroup\$
    – emanresu A
    Commented Jul 12, 2021 at 9:43
3
\$\begingroup\$

Posted! - How many Sets are there?

\$\endgroup\$
2
  • \$\begingroup\$ Minor suggestion: Move the expected outputs to the start, because you have to scroll all the way to the end to see them. \$\endgroup\$
    – user
    Commented Jul 19, 2021 at 23:59
  • \$\begingroup\$ @user Done, thanks. \$\endgroup\$ Commented Jul 21, 2021 at 4:36
1
20 21
22
23 24
162

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .