Print out the first N characters of your code

21

3

You should write a program or function that receives a positive integer N as input and prints out the first N characters of your code. If N is larger than the length of your code you should continue output your code cyclically.

Reading your source code in any way and reading from file, stdio, etc. are disallowed.

Examples

(assuming your code is yourcode)

Input => Output:

5 => yourc
10 => yourcodeyo
22 => yourcodeyourcodeyour

Clarification

Your program should be at least 1 byte long.

randomra

Posted 2015-01-25T07:47:08.507

Reputation: 19 909

15Congratulations on posting the 2000th code golf challenge! :) – Martin Ender – 2015-01-25T12:55:35.253

3Douglas Hofstadter would love this! – Luis Mendo – 2015-01-25T17:51:28.613

1@MartinBüttner Actually, there are over 300 deleted [code-golf] questions. But close enough ;) – Doorknob – 2015-01-26T02:57:32.940

11@MartinBüttner Thank you. Only 48 to go until a round number! – randomra – 2015-01-26T09:29:18.020

5Maybe it's time you mentioned explicitly that empty programs are invalid? – Martin Ender – 2015-01-26T20:42:24.540

Does using a function that returns the "stringified" or "pretty-printed" version of its argument count as the program reading its own source code? – zgrep – 2018-04-11T05:55:09.270

Answers

16

Python 2, 61 bytes

def f(n):a='def f(n):a=%r;print(a%%a*n)[:n]';print(a%a*n)[:n]

Try it online!

grc

Posted 2015-01-25T07:47:08.507

Reputation: 18 565

10

><>, 49 bytes

'3d*}r0ff+0i:&0(?.~~a*&"0"-+60.&~:?!;1-&:o}&" "0.

Half the code is converting the input from a string to an int. If we're allowed to use the code point of a single char read from STDIN instead, then this program would be much shorter at 21 bytes:

'3d*}ri:?!;1-&:o}&60.

Explanation

I'll use the second program for the explanation.

' starts string parsing, pushing every char until a closing quote is found. Since the rest of the line has no ' quote, every char except the initial ' is pushed onto the stack.

But ><> is a toroidal 2D language, so after the line is over the instruction pointer wraps back to the start, hitting the ' again and stops string parsing. The result is that we've pushed everything necessary except the initial quote, namely

3d*}ri:0=?;1-&:o}&60.

' is ASCII 39, so we push the initial quote by pushing 3d* = 3*13 = 39. We then shift the stack right (}) and reverse (r), giving:

.06&}o:&-1;?=0:ir}*d3'

Now we're all set up to start printing. i reads in a char of input, but ><> chars are basically integers. In the first program, the i is replaced with a loop that converts a digit string from STDIN into an integer.

We then execute the following loop to print out the first N chars:

:?!;               If the top of the stack (N) is 0, then terminate
                   Otherwise...
1-                 Subtract 1 from N
&                  Move N to the register temporarily
:o                 Output the next char in the program
}                  Shift the stack right
&                  Put N back on the stack
60.                Repeat loop by jumping back to the first :

Sp3000

Posted 2015-01-25T07:47:08.507

Reputation: 58 729

9

CJam, 34 17 16 bytes

This can be golfed a lot..

{`"_~"+ri_@*<}_~

Code expansion:

{`"_~"+ri_@*<}_~
{            }_~      "Put this code block on stack, take a copy and execute the copy";
 `                    "When executed, this block will the top element on stack to a string";
  "_~"                "Then put this string on stack";
      +               "Concat it to the the previous string on stack which ` created";
       ri             "Read an integer from STDIN";
         _@           "Copy the integer and put the concatinated string on top of stack";
           *          "Repeat the string input number of times";
            <         "Take the first input number of characters from the repeated string";

Finally, anything on stack gets printed to STDOUT automatically

Try it online here

Optimizer

Posted 2015-01-25T07:47:08.507

Reputation: 25 836

5

JavaScript (ES6), 65 52 50 47 41 39

