text:
Eternal 2014 — PCG.SE New Year’s Puzzle 2015
So, now that it's 2015, and a bunch of answers from last year's puzzle are now starting to produce invalid output, it's time for a question involving the number 2015.
Except... why? Wouldn't you like it if your date-based answers to last year's problem were to stay valid? Why don't we change our calendar so that it's never 2015, and we simply continue living in 2014, forever and ever?
Let's define a new date notation, called Eternal 2014 notation, as follows:

For dates 2014 and before, the dates will be the same as in the proleptic Gregorian calendar.
For dates in years 2015 and onward, the year will stay 2014, and the month will be the number it would be if the same month cycle in 2014 were to continue forever past month 12. So 2015-02-08 would be 2014-14-08, and 2020-12-31 would be 2014-85-02. Note that leap days are not accounted for because 2014 is not a leap year.

Your task is to build a program or function that will take a Julian astronomical date as input and return a string with the date corresponding to that Julian date in Eternal 2014 notation, in either YYYY-MM-DD or DD/MM/YYYY format.
You may assume that the Julian day entered will always be an integer from 1721426 (January 1, 1) to 2914695 (January 23, 3268) inclusive. Years may contain leading zeros to pad to 4 digits or not, but months and days must always have leading zeros to pad to two digits (and years may not contain leading zeros to pad to any number of digits other than 4).
Here are some example inputs and their outputs, in all acceptable formats:
> 1721426
1-01-01
01/01/1
0001-01-01
01/01/0001

> 2086302
999-12-31
31/12/999
0999-12-31
31/12/0999

> 2456659
2014-01-01
01/01/2014

> 2456789
2014-05-11
11/05/2014

> 2457024
2014-13-01
01/13/2014

> 2457389
2014-25-01
01/25/2014

> 2469134
2014-411-07
07/411/2014

> 2567890
2014-3657-29
29/3657/2014

> 2914695
2014-15059-23
23/15059/2014

You may not use any built-in date processing libraries in your language. All calculations must be done algorithmically within the program's source code itself.
The shortest program (in bytes) to achieve this in any language wins.

Haha, this question gets 25 upvotes right as the Winter Bash begins.

Python 2, 166 bytes
n=input()
d=m=y=1
M=([3]+[3,2]*3)*2
while n>1721426:
 n-=1;d+=1;M[2]=y%400<1or y%4<1<y%100
 if d>M[m%12]+28:m+=1;d=1
 if m>12<2014>y:y+=1;m=1
print'%02d/'*2%(d,m)+`y`

This cycles through every day from January 1, 1 (1721426) to the given date, incrementing the current day, month and year as it goes. The last test case takes about a second on my computer.
Output is printed in the second format:
01/01/1
31/12/999
23/15059/2014

Ostrich 0.5.0, 197 bytes
G~:J1401+4J*274227+146097/F3*4/F+38~+:f4*3+:e1461:p%4/F:g5*2+:h153:s%5/F1+:D;hs/F2+12:n%1+:M;ep/F4716-n2+M-n/F+:Y;{2014:Y;D365+:D;{M1-12%[31:x28x 30:yxyxxyxyx]=:dD<.{Dd-:D;M1+:M;}*}(}Y2014-*D"/M"/Y

Ungolfed (ha):
G~:J;
4716:y;1401:j;2:m;12:n;4:r;1461:p;3:v;5:u;153:s;2:w;274277:B;38~:C;
Jj+4J*B+146097/F3*4/F+C+:f;
rf*v+:e;
ep%r/F:g;
ug*w+:h;
hs%u/F1+:D;
hs/Fm+n%1+:M;
ep/Fy-nm+M-n/F+:Y;
{
2014:Y;
D365+:D;
{
M1-12%[31 28 31 30 31 30 31 31 30 31 30 31]=:d
D<.{Dd-:D;M1+:M;}*
}(
}Y2014-*
D"/M"/Y

I'm... really just exhausted from all the New Year's happiness and what not. That's why I haven't golfed this very much. I may or may not come back to make it better later.
Algorithm from https://en.wikipedia.org/wiki/Julian_day#Gregorian_calendar_from_Julian_day_number

PHP (278)
Run on command line using php -R '<code>'. (The flag counts as one character.)
if(0<$N=($n=$argn-1721426)-735233){$n=$N%365+735233;$o=12*($N/365|0);}for($y=1+400*($n/146097|0)+100*(($n%=146097)/36524|0)+(($n%=36524)/1461<<2)+(($n%=1461)/365|0);($n%=365)>=$d=@++$m-2?30+($m+($m>>3)&1):29-($y%4||!($y%100)&&$y%400);)$n-=$d;printf("$y-%02d-%02d",$m+@$o,$n+1);

More readable version (run using filename and without -R):
<?php

// step 1: read the input and fix up 2014 dates
if (0 < $N = ($n = fgets(STDIN) - 1721426) - 735233) {
    $n = $N % 365 + 735233; // wrap around to 2014-01-01
    $o = 12 * ($N / 365 | 0); // compute month offset
}

for (

// step 2: extract year
$y = 1
    + 400 * ($n / 146097 | 0)
    + 100 * (($n %= 146097) / 36524 | 0)
    + (($n %= 36524) / 1461 << 2)
    + (($n %= 1461) / 365 | 0);

// step 3: extract month and day
($n %= 365) >= $d = @++$m - 2
    ? 30 + ($m + ($m >> 3) & 1)
    : 29 - ($y % 4 || !($y % 100) && $y % 400);

) $n -= $d;

// step 4: print date string, adding the month offset
// previously computed in step 1.
printf("$y-%02d-%02d", $m + @$o, $n + 1);

C 176
Thanks to @ceilingcat for some very nice pieces of golfing - now even shorter
y=1;m;d;main(n,a)int**a;{for(n=atoi(a[1]);n-->1721426;)++d>(~m%2+m%12/7?30:m%12-1?29:y%(y%100?4:400)?27:28)&&(d=!++m,m>11&y<2014)&&(m=!++y);printf("%d-%02d-%02d\n",y,m+1,d+1);}

It uses the same algorithm as the Python 2 answer by @grc
Try it online!


text:
Recycling for the New Year
A good resolution for 2015 is to live more sustainably. We'll start by recycling. Recycling code, that is!
Your task is to print the number 2015 to STDOUT, with or without trailing newline (and only that). However, you have to do so by recycling some old code from PPCG. Here is how that works:

Pick any answer posted on CodeGolf.SE before 2014-12-16 00:00:00Z (the day I posted this in the sandbox). Exception: You may not use any answers from last year's New Year's challenge.
Choose one code block from that answer (not an inline code snippet, it has to be a on its own paragraph). This block must be advertised as actual code, e.g. you cannot use test cases or example output which happen to use monospace formatting.
Rearrange the characters in that code block to form your submission for this challenge. You may only change the order, not add or remove any characters. This includes newlines.
You must be able to show that the original source block is syntactically valid in your language. In the best case you can do this by showing that it runs without compile-time or run-time errors. So while the original code may have been Java, you could use it for a Whitespace answer (as every file is valid in Whitespace), but probably can't use it for a Python answer (as the original won't be valid Python syntax).

Note that your answer must ignore all input and external state (including the actual current date). It may read from STDIN, say, as long as it doesn't crash if it's empty, and produces the same output for all possible contents of the stream.
Your resulting code has to be a full program (not a function, nor a snippet which assumes a REPL environment).
This is code golf, so the shortest answer (in bytes) wins.
Leaderboards
I'm sure this will play out very differently in different languages. So the following Stack Snippet generates both a regular leaderboard and an overview of winners by language.
To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:
# Language Name, N bytes

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:
# Ruby, <s>104</s> <s>101</s> 96 bytes

function answersUrl(e){return"http://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function getAnswers(){$.ajax({url:answersUrl(page++),method:"get",dataType:"jsonp",crossDomain:true,success:function(e){answers.push.apply(answers,e.items);if(e.has_more)getAnswers();else process()}})}function shouldHaveHeading(e){var t=false;var n=e.body_markdown.split("\n");try{t|=/^#/.test(e.body_markdown);t|=["-","="].indexOf(n[1][0])>-1;t&=LANGUAGE_REG.test(e.body_markdown)}catch(r){}return t}function shouldHaveScore(e){var t=false;try{t|=SIZE_REG.test(e.body_markdown.split("\n")[0])}catch(n){}return t}function getAuthorName(e){return e.owner.display_name}function process(){answers=answers.filter(shouldHaveScore).filter(shouldHaveHeading);answers.sort(function(e,t){var n=+(e.body_markdown.split("\n")[0].match(SIZE_REG)||[Infinity])[0],r=+(t.body_markdown.split("\n")[0].match(SIZE_REG)||[Infinity])[0];return n-r});var e={};var t=1;answers.forEach(function(n){var r=n.body_markdown.split("\n")[0];var i=$("#answer-template").html();var s=r.match(NUMBER_REG)[0];var o=(r.match(SIZE_REG)||[0])[0];var u=r.match(LANGUAGE_REG)[1];var a=getAuthorName(n);i=i.replace("{{PLACE}}",t++ +".").replace("{{NAME}}",a).replace("{{LANGUAGE}}",u).replace("{{SIZE}}",o).replace("{{LINK}}",n.share_link);i=$(i);$("#answers").append(i);e[u]=e[u]||{lang:u,user:a,size:o,link:n.share_link}});var n=[];for(var r in e)if(e.hasOwnProperty(r))n.push(e[r]);n.sort(function(e,t){if(e.lang>t.lang)return 1;if(e.lang<t.lang)return-1;return 0});for(var i=0;i<n.length;++i){var s=$("#language-template").html();var r=n[i];s=s.replace("{{LANGUAGE}}",r.lang).replace("{{NAME}}",r.user).replace("{{SIZE}}",r.size).replace("{{LINK}}",r.link);s=$(s);$("#languages").append(s)}}var QUESTION_ID=43048;var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";var answers=[],page=1;getAnswers();var SIZE_REG=/\d+(?=[^\d&]*(?:<(?:s>[^&]*<\/s>|[^&]+>)[^\d&]*)*$)/;var NUMBER_REG=/\d+/;var LANGUAGE_REG=/^#*\s*([^,]+)/
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
<link rel=stylesheet type=text/css href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	AuthorLanguageSize

Winners by Language

LanguageUserScore

{{PLACE}}	{{NAME}}{{LANGUAGE}}{{SIZE}}Link

{{LANGUAGE}}{{NAME}}{{SIZE}}Link

Not every Whitespace program is valid; I got an error for http://ideone.com/Jphkf3

This question just came to my mind: is it allowed to recycle the original code in a way that you comment out a huge part of the original?

@ProgramFOX yes, because if you have to comment out a lot that will probably hurt your score.

@Ypnypn That looks like a runtime error to me though, not a syntax error, right?

GolfScript, 9 bytes
The original answer (dibs!) is also in GolfScript, which is how I know it is syntactically valid. I tested on http://golfscript.apphb.com/ .
2015}{.**

I despise the use of languages designed for golfing, but I had to win this challenge, so I betrayed my values by posting this answer. I don't know what most of the characters do in this language, but I once inadvertently learned, while skimming a GolfScript answer, that an unmatched } comments out the rest of the program. This allowed me to ignore the rest of the characters.

Huh, I'd never thought unmatched braces would be valid in GS.

@MartinBüttner Did you never see this?

Befunge-93, 2085 bytes
I thought I'd have fun and go meta by recycling the best of the recycled. Not going for any awards for brevity here.
+2012+1+1e1 or b+bbv+b+NN
"a"""""
p((('?'.ord-' '.ord )/(1.0/'A'.ord)).to_i)
<<id
                   1
                   !
                   _"  fabaaaca"-.-.-.-.+"O"2::++p

aa
AaAAaAAaAAaAAaA
eEe ddd OoOOoOOoOOoOOoOOoOOoOOoOOoOOoO ddD Ccc eEE
ccc LLl
SssSss LLl
SsS LLl
SsSSsSSsSSsS LLl
cccccc
mMm

+   +     a     pppp  pppp  y   y     n   n eeeee +     +    y   y eeeee     a     rrr    "
+   +    a a    p   p p   p  y y      nn  n e      + + +      y y  e        a a    r  r   "
+++++   aaaaa   pppp  pppp    y       n n n eee    + + +       y   eee     aaaaa   rrr    "
+   +  a     a  p     p       y       n  nn e       + +        y   e      a     a  r  r
+   + a       a p     p       y       n   n eeeee   + +        y   eeeee a       a r  r   "

Hope to see another round of awesome programming puzzles and code golf challenges

===============================
"" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" " ' ' ' ' '

Big char dump below (will clean up if there's more languages to squeeze in):

  $$$$$$$()++++++++++++++++++++++++++++--------------------------/////:::;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<>>>>>??AAACCDDEEEFHHLLMMMMM
NOOOOOOOOOOORRRRRRRRRSSSUUUUV[\]___aaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbbbcccccccccccccddddddddddddddddddddddddddddddddddddddd
ddddddddddddddddddddddddddddddddddddddddddddddddddeeeeeeeeeeeeeeeeeeeeeeeee
eeeeeeeeeeeeeeeeeeffffffffffghhhhhhiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiilll
llllllllllmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnnnnnnnnnnnnnnnnn
nnnnnnnnnnnnnoooooooooooooooooooooooooooooooooooooooooooooooooppppppppppppp
ppppppppppppprrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrsssssss
ssssssssssssssssssssssssstttttttttttttttttttttttttttttttttttttttttttttttttt
ttttttttttttttttttttttttttttttttttttttttttuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
uuuuuuuuuuuuvvvvvvvvwwxxxxxxxxxxxxxxxxxyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
yyyyyyyyyyzz{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}

"""
one=1
print(int(ord('A')/(one/(ord(' ')-one))))
id
"mOO"

This is actually also a polyglot for 5 languages: Befunge-93, oOo Code, Pyth, Python 3 and Ruby. However, since the original code is only syntactically valid for Befunge-93, I'm only counting that.
Unfortunately the original code had only one pair of [] and too many .s, so I wasn't able to actually fit Brainfuck in (hence the oOo Code).

Notes
This turned out to be surprisingly restrictive, because:

The full set of digits available is 001111111222, requiring the use of ord for Ruby and Python. In particular there's no 5, which turned out to be a pain for Pyth.
The lack of @ meant that p needed to be used to place an @ for Befunge.
The lack of * meant that we had to multiply by dividing by the inverse of a number. Fun.

Befunge-93
The Befunge program is
                   v
                   1
                   !
                   _"  fabaaaca"-.-.-.-.+"O"2::++p

where we've skipped the useless instructions. We encode each digit as the difference in ASCII values between chars, specifically cabf vs. a.
oOo Code
The corresponding BF is
>><->>->>>><>+++++[>++++++++++<-]>.--.+.++++.>>[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>->>>>>>>>>>>>>>>>>>>>>>->>>>>>>>>>>>>>>>>><;;;;;;;;;;;;;;;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>->>>]

, of which the only relevant part is
+++++[>++++++++++<-]>.--.+.++++.

Pyth
Pyth only executes the first line, so
+2012+1+1e1 or b+bbv+b+NN

Note that Pyth uses an prefix notation, so the first part of the line is actually
2012 + (1 + (1 + (1 % 10)))

(Note: e means %10)
Due to the nature of Pyth, this is automatically printed. The rest of the line is valid Pyth, but the preceeding space before the o suppresses the automatic printing.
Python 3
The majority of the Python code is commented out using strings, especially a large triple-quoted string in the middle. Ignoring a few stray strings, we have:
+2012+1+1e1 or b+bbv+b+NN
"""
...
"""
one=1
print(int(ord('A')/(one/(ord(' ')-one))))
id

The first and last lines are syntactically valid, but do nothing. The middle two lines print what we need.
Ruby
The Ruby code is similar, but we're using a heredoc instead of a triple quoted string to comment out most of the program. Ignoring some stray strings, we have:
+2012+1+1e1 or b+bbv+b+NN
p((('?'.ord-' '.ord )/(1.0/'A'.ord)).to_i)
<<id
...
id

Once again, the first line is syntactically valid, but does nothing. The second line prints what we need.

Heh, you definitely don't get the "shortest code" award, but +1 for creativity!

CJam, 12 bytes
T~mp[]!_1+oE^

The Unscramble the Code topic is a really good source for random number printing. This one was quite fun to piece together :)
T~     bitwise not of 0 is -1                     [-1]
mp     replace with 0 as -1 is not prime          [0]
[]!    not of an empty array (falsy) is 1         [0, 1]
_      copy that 1                                [0, 1, 1]
1+     add 1                                      [0, 1, 2]
o      output top of stack                        [0, 1]           2
E      push 14                                    [0, 1, 14]       2
^      bitwise xor                                [0, 15]          2
       (CJam implicitly prints stack afterwards)  []               2015

Bonus answers
14 bytes:
36.e8 .79e2%15

19 bytes:
0_*1_)@@{_%\_)*\};5

