@DJMcMayhem I try to post verbose explanations on all my answers, so that someone familiar with programming but not with PowerShell can still follow along with what's happening. I'm sure that I've gotten better in my explanation skills in the past year.
Enema
:OQ::!Q:
Code can come any place after this.
This language is similar to Emmental in that it is capable of redefining itself. Essentially, what we're doing here is redefining O (which normally is for output) to do nothing (thus making the language no longer have a transformational model...
Given a sudoku puzzle, find all possible numbers that can be filled into each empty cell within the puzzle. The input is a three-dimensional array containing the row, column and cell value respectively. The result is to be in the form of a four-dimensional array containing the row, column, cell a...
The "language" with the highest average score is "double" with a whopping average of 428.5 across two questions. On closer inspection though it turns out it gets almost all its points from an answer given in "double brainfuck" and then gets nine points from from a tips answer suggesting that you "Double check your character count"
[master list]
Natural Pi #2 - Sand
Goal
Simulation
What are we simulating? Buffon's needle. Smooth out the sand in your sandbox, draw a set of equally spaced parallel lines (call the distance in between t). Take a straight stick of length l and drop it N times into the sandbox. Let the number...
This was inspired by a now removed CS.SE question.
Task
Given two non-empty input strings A and B, output the smallest distance from A to a palindrome that contains B as a substring. Distance is defined by the number of character replacements (Hamming distance).
Restrictions
Sensible input: ...
@TimmyD As in, I'd have to look twice to see what kind of phone it is. Once you actually look at it you can see the differences, but that white one in particular...
@Geobits I really dislike the Galaxy S6 I have for work for this exact reason. The back is so ridiculously slippery, it's practically impossible to use one-handed.
Hyper about quines
code-challenge quine code-generation source-layout busy-beaver
Inspired by Hyperprogramming: N+N, N×N, N^N all in one.
Definitions
Hyperquines
Define a hyperquine of order n as a quine-like full program or function P that satisfies all rules that apply to proper quines an...
The basic definition of a quine is a program that, when run, produces its own source code as output. There are a number of techniques and a number of way to implement those techniques across a number of different languages.
However, not all quine programs are equal. Clearly, any quine in HQ9+ or...
@Dennis "If the source code aabbcc generates the output aaaabbbbcccc, the program is a hyperquine of order 1." Is it worth adding a sentence like "(Six groups of 1 character generating output made up of six groups of 2 characters.)"? It's already clear, but the extra sentence might help for people like me who need to read the obvious twice before it becomes so...
@DJMcMayhem Yeah. The accepted answer finally got yhe last vote it needed. I can't find any information that indicates that you cannot get it for your own question. Do you remember which one it was?
Vim, 54, 52, 49 47 keystrokes
2wa0<esc>qqYp<c-a>6ldf @qq@q$dT]dd:%norm dwf{xwC;<CR>gg"0P
Explanation:
2wa0<esc> 'Move 2 words forward, and insert a 0.
qq 'Start recording in register Q
Yp 'Duplicate the line
...
I looked it up on mother meta, and it doesn't count for your own question
BTW @MartinEnder Thanks for your awesome polyglot! It made my challenge stay popular for a long time which got me a gold badge a new all-time highest scoring post. :D
@Dennis "If two or more submissions are tied, the submission among these that starts with the shortest hyperquine (measured in characters) wins." Is this characters rather than bytes? Is the intention that multi-byte characters count as one, or just to clarify that the length is not measured in groups or group lengths?
@MartinEnder It actually didn't get that much exposure. The reddit post got it less than 300 views (since I didn't get the silver badge for sharing a link)
I wouldn't say so for general quines, but I think in your challenge it actually makes sense because you've also defined your hyperquines in terms of runs of characters
also, in quines if you encode extra information per character, that also means you need to output more information, so it kinda balances out any cheating
Is there any loop hole with a language that reads a multi-byte character as individual bytes of source code? I don't know of one, but I'm way out of my depth here...
@trichoplax if it did, wouldn't that just mean that the language uses a single-byte encoding?
(and you gave it a weird file)
it doesn't seem to allow any abuse, and if someone actually managed to build a polyglot based on that, I'd be very impressed and would definitely upvote it :)
@MartinEnder As long as someone displaying it as multi-byte source code would have it declared invalid. I guess that doesn't need to be said explicitly? I'm just scraping the bottom of the barrel of possible problems
@DJMcMayhem Yeah, but if we're talking about the same question here, both accepted and best-scoring answer belonged to the same user. :P I guess I'll just have to get more upvotes.
@trichoplax Uh, so something like an ASCII answer that claims it's using UTF-32? Hm... Also, I must admit that I didn't even consider non-character based languages.
@Dennis I think it was clear already - it just made me wonder about the intention behind it in case there was a loophole. I can't compare with the previous wording without scrolling back because the latest edit doesn't show in the edit history for some reason - never seen that before
@MartinEnder That probably has something to do with the fact I don't know what I'm talking about... I meant something like displaying chinese characters in the answer, but passing it to the interpreter as bytes.
It might allow something like abcd -> ababcdcd to count as an order 1 hyperquine
Wouldn't hurt to mention explicitly that this isn't allowed. We don't have well-understood defaults for scoring characters.
> You must use the same character encoding for source code output, character count, and execution. For example, the Python program print 42 is not a 2-character UTF-32 submission, since the interpreter treats each byte as a single character. If your language of choice is not character-based, treat all individual bytes as characters.
I can't see a way around that other than writing an interpreter specially for the purpose of getting around it, which would post date the challenge so wouldn't matter
Inspired by Hyperprogramming: N+N, N×N, N^N all in one.
Thanks to @MartinEnder and @trichoplax for their help in the sandbox.
Definitions
Hyperquines
Define a hyperquine of order n as a quine-like full program or function P that satisfies all rules that apply to proper quines and, in addition...
@Maltysen OK, there seems to be a lot of submissions in other challenges that do this. I guess it's valid then. (That said, I'd be incredibly surprised if there's a valid JS answer.)
Ideone is currently vulnerable to XXS! Until this is fixed, I suggest avoiding Ideone links from untrusted sources and opening all other Ideone links that are not your own in an Incognito window.
> Most people know about Amazon "Prime," but they don't know Amazon's went public in '97, which is a prime number. Write out the full year as 1997, and it's still a prime number. Specifically, the IPO was on May 15, 1997. 5,151,997 (5/15/1997) is also prime. For you non-Americans, 15/5/1997 and 15/05/1997 create two more prime numbers 1,551,997 and 15,051,997.