q=n=>('q='+q).repeat(n/39+1).slice(0,n)

Uses ES6 repeat() to clone the code, then slices down. Uses a hardcoded length.


Old version (50):

q=n=>n>(l=(t='q='+q).length)?t+q(n-l):t.slice(0,n)

Creates a function q, taking a single parameter.

It stringifies the function text, and recursively calls the function if n is greater than the text's length. Otherwise, it returns a substring of the text.

Non ES6 version (65):

function q(n){return t=q+'',l=t.length,n>l?t+q(n-l):t.slice(0,n)}

Scimonster

Posted 2015-01-25T07:47:08.507

Reputation: 2 905

1using recursion, rather than ES6's .repeat, for the cyclic requirements was simply genius. – Jacob – 2015-01-26T08:18:17.623

1Actually, it seems like using repeat() enabled me to cut it down a bunch, so i used that instead. – Scimonster – 2015-01-26T09:48:37.853

Didn't see that. Anyway - this is a very nice answer – Jacob – 2015-01-26T09:50:59.063

why the /39+1? why not just leave a long enough string? – l4m2 – 2018-03-31T04:04:07.853

@l4m2 it's equivalent to (n/39) + 1. The length of the code is 39, but if say n=3 you want 1 repetition, not 0. So you add one. – RK. – 2018-03-31T15:32:02.030

@RK. I mean why not repeat for n times – l4m2 – 2018-03-31T16:06:28.877

See the test cases... – RK. – 2018-03-31T17:48:52.390

1q=n=>('q='+q).repeat(n).slice(0,n) works fine on firefox – l4m2 – 2018-04-01T00:24:41.873

5

Python 2, 117 bytes

b=input();a=lambda x:(b*(2*(x+chr(34))+')'))[:b];print a("b=input();a=lambda x:(b*(2*(x+chr(34))+')'))[:b];print a(")

Life protip: don't execute list(itertools.cycle(x)). For some reason, I can't imagine why, it crashes the interpreter.

QuadmasterXLII

Posted 2015-01-25T07:47:08.507

Reputation: 881

1itertools.cycle() is an infinite generator, so unless your computer has infinite memory you're going to have problems :) – Sp3000 – 2015-01-26T03:38:17.877

5

J - 24 char

Takes a single positive integer argument and spits out a string.

($],quote)&'($],quote)&'

J doesn't have any self-reference tricks, so we just do it the quine way. Explained by explosion:

  ],quote                 NB. right arg prepended to quotation of right arg (quine)
 $                        NB. cyclically take left-arg characters from that
(        )&'($],quote)&'  NB. preload right arg with  ($],quote)&

The dyadic $ operator in J cyclically takes items from its right argument to fit the dimensions specified on the left. When the dimension is a single number, this is a simple 1D list of characters, so we do exactly what the question asks.

Try it for yourself at tryj.tk.

algorithmshark

Posted 2015-01-25T07:47:08.507

Reputation: 8 144

What is the general purpose of the quote verb? – randomra – 2015-02-01T08:53:37.357