Ostrich, 198
I'm excited to get an Ostrich answer out; I don't care how long it is. :P (this is version 0.5.0, by the way)
{: rotate ( circ n -- )
    neg swap change-circular-start

IN: 1 9 [a,b] <circular> dup 6 rotate >array .
{ 4 5 6 7 8 9 1 2 3 }
IN: 1 9 [a,b] <circular> dup 3 rotate >array .
 7 8 9   3 4  6 };2 n15

Original:
: rotate ( circ n -- )
    neg swap change-circular-start ;

IN: 1 9 [a,b] <circular> dup 6 rotate >array .
{ 4 5 6 7 8 9 1 2 3 }
IN: 1 9 [a,b] <circular> dup 3 rotate >array .
{ 7 8 9 1 2 3 4 5 6 }

All I changed was the following:

Wrapped everything other than 2 n15 in a block ({}) that is immediately popped (;).
Stuck 2 n15 at the end. 2 pushes a 2, n pushes a 0, and 15 pushes 15, which ultimately becomes 2015 when output.

This actually helped me find a bug: 2n15 doesn't work for some reason (it prints 215), but both 2 n15 and 2n 15 work. I'll have to figure out why that is....
Here's the search query I used to find this perfect code sample:

created:..2014-12-16 is:answer code:"2" code:"0" code:"1" code:"5" code:"]" code:";"

This answer would work for 140, but I'm going to see if I can go smaller....

JavaScript, 26 bytes
Original:
alert(998|(103>8>0&41>-0))

Recycled:
alert(4030>>(998>1|8&1-0))

It just shifts 4030 one bit to the right.

CJam, 14 bytes
This one is a bit tricky, so I had to post it even though its a bit long. Original answer is also in CJam, so its valid.
Original answer:
92e8.17 5e6.3%

Recycled 2015:
9.68e3 .7e2%15

How it works
9.68e3 is 9680
.7e2 is 70
9680 70% is 9680%70 = 20
15 is 15

So the stack contains 20 and 15 which are printed one after another, printing 2015
Try it online here

Marbelous, 54 bytes
Boring answer (54 bytes)
32303135
:R
:Q
++003333333567QQRR}0

(followed by a ton of trailing newlines to equal 54 bytes)
Original Answer
The main board simply drops marbles representing each of character of 2015. R and Q boards are defined, but never used.
Alternative answer (92 bytes)
3W!!?0]]>W/\&0&1@1@0@0
      ]]>W/\&0&1@1@0@0
                @1  @0
03  02
\\  //
32+A
  Dp

Original Answer
Spaces as blank cells should be checked. This first prints 2 (0x32), then prints 0x03+0x02+0x0A=0x0F=15 as a three digit decimal (015). The first three lines do nothing.
Test answers here.

Pyth, 25
https://github.com/isaacg1/pyth
J6ifqT++2010/JJ4U*2^TJ^TT

