@Sparr I generally agree but a) it's meta and b) it's explicitly supposed to list less ground-breaking contributions that aren't worth cluttering the question with.
Zero-length answers
Considering an empty program a quine was original in the 1994 IOCCC.
Eleven years later, if you can solve a task with an empty program, you should just notify the OP.
Seeing "o.k." as an abbreviation for "okay" always reminds me of when my friend tried to convince me that O.K. is actually an acronym for Oll Korrect, apparently an old-timey spelling of All Correct.
The game of Chinese checkers is played on a board with spaces in the shape of a six-pointed star:
Image from Wikipedia
We can create an ASCII-art representation of this board, using . for empty spots and the letters GYORPB for the six colored starting locations:
G
G G
...
Introduction
For many centuries, there has been a certain river that has never been mapped. The Guild of Cartographers want to produce a map of the river, however, they have never managed to succeed -- for some reason, all the cartographers they have sent to map the river have been eaten by wild...
As part of his answer to Make an Error Quine!, @Falko proposed the following algorithm:
How to create your own solution in 2 minutes?
Open a new file in an IDE of your choice.
Bang your head onto the keyboard in front of you.
Compile.
Replace the code with the compiler error mes...
Write two programs such that when the bytes of their source code are XOR-d together it produces a third, valid program, all in the same language. The length of each of the three programs in bytes must be identical.
The first program should output A. The second program should output B. The third ...
Here was my approach, with the hope that you can make something better of it. Let x and y be the coordinates, centered at (0,0). Let (a,b,c)` be the corresponding triangular coordinates (x+y,x-y,-2*x), which add to 0. Then, the region is determined by which of [a,b,c,-a,-b,-c] are greater than 2*n. If none are, we're in the center. If exactly one is, we're in one of the six triangles. If 2+ are, we're not on the board. Also, if a is odd, put a space instead.
@MartinBüttner an 'ignore whitespace in replacement string' modifier would also improve readability a lot (if you could write whitespace with escape chars as you planned it wouldn't hinder functionality)
In this challenge, you are required to shift characters in an inputted string n number of times and output the shifted string
Input
Input will first contain a string. In the next line, an integer, which denotes n will be present.
Output
If n is positive, shift the characters in the string to...
@randomra you can already use comments in the regex, if you use the free-spacing modifier x
that doesn't help much in -s mode of course, because you still can't include newlines
I'm not sure I'll add comments to replacement strings. I think in most cases the trickiness will be in the pattern so that any quirks in the substitution can be explained there
but I'll keep it in mind for if I ever rewrite Regex.Replace
@aditsu would you consider changing e[ and e] such that if you give them an arraylist to pad with, they pad with the contents of the arraylist, not the arraylist itself? e.g. "abc"8"Xx"e] --> "abcXxXxX"
I just found a particular scene funny. They are "hacking" into a security system, and the code they are writing is in python... The explicit code the protagonist uses is the "Sieve of Eratosthenes ".
except you're not ever gonna use most of the control characters anyway, so I could have used one of those instead, but that would be even less usable
I might ditch multifile mode once newline escapes work in replacement strings. I could also maybe make -s more sophisticated by not splitting patterns on newlines if that would invalidate the regex... so that if you have a literal \n in a character class or a group, it won't be considered as a split because the pattern isn't complete yet
I think this is the last time I bother you with my 'Catch the cat' assymmetrical koth challenge: Do you agree that I should make two threads (like in cops and robbers) one for the cats, one for the catchers submissions? (As cats only compete within cats, and catchers only compete within catchers)
has anyone used programs to replace flash cards when learning stuff? I'm just looking for something really simplistic, but all the tools I've found so far seem a bit overkill while not being as flexible as I'd like them to be.
(ideally I'd just like to read in a bunch of markdown card definitions and flick through them in my browser... might just put something together myself if I can't find anything)
@flawr It's up to you. The main motivation for having two separate thread for Cops and Robbers is so that the Robbers can submit answers as opposed to comments. Since everyone in CTC is going to submit an answer either way, it doesn't matter.
Assymetrical KOTH: Catch the Cat
This challenge consists of two threads, this is the cat thread, the catcher thread can be found here.
The controller can be downloaded here.
This is an assymetrical KOTH: Each submission is either a cat or a catcher. There are games between each pair of each a...
Assymetrical KOTH: Catch the Cat
This challenge consists of two threads, this is the catcher thread, the cat thread can be found here.
The controller can be downloaded here.
This is an assymetrical KOTH: Each submission is either a cat or a catcher. There are games between each pair of each a...
@MartinBüttner No mine didn't get reverted either. I wonder whether there was more than one person looking on the same day. I got another the next day, for the same answer as one of the previous day's, so at least that one was from a different person.
in a Java koth if I don't want players (classes) to keep state/info between calls is forbidding static variables enough? apart from directed hacks like reflection
@randomra As here on codegolf.SE the competitions are not automated (like rps-contest.com) I do not think it is necessary to make restrictions? The competitors have to post and explain their code so any attempt to cheat will be discovered I think..
@trichoplax I got three upvotes twice... I think maybe the script is clever enough to notice if someone just upvotes a bunch of answers on one question
or generally if someone just upvotes a lot or specifically targets one user
Some string-based languages (including but not limited to sed, Retina, ///) can't really handle integer arithmetic in decimal (or other normal bases). Therefore, these almost always have to start by converting the input from decimal to unary, and the output back from unary to decimal, which can e...
Normally, users can't make questions community wiki (only moderators can, after the question is posted), but they can manually turn answers to CW.
Now I just noticed that when you self-answer immediately (i.e. by checking the "Answer your own question" checkbox while posting the question), and s...
I'm having trouble with this (unary). How is it different from accepting binary input (which is forbidden.) I feel like it should be more about "accepting input number as a standard representation in your language".
Yes, numerical input and output may be given as a character code
As long as this doesn't give an unfair advantage (e.g. for a challenge that is "given a character code, output the character"), I don't see any problem with this. It's similar to allowing each language to use its native string repr...
so can I take a list as 1*2*3 if they ask for the reduced product?
> The languages in question are probably not going to win normally anyway, and I don't like to discourage answers in interesting esoteric languages, just because the author couldn't be bothered to include the atoi implementation.
This is the goal here too I guess, and unary doesn't give much advantage but I would say other bases might do.
adding my code to the end of the input is also a convenient/unambiguous representation in my mind, so I don't like that
I think I'm against unary being used as a default. In some challenges, it makes a legitimate difference and I'm not sure it should be the asker's responsibility to specify numbers must be in decimal.
That's a good point too. I'm very uncertain about this whole idea. Making Retina users ask about what to do every time is certainly not optimal either.
Ah, yeah. Perhaps specifying decimal numbers should be more common practice when it matters. It's another thing the sandbox can easily catch, but will probably disrupt a bunch of main posts until it catches on.