@randomra Its definition in the standard library is ''''&,@(,&'''')@(#~ >:@(=&'''')), or in English, "double any ' characters, then add one to the start and end." J uses Ada-like string literals so this escapes the string. – algorithmshark – 2015-02-01T08:59:23.887

4

k2 - 7 char

{x#$_f}

In English, this is a function with argument x whose definition is "x take string self".

  • Self (the noun _f) is the innermost currently executing function. Here it is the function {x#$_f}.
  • String (monadic $) converts its argument to a string. In the case of a function, it creates a string with the function's original definition.
  • Take (dyadic #) takes left-arg items form the list in right-arg. In the case of a string, the items are characters, so this is doing exactly what we want.

This will not work in the open-source Kona, because it seems to create black holes which eat all attempts to use them as arguments to anything. I am unsure of proper k3 semantics but they are probably not much kinder.

In Q, this is {x#string .z.s} and in k4 {x#2_$.z.s}. We have to use 2_ to drop two initial characters in k4, for reasons only a mother could love.

algorithmshark

Posted 2015-01-25T07:47:08.507

Reputation: 8 144

3

JavaScript, 34 bytes

f=n=>n&&('f='+f+f(n-1)).slice(0,n)

Recursive function that repeats the code n times, then slices the result.

Yair Rand

Posted 2015-01-25T07:47:08.507

Reputation: 381

3

Japt, 2 bytes

îî

Try it online!

The first î is a number method that takes one parameter, and repeats it to length n. Because it is the first method, n becomes the input. The second î gets cast into a string, and gets repeated.

This transpiles to:

n.î("î") -> Repeat "î" until it reaches length n

8 byte solution

îQi"îQi"

Try it online!

îQi"îQi" transpiles to n.î(Qi"îQi")

n.î(Qi"îQi")
      "îQi"    // String "îQi"          -> îQi
    Qi         // Insert "              -> îQi"
n.î            // Repeated to length n  -> îQi"îQi"îQi"  (n=12)

Oliver

Posted 2015-01-25T07:47:08.507

Reputation: 7 160

1Beautiful in its simplicity! – Shaggy – 2018-04-11T22:10:28.547

3

Ruby, 66 64 63 bytes

eval s=%q(puts"eval s=%q(#{s})".chars.cycle.take(gets.to_i)*'')

The same using a function to avoid calling gets is a bit longer (81 bytes):

def f(i);eval s=%q(puts"def f(i);eval s=%q(#{s});end".chars.cycle.take(i)*'');end

Lambda versions of the same are 69 and 65 bytes:

l=->i{eval s=%q(puts"l=->i{eval s=%q(#{s})}".chars.cycle.take(i)*'')}
->i{eval s=%q(puts"->i{eval s=%q(#{s})}".chars.cycle.take(i)*'')}

Denis de Bernardy

Posted 2015-01-25T07:47:08.507

Reputation: 270

1.cycle is neat, I have to remember that. :) You can probably shorten .join to *''. – Martin Ender – 2015-01-25T12:56:36.037

You can save a few chars by using String#format instead of interpolation: eval s="$><<('eval s=%p'%s).chars.cycle.take(gets.to_i)*''" – Ventero – 2015-01-25T14:12:34.507

3

Mathematica, 65 bytes

Print[StringTake[StringJoin @@ Table[ToString[#0], {#1}], #1]] & 

All spaces is necessary to make this a proper quine, including the trailing one. This is a pure function, which you can use as follows:

Print[StringTake[StringJoin @@ Table[ToString[#0], {#1}], #1]] & [75]

which prints

Print[StringTake[StringJoin @@ Table[ToString[#0], {#1}], #1]] & Print[Stri

Unfortunately, applying ToString to a function doesn't yield exactly the way you entered the function, so I can't shorten this by removing whitespace, shortening #1 to # or using prefix notation for function calls.

Martin Ender

Posted 2015-01-25T07:47:08.507

Reputation: 184 808

"shortening # to #1"? – undergroundmonorail – 2015-01-25T19:47:22.390

@undergroundmonorail the other way round, thanks – Martin Ender – 2015-01-25T19:48:41.310

3

MATLAB, 319 141 characters

I managed to squeeze a few bytes from the original one:

function d=g(n);d='gvodujpo!e>h)o*<e>(<e>\e)2;2:*.2-e-e)2:;foe*.2^<e>e)2,npe)1;o.2-252**<';d=[d(1:19)-1,d,d(19:end)-1];d=d(1+mod(0:n-1,141));

knedlsepp

Posted 2015-01-25T07:47:08.507

Reputation: 266

Great answer...! No idea how it works :-) – Luis Mendo – 2015-01-31T16:54:48.490

2

Unary(1-8 version), 23855 bytes

Takes input as unary of '1's, and the code is 23855 '1's (,[.,])

l4m2

Posted 2015-01-25T07:47:08.507

Reputation: 5 985

1What brainfuck does this translate too? – James – 2018-03-31T05:52:51.967

@DJMcMayhem It's a cat – l4m2 – 2018-03-31T16:53:28.913

Now find a language that unary input make sense and some 1-char program do cat – l4m2 – 2018-04-02T17:20:28.617

2

Japt, 40 28 bytes


"îR+Q+V+Q+R+V"
îR+Q+V+Q+R+V

First time writing a quine, so this can probably be shortened quite a bit. On the other hand, I'm quite happy I got it to work at all.

Leading newline intentional, the second line is data and the rest of it unwraps the data, then repeats the whole resulting string until it reaches length equal to the input.

Shaved off a whopping 12 bytes thanks to Oliver.

Try it online!

Nit

Posted 2015-01-25T07:47:08.507

Reputation: 2 667

Nice :) you can replace tTU with ¯U and you can use î in place of p by moving it to the front: Try it Online

– Oliver – 2018-04-09T14:24:20.577

On second thought, I don't think you need to slice it at all. îR+Q+V+Q+R+V should work just fine. – Oliver – 2018-04-09T14:31:10.490

@Oliver Oh that's clever, I didn't know about î, that's very handy. Thanks a lot! – Nit – 2018-04-10T07:30:18.667

I'm not too good with quines either but I think this should work for 24 bytes.

– Shaggy – 2018-04-10T08:36:54.110

2

Matlab (57)

function s=f(n);s=evalc('type f');s=s(mod(1:n,nnz(s))+1);

The initial 1 index (instead of 0) in the last line is because Matlab's function type introduces an initial line-feed, which should be removed. Thanks to Dennis for his correction (last index) and for his suggestion (nnz shorter than numel).

Luis Mendo

Posted 2015-01-25T07:47:08.507

Reputation: 87 464

Im afraid this does not do what I would expect (f(4) returns 'fun'), the good news is that you can fix it by saving 2 chars. (remove the -1). -- I think you can also remove the second newline and swap out numel for nnz. – Dennis Jaheruddin – 2015-01-26T15:00:58.653

@Dennis Thanks for these two ideas! I've edited to incorporate both – Luis Mendo – 2015-01-26T16:12:25.910

Hm, I don't want to be a buzzkill, but doesn't the type f part clash with the requirement Reading your source code in any way and reading from file, stdio, etc. are disallowed? – knedlsepp – 2015-01-30T22:11:37.767

@knedlsepp I think you are right. I had that suspicion too. type probably accesses the hard disk. Do you think I should remove the answer? – Luis Mendo – 2015-01-31T15:53:40.177

@LuisMendo: I don't think anyone really minds. :-) I just wanted to give this problem a go yesterday, as I had already failed to produce a quine similar to this a few times before. And of course I had to check if there already was a Matlab solution. :-) In the end this gave me enough motivation to dig deep enough into this to finally produce a solution. (I stole your mod-indexing idea by the way.) – knedlsepp – 2015-01-31T16:40:07.710

2

R, 203 bytes

When N = 203, the code fully print itself.

(f <- function(N){
str <- paste0("(f <- function(N)", paste0(as.character(body(f)), collapse = "\n"), ")}(", N, ")")
cat(rep(str, floor(N/nchar(str))), sep = "")
cat(substr(str, 1, N%%nchar(str)))})(203)

When N = 50, the code trims itself.

(f <- function(N){
str <- paste0("(f <- function(N

When N = 300, the code partially repeats itself.

(f <- function(N){
str <- paste0("(f <- function(N)", paste0(as.character(body(f)), collapse = "\n"), ")}(", N, ")")
cat(rep(str, floor(N/nchar(str))), sep = "")
cat(substr(str, 1, N%%nchar(str))))}(300)(f <- function(N){
str <- paste0("(f <- function(N)", paste0(as.character(body(f)), collapse = "\

Kun Ren

Posted 2015-01-25T07:47:08.507

Reputation: 181

Give this a try: (f=function(N){s=paste0("(f=",paste0(capture.output(f),collapse=""),")");cat(rep(s,N%/%nchar(s)),substr(s,1,N%%nchar(s)),sep="")})(200) – Thomas – 2015-01-26T10:30:08.070

1

Pyth, 15 13 14 bytes

<jN*Q]"<jN*Q]"

Try it online!

Modified version of the standard Pyth quine.

hakr14

Posted 2015-01-25T07:47:08.507

Reputation: 1 295

@l4m2 How so? Please explain, I don't see anything wrong... – hakr14 – 2018-03-31T18:00:34.030

29 should be <jN*Q]"<jN*Q]<jN*Q]"<jN*Q]<jN wrong? – l4m2 – 2018-03-31T18:20:00.027

@l4m2 Ah, right you are. I've fixed it. – hakr14 – 2018-03-31T18:34:39.300

<jN*Q]"<jN*Q]" seems work? – l4m2 – 2018-03-31T18:37:35.277

Yeah, I realized that. Thanks for the help btw! – hakr14 – 2018-03-31T18:39:01.230

1

Hoon, 185 bytes

=/(f "=/(f k |=(n=@ =+((trim 5 f) `tape`(scag n `tape`(zing (reap n :(weld p <f> (slag 1 q))))))))" |=(n=@ =+((trim 5 f) `tape`(scag n `tape`(zing (reap n :(weld p <f> (slag 1 q))))))))

Set f to the program's code as a tape, but with "k" for itself. Split the tape at character 5, setting variables [p=left q=right]. Weld together the strings p, the original string f, and everything after the 1st character of q. Repeat that string n times, then return the first n characters of it.

Doing this was slightly hampered by Hoon's stdlib not having a format function or find-and-replace...Also, I'm not sure why we need another cast after the scag, since it should keep type information. So it goes.

RenderSettings

Posted 2015-01-25T07:47:08.507

Reputation: 620

1

Jstx, 7 bytes

/£↕:1Fn

Try it online!

Quantum64

Posted 2015-01-25T07:47:08.507

Reputation: 371

1

SmileBASIC, 106 66 bytes

INPUT N?MID$(("+CHR$(34))*3,23,N)INPUT N?MID$(("+CHR$(34))*N,23,N)

12Me21

Posted 2015-01-25T07:47:08.507

Reputation: 6 110

1

Perl 5 with -pa, 48 bytes

$_=q{$_=substr"\$_=q{$_}:eval"x"@F",0,"@F"};eval

Try it online!

Dom Hastings

Posted 2015-01-25T07:47:08.507

Reputation: 16 415

1

Gol><>, 12 bytes

"r2ssIFLko|;

Try it online!

How it works

"r2ssIFLko|;

"..."   Push the chars in reverse order
r2ss    Reverse the stack, then push `"`
IF...|  Input n, and repeat the following n times...
  L     Push the loop counter (0 to n-1)
   k    Pop x and copy x-th from the top
    o   Pop and print as char
;       Halt

k can wrap any number of times, so we don't need to duplicate the whole stack depending on the input.

Bubbler

Posted 2015-01-25T07:47:08.507

Reputation: 16 616

1

C++, 305

int L=305;string s="int main(){string t=\"string s=\";int n;cin>>n;t+=s;t+=\"\";\";t+=s;while(n>0){if(n>L){cout<<t;n-=L;}else{cout<<t.substr(0,n);}return 0;}";
int main(){string t="int L=305;string s=\"";int n;cin>>n;t+=s;t+="\";";t+=s;while(n>0){if(n>L){cout<<t;}else{cout<<t.substr(0,n);}n-=L;}return 0;}

Explanation Apart from the escape character all other characters are printed out. The main method is inside the string s and inside main the full string is built and printed to stdout

bacchusbeale

Posted 2015-01-25T07:47:08.507

Reputation: 1 235

0

Ly, 28 bytes

"r(34)<ns>l[p&:l,s]p<[>o<,]p

Try it online!

LyricLy

Posted 2015-01-25T07:47:08.507

Reputation: 3 313

Doesn't work with wrapping (input>15). – Weijun Zhou – 2018-04-02T18:39:15.310

0

J, 41 Bytes

Now that was a brain teaser!

((,quote,')$~'"_)'((,quote,'')$~''"_)')$~

Explanation:

((,quote,')$~'"_)'((,quote,'')$~''"_)')$~  | Expression taking 1 argument
                                       $~  | Reshape left argument to fit right, taking cyclically.
(                                     )    | One large expression that evaluates to a string
                 '((,quote,'')$~''"_)'     | String literal containing the code to the left of it
 (,quote,'$)~'"_)                          | A 4-Hook:
         '$)~'"_                           | The string '$)~'
   quote,                                  | Appended to the quoted version of the string
  ,                                        | Appended to the raw string

Examples:

   ((,quote,')$~'"_)'((,quote,'')$~''"_)')$~ 10
((,quote,'

   ((,quote,')$~'"_)'((,quote,'')$~''"_)')$~ 20
((,quote,')$~'"_)'((

   ((,quote,')$~'"_)'((,quote,'')$~''"_)')$~ 30
((,quote,')$~'"_)'((,quote,'')

   ((,quote,')$~'"_)'((,quote,'')$~''"_)')$~ 41
((,quote,')$~'"_)'((,quote,'')$~''"_)')$~

   ((,quote,')$~'"_)'((,quote,'')$~''"_)')$~ 50
((,quote,')$~'"_)'((,quote,'')$~''"_)')$~((,quote,

Bolce Bussiere

Posted 2015-01-25T07:47:08.507

Reputation: 970

0

Stax, 24 bytes

"34bLNca*]$("34bLNca*]$(

Run and debug it

Adaption of the "34bL"34bL quine.

Weijun Zhou

Posted 2015-01-25T07:47:08.507

Reputation: 3 396

0

Java 10, 193 176 bytes

n->{var s="n->{var s=%c%s%1$c;s=s.format(s,34,s);for(int i=n;i>0;i/=176)s+=s;return s.substring(0,n);}";s=s.format(s,34,s);for(int i=n;i>0;i/=176)s+=s;return s.substring(0,n);}

Explanation:

Try it online.

n->{                       // Method with integer parameter and String return-type
  var s="n->{var s=%c%s%1$c;s=s.format(s,34,s);for(int i=n;i>0;i/=176)s+=s;return s.substring(0,n);}";
                           //  Unformatted source code
  s=s.format(s,34,s);      //  Create the formatted quine
  for(int i=n;i>0;         //  Loop `i` as long as it's not 0
      ;                    //    After every iteration:
       i/=176)             //     int-divide `i` by the hardcoded length of the source code
    s+=s;                  //   Exponentially enlarge the source code
  return s.substring(0,n);}//  Return the first `n` characters of the source code

-part:

  • The var s contains the unformatted source code.
  • %s is used to input this String into itself with the s.format(...).
  • %c, %1$c and the 34 are used to format the double-quotes.
  • s.format(s,34,s) puts it all together.

Challenge part:

  • for(int i=n;i>n;i/=176) loops ceil(n/176) times, where 176 is the length of the source code.
  • s+=s; exponentially increases the size of the source code String. (ab becomes abab; abab becomes abababab; abababab becomes abababababababab; etc.)
  • s.subtring(0,n); takes the first n characters of the String.

Kevin Cruijssen

Posted 2015-01-25T07:47:08.507

Reputation: 67 575

0

><>, 22 19 bytes

'rd3*$:?!;1-$:o}50.

Try it online!

Takes input through the -v flag.

Jo King

Posted 2015-01-25T07:47:08.507

Reputation: 38 234

0

Stax, 8 bytes

",:m",:m

Run and debug it

recursive

Posted 2015-01-25T07:47:08.507

Reputation: 8 616

0

05AB1E, 17 bytes

0"D34çýI∍"D34çýI∍

Try it online.

Explanation:

0                    # Push a 0 to the stack
                     #  STACK: [0]
 "D34çýI∍"           # Push the string 'D34çýI∍' to the stack
                     #  STACK: [0, 'D34çýI∍']
          D          # Duplicate this string
                     #  STACK: [0, 'D34çýI∍', 'D34çýI∍']
           34çý      # Join the entire stack by the character '"'
                     #  STACK: ['0"D34çýI∍"D34çýI∍']
               I     # Take the input
                ∍    # Shorten/lenghten the string to that size (and output implicitly)
                     #  i.e. 3 → '0"D'
                     #  i.e. 25 → '0"D34çýI∍"D34çýI∍0"D34çýI'

Kevin Cruijssen

Posted 2015-01-25T07:47:08.507

Reputation: 67 575

0

KSFTgolf - 4 chars, 6 bytes

KSFTgolf if a language I've been attempting to design for code golf. I've been changing it a lot, so this probably shouldn't actually count.

☃\@2

KSFT

Posted 2015-01-25T07:47:08.507

Reputation: 1 527

What language is this ? Any links ? Spec ? explanation .. – Optimizer – 2015-01-25T14:42:54.103

@Optimizer Ah, right. I forgot about that. It's a language I've been designing for code golf. This is finally a challenge where (if I fix all the bugs) it could actually win. – KSFT – 2015-01-25T14:44:16.170

1

Moreover, as far as I can see, the language was created like 10 minutes back, so technically, this is a non-competing answer :) . Also, I suppose this is the block corresponding to your code, which totally looks like something that has been specifically done for this challenge (as there are no other unicode based code blocks in your whole file).

– Optimizer – 2015-01-25T14:48:04.710

@Optimizer That instruction was actually in the language before (although a commit that changed it slightly was pushed after the challenge was posted), which was created a few days ago. Because I don't think this would work in the version of the language that was public when the challenge was posted, though, I don't think this answer should actually count, as I stated in my answer. – KSFT – 2015-01-25T14:50:51.343

4Do you want to build a snowman? – flawr – 2015-01-25T17:19:13.360

@Optimizer I can verify that this language exists for a while ago and the first commits where done a few days ago. It was displayed in another challenge. You can check on here: http://codegolf.stackexchange.com/a/44845/14732

– Ismael Miguel – 2015-01-26T10:52:28.410

@IsmaelMiguel Sure, but the meaning of code was changed only 21 hours back

– Optimizer – 2015-01-26T11:08:57.460

@Optimizer I see your point. I know what you mean. But there are no evidences that the change was made for exactly this question. You can only claim it was a huge coincidence, since the times are 1 hour apart. You can flag it, and I think this wasn't fairplay, but no one can do anything. It will go down the drain as "just a coincidence". You can say that he had just enough time to implement this. I agree. But that would be seen as speculation and disregarded as well. – Ismael Miguel – 2015-01-26T11:19:24.407

Why flag it ? The OP is also saying that its a non competing entry, so there is no reason to flag/delete the answer. – Optimizer – 2015-01-26T11:21:21.987

@Optimizer Apparently you thought otherwise here, where i had a non-competing entry that got downvoted and deleted.

– Scimonster – 2015-01-26T11:35:02.870

@Scimonster off topic. But that is a CnR where you were the second answer cracking the same cops code. – Optimizer – 2015-01-26T12:03:37.137

Huh...somehow, I wasn't notified of all of these comments... Anyway, I don't mind deleting that if that's what most people think I should do. While I admit that I changed what the unicode snowman instruction did after I saw this challenge, I had been thinking about changing it in that way for a while. – KSFT – 2015-01-26T12:35:33.500

-1

Tcl, 31 bytes

puts [read [open $argv0] $argv]

Try it online!

sergiol

Posted 2015-01-25T07:47:08.507

Reputation: 3 055