Here is the original answer (also written in pyth). I know that this is not a very competitive answer (there is python answer of length 26), but I really enjoyed coming up with this, and I think it comes out into a rather humourous answer.
Explanation:
J6                           : J=6
  i                   ^TT    : convert_to_base(..., 10 BILLION)
   fqT          U*2^TJ       : filter(lambda T: T==..., range(2*10^6)
      ++2010/JJ4             : 2010 + J/J + 4

Basically this is filtering a list of the first two million numbers for being equal to 2015. Then, it treats this list of numbers as the digits of a base 10 BILLION number. Thankfully, there is only one number equal to 2015 in the range, so you get 2015*10000000000^0, which is just 2015. This takes a couple seconds to run.

Perl, 48 bytes
\d>\fDg;print ord($:)*($_=$=+/~?/)+$_|//<<(\n>n)

Original Answer

Python 2, 26 bytes

iiiceex=";;+=*";print 2015

Taken from the Smallest python script to print even numbers 0 to 100 thread. This is probably the solution @FryAmTheEggman was alluding to.

><>, 57 bytes
Original C++ code, from the RadioASCII challenge:
#include <cstdio>
int main(){int x;printf("Lawrencium");}

Recycled ><> (Fish) code:
eclne)nfn;
   ""#(();<>Laaccddiiiiiiimmnnnoprrsttttuuwx{}

Like Befunge, ><> is a stack-based 2D language. Execution starts from the top left and is initially rightward. Only the first line of the program is executed, in the following manner:
e      Push 14                          [14]
c      Push 12                          [14, 12]
l      Push the length of the stack     [14, 12, 2]
n      Output as num                    [14, 12]          2
e      Push 14                          [14, 12, 14]      2
)      Push 1 if greater than else 0    [14, 0]           2
n      Output as num                    [14]              20
f      Push 15                          [14, 15]          20
n      Output as num                    [14]              2015
;      Terminate                        [14]              2015

Now the big question is — why is the C++ code valid ><>? In ><> there are ways to change the direction of program flow (it's a 2D language, after all):
^>v<     Arrows which direct program flow a certain direction
_/|\     Mirrors which reflect the direction of program flow
#        Four-way mirror, reflect from all directions

When the C++ code is executed, the initial # reflects program flow leftward. But ><> is toroidal, so the instruction pointer wraps around, appearing from the end of the line, meeting the > which directs program flow rightward again. The pointer then wraps back to the #, bounces back to the >... and thus an infinite loop occurs and an error is never thrown.

Mathematica, 60 bytes
⌊DF@IM~RS~ad~ee~ee~ggggiiimmnnoorrrstt~.22346⌋Print@2015

Source
The part in the Floor brackets is just a series of function applications of non-existing functions (which Mathematica doesn't have a problem with, because of its symbolic computation model). Likewise, just writing the flooring and Print@2015 is multiplication, which Mathematica also doesn't complain about. Without the syntactic sugar, it would be
Floor[ggggiiimmnnoorrrstt[ee[RS[DF[IM], ad], ee], 0.22346]] * Print[2015]

Since we're not assuming a REPL environment, the evaluated result of this is never printed (which would be Null Floor[ggggiiimmnnoorrrstt[ee[RS[DF[IM], ad], ee], 0.22346]]), but only the side effect of the Print actually goes to STDOUT.
Thanks to Sp3000 for turning up the source to this.

Python 3, 1878 bytes
Very long, but wanted to share anyway:
import sys,re,zlib as z,base64
print(2015)#,PIL.Image as ire.search(str(z.adler3(i.open(sys.argv[1]).tobytes()[2::6])%203)+'(\\D+',z.decompress(base64.b8decode(b'c${Tc%XZ>86NyfdNqBH<%b?iLI_EpFkwO-GfQC$tcfjoB$+h*^;0s?o$g*?uzgjxs%~BKif!C3zALZEU!&?wJd#-mqgS@p
U&(_4w^urvvWJU8Bj;bvv4ia;eiJLu+bsXLru`DjH|W<`|;xLq++kv5k8VWZgQe*`_u+opEF8>A6qjM%k#skzbiuJ7dL_*><K@9l6!M*H(|w)PZJ2`RYy7K2VVrv+zc)&2Fc?wvh|^#ksyymE?D!Q$3!LbFX%h%vT%1#lr486Iybw?0!`H)ZlZ#XIao2uXTr}(IBl@wRWHa#})bgV);O3HoW7+T*!5M3=^mu6Ri$`7L;uUWj~gsqR6gQR9h7^nKdBIgy>ats36%|M|8p1x;32(ZfK9R5_xK5ts=Sz70c%SIK&g3N1E|sg{n3>JSbKwwhssGcb$8uMNw=Nv;f_;rj?}kz(3-&#FQw@O;q(8nGHjbrTC(NQv=ckXT|eHr|amahCq(7T6<LBTr5Gj>fHV~3DcYINN!Qr`6Dl?jT>!4u5~bb%Zi6VTax;%vg*m325J_$nEC%yqbbYeEp!K_K7k)W-XCP`6+}N7tktMVX+{@c2L&kLAc&IvspGrzZ$F`uOBg}fA3W2neAU}tg~<+iCN=<sR^Zke+9WNhnCyy6!8nfa>33&OWiPt2s=OMTrUgilSYQxrG!gziB!Aj83zX&6S|yjIQkA?iF0n%?<+B=%_D11aoCv?@Q&eei{sqNkr7RG`#*xyzSUE6BUNnZK)3|3Wls}K$qaKv;jOO#!{3Ms)4CQ?shafnAF^zVq(`K9o2xL5JoQoGea+W1$+xmw&8OMOtN1Pid6UAcd+*_bB6IY$KjrO=ac^tPv3(8O`&(agOBbT{Va6s}Rm9&`I#yivC;MhW8=n+^^&Reho;~!~W<xgH6bVq3^=H7)sUXV2nv~DP4`CY`f55i&qH)DvPMQy>)y*Z=|68w@v=#oo5^RSh5R2F%1-vt>h=|+1n0pE^Yq-72!)1+o{hD_3<Cyxpyr6r%cei-AFQ*h1seM$MP>ovLS2k#Ci$to#do$s3MXu2lZsw~9HkbjVWM@1!{w>}LWVj#j2qC(+*Okc>=<qcV}*}+U_QK+(ZZ(x>ZMdDDWtgHiBK+7p6aHHI`u-h6z7|Xm`>D1t4uEp271y7oCI^{1^H~O7QRxTA_U&92Q8z$J2O|5Lbeg_0umd^pSU<%-ki7LtDvo&AgIt0h~6(y@Hr+kyLJ$<B#07KdGob0EW$7@f{GszaUv#tkpSyk759Khmvq-aiyM-_&x_VCTx$Vy<;$<k{T$-@{Mhc<<%KD1AHK^MKkg%pYIW}SxhV?&a{o9=rs@*+hqyoioE=TF>9S<KxY+^69^OA0jkS#0!w@kw4}KTcP9#+PVW+qB|7B`Y?eRs+7}8RSAs?i?-Cz#Wp(Iihd`nI!Q_i%R^o_;fvDQ5|{Cr;yWeirL>_l#(wn)$QenJkK6Sgw)5NleBzvo&G#@>X`7Ib*aS4LHx9epI%BXXV&y7LJ&54g}D25-Q8>DZQ5hGKyIeJkQQu08%j|<x~)q(AOVw9P~Z*c0Z@VM6n#<}tBT6+T%4mZ9f*y76xlEFM~o$xr9*SZHd^6D-C!pkkp3m(-~W3&>KY@106L+;I><MJ^Dz`f{(I3i?u`2pWjUjlwZx`B1JB#h#u3xTH*b1K?TG40|4lxF1$_Pw+t?h2')).decode()).group(1))

Taken from KennyTM's answer.
I saw that 2, 0, 1 and 5 and # could be found in the code, so I moved some chars to make print(2015) and could comment out the rest. I also put the PIL import into the comment so it doesn't require that library.

PHP, 21 bytes
<?=65*4*31*2/8;//7**9

Let's try this again. Taken from another PHP answer from Unscramble the Source Code. It's pretty basic, but so far it's the shortest program in a non-golfing language. You can verify it at http://codepad.org/15EjIYAU. The original code is as follows:
<?=9*8*7*6*5*4/3/2/1;

You don't even need the 4*2/8 ;)

I know, but I wanted to make it more interesting, and it would have been commented out anyways.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Morse the New Year
This is Weekly Challenge #1. Theme: Audio Processing
Your task is to write a program, which writes an audio file to disc (in a format of your choice), which contains the Morse code for 2015, i.e.
..--- ----- .---- .....

You are free to choose any sort of sound for the segments, like a single-frequency sine wave, a chord, noise, some instrument (e.g. using MIDI files), as long as it's audible. However, there are some constraints on the timing:

Short segments need to be at least 0.2 seconds in length.
Long segments need to be at least 3 times as long as short segments.
Breaks between segments within a digit should be the same length as short segments.
Breaks between digits should be the same length as long segments.
Each segment and break may deviate up to 10% from the average length of that type of segment/break.
The entire audio file may not be longer than 30 seconds.

The breaks don't need to be completely silent, but the Morse segments should be audibly louder than the breaks.
Note that you have to write an audio file. You cannot just play the sound, e.g. using system beeps. You're allowed to use any sort of library to handle the file format and audio generation, but you must not use built-in features for Morse encoding.
This is code golf, so the shortest answer (in bytes) wins.
Please consider linking to an upload of the resulting audio file (on SoundCloud or similar), so people can check out the result without having to run your code. If you upload to SoundCloud, please make sure to enable downloads in the Permissions tab of the track.
If your output uses a rather uncommon file format, please add some information about how to play it back and/or convert it to a more common format and upload it.
Example track

This is a manually generated example track which conforms with the spec and uses noise for the Morse segments (microphone background noise, to be precise). Here is a link to SoundCloud if the embedded player doesn't work for you.
Bounty Details
I will award the bounty to the shortest submission in an audio programming language, i.e. a language that is designed to synthesise sound. That list is not complete, so feel free to use another audio programming language, if you know one. If you're not sure whether some language you want to use classifies as an audio programming language, please let me know in the comments or in chat, and we can discuss that.
Note that your submission still has to comply with all the rules - in particular, it has to write a file, which might not be possible in all audio programming languages. E.g., as far as I can tell, gibber can only play the sound and not save it to a file.

Additional Challenge: Make it sound really nice.

@Mew How nice can Morse possibly sound?

Doing this in Brainf**k would make this awesome on so many bonus levels.

@Mast Probably, but unfortunately, BF can't write to a file. ;) (I'll make sure to be more lenient with that next time.)

Are music notation formats, that only contain the score and no audio (.mid, .abc seen below) considered acceptable as an "audio file"? What about "tracker" formats, that contain both samples and a score, but no rendered audio track (.mod, .xm)?

@Tobia I would say as long as there is some audio player (that existed before this challenge was posted), which can actually play back the file, then it's an audio file.

The only answers that could work for the bounty so far are the Csound, ChucK, and SuperCollider ones, right?

@KSFT Yes, that's correct.

@MartinBüttner hmm, you picked on my solution which did not write to a file and then accepted one that does not either (also does not meet the 30s requirement though ABC format allows to specify the tempo which would cost extra characters). Of course the point is moot as even after fixing I would lose by a few characters.

@nutki Thanks for pointing that out. I'll notify the OP and unaccept for now.

AWK BASH: 66 86 67 74 bytes
As requested by Martin Büttner, I added a tempo since after checking the ABC Notation standard, it seems there is no defined default value for this (thanks nutki for pointing this).
I also write into a disk file (a) instead of STDOUT since the question wanted explicitly "a file on disc".
a=C3z;echo "X:1
K:A
Q:99
CzCz$a$a$a3$a$a$a$a${a}3Cz$a$a$a${a}3CzCzCzCzC">a

I put a tempo of 99 which causes the audio file to last 22 seconds; It's slower than my previous version, but at least now it is supposed to be the same length on every ABC player, and it fit under 30 seconds.
It looks ... very much like the previous version as you can see:

Here is the new midi file.
First BASH version (tempo is missing)
Why didn't I think to this first... :o)
That's 22 less bytes than with AWK, for the same result
a=C3z;echo "X:1
K:A
CzCz$a$a$a3$a$a$a$a${a}3Cz$a$a$a${a}3CzCzCzCzC"

Like the previous version in AWK, it write on stdout a valid "ABC" notation file (thanks Tobia for finding out that the "L" statement was optional)
It looks like this:

And it sounds exactly like the previous version.
Previous version in AWK (86 Bytes)
Here is a new version; a little longer, but with a more accurate timing. I let the first version bellow for comparison/reference:
BEGIN{a="C3z";print"X:1\nK:A\nL:1/8\nCzCz"a a a"3"a a a a a"3Cz"a a a a"3CzCzCzCzCz";}

This is still a valid "abc" file, which looks like this:

Here is the new midi file (I accelerated the tempo to stay under the 30 seconds limit).
First version in AWK (66 Bytes):
This is a lot less interesting than my previous answer, but it is a lot shorter, so:
BEGIN{print"X:1\nK:A\nL:1/4\nCCC2C2C2zC2C2C2C2C2zCC2C2C2C2zCCCCC"}

This outputs a valid "abc" file, which can be read into (among others) EasyABC.
It will look like this:

and it will sound like this (midi file).
+

You should post it as ABC without the AWK wrapping and claim the bounty!

Tobia, ABC is a file format, not a programming language. And so far with 86 bytes this is the shortest answer... The question is now "is the resulting sound close enough from requirements for the answer to be valid?"

I would have called it a file format too, but the wiki page the OP linked lists it as a Sound programming language. I've sumbitted my own ABC file as an entry, alongside a more proper Csound program. Let's see what they think of it.

That's the problem with wikis... sometime people editing them make mistakes :o) . Lot's of different things can be called "programming languages" but I think ABC is not one of them. Anyways, thanks for finding out the "L" was optional. It saved me a couple of bytes ;o)

"Long segments need to be at least 3 times as long as short segments." The last music line shown doesn't meet the requirements.

Mbomb007, you're looking at the first version which had a not good enough timing. That's why i made a new one with the correct timing. It's only there as a reference. Just use the new version.

nutki just pointed out that this doesn't write to a file (but to STDOUT instead). He also mentioned that, without a specified tempo, the abc file doesn't actually comply with 30 second rule. I'll re-accept your answer if you can fix these issues (and it's still the shortest).

Stdout is a file. Really. If you meant "a file on disk" I can fix this, but stdout is a file on most operating systems. For the tempo I'm pretty sure the default value is ok with the 30 seconds limit, but I'll double check.

See here for first point: http://en.wikipedia.org/w/index.php?title=Everything_is_a_file . writing on disk would take 2 extra bytes if you really want to.

If you want to address a comment at someone you can tag them with an @, like @LeFauve. Otherwise the person doesn't get notified about your comment (unless it's their question/answer you're commenting on). The STDOUT issue is indeed debatable, and my next audio challenge will definitely be more liberal in that regard, but all the other answers interpreted as "write to disk" (which was my intention), so I think those two bytes are only fair (and you're still leading by a decent margin after all). Thanks for the modifications.

@MartinBüttner, I made the changes you requested, and with 74 bytes it seems I still have the shortest answer :o) . I re-read your question, and it seems I missed the "to disc" after "audio file"; That means STDOUT was not a valid choice (it is a file, but it is not on disc). Sorry about this. For the tempo, I mistaken it with "unit note length" which can be safely omitted; I now added a fixed tempo value.

x86 machine code (.COM file): 121 120 113 109 bytes
Hexdump:
00000000  b4 3e bb 01 00 cd 21 b4  3c 31 c9 ba 3e 01 cd 21  |.>....!.<1..>..!|
00000010  4a b4 09 cd 21 be 56 01  8a 0c 46 e8 0c 00 b1 32  |J...!.V...F....2|
00000020  e8 07 00 81 fe 6d 01 75  ef c3 88 cb c0 e3 07 c1  |.....m.u........|
00000030  e1 04 30 d2 b4 02 00 da  cd 21 e2 fa c3 2e 73 6e  |..0......!....sn|
00000040  64 00 00 00 18 ff ff ff  ff 00 00 00 02 00 00 10  |d...............|
00000050  00 00 00 00 01 24 33 33  99 99 99 66 99 99 99 99  |.....$33...f....|
00000060  99 66 33 99 99 99 99 66  33 33 33 33 33           |.f3....f33333|
0000006d

Can be easily run under DosBox; the output is a .SND file named SND. Here is a FLAC version of its output (and here the .COM file).
Commented assembly:
    org 100h

start:
    ; close stdout
    mov ah,3eh
    mov bx,1
    int 21h
    ; open snd
    mov ah,3ch
    xor cx,cx
    mov dx,filename
    int 21h
    ; write the header
    ; we used the `snd` part of the header as file name, back off one byte
    dec dx
    mov ah,9h
    int 21h
    mov si,data
.l:
    ; data read cycle
    ; read the current byte in cl (zero-extending to 16-bit)
    ; notice that ch is already zero (at the first iteration it's 0 from the
    ; int 21h/3ch, then we are coming from gen, which leaves cx to zero)
    mov cl,[si]
    ; move to next byte
    inc si
    ; generate the tone
    call gen
    ; generate the pause
    mov cl,50
    call gen
    ; repeat until we reach the end of data
    cmp si,eof
    jne .l
    ; quit
    ret

gen:
    ; generate a sawtooth wave at sampling frequency/2 Hz
    ; receives length (in samples>>4) in cx, with lowest bit indicating if
    ; it has to write a wave or a pause
    mov bl,cl
    ; shift the rightmost bit all the way to the left; this kills the
    ; unrelated data and puts a 128 in bl (if cx & 1 != 0)
    shl bl,7
    ; rescale the samples number
    shl cx,4
    ; zero the starting signal
    xor dl,dl
    ; prepare the stuff for int 21h
    mov ah,2h
.l:
    ; increment the signal
    add dl,bl
    ; write it
    int 21h
    ; decrement iteration count and loop
    loop .l
    ret

    ; .SND file header (4096 samples, mono, PCM)
header:
    db "."
    ; we also use "snd" as the file name
filename:
    db "snd",0,0,0,24,0xff,0xff,0xff,0xff,0,0,0,2,0,0,0x10,0,0,0,0,1
    ; terminator for int 21h/ah=9h
    db '$'
data:
    ; generated by gendata.py
    incbin "data.dat"
eof:

The data.dat included above is an easy-to-use representation of the morse string (lower bit: sound on/sound off, upper 7 bits: sound length in samples >> 4) generated by a Python script:
#!/usr/bin/env python2
import sys

# source string
s = "..--- ----- .---- ....."
# samples
sr = 4096
conv =  {
            '.': 1 | (((sr/5) >> 4) & ~1),    # dot:   1/5 second, dI/dt=1
            '-': 1 | (((sr/5*3) >> 4) & ~1),  # line:  3/5 second, dI/dt=1
            ' ':     ((sr/5*2) >> 4) & ~1     # space: 2/5 second (+1/5 from the always-present pause), dI/dt=0 (silent)
        }
sys.stdout.write(''.join(chr(conv[a]) for a in s))

You don't necessarily need a file extension, if that can save you four bytes.

@MartinBüttner: actually, it allows me to save 3 bytes. The a of a.snd is put just before the SND header, which starts with .snd followed by a zero byte, so I get the .snd part for free and I recycle its zero-terminator. Also, the fact that the header starts one byte after the file name allows me to use a inc dx to move to the header (1 byte) instead of a mov dx, header (3 bytes). OTOH, if I were allowed to call it just .snd alone I could save two bytes, but I'm not sure that real DOS would allow that (the treatment of the extension under DOS was quite peculiar).

I did some tests with calling the file .SND: I got .SND on DosBox, SND~1 on FreeDOS, and I expect something else on "real" DOS; thus, it's definitely "undefined behavior" area. In the end, I settled with calling the file SND (1 byte less due to the removed a, keeping the cost of the inc dx - which becomes dec dx).

Mathematica - 130
r = Riffle;
s = SoundNote;
Export["m.mid",
 Sound@
   r[Flatten@
     r[
       s[0,.4(Boole@#+.5)]&/@Array[#>4&,5,5-#]&/@{2,0,1,5},
       (b=None~s~#&)@.6
     ],b@.2
   ]
]

Play online

Oh you can also use infix notation for Export, like "m.mid"~Export~Sound@....

(b=None~s~#&)@.6 should be (b=None~s~#&)@.4  Also, you can save 3 chars using r = Riffle; s = SoundNote; Export["m.mid", Sound@r[r[Table[s[0, If[{1, 2, 11}~MemberQ~k || k > 15, .2, .6]], {k, 20}], None~s~.2], None~s~.4, 11]]

Martin, But there was already a .2 in each break.  .4 + .2

@DavidCarraher Ah, you're right.

Python, 155
Uses the python built-in wave module.
import wave
n=wave.open(*"nw")
k=17837
n.setparams((2,2,k,0,"NONE",0))
h=k*1314709609
while h:[n.writeframes(`i%9`)for i in[0]*(2-h%2)*k+range(h%4*k)];h/=4

Writes to a file called n.
Thanks Sp3000 for suggestion on using list comprehension for loop (this helped remove a bit of indentation).
Listen to it:
https://soundcloud.com/bitpwner/morse-the-new-year-2015
Here is a link to SoundCloud if the embedded player doesn't work for you.
Commented code:
import wave
n=wave.open("n.wav","w")         # Open a wav file for writing
k=44100
n.setparams((2,2,k,0,"NONE","")) # Sets the minimal params for the wav file
w=n.writeframes
h=23450475295733                 # Contains base-4 morse: '.'=1, '-'=3, ' '=0
while h:
    for i in range(h%2*k):w(h%4*chr(i%99)) # Writes saw-tooth signal using i%99
    w((2-h%2)*k*" ")                       # Writes the pauses
    h/=4

Since w is a side-effect I think you can list comp to save two bytes: while h:[w(h%4*chr(i%99))for i in range(h%2*k)];w((2-h%2)*k*" ");h/=4

@Sp3000 oo... didn't think of that =D. thx!

This might be a stupid question, but if h is divided by 4 for each iteration, how does the while loop stop?

@Derek朕會功夫 For python, when h becomes 0, it evaluates to False, terminating the loop. The while loop is a golfing trick to extract the values in the sequence "11333033333013333011111" one by one.

@bitpwner I get it that 0 evaluates to false, but isn't it that for all positive numbers, if you divide it by another positive number, there's no way you can get a 0 out of it?

@Derek朕會功夫 It is an integer division, which rounds down. (e.g. 9/4 gives 2. Then 2/4 gives 0.)

@bitpwner Oh you are right! Totally forgot about that.

Perl 5: 94 122 140
SND files have simpler headers, no need to print in binary. This versions produce 8khz mono SND file named 'a':
open A,'>a';print
A".snd",pack"N*",24,-1,2,8e3,1,map{(--$|x3)x(894261072>>$_&1?1600:400)}0..39

The result file.
Old solution. Produces a 1khz 8-bit mono WAV file named 'a':
open
A,'>a';print
A pack"A4lA8lssllssA4ls*",RIFF,17040,WAVEfmt,16,1,1,(1e3)x2,1,8,data,17004,map{($_)x(894261072>>$v++&1?400:100)}(255,0)x20

The result file.
To get to 122 characters I had to paste the header in binary instead of packing it which makes the code hard to copy here. The escaped version is:
open
A,'>a';print
A"RIFF\x90B\0\0WAVEfmt \0\0\0\0\0\xe8\0\0\xe8\0\0\0\0datalB\0\0",pack"s*",map{($_)x(894261072>>$v++&1?400:100)}(255,0)x20

Base64 encoding of the actual 122 bytes solution:
b3BlbgpBLCc+YSc7cHJpbnQKQSJSSUZGkEIAAFdBVkVmbXQgEAAAAAEAAQDoAwAA6AMAAAEACABk
YXRhbEIAACIscGFjayJzKiIsbWFweygkXyl4KDg5NDI2MTA3Mj4+JHYrKyYxPzQwMDoxMDApfSgy
NTUsMCl4MjA=

U could use .au extension, maybe. Well done!

AWK: 172 170 bytes
...and without using any wave library! (*)
BEGIN{for(;++i<204;){d=d"\177\177\n";D=D"\n\n"}t=d d d D;d=d D;T=D D D;u=t t t;print".snd\0\0\0\30\0\0\221\306\0\0\0\2\0\0\20\0\0\0\0\1"d d u T u t t T d u t T d d d d d}

This outputs a Sun au audio file on stdout which can be played by vlc (among others). While the au fileformat don't have any sample rate limitation, VLC refuses to play any file with a sampling rate inferior to 4096 Hz, so I used this frequency
EDIT: Link to resulting audio file on DropBox

(*) Shouldn't there be a bonus for this? ;o)

You don't need the space in the d=d "\177... concatenation.  That saves a byte.  But when I play the resulting audio file, it sounds like it's missing the last dit of the 5.

Thanks. I saved a second byte with another concatenation using the same trick. I just checked the audio file with vlc 2.1.1 and it sounds complete. What player did you use?

I was using QuickTime Player on OS X. I opened it in VLC and it sounds fine, so never mind. Apple's fault, not yours.

C#, 556 552 536 535 516 506 503 491 483 bytes
Uses the library Wav.Net.
using System;using System.Linq;namespace WavDotNet.Core{using S=Samples<float>;class P{static void Main(){var w=new WavFileWrite<float>("a",9999);var b=new Tools.Generators.Sawtooth(9999);Func<long,float,S>g=(t,a)=>b.Generate32Bit(new TimeSpan(t),99,a);var l=2500000;S x=g(l,1),y=g(l*3,1),z=g(l*3,0),_=g(l,0),v=new S(new[]{x,_,x,_,y,_,y,_,y,z,y,_,y,_,y,_,y,_,y,z,x,_,y,_,y,_,y,_,y,z,x,_,x,_,x,_,x,_,x}.SelectMany(c=>c).ToList());w.AudioData.Add(new Channel<float>(v,0));w.Flush();}}}

Outputs to a file named a.
Result hosted on Dropbox
Ungolfed code:
using System;
using System.Linq;
namespace WavDotNet.Core
{
    using FloatSamples = Samples<float>;
    class P
    {
        static void Main()
        {
            var file = new WavFileWrite<float>("output.wav", 9999);
            var sawtoothGen = new Tools.Generators.Sawtooth(9999);
            Func<long, float, FloatSamples> generate = (t, amplitude) => sawtoothGen.Generate32Bit(new TimeSpan(t), 99, amplitude);
            var length = 2500000;
            FloatSamples shortBeep = generate(length, 1),
            longBeep = generate(length * 3, 1),
            shortPause = generate(length * 3, 0),
            longPause = generate(length, 0),
            allSamples = new FloatSamples(new[] { shortBeep, longPause, shortBeep, longPause, longBeep, longPause, longBeep, longPause, longBeep, shortPause,
                longBeep, longPause, longBeep, longPause, longBeep, longPause, longBeep, longPause, longBeep, shortPause,
                shortBeep, longPause, longBeep, longPause, longBeep, longPause, longBeep, longPause, longBeep, shortPause,
                shortBeep, longPause, shortBeep, longPause, shortBeep, longPause, shortBeep, longPause, shortBeep }
                .SelectMany(c => c).ToList());
            file.AudioData.Add(new Channel<float>(allSamples, 0)); // 0 == ChannelPositions.Mono
            file.Flush();
        }
    }
}

Python 3 2, 191 188 174 171 (no libraries)
Wav files are incredibly simple. Wanted to try without libraries. For some reason my files seem to crash Windows Media Player. Quicktime works bugs out halfway into the file. Conversion to a larger sample rate using Audition fixes this.
Update: Implemented some optimizations from the Perl answer. Now outputs with just the name n and in 1000Hz sampling. Edited info above accordingly.
w,s=200*" ",50*"~~  "
a,b,c=s+w,3*s+w,2*w
open(*"nw").write("RIFF\xD46\0\0WAVEfmt \20\0\0\0\1\0\1\0\xE8\3\0\0\xE8\3\0\0\1\0\10\0data\xB06\0\0"+a*2+b*3+c+b*5+c+a+b*4+c+a*5)

Old version
w,s=1600*" ",200*"~~~~    "
a,b,c=s+w,3*s+w,2*w
open("n.wav","wb").write("RIFF\244\265\1\0WAVEfmt \20\0\0\0\1\0\1\0@\x1f\0\0@\x1f\0\0\1\0\10\0data\200\265\1\0"+a*2+b*3+c+b*5+c+a+b*4+c+a*5)

C# 382 333bytes
Doesn't use any non-standard libraries, writes out an 8bits-per-sample 44100samples-per-second wav, with what I hope is a valid header (seems to play/load happily in WMP/.NET/Audacity).
The header is base64 encoded, and the morse is encoded as signal on/off which is stored in a single long (64bits) because the last 5 bits are the same as the first.
The result can be found here
Golfed code:
using System.IO;class P{static void Main(){using(var w=new FileStream("w.wav",FileMode.Create)){int i=0,d=9980;w.Write(System.Convert.FromBase64String("UklGRhCCCgBXQVZFZm10IBAAAAABAAEARKwAAESsAAABAAgAZGF0YeyBCgA="),0,44);for(var k=5899114207271221109L;i++<d*69;w.WriteByte((byte)(System.Math.Sin((k>>(i/d)%64&1)*i*0.1)*127+127)));}}}

With comments:
using System.IO;

class P
{
    static void Main()
    {
        using(var w=new FileStream("w.wav",FileMode.Create))
        {
            int i=0,d=9980; // d is samples per tone

            // write wav header
            w.Write(System.Convert.FromBase64String("UklGRhCCCgBXQVZFZm10IBAAAAABAAEARKwAAESsAAABAAgAZGF0YeyBCgA="),0,44);

            for(var k=5899114207271221109L; // 0101000111011101110111010001110111011101110111000111011101110101 as long
                i++<d*69; // 69 is number of bits
                w.WriteByte((byte)(
                    System.Math.Sin(
                        (k>>(i/d)%64&1) // read bit (0 or 1)
                        *i*0.1) // mul by ticker (sin(0) = 0)
                    *127+127)) // make sensible
            );
        }
    }
}

The challenge doesn't require the name of the file to end with .wav, so you can save 4 bytes there.

Nice way of fitting the 69 bits PWM code into a 64bit constant. I was trying something like that but probably I could not shorten my code using your method.

C# ~ 485 bytes
Using the Wav.Net library.
using WavDotNet.Core;namespace System.Collections.Generic{using f=Single;class T{static void Main(){var i=new WavFileWrite<f>("x",8000);Func<long,Samples<f>>g=d=>new WavDotNet.Tools.Generators.Sawtooth(8000).Generate32Bit(new TimeSpan(d),600,1);var s=new List<f>();var k="..--- ----- .---- .....";foreach(var c in k){s.AddRange(c=='.'?g(2000000):g(6000000));s.AddRange(new f[1600]);if(c==' '){s.AddRange(new f[3200]);}}i.AudioData.Add(new Channel<f>(new Samples<f>(s),0));i.Flush();}}}

And here's the output.
Readable version,
using WavDotNet.Core;

namespace System.Collections.Generic
{
    using f = Single;

    class T
    {
        static void Main()
        {
            var i = new WavFileWrite<f>("x", 8000);
            Func<long, Samples<f>> g = d => new WavDotNet.Tools.Generators.Sawtooth(8000).Generate32Bit(new TimeSpan(d), 600, 1);
            var s = new List<f>();
            var k = "..--- ----- .---- .....";

            foreach (var c in k)
            {
                s.AddRange(c == '.' ? g(2000000) : g(6000000));
                s.AddRange(new f[1600]);

                if (c == ' ')
                {
                    s.AddRange(new f[3200]);
                }
            }

            i.AudioData.Add(new Channel<f>(new Samples<f>(s), 0));
            i.Flush();
        }
    }
}

You can save some bytes by wrapping your class inside the namespace System.Collections.Generic (that actually works). There's also some unnecessary whitespace you can remove.

SuperCollider, 625 605 bytes
Audio programming language submission!
Output is written to a file b in AIFF format. Windows Media Player fails to open it, but it works fine in VLC media player. The generated file a is an OSC file.
c=0;d=0;f={c=c+d;d=0.2;[c,[\s_new,\w,1001,0,0,\freq,800]]};g={c=c+d;d=0.2;[c,[\n_free,1001]]};h={c=c+d;d=0.6;[c,[\s_new,\w,1001,0,0,\freq,800]]};i={c=c+d;d=0.6;[c,[\n_free,1001]]};x=[f.value,g.value,f.value,g.value,h.value,g.value,h.value,g.value,h.value,i.value,h.value,g.value,h.value,g.value,h.value,g.value,h.value,g.value,h.value,i.value,f.value,g.value,h.value,g.value,h.value,g.value,h.value,g.value,h.value,i.value,f.value,g.value,f.value,g.value,f.value,g.value,f.value,g.value,f.value,i.value];Score.recordNRT(x,"morse.osc","Morse2015.aiff");SynthDef("w",{arg freq=440;Out.ar(0,SinOsc.ar(freq,0,0.2))}).writeDefFile;

I created a few SuperCollider functions: f generates a short beep, g a short break, h a long beep and i a long break. SuperCollider needs the starting positions for each sine wave and not a length, so I had to create functions that generate a wave with the correct starting position and I have to call the functions each time I need a sine wave. (I could not store a wave with a specific length in a variable to reuse). The \w definition is created at the end of the code block.
On my Windows computer, it did not save the audio file in the same directory as my code, but in this directory:
C:\Users\MyName\AppData\Local\VirtualStore\Program Files (x86)\SuperCollider-3.6.6

Result hosted on Dropbox
Code with indentation:
c = 0;
d = 0;
f = { c=c+d;d=0.2;[ c, [ \s_new, \w, 1001, 0, 0,  \freq, 800 ] ] };
g = { c=c+d;d=0.2; [ c, [\n_free, 1001]] };
h = { c=c+d;d=0.6; [ c, [ \s_new, \w, 1001, 0, 0, \freq, 800]]};
i = { c=c+d;d=0.6;[ c, [\n_free, 1001]] };

x = [ f.value, g.value, f.value, g.value, h.value, g.value, h.value, g.value, h.value, i.value,
      h.value, g.value, h.value, g.value, h.value, g.value, h.value, g.value, h.value, i.value,
      f.value, g.value, h.value, g.value, h.value, g.value, h.value, g.value, h.value, i.value,
    f.value, g.value, f.value, g.value, f.value, g.value, f.value, g.value, f.value, i.value
];

Score.recordNRT(x, "morse.osc", "Morse2015.aiff");

SynthDef("w",{ arg freq = 440;
    Out.ar(0,
         SinOsc.ar(freq, 0, 0.2)
    )
}).writeDefFile;

ChucK - 1195 217 201 147 145 144
ChucK is an audio programming language. bitpwner helped me get this down from 201 bytes to 147 bytes.
SinOsc s;WvOut w=>blackhole;"y"=>w.wavFilename;int j;for(1016835=>int i;i>0;2/=>i){s=>w;j++;(i%2?200:600)::ms=>now;s=<w;(j%5?200:600)::ms=>now;}

Here is a direct link to SoundCloud if the embedded player doesn't work for you.

Managed to cut it down to 164 with a similar trick used in my answer: WvOut w=>blackhole;"x"=>w.wavFilename;SinOsc s=>w;0=>int j;for(1016835=>int i;i>0;2/=>i){j++;300=>s.freq;(600-i%2*400)::ms=>now;s=<w;(j%5>0?200:600)::ms=>now;s=>w;}

@bitpwner You're using j to avoid the array?

The magic number 1016835 in binary is 11111000010000000011. j is there to simply to keep track of the pauses between each digit of 2015 (each digit has 5 sounds).

@bitpwner Ah, I didn't even notice that. That's a really cool idea!

You can edit it into your answer to have a higher chance of bounty. imo, the improvement is not a lot to justify a new answer sinc you already did the bulk of the work figuring out Chuck ;)

@bitpwner I will, once I figure out how it works and make sure arithmetic works like that in ChucK. I also just removed 300=>s.freq;, which I realized is completely pointless.

Csound, 140 + 40 = 180
Audio programming language.
This is the Orchestra file:
instr 1
a1 oscil 2^15,990,1
out a1
endin

and this is the Score file:
f1 0 512 10 1
t0 300
i1 0 1
i1 2
i1 40
i1 60
i1 62
i1 64
i1 66
i1 68
i1 4 3
i1 8
i1 12
i1 18
i1 22
i1 26
i1 30
i1 34
i1 42
i1 46
i1 50
i1 54

The sizes are computed assuming no extra whitespace, single line terminator (UNIX) and no terminator after the last line.
You invoke them using the csound command:
csound morse.org morse.sco

which will produce an output file in the current directory, by default named "test.aif"
https://soundcloud.com/whatfireflies/morse-code-golf-in-csound/s-qzsaq
I could have shaved two or three bytes by choosing an uglier waveform, but I like the sound of the traditional Morse sine wave.
PS: I'm a total newbie at Csound, any golfing tips are appreciated, especially concerning the score file!

Ah, I was looking forward to CSound. If no one had posted an answer in it, I probably would have tried to write one myself. :)

brainfuck, 649 bytes
++[>-[+>++[++<]>]>[>..........-..........+<-]-[+>++[++<]>]>[....................-]<<<<<-]+++[>+++[>-[+>++[++<]>]>[>..........-..........+<-]<<<-]-[+>++[++<]>]>[....................-]<<<-]-[+>++[++<]>]>[....................-]+++++[>-[+>++[++<]>]>[....................-]+++[>-[+>++[++<]>]>[>..........-..........+<-]<<<-]<<<-]+++[>-[+>++[++<]>]>[....................-]<<<-]-[+>++[++<]>]>[>..........-..........+<-]++++[>-[+>++[++<]>]>[....................-]+++[>-[+>++[++<]>]>[>..........-..........+<-]<<<-]<<<-]++[>-[+>++[++<]>]>[....................-]<<<-]+++++[>-[+>++[++<]>]>[....................-]-[+>++[++<]>]>[>..........-..........+<-]<<<<<-]

This generates a sequence of 8 bit unsigned samples that may be played at 8000 samples per second with a tool such as aplay on Linux. Credit to table of BF constants.
Try it online!
Somewhat less golfed
DIT DIT DAH DAH DAH
++[>
 -[+>++[++<]>]>[>..........-..........+<-]
 -[+>++[++<]>]>[....................-]
<<<<<-]
+++[>
 +++[>
  -[+>++[++<]>]>[>..........-..........+<-]
 <<<-]
 -[+>++[++<]>]>[....................-]
<<<-]
-[+>++[++<]>]>[....................-]
DAH DAH DAH DAH DAH
+++++[>
 -[+>++[++<]>]>[....................-]
 +++[>
  -[+>++[++<]>]>[>..........-..........+<-]
 <<<-]
<<<-]
+++[>
 -[+>++[++<]>]>[....................-]
<<<-]
DIT DAH DAH DAH DAH
-[+>++[++<]>]>[>..........-..........+<-]
++++[>
 -[+>++[++<]>]>[....................-]
 +++[>
  -[+>++[++<]>]>[>..........-..........+<-]
 <<<-]
<<<-]
++[>
 -[+>++[++<]>]>[....................-]
<<<-]
DIT DIT DIT DIT DIT
+++++[>
 -[+>++[++<]>]>[....................-]
 -[+>++[++<]>]>[>..........-..........+<-]
<<<<<-]

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Jump the Array!
Let's play a one-player game called jump the array. To play, you only need an array of integers, say a. You start at some position i, and on each turn, you jump to a new position. On turn n,

if n is even, you jump to the absolute position a[i] mod length(a),
if n is odd, you jump to the relative position (i + a[i]) mod length(a).

The array indexing starts at zero. You can count the first jump as turn 0 or turn 1, which give a different game. Since the state space of the game is finite (your move is determined by your position and the parity of the turn number), you will of course eventually enter a loop of even length. Denote by loop(a, i, b) the length of this loop, when the first jump is counted as turn b.
Input
A nonempty array a of integers to play the game with.
Output
The maximum number p such that, when starting on some position i and counting the first turn as either 0 or 1, you eventually enter a loop of length 2 * p. In other words, your output is the number
max { loop(a, i, b)/2 : i in [0 .. length(a)-1], b in [0,1] }

Rules
You can give a function or a full program. The smallest byte count wins, and standard loopholes are disallowed.
Test cases
[0] -> 1
[-213] -> 1
[1,3,12,-1,7] -> 1
[2,3,5,7,9,11,13,17,19] -> 2
[-2,3,-5,7,-9,11,-13,17,-19,23,-27] -> 3
[0,2,5,4,-9,0,-1,1,-1,1,-6] -> 4

@kukac67 Yeah, it's the latter option, as Martin said.

I assume that mod is defined as always positive (-1 mod 5 == 4) unlike in C. Is that the case?

@nutki Yes, I use a Haskell-style mod, which always gives nonnegative results.

If zero-indexing turns gives a different result from one-indexing, should we output either result, or whichever one is less?

@MartinBüttner No, I was asking about indexing the turns, not the arrays.

@KSFT oh. You should output the maximum over both using 0-based and 1-based counting (that's the b in the definition). (I know because I asked this earlier.)

Pyth: 28 character (Python 2: 116 character)
eSmhxtu+G%@Q+eG@QeGlQUQ]ddUQ

Usage:
Try it here: Pyth Compiler/Executor
It expects a list of integers as input
[0,2,5,4,-9,0,-1,1,-1,1,-6]
Explanation:
I noticed one important property of the function loop: For each i there is a j, so that loop(a,i,0) == loop(a,j,1) and vice versa. Therefore we only need to compute the values loop(a,i,b) for b=0.
Proof: If the is a cycle i -> j -> k -> ... -> z -> i with b = 0, then there exists the cycle j -> k -> ... -> z -> i -> j with b = 1.
Therefore a simple script can work the following way. Iterate over all i and try to reach i by iteratively computing i = a[(i + a[i]) mod len(a)] mod len(a). Since this computation may ran into a cycle without i, we cancel the computation after len(a) steps. Then we print the maximum cycle.
A Python 2 implementation looks like this (125 character}:
a=input();A=len(a);m=[]
for i in range(A):
 j=i
 for c in range(A):
  j=a[(j+a[j])%A]%A
  if i==j:m+=[c+1];break
print max(m)

For the pyth implementation I used a little different approach. For each i I compute the list of positions, and look for i in this list.
eSmhxtu+G%@Q+eG@QeGlQUQ]ddUQ
  m                       UQ    for each d in [0, ..., len(input)-1] compute a
      u                ]d         list G (using reduce),
                                  which is first initialized with G = [d]
                     UQ           for each H in [0, ..., len(input)-1]:
       +G                            append to G the value
         %@Q+eG@QeGlQ                   input[G[-1] +input[G[-1]] % len(input)
                                        (notice that list lookups in pyth work with modular wrapping)
     t                            remove the first value (which is d)
    x                    d        and find the index of d in this shortend list
                                  (it's -1, if d is not in the list)
   h                              add 1
eS                              print the maximum (end of sorted list)

edit: Python 2: 116 characters
@proud haskeller's solution was i few characters shorter than my Python solution, therefore I 'had' to shorten it a bit.
a=input();A=len(a);l=lambda j,i,c:c<=A and(c*(i==j)or l(a[(j+a[j])%A]%A,i,c+1));print max(l(i,i,0)for i in range(A))

The difference is, that I calculate the number recursively instead of iteratively.

Python - 157
a=input()
z=len(a)
b=[]
for i in range(z):
    s,c,t=[],"",0
    while(c in s[:-1])-1:j=(i*t+a[i])%z;c=`t`+`i`;s+=[c];t^=1
    b+=[len(s)-s.index(c)-1]
print max(b)/2

If you put len(a) in a variable and replace all len(a)s with the name of that variable, you can save some characters.

Some ideas: t+=1;t%=2 -> t^=1 and  if t: j=(j+a[j])%z else: j=a[j]%z -> j=(t*j+a[j])%z

Use only one space to indent. Saves 9 chars here.

Another idea: while c not in s[:-1]: could be while(c in s[:-1])-1:.

@Pietu1998 Ah, that saves one more character.

And one more. You don't have to use j, as this loop assigns the contents of range(z) to i instead of incrementing it. Just replace j with i to save 4 chars.

I count 161 character.

@Jakube Ah, you're right.

I don't see why you need () around the b+=... also here is a neat tool some people here use to count bytes :)

@FryAmTheEggman I need square brackets because you can't add an int to a list.

Haskell, 120 105
f s|t<-l s=maximum[g$drop t$iterate(\i->s!!mod(i+s!!mod i t)t)i|i<-s]
g(x:s)=l$0:fst(span(/=x)o)
l=length

this generates an infinite list for each starting point (for golfing reasons we iterate over all values instead of all indexes, which are equivalent). then it calculates the cycle of each list (the cycle length of xs is xs % []).
it uses @jakubes's observations about cycles. because it steps 2 steps at a time, we don't need to divide by 2 at the end.
Edit: now using @MthViewMark's trick of dropping the first n elements to guarantee having a cycle with the first element. by the way, I managed to golf his algorithm to 112 characters:
l=length
o(x:y)=1+l(takeWhile(/=x)y)
j a|n<-l a=maximum$map(o.drop n.iterate(\i->mod(a!!mod(i+a!!i)n)n))[0..n-1]

Haskell - 139 characters
l=length
o(x:y)=1+l(takeWhile(/=x)y)
j a=maximum$map(o.drop n.iterate(b!!))[0..n-1]
 where b=zipWith(\x y->mod(a!!mod(x+y)n)n)a[0..];n=l a

Examples:
λ: j [0]
1

λ: j [-213]
1

λ: j [1,3,12,-1,7]
1

λ: j [2,3,5,7,9,11,13,17,19]
2

λ: j [-2,3,-5,7,-9,11,-13,17,-19,23,-27]
3

λ: j [0,2,5,4,-9,0,-1,1,-1,1,-6]
4

This makes use of @jakube's observation that you need only check half the starting values, while performing 2 step per iteration.

You could squish the where to the previous ]. Also, did you try using cycle l!!i instead of l!!mod n(length l)?

Also, you can inline b, and use a pattern guard |n<-l a to eliminate the where.

Python, 160
l=lambda a,b,c,d:(b,c)in d and len(d)-d.index((b,c))or l(a,(a[b]+[0,b][c])%len(a),~c,d+[(b,c)])
j=lambda a:max(l(a,b,c,[])for b in range(len(a))for c in(0,1))/2

Function for answer is j.
The recursive function l returns the loop length for a given array, start, and first turn, and the function j finds the max.

I think you can save some characters by defining j with a lambda.

Mathematica, 113 112 chars
l=Length;m=MapIndexed;f=Max[l/@ConnectedComponents@Graph@m[Tr@#2->#&,Part@@Thread@Mod[#+{Tr@#2,1}&~m~#,l@#,1]]]&

Example:
f /@ {
  {0},
  {-213},
  {1, 3, 12, -1, 7},
  {2, 3, 5, 7, 9, 11, 13, 17, 19},
  {-2, 3, -5, 7, -9, 11, -13, 17, -19, 23, -27},
  {0, 2, 5, 4, -9, 0, -1, 1, -1, 1, -6}
}

{1, 1, 1, 2, 3, 4}

ised 82
ised '@1{0,2,5,4,-9,0,-1,1,-1,1,-6};@2{1};' '@{4 5}{(@3{:$1_x++x*@2{1-$2}:}2*#$1)::[#$1]};{1+?{:@5{$3::$5}=$4:}@::[2*#$1]_0}/2'

The first argument doesn't count into length (array initialization into $1 and b initialization into $2 - select the "game").

Mathematica, 189 162 161 bytes
If anonymous functions are allowed - 161 bytes:
Max[l=Length;Table[b={};n=p;i=s-1;e:={i,n~Mod~2};While[b~Count~e<2,b~AppendTo~e;h=#[[i+1]];i=If[EvenQ@n++,h,i+h]~Mod~l@#];l@b-b~Position~e+1,{s,l@#},{p,0,1}]/4]&

Otherwise - 163 bytes:
f=Max[l=Length;Table[b={};n=p;i=s-1;e:={i,n~Mod~2};While[b~Count~e<2,b~AppendTo~e;h=#[[i+1]];i=If[EvenQ@n++,h,i+h]~Mod~l@#];l@b-b~Position~e+1,{s,l@#},{p,0,1}]/4]&

Running this on all the test-cases:
f /@ {
  {0},
  {-213},
  {1, 3, 12, -1, 7},
  {2, 3, 5, 7, 9, 11, 13, 17, 19},
  {-2, 3, -5, 7, -9, 11, -13, 17, -19, 23, -27},
  {0, 2, 5, 4, -9, 0, -1, 1, -1, 1, -6}
}

Results in:
{1, 1, 1, 2, 3, 4}

Python 2, 202 bytes
def l(a,n,i):
 b=[]
 while not[i,n]in b:b.append([i,n]);i=(a[i]if n<1 else i+a[i])%len(a);n+=1;n%=2
 return len(b)-b.index([i,n])
def f(a):print max([l(a,n,i) for n in[0,1]for i in range(len(a))])/2

DEMO
This is nearly a port of my Mathematica answer.

This looks very similar to mine. Mine was off by one (before dividing by two) at first. I'm still not sure why, but I just subtracted one before dividing.

I don't know Mathematica, so I can't really help more.

@Zgarb Oh! Well that explains everything. I didn't even think of that. Thanks!

For with 3 arguments is usually shorter than While (since you can save on a semicolon in front of the For).


text:
Computer Generated Textured Wall Paint
The paint on the walls in my room has a random, almost fractal-like, 3-dimensional texture:

In this challenge you will write a program that generates random images that look like they could be part of my walls.
Below I've collected 10 images of different spots on my walls. All have roughly the same lighting and all were taken with the camera one foot away from the wall. The borders were evenly cropped to make them 2048 by 2048 pixels, then they were scaled to 512 by 512. The image above is image A.
These are only thumbnails, click images to view at full size!
A:
B:
C:
D:
E:
F:
G:
H:
I:
J:
Your task is to write a program that takes in a positive integer from 1 to 216 as a random seed, and for each value generates a distinct image that looks like it could have been the "eleventh image" of my wall. If someone looking at my 10 images and a few of yours can't tell which were computer generated then you've done very well!
Please show off a few of your generated images so viewers can see them without having to run the code.
I realize that the lighting in my images is not perfectly uniform in intensity or color. I'm sorry for this but it's the best I could do without better lighting equipment. Your images do not need to have variable lighting (though they could). The texture is the more important thing to focus on.
Details

You may use image processing tools and libraries.
Take the input in any common way you desire (command line, stdin, obvious variable, etc).
The output image can be in any common lossless image file format, or it can just be displayed in a window/bowser.
You may programmatically analyze my 10 images but don't assume that everyone running your code has access to them.
You must generate the images programmatically. You may not hard-code a slight variant of one of my images or some other stock image. (People would vote you down for this anyway.)
You may use built-in pseudorandom number generators and assume the period is 216 or more.

Scoring
This is a popularity contest so the highest-voted answer wins.

PerlinNoise + truncation + shading

I can't make wall images, so instead have a comic!

@Sp3000 That's more or less how it happened. Though If I has been looking up I'd have probably chosen my ceiling, which could work as well...

GLSL (+ JavaScript + WebGL)

Live demo | GitHub repository
How to use
Reload the page for a new random image. If you want to feed in a particular seed, open your browser's console and call drawScreen(seed). The console should display the seed used on load.
I haven't really tested this on a lot of platforms, so let me know if it doesn't work for you. Of course, your browser needs to support WebGL. Errors are displayed either in the column on the left, or in the browser's console (depending on the type of error).
New: You can now bring the walls to life a bit, by ticking the "movable light source" checkbox.
What is this sorcery?
I've got this WebGL boilerplate code floating around my GitHub account, which I use every now and then to quickly prototype some 2D graphics things in WebGL. With some shader magic, we can also make it look slightly 3D, so I thought that was the quickest way to get some nice effects going. Most of the setup is from that boilerplate code, and I'm considering that a library for this submission and won't include it in this post. If you're interested, have a look at the main.js on GitHub (and the other files in that folder).
All the JavaScript does is to set up a WebGL context, store the seed in a uniform for the shader, and then render a single quad over the entire context. The vertex shader is a simple passthrough shader, so all the magic happens in the fragment shader. That's why I called this a GLSL submission.
The largest part of the code is actually to generate the Simplex noise, which I found on GitHub. So I'm omitting that as well in the code listing below. The important part is, it defines a function snoise(vec2 coords) which returns simplex noise without using a texture or array lookup. It's not seeded at all, so the trick to getting different noise is to use the seed in determining where to do the lookup.
So here goes:
#ifdef GL_ES
precision mediump float;
#endif
#extension GL_OES_standard_derivatives : enable

uniform float uSeed;
uniform vec2 uLightPos;

varying vec4 vColor;
varying vec4 vPos;

/* ... functions to define snoise(vec2 v) ... */

float tanh(float x)
{
    return (exp(x)-exp(-x))/(exp(x)+exp(-x));
}

void main() {
    float seed = uSeed * 1.61803398875;
    // Light position based on seed passed in from JavaScript.
    vec3 light = vec3(uLightPos, 2.5);
    float x = vPos.x;
    float y = vPos.y;

    // Add a handful of octaves of simplex noise
    float noise = 0.0;
    for ( int i=4; i>0; i-- )
    {
        float oct = pow(2.0,float(i));
        noise += snoise(vec2(mod(seed,13.0)+x*oct,mod(seed*seed,11.0)+y*oct))/oct*4.0;
    }
    // Level off the noise with tanh
    noise = tanh(noise*noise)*2.0;
    // Add two smaller octaves to the top for extra graininess
    noise += sqrt(abs(noise))*snoise(vec2(mod(seed,13.0)+x*32.0,mod(seed*seed,11.0)+y*32.0))/32.0*3.0;
    noise += sqrt(abs(noise))*snoise(vec2(mod(seed,13.0)+x*64.0,mod(seed*seed,11.0)+y*64.0))/64.0*3.0;

    // And now, the lighting
    float dhdx = dFdx(noise);
    float dhdy = dFdy(noise);
    vec3 N = normalize(vec3(-dhdx, -dhdy, 1.0)); // surface normal
    vec3 L = normalize(light - vec3(vPos.x, vPos.y, 0.0)); // direction towards light source
    vec3 V = vec3(0.0, 0.0, 1.0); // direction towards viewpoint (straight up)
    float Rs = dot(2.0*N*dot(N,L) - L, V); // reflection coefficient of specular light, this is actually the dot product of V and and the direction of reflected light
    float k = 1.0; // specular exponent

    vec4 specularColor = vec4(0.4*pow(Rs,k));
    vec4 diffuseColor = vec4(0.508/4.0, 0.457/4.0, 0.417/4.0, 1.0)*dot(N,L);
    vec4 ambientColor = vec4(0.414/3.0, 0.379/3.0, 0.344/3.0, 1.0);

    gl_FragColor = specularColor + diffuseColor + ambientColor;
    gl_FragColor.a = 1.0;
}

That's it. I might add some more explanation tomorrow, but the basic idea is:

Choose a random light position.
Add up a few octaves of noise, to generate the fractal pattern.
Square the noise to keep the bottom rough.
Feed the noise through tanh to level off the top.
Add two more octaves for a little bit more texture on the top layer.
Compute the normals of the resulting surface.
Run a simple Phong shading over that surface, with specular and diffuse lights. The colours are chosen based on some random colours I picked from the first example image.

This is more realistic than the wall itself :o

Some more "veins" / "snakes" / "worms" would make this picture more fitting for the "wall". But still nice.

Mathematica Spackling
The app below applies speckling to a random image.    Clicking on "new patch" generates a new random image to work with, and then applies the effects according to current settings.
The effects are oil painting, Gaussian filter, posterization, and embossing.  Each effect can be independently tweaked.  The seed for the random number generator can be any integer from 1 to 2^16.
Update:
The Gaussian filter, which softens the edges, is now the last image effect applied.  With this modification, the posterization effect was no longer needed and thus removed.
Manipulate[
 GaussianFilter[ImageEffect[ImageEffect[r, {"OilPainting", o}], {"Embossing", e, 1.8}], g],
 Button["new patch", (SeedRandom[seed] r = RandomImage[1, {400, 400}])],
 {{o, 15, "oil painting"}, 1, 20, 1, ContinuousAction -> False, Appearance -> "Labeled"},
 {{e, 1.64, "embossing"}, 0, 5, ContinuousAction -> False, Appearance -> "Labeled"},
 {{g, 5, "Gaussian filter"}, 1, 12, 1, ContinuousAction -> False, Appearance -> "Labeled"},
 {{seed, 1}, 1, 2^16, 1, ContinuousAction -> False, Appearance -> "Labeled"},
 Initialization :> (SeedRandom[seed]; r = RandomImage[1, {400, 400}])]

Explanation
The explanation is based on a slightly different version, in which posterization was employed and GaussianFilter was applied early on.  But it still serves to clarify how each image effect alters an image.  The end result is a paint texture with sharper edges.  When the Gaussian filter is only applied at the end, the result will be smoother, as the above picture shows.
Let's look at some image effects, one at a time.
Generate a starting image.
 r = RandomImage[1, {200, 200}]

Lena will show us how each image effect transforms a life-like picture.
Lena = ExampleData[{"TestImage", "Lena"}]

An oil painting effect applied to Lena.
ImageEffect[Lena, {"OilPainting", 8}]

An oil painting effect applied to our random image.  The effect was intensified (16 instead of 8).
 r1 = ImageEffect[r, {"OilPainting", 16}]

A Gaussian filter effect applied to Lena (not to the oil painting effect version of Lena).  The radius is 10 pixels. (In the final version, at the top of this entry, GaussianFilter is applied as the final effect.)
 GaussianFilter[Lena, 10]

A somewhat milder Gaussian filter effect applied to r1.  The radius is 5 pixels.
 r2 = GaussianFilter[r1, 5]

An intense posterization effect applied to Lena.  (In the final version of the app, I removed posterization. But we'll leave it in the analysis, since the examples in the analysis were based on an earlier version with posterization.)
 ImageEffect[Lena, {"Posterization", 2}]

A posterization effect applied to r2.
r3 = ImageEffect[r2, {"Posterization", 4}]

Embossing Lena
 ImageEffect[Lena, {"Embossing", 1.2, 1.8}]

Embossing r3  completes the image processing.  This is intended to look something like the OP's ceiling.
 ceilingSample = ImageEffect[r3, {"Embossing", 1.2, 1.8}]

For the curious, here is Lena with the same image effects applied.

... there's a built-in to get the Lena image? LOL.

Yes. There are roughly 30 built-in pictures in Mathematica used for image processing tests.

With a slight modification, one could feed RandomInteger a seed, thereby guaranteeing a particular output.  Or do you mean something else, like a starting, non-Random image to which effects are applied?

It now accepts a seed from 1 to 2^16.

+1 because Lena will show us how each image effect transforms a life-like picture made me LOL. The weird thing is, the final Lena image appears to have an Aztec or Inca facing left, wearing a headdress and weilding a twig as if it were a gun.

POV-Ray
A lot of golfing potential, run with povray /RENDER wall.pov -h512 -w512 -K234543
First it creates a random texture, but instead of stopping there it transforms the texture into a 3D-heightfield to make the radial shadows from the camera flash more realistic. And for good measure it adds another texture of little bumps on top.
The only way apart from hardcoding the random seed is to use the clock variable meant for animations, this is passed with the -K{number} flag
#default{ finish{ ambient 0.1 diffuse 0.9 }}

camera {location y look_at 0 right x}
light_source {5*y color 1}

#declare R1 = seed (clock); // <= change this

#declare HF_Function  =
 function{
   pigment{
     crackle turbulence 0.6
     color_map{
       [0.00, color 0.01]
       [0.10, color 0.05]
       [0.30, color 0.20]
       [0.50, color 0.31]
       [0.70, color 0.28]
       [1.00, color 0.26]
     }// end color_map
    scale <0.25,0.005,0.25>*0.7
    translate <500*rand(R1),0,500*rand(R1)>
   } // end pigment
 } // end function

height_field{
  function  512, 512
  { HF_Function(x,0,y).gray * .04 }
  smooth
  texture { pigment{ color rgb<0.6,0.55,0.5>}
            normal { bumps 0.1 scale 0.005}
            finish { phong .1 phong_size 400}
          } // end of texture
  translate< -0.5,0.0,-0.5>
}

There is no need to golf this at all. Nice results! :)