text:
9 Hole Challenge
The 9 Hole Challenge

9 code golfing challenges of varying difficulty.
Penalties for using the same language more than once.
The question will be updated with pars, hole champions and trophy winners.
This comes from a competition I have with some friends, it's not the usual format, but I hope some of you will appreciate the different spin on it. Challenges, rules and trophies below.

Holes

Greenway (24)
f(c:string, n:integer)
Prints a line containing n instances of c.
Somewhere in the Rough (73)
f(t:string, s:string, n:integer) -> i
Where i is the index of the nth instance of s in t.
Curry for Dinner (6235)
f(x:function, y: function) -> g
Where g is a function that will call y, n times;
where n is the return value of x
Spew (92)
f(p:string)
Writes to file at p and fills it with a randomly sized rectangle of random characters (ascii).
Treasure Hunt (75)
f(p:string, c:char) -> (x, y)
Reads file at p which contains a grid of symbols
and returns the x and y coordinates of the first instance of that symbol
within the grid, assume it exists.
Bridge on the River Kwai (179)
f(l:list[int])
Prints difference bridges diagram for l.
E.g for [1,7,3,17,1]
 /+6\ /-4\ /+14\  /-16\
1    7    3     17     1

Make sure that the spaces are created according to the size of the
number above. For a 3 digit long number, you are going to need 4 spaces
between the digits on the line below.
Catch: Somewhere, your code must spell trousers
(Must have at least 1 non-alphanumeric delimiters.
E.g. tr(ou,se)(rs)
Time Flies When You're Playing Golf (1157)
f(p:string) -> [h, m]
Reads file at p which contains an ASCII representation
of an analogue clock, where the hour hand is represented
with one lines, and the minutes by two. Output a list
containing two elements: the hours and minutes shown on
the clock. If only one hand is visible, assume both point
to that position.
Here are all the possible combinations for a hand.
\ | /
 \|/
--o--
 /|\
/ | \

These positions, respectively are (12, 1, 3, 5, 6, 7, 9, 11).
Assume that the other characters within the clock face are spaces.
Timber! ()
f(p:string) -> b:boolean
Where p is the path to a file with an ascii building in.
Blocks with white space underneath them will fall.
(Except from slashes, which stay in place if there is a stable block in the    opposite direction to the way they face). If the building is structurally integral
return true, otherwise return false. All non whitespace blocks
are counted as being solid and other than slashes, they all fall.
Structurally safe
____
|/\|
|  |

Not Safe
|__
  |
  |

Safe version
|__
\\|
  |

Slacker News (218)
f(s:string, r:string, p:string)
Gets the titles of the top 20 stories on Hacker News and changes all instances of s to r, then writes the new titles to a html file at p, where each title is contained within a h1 element.
The outputted file should something like this

Some title

Some other title
...etc
Catch:

You may not use the HN api.
You may not use Regex.
You may not use angle braces anywhere in your code.

Scoring

Character count is the length of the function that will compile & run correctly. However you still need to submit the full code, including imports.
+10% for every repeated language in your submission. (E.g. If you use Ruby for 3 solutions, then your final score will be multiplied by 1.2). Different versions of the same language count still count as the same language.
Par will be average score for each hole.
Submit your solutions in one answer.
Your overall score is your character count + your language penalty, then round it up.

Trophies

Gold Jacket - (@Sprigyig - 1290) Lowest overall score
Shooter - (@Sprigyig - 9) Most languages used
Bunker - Most above par score on any hole
Snakes on a Plane - (@AsksAnyway - 1727) Highest python character submission in a single solution
Good Parts - (@AsksAnyway - 255) Highest JS character count in a single solution
Shakey Steve - Shortest solution that uses interfaces
You're Not From Round Here - Shortest unique language solution that's language has the shortest wikipedia page.
Happy Gilmoore - (@AsksAnyway - 31) Shortest solution that has the word 'alligator' in the code.
Unicycling Dwarf Magic - The default extensions of your 9 submission source files are a perfect anagram of a word in the Oxford Dictionary.

You are only eligible for a trophy once you have completed all 9 holes

Submissions

@Sprigyig 1290
@Firefly 1320
@grc 1395
@Trevor M 1465
@C Gearhart 1654
@Guy Sirton 1719
@AsksAnyway 4651

I assume "angle braces" refers to what I call "brackets," right? []

@anorton < & >

@DanPrince Ah!  Glad I asked. :)  One other question: must the file contain a test case (e.g. actually calling the function f), or just the definition of the function itself?

An analog clock has 12 positions for each hand, but you only give us 8. How does that work?

@Kevin You don't have to account for the other positions. That diagram shows you all the possible configurations of either hand.

@anorton, just the function definition.

@DanPrince Do you want the / position to refer to 1 o'clock or 2 o'clock?  (and similarly for all the rest of the diagonals)

@anorton 1/5, 5/25, 7/35, 11/55

This challenge is awesome x 9. However I think it's too bad that there are penalties for using many times the same language. Can you please precise what you mean in the trophies "Snakes on a Plane", "Good Parts" (do we need to write a lot of code to win those?) and "Unicycling Dwarf Magic" (what are extensions?). Thanks

The 10% penalty applies to the entire score, or only to those submissions that use that language? Also, are these additive (100, 110, 120...), or multiplicative (100, 110, 121...)? Can you show a narrated example?

@xem extensions should refer to py, c, java, etc, which are the default file name extensions for Python, C, and Java (respectively).

As for the curry challenge, I take it y will take no arguments, but what should g return?

Continuing on Jan's comment: I assume we only have to provide f, but not x or y.  Thus, g could return anything.

@xem, the you'll end up with a bad score if you write too much code, so the idea is to write an optimally bad amount of code, and still do well on the other challenges.
JanDvorak there is a 10% penalty for each time you use a language beyond the first time. E.g. if you use golfscript 3 times, then you'll get a 20% multiplier on your overall score.

So if I make my 9 short functions in JS, I'll have a 190% penalty but I'll be running for the "good parts" trophy? What does "highest" mean in this trophy definition? Does it refer to the number of characters or the number of functions?

What counts as a block in the Timber challenge? Each ASCII character is a separate block? Straight lines?

All non whitespace blocks are blocks (slashes are the only exception)

@xem updated the question.

Can we reorder the arguments? Namely, I'd like to get the arguments in Curry for Dinner in the opposite order.

Think of it almost as a booby prize. The more trophies you get, the better right? But it's hard to get the JS/Python trophies and also get low character counts, so you'd have to write an 'optimally bad amount of code'

@JanDvorak, Sorry, but people have already started. I'm happy to clarify on rules/edge-cases, but not change the actual puzzles.

@DanPrince 'not able to use angle braces', can we use the ascii values of said braces? (hole 9)

@Tyzoid Of course.

Is it okay to count JavaScript, TypeScript, CoffeeScript, ... as separate languages? (to avoid the penalty)

Will different versions or flavours of a language be considered "different" for scoring purposes?  e.g. Python 2 vs Python 3?  Visual Basic vs VB.Net vs VBScript?  How about supersets or near-supersets like C vs C++?  Sorry for the pedantry, but this is code-golf! :-)

@xem You can use one compile-to variant of another language. E.g. JS + Coffee won't get you a penalty, but JS+Coffee+Livescript will.

@DarrenStone versions don't. See above comment for flavours. I'd count the VB variants as the same, but C  and C++ as different.

@DanPrince are the hands on you clock backwards? The minute hand is generally the larger of the two. (my implementation is trivially changed by this, but I'd like to get it right)

@Tyzoid my bad. Typo.

Task 4: define "grid", constraints on random range. Task 5: define "grid", what about multiple occurrences of the symbol? Task 6: are we required to reverse engineer this format? How flexible is it (with respect to signs, slashes, padding, etc)? Task 7: what does it mean to "output a list"? Return it? Print it? What assumptions can be made about the padding in the input file?

Task 8: what is the "root" of a slash? Which positions touch it? Task 9: What is "Hacker News"? What is the ordering on its stories? Must the output file be valid? If so, to which standard? Does "each title is contained within a h1 element" mean
Title 1Title 2...Title 20
?

Task 4: Rectangular data structure with a random height and width.
Task 5: Any occurrence.
Task 6: No you aren't. Look at the example diagram and extrapolate.
Task 7: Return it.
Task 8: Look at the example diagrams, the root is bottom. E.g. a \ attaches this way ->, whereas a / attaches this way <-.
Task 9: Google it. No, but it must be able to display in a popular browser. No, it means each element in it's own h1 tag.

You've managed to not answer most of the questions.

And everyone else has managed to do it without. This is a code golf. Use your imagination and sense of fun.

Unicycling Dwarf Magic: Does it have to be ONE word? Is that even possible? :)

@CPX Seven source code extensions is possible, at least: hs lua b s el om py => blasphemously. If one allows .ii ("gcc pre-processed C++ source code") it's possible with 9. You don't happen to have a good list of programming language file extensions around, do you?

Ok, it's definitely possible. I'll attempt a solution, but it'll take a while since I'll have to learn & find implementations for some... interesting languages. Here's a useful tip: the E programming language gets you a much-needed vowel.

Can you clarify what you mean by "you only need to submit the function"? Can we exclude imports/includes from the character count? What about code outside the function, or even separate functions?

This is OT to me as both not a good fit for the SE model (out-of-band trophies, multiple mostly independent sub-answers per answer) and likely to generate copypaste-debate as the per-language and per-task shortest converge.

Are languages without functions excluded from the challenge? Or can we also write STDIN to STDOUT programs instead of functions?

I'm closing this question because multi-part challenges with little interaction between subchallenges became off topic by community consensus.

Score: 4651
2907 + 60% penalty
1. GolfScript - 14 characters
{*}:a;lligator

Usage: c n a e.g. "test" 3 a -> testtesttest
 Happy Gilmoore
2. Python - 72 characters
def f(t,s,n,p=-1):
 while n:p=t.find(s,p+1);n-=1 if p+1 else n
 return p

3. Javascript - 255 characters
/*
Curry for Dinner

f(x:function, y: function) -> g Where g is a function that will call y, n times; where n is the return value of x
*/
function f(x, y) {
    var g = function() {
        var n = x();
        for (var i = 0; i < n; ++i) {
            y();
        }
    };
    return g;
}

 Bunker
 Good Parts
4. Python - 132 characters
from random import randrange as r
def f(p):l=range(r(9));open(p,'w').writelines([''.join([chr(r(94)+33)for _ in l])+'\n'for _ in l])

5. Python - 89 characters
def f(p,c):
 for y,d in enumerate(open(p).readlines()):
  x=d.find(c)
  if x+1:return x,y

6. Python - 189 characters
def f(l):
 for i in 0,1:
  for n,u in enumerate(l):
   o=l[n+1] if len(l)>n+1 else id
   if i:print u,' '*4,
   elif o!=id:print' /'+('+' if o-u>0 else '')+str(o-u)+'sers'*0+'\\ ',
  print

7. Python - 1727 characters
def f(p):
    lines = open(p).read().split('\n')

    # preprocess lines to ensure correct format
    if len(lines) < 5:
        for i, line in enumerate(list(lines)):
            if 'o' in line:
                if i == 0:
                    lines.insert(0, ' ' * 5)
                    lines.insert(0, ' ' * 5)
                elif i == 1:
                    lines.insert(0, ' ' * 5)
        while len(lines) < 5:
            lines.append(' ' * 5)

    # find characters that can only be the hour hand
    for i, line in enumerate(lines):
        if i == 0:
            if '\\' in line:
               hour = 11
            elif '|' in line:
                hour = 12
            elif '/' in line:
                hour = 1
        elif i == 2:
            if '--o' in line:
                hour = 9
            elif 'o--' in line:
                hour = 3
        elif i == 4:
            if '/' in line:
               hour = 7
            elif '|' in line:
                hour = 6
            elif '\\' in line:
                hour = 5

    # find characters that might represent the minute hand
    possible_minutes = []
    for i, line in enumerate(lines):
        if i == 1:
            if '\\' in line:
                possible_minutes.append(55)
            if '|' in line:
                possible_minutes.append(0)
            if '/' in line:
                possible_minutes.append(5)
        elif i == 2:
            if '-o' in line:
                possible_minutes.append(45)
            if 'o-' in line:
                possible_minutes.append(15)
        elif i == 3:
            if '/' in line:
                possible_minutes.append(35)
            if '|' in line:
                possible_minutes.append(30)
            if '\\' in line:
                possible_minutes.append(25)

    HOUR_MINUTES = {
        12: 0,
        1: 5,
        3: 15,
        5: 25,
        6: 30,
        7: 35,
        9: 45,
        11: 55,
    }

    # remove minute hand that is actually hour hand
    if len(possible_minutes) > 1:
        not_minute = HOUR_MINUTES[hour]
        if not_minute in possible_minutes:
            possible_minutes.remove(not_minute)

    assert(len(possible_minutes) == 1)
    minute = possible_minutes[0]

    h, m = hour, minute
    return [h, m]

 Snakes on a Plane
8. Python - 226 characters
def f(p):
 e=set;q,t=e(),True
 for l in open(p).readlines():
  r,b,q=e(q),e(),e()
  for i,c in enumerate(l):
   if c.strip():b.add(i);q.add(i-1 if c == '/' else i+1 if c == '\\' else i)
  if not r.issubset(b):t=False
 return t

9. Python - 203 characters
import urllib
def f(s,r,p):f,l,g=open(p,'w'),'\74','\76';[f.write(l+'h1'+g+t.replace(s,r)+'h1'+g)for i,t in enumerate(urllib.urlopen('http://x.co/3WYln').read().split('title'+g))if(i in range(2,42))&i%2]

What does the comment "#alligator" have to do with the code #1? It seems to be included in the word count for some reason.

@Dhara It is for the Happy Gilmoore trophy: "Shortest solution that has the word 'alligator' in the code."

#9 uses angle braces (i<i<42), or are they allowed as long as you only use them as operators?

@ChristopherCreutzig Fixed thanks.

Score: 1320
I've plenty to do to improve this score... Oh well, at least I avoided repeated-language penalties. :-)
1. Python (21 chars)
def f(c,n):print(c*n)

The "obvious" solution.
2. ECMAScript 6 (47 chars)
f=(t,s,n)=>t.split(s).slice(0,n).join(s).length

Finds the index in a bit of an unconventional way, by counting the length of the substring before it.
3. J (12 chars)
f=:2 :'v^:u'

The built-in conjunction ^: raises a function to a power (i.e. repeats a function a given number of times).  That is, f^:3 y = f (f (f y))).  However, it's overloaded to alos accept functions rather than integers, in which case it runs the function on the input to get the number of repetitions.  Unfortunately we need to flip the operands for the task, otherwise we'd have the consise  answer f=:^:.
4. C (95 chars)
#include <stdio.h>
#include <stdlib.h>

f(char*p){FILE*f=fopen(p,"a");for(int n=rand(),y=n*n;y--;y%n||putc(10,f))putc(rand()%94+32,f);}

This task leaves quite a bit of room for interpretation and abuse: is it okay to just output a random printable ASCII character and say it's a randomly-dimensioned rectangle with dimensions from the set {1}?  Probably not.  Anyway, I went with plain rand() but in reality you probably want to add %9 or something if you want to test it.  On my linux box I didn't have to flush the file in order for it to be written (I guess it flushes automatically on program exit), but I'm pretty sure you have to flush it to be standards-compliant, so feel free to add fflush(f); to the count here.
5. Haskell (100 chars)
import Control.Arrow
import Data.List
import Data.Tuple
import Control.Applicative

h p c=head.filter(p c.snd).zip[1..]
g c=swap.(id***fst.h(==)c).h elem c.lines
f p c=g c<$>readFile p

I like the repeated pattern between finding the row and the column (abstracted via h).
6. Lua (261 chars)
function f(s,m,y,...)if s and m then for i,v in pairs(m)do
io.write(v,(" "):rep(#tostring(s[i])))end print()elseif s then
r=unpack f(s,{"",f(trouse,r(s))})f({f(nil,r(s))},s)elseif y then
return ("/%s%d\\"):format(m<y and"+"or"-",math.abs(m-y)),f(s,y,...)end end

Makes use of multiple return values and recursion to deal with computing the differences.  It cost me a few  characters to match the sample output exactly (adding the right amount of spaces everywhere).
7. Go (307 chars)
func f(p string)[]int{var l[]string
g,_:=os.Open(p)
H,M,s,m:=0,0,bufio.NewScanner(g),[][]int{{-1,-1,11},{-1,0,12},{-1,1,1},{0,-1,9},{0,1,3},{1,-1,7},{1,0,6},{1,1,5}}
for s.Scan(){l=append(l,s.Text())}
for _,a:=range m{if l[2+a[0]*2][2+a[1]*2]!=' '{M=a[2]}
if l[2+a[0]][2+a[1]]!=' '&&(H==0||M!=a[2]){H=a[2]}}
return[]int{H,M}}

Could probably be golfed a lot more; I barely know Go.
8. CoffeeScript (+ node.js) (223 chars)
f=(p)->
 a=require('fs').readFileSync(p).toString().split "\n"
 U=(i,j)->a[i]?[j]and a[i][j]==' '
 for l,i in a
  for c,j in l
   m =
    "/":[i+1,j-1]
    "\\":[i+1,j+1]
    a:[i+1,j]
   return if U.apply(0,m[c]or m.a)
 1

A bit of a cheap-shot since I already have JS.  Oh well.  Returns a falsy value (namely, undefined) or a truthy value (namely, 1) to indicate the answer.
9. Bash (254 chars)
f(){
curl https://news.ycombinator.com/rss|
awk -Ftitle '{OFS="h1\76\n\74h1";ORS="";print substr(OFS,4);print$2,$4,$6,$8,$10,$12,$14,$16,$18,$20,$22,$24,$26,$28,$30,$32,$34,$36,$38,$40;print substr(OFS,0,3)}'|
while read l;do echo ${l//$1/$2};done|
tee $3
}

(Newlines after pipes added for readability.)  Working around the restrictions with the shell was fun.  I realise there's probably a better way to do $2,$4,$6,..., but this was what I came up with anyway.

Is there any reason why you haven't included imports/includes in the character count? Otherwise, great work!

Oh yeah, I forgot to mention that. Since the question emphasises that "you only need to submit the function" I was thinking it'd be fair to ignore the cost of including standard libraries.

For hole 1 f=str.__mul__

@SnakesandCoffee that doesn't print it to stdout, unfortunately. :(

Score: 1,394.4
996 characters + 40% penalty
1. Greenway - Haskell, 19 chars
f c n=replicate n c

Usage:
> f "hello" 5
["hello","hello","hello","hello","hello"]

2. Rough - PHP, 72 chars
<?
function f($t,$s,$n){for($i=-1;$n--;$i=strpos($t,$s,++$i));return$i;}

3. Curry - JavaScript 1.8, 45 chars
f=function(x,y)function(){for(i=x();i--;)y()}

4. Spew - J, 43 chars
f=:3 :'((33+?(1+?2#100)$1#93){a.)fwrites y'

Usage:
f 'file.txt'

5. Treasure - J, 64 chars
f=:4 :0
a=.freads x
b=.1+a i.u:10
c=.a i.y
d=.<.c%b
e=.d,c-b*d
)

Usage:
'file.txt' f 'c'

6. Bridge - Python, 166 chars
def f(l):J=''.join;t=map;r=lambda n:' '*len(n);s=t(str,l);o=['/%+d\\'%(y-x)for x,y in zip(l,l[1:])];print J(t(J,zip(t(r,s),o)))+'\n'+J(t(J,zip(s,t(r,o)+['users'*0])))

7. Time - Python, 205 chars
def f(p):
 s=open(p).read();a=[s[:12],s[18:],s[11:15],s[15:18]];z=[0]*3
 for l in(0,1):
  for c in'/|\\':z[a[l].count(c)]=('|/'.find(c)+6*l)%12or 12
  z[a[2+l].count('-')]=3+6*l
 print[z[1]or z[2],z[2]*5%60]

Assumes lines are space padded to be five characters wide. Uses tabs for second indentation level.
8. Timber - Python, 190 chars
def f(p):g=open(p).readlines();C='\\/ ';return all(1-[x+2>len(g[y])or g[y][x+1]in C,x<1or g[y][x-1]in C,0,' '==g[y+1][x]][C.find(g[y][x])]for y in range(len(g)-1)for x in range(len(g[y])-1))

9. Slacker - Python, 192 chars
import urllib
def f(s,r,p):F=open(p,'w');d=urllib.urlopen('http://x.co/3WYmQ').read()[37:];o,c='\x3c\x3e';exec"d=d[d.find(o+'t')+7:];F.write(o+'h1'+c+d[:d.find(o)].replace(s,r)+o+'/h1'+c);"*20

Thanks to Tyzoid for the url shortener idea.

Very impressed with your Python, lots of tricks to learn from.

@AsksAnyway Thanks. Be sure to check this out if you haven't already.

Umm, surely your (1) is in J, no? Maybe you forgot to update the heading/sample run.

@FireFly Yeah, my mistake. I updated the scoring and usage but forgot to change the actual solution.

Edit: Think I'll just submit this as is: 1290 total, no language repeats.
Greenway, C#
53
void g(string s,int n){while(n-->0)Console.Write(s);}

I decided to swap languages with #1 and #9. Totally worth 30 here for hundreds later.
Somewhere In The Rough, Python
59
I really shouldn't have used up such a good language on an easy problem. Also, how is this not part of any language's indexOf family of functions? I seem to always need this...
def f(t,s,n):return sum(map(len,t.split(s))[:n+1])+n*len(s)

Curry For Dinner, Lisp
61
I haven't touched lisp since that one week in college....
(defun f (c g)(loop for i from 1 to(funcall c)do(funcall g)))

Spew, Bash/shell utils
102
My bash-foo was never that good to begin with. I'll fiddle with this one later. BTW if you want it to finish faster, switch it over to /dev/urandom.
f(){
c=$(($RANDOM%9+9))
for i in $(seq $c);do
echo `tr -cd [:print:]</dev/random|head -c$c`>>$1
done
}

Treasure Hunt, C
113
Probably one of the more C friendly problems. I interpreted "return two integers" as take a return array pointer as an argument. Warnings? What warnings? An int* is just as good as a FILE* =p.
void f(int*p,int c,int*r){int*f,t;*r=r[1]=0;f=fopen(p,"r");while(c-(t=fgetc(f))){*r=t-'\n'?*r+1:0;r[1]+=*r?0:1;}

Bridge on the River Kwai, Perl
207
I started learning perl while writing this one. (Better late than never!) I came into this wanting to do regex heroics, so I form the string as both layers of the bridge together, then use regexes with space replacements to form the two different lines.
sub f{@trouse=0..$#_-1;foreach $i(@trouse){$r.=sprintf("%d/%+d\\",$_[$i],$_[$i+1]-$_[$i])}$r.=$_[$#_]."\n";print$r=~s/(^|\\)(\d+)(\/|$)/$1.' 'x length($2).$3/egr;print$r=~s/(\/[+-]\d+\\)/' 'x length($1)/egr}

Time Flies When You're Playing Golf, Java
297
You can only do so much to make java terse... It assumes the clock is space padded so each line is 5 spaces long.
public boolean p(int r,int m,String s){int c[]={1,1,0,-1,-1,-1,0,1};return s.charAt(6*c[(r+6)%8]*m+14+c[(r)%8]*m)!=' ';}
public int[]time(String c){int h=9,m=0,t[]={3,5,6,7,9,11,12,1};for(int i=0;i<8;i++)if(p(i,1,c))if(p(i,2,c))m=i;else h=i;if(h==9)h=m;m=(t[m]*5)%60;h=t[h];return new int[]{h,m};}

Timber! Javascript
201
It runs in chrome's console. I make no guarantees elsewhere =p. It requires that the lines be space padded out to the length of the longest line. I feel like this is a reasonable request of ASCII art.
function f(s) {s=s.split("\n")
d={};m={'/':-1,'\\':1};r=1
s.forEach(function(x){t={}
for(i=0;i<x.length;i++){if(x[i]!=' '){j=m[x[i]]?i+m[x[i]]:i
t[j]=1}}for(n in d){if(x[n]==' '){r=0}}d = t})
return r}

Slacker News, Ruby
197
def s(f,s,t)
l=60.chr
r=62.chr
IO.write(f,l+"h1"+r+URI.parse("https://news.ycombinator.com").read().split('mhead')[0,20].map{|x|x[0,x.length-19].split(r).last.sub(s,t)}.join(l+"/h1#{r+l}h1"+r))
end

Not only is this a great answer, it also makes for a great read. Good job!

Thanks, I imagine it is a little less interesting now that I swapped ruby and C#. No more ranting on .Net's insane string split =)

Had fun touching a few languages for a little bit...
Character counts obtained after removing unnecessary spaces/newlines but submission mostly kept readable.  Since the question is a mix of functions and programs I included only the body of the function where required...  Also some liberty taken with what the meaning of "return" is...
Total ~1719
1- Python (~20)
def f(c, n):
    print c*n

2- C (~109)
int f(char*t,char*s,int n){int i;char*q=t;int l=strlen(s);for(i=0;i<n;++i){t=strstr(t, s)+l;}return(t-q-l);}

Readable version:
#include <string.h>

int f(const char *t, const char *s, int n)
{
  int i;
  char *start = t;
  int l = strlen(s);
  for(i = 0; i < n; ++i)
  {
    t = strstr(t, s) + l;
  }
  return(t - start - l);
}

3- Javascript (~56)
function(x, y) {return function() {for(i=0; i<x(); i++) y();}}

4- Rexx (~136)
f: Procedure
  Parse arg p
  w = random(1, 9)
  h = random(1, 9)
  Do y = 1 to h
    Do x = 1 to w
      Call CHAROUT p, d2c(random(32, 99))
    End
    Call LINEOUT p, ""
  End

5- Scala (~290)
def f(p: String, c: Char) {
  def sc(w: String, c: Char, x: Int, y:Int ): Boolean =
    {
      if(w.isEmpty) false else
      if(w.head==c) {println(x, y); true} else sc(w.tail, c, x+1, y)
    }
  def sr(w: Array[String], c: Char, x: Int, y: Int)
  {
    if(!sc(w.head, c, 0, y)) sr(w.tail, c, 0, y+1)
  }
  sr(io.Source.fromFile(p).mkString.split('\n'), c, 0, 0)
}

6- C++ (~355)
void b(list<int> l) // trouser+s
{
  auto i = l.begin();
  auto j = i;
  j++;
  list<int> d;
  while(j!=s.end()) d.push_back(*j++ - *i++);
  j = d.begin();
  ostringstream o[2];
  for(auto i : l)
  {
    while(o[0].tellp()!=o[1].tellp()) o[1] << " ";
    o[1] << i;
    if(j != d.end())
    {
      while(o[0].tellp()!=o[1].tellp()) o[0] << " ";
      o[0] << "/" << (*j>=0 ? "+" : "") << *j++ << "\\";
    }
  }
  cout << o[0].str() << endl << o[1].str() << endl;
}

7- Go (~301)
Note this requires the clock to be padded (i.e. all lines are same length).
func f(p string)(h int,m int) {
  var a=[8]int {0, 2, 4, 12, 16, 24, 26, 28}
  var b=[8]int {7, 8, 9, 13, 15, 19, 20, 21}
  var d=[8]int {11, 12, 1, 9, 3, 7, 6, 5}
  h=9
  c, e := ioutil.ReadFile(p)
  if e==nil {
    for i:=range a {
      if c[a[i]]>32 {
        m=i
      }
    }
    for i:= range b {
      if c[b[i]]>32 {
        if i!=m {
          h=i
        }
      }
    }
    if h==9 {
      h=m
    }
    h=d[h]
    m=d[m]*5%60
  }
  return
}

8- Ruby (~259)
def f(p)
  a,b = File.read(p).split(/\n/).reverse,Hash.new(1)
  a.each_with_index {
    |l,i|
    l.split("").each_with_index {|k,j|
      case k
        when ' '
          b[j] = 0
        when '/'
          b[j] = b[j]|b[j-1]
        when '\\'
           b[j] = b[j]|b[j+1]
      end
      unless k==' '
        if b[j]==0
          return 0
        end
      end
    }
  }
  return 1
end

9- bash/Unix hack (~193)
wget -qO - http://news.ycombinator.com/rss | tr "\074\076" "\n" | grep -B1 /title | awk 'NR % 3 == 1' | head -21 | tail -20 | sed 's/$1/$2/' | awk '{ print "\074h1\076" $0 "\074/h1\076"}' > $3

Nice, but your #9 uses angle braces, which is against the rules for that hole.

@RichardSmith: Thanks... I'll have to fix that one.

Careful on hole #3, there is no guarantee that x() will return the same number on each function call!

@Tyzoid: I was considering capturing it... You're correct that's my assumption/interpretation of the spec.

1654
1. Greenway (Haskell - 37)
f x y=do print(concat(replicate x y))

2. Somewhere in the Rough (Mathematica - 43)
f[t_,s_,n_]:=StringPosition[t, s][[n+1, 1]]

3. Curry for Dinner (Lisp - 58)
(defun f(x y)(lambda()(dotimes(c(funcall x))(funcall y))))

4. Spew (Matlab/Octave - 83)
function x(f)
    save f arrayfun(@char,randi(255,randi(255),randi(255)))
endfunction

5. Treasure Hunt (C - 176)
char* f(char* s,char c){FILE* n;char* r;int i=0,j=0,k=0;n=fopen(s,"r");while(!feof(n)){k=fgetc(n);if(k==(int)c)break;j++;if(k=='\n'){i++;j=0;}}sprintf(r,"%d %d",i,j);return r;}

6. Bridge on the River Kwai (Ruby - 192)
def f(l)
    trouse="\n%s"
    rs = l[0].to_s
    for i in 1..l.length-1
        s = "/%+d\\"%(l[i]-l[i-1])
        print " "*l[i-1].to_s().length+s
        rs += " "*s.length+"%d"%l[i]
    end
    puts trouse%rs
end

7. Time Flies When You're Playing Golf (Node.js - 406)
function f(n){var g,h,m,q;fs.readFile(n,'ascii',function(e,d){l=d.split('\n');g=function(x,y){try{return l[x][y].trim()&&1;}catch(e){return 0;}};h=g(0,0)*11||g(0,2)*12||g(0,4)*1||g(2,0)*9||g(2,4)*3||g(4,0)*7||g(4,2)*6||g(4,4)*5;m=(g(1,1)&&h!=11)*55||(g(1,2)&&h!=12)*0||(g(1,3)&&h!=1)*5||(g(2,1)&&h!=9)*45||(g(2,3)&&h!=3)*15||(g(3,1)&&h!=7)*35||(g(3,2)&&h!=6)*30||(g(3,3)&&h!=5)*25||h*5%60;return [h,m];});}

8. Timber! (Go - 329)
func f(p string)bool{
    x,_:=ioutil.ReadFile(p)
    b:=strings.Split(string(x),"\n")
    for j:=0;j<len(b)-2;j++{
        for i:=0;i<len(b[j]);i++{
            r,o:=1,0
            switch string(b[j][i]){
            case " ": continue
            case "/": r,o=0,-1
            case "\\": r,o=0,1
            }
            if i+o<len(b[j]) && b[j+r][i+o]==' ' {
                return false
            }
        }
    }
    return true
}

9. Slacker News (Python - 330)
def f(s,r,p):
    w=urllib2.urlopen('http://news.ycombinator.com')
    a=[l.get_text() for l in BS(w).body("a") if l.find_parent("td", class_="title")]
    t=lambda x:u"\x3c{}\x3e{}\x3c/{}\x3e".format(x,'{}',x)
    m=''.join(t("h1").format(l.replace(s,r)) for l in a[:20])
    with open(p,'w') as h:
        h.write(t("html").format(m).encode('utf8'))

WIP. Note, character counts may be off due to '\n' and wc
[1 Greenway] Mindf*ck, 54 characters
>>+[+>,-]<[<]>,<<++++++++[>>------<<-]>>[>[.>]<[<]>-]

Usage:
Once the code is written, input your string, and terminate your string with a ^a (ctr+a), then immediately after, enter your number.
One caveat: the number given must only be from 0-9 (if you wish a larger one, the ascii value-48 of whatever character you input will be used as n)
Screenshot:

[3 Curry for Dinner] Javascript, 59 characters
function f(x,y){return function(){n=x();while(--n!=0)y();}}

[4 Spew] BASH, 56 characters
f(){ dd if=/dev/urandom of="$1" count=$((RANDOM%30+2));}

[7 Time Flies When You're Playing Golf] C, 334 Characters (412 with macro definition)
#define E(A) else if(s[A]==
#define G(A) else if(A)m=
#define M(A) &&m!=A)h=A
int (*f(char* s)){short h=0,m=0;if(s[0]=='\\')m=11;G(s[2]=='|')12;G(s[4]='/')1;G(s[11]=='-')9;G(s[15]=='-')3;G(s[22]=='/')7;G(s[24]=='|')6;G(s[26]=='\\')5;if(s[7]=='\\'M(11);E(8)'|'M(12);E(9)'/'M(1);E(12)'-'    M(9);E(14)'-'M(3);E(18)'/'M(7);E(19)'|'M(6);E(20)'\\'M(5);int* i=malloc(sizeof(int)*2);i[0]=(h==0)?m:h;i[1]=m*5;return i;}

Note: this function returns a pointer to a two dimensional integer array, formatted like so:
{3, 55} (for a clock position of hour on 3, minute on 11)
[9 Slacker News] PHP, 246 characters
function f($a,$b,$c){$t=file_get_contents("http://x.co/3WQoY");$g=explode('d class="t',$t);$f=fopen($c,"w");for($i=1;++$i!=count($g)-10;){$e=explode("\x3e",$g[$i]);fwrite($f,"\x3ch1\x3e".str_replace($a,$b,s    ubstr($e[2],0,-3))."\x3c/h1\x3e\n");}}

Seperate/Original implementation in BASH+AWK, 218 characters
f(){ wget -qO- x.co/3WQoY|grep "e_"|awk '{n=split($0,a,"d class=\"t");for(q=1;++q!=n-10;){split(a[q],b,"\x3e");m=substr(b[3],0,index(b[3],"\x3c/")-1);gsub("'"$1\",\"$2"'",m);print "\x3ch1\x3e"m"\x3c/h1\x3e"    }}'>"$3";};

Not really here to golf, but here's some Tcl, since the language needs more love:
set holes {
    greenway
    rough
    curry
    spew
    hunt
    bridge
    time
    timber
    slacker
}

proc greenway {c n} {
    puts [string repeat $c $n]
}

proc rough {t s n} {
    set i [string first $s $t] ;# a bit wet
    while {[incr n -1]} {
        incr i [string first $s $t $i]
    }
    return $i
}

proc curry {x y} {
    set n [uplevel 1 $x]
    set body [string repeat "$y;" $n]
    return [list apply [list args $body]]
}

proc spew {p} {
    set w [expr {int(rand()*80)}]
    set h [expr {int(rand()*80)}]
    set f [open $p w]
    for {set y 0} {$y<$h} {incr y} {
        set ln ""
        for {set x 0} {$x<$h} {incr x} {
            append ln [format %c [expr {int(rand()*96+32)}]]
        }
        puts $f $ln
    }
    close $f
}

proc hunt {p c} {
    set f [open $p r]
    set y 0
    while {[gets $f line]>=0} {
        set x [string first $f $c]
        if {$x != -1} {
            return [list $x $y]
        }
        incr y
    }
}

proc bridge {l} {
    set l [lassign $l m]
    set top ""
    set btm $m
    foreach n $l {
        set t "/[expr {$n>$m?"+":""}][expr {$n-$m}]\\"
        append top "[string repeat \  [string length $m]]$t"
        append btm "[string repeat \  [string length $t]]$n"
        set m $n
    }
    # trousers
    return $top\n$btm
}

proc time {p} {
    set f [open $p r]
    while {[gets $f line] >= 0} {
        set line [format %-.5s $line]
        lappend c [split $line {}]
    }
    close $f
    foreach {x y h} {
        -1 -1  0
         0 -1  1
         1 -1  3
         1  0  5
         1  1  6
         0  1  7
        -1  1  9
        -1  0 11
    } {
        set 2x x; incr 2x $x
        set 2y y; incr 2y $y
        if {[lindex $c $2y $2x] != " "} {
            set hh $h
        } elseif {[lindex $c $y $x] != " "} {
            set mm $h
        }
    }
    if {![info exists $mm]} {
        set mm $hh
    }
    set mm [expr {$mm*5}]
    if {$hh == 0} {set hh 12}
    list $hh $mm
}

proc timber {p} {
    set f [open $p r]
    set must {}
    while {[gets $f line] >= 0} {
        set line [format %-.5s $line]
        foreach i $must {
            if {[string index $line $must] eq " "} {
                close $f
                return false
            }
        }
        set must {}
        set i 0
        foreach c [split $line] {
            switch $c {
                "\\" {lappend must [expr {$i+1}]}
                "/"  {lappend must [expr {$i-1}]}
                " "  { }
                default  {lappend $must $i}
            }
            incr i
        }
    }
    close $f
    return true
}

proc slacker {s r p} {
    package require tdom
    set f [open $p w]
    set h [::http::geturl https://news.ycombinator.com/]
    set html [string trim [::http::data $h]]
    ::http::cleanup $h
    set dom [dom parse $html]
    lappend map , [string index $html 0]
    lappend map . [string index $html end]
    set root [$dom documentElement]
    foreach n [$root selectNodes {//td[@class=title]/a}] {
        set x [$n text]
        set x [string map [list $s $r] $x]
        puts $f [string map $map ",h1.$x,/h1."]
    }
    close $f
}

Mostly untested because writing these procs in half an hour is much more interesting than trying to properly engineer golf code.  Enjoy!

Only had time to work on 1/2 of these.  You seem to want them in the form of a function and not a one liner.  So all of these are functions.  Testing code below the function.  In Perl.
Greenway:
sub f{print$_[0]x$_[1]}

#test
&f("abc",5);

Rough:
sub f{$i=-1;$n=$_[2];do{$i=index$_[0],$_[1],$i+1;$n--}while($n>0 && $i>-1);print$i+1}

#test
&f("abcefgacefgabcefgabcefgabcefg","cef",4);

Curry:
use Sub::Curried;
curry f($x,$y){$q=0;foreach(1..&$x){$q=&$y};return $q;}

#test
sub fy { return 1;}
sub fx { return 10;}
print&f(\&fx,\&fy);

Spew:
use Crypt::PRNG qw(random_string_from irand);
sub f{open($o,">$_[0]");$m=(irand)%10+1;map{printf $o "%s\n",random_string_from(['A'..'z'],$m)}(1..$m)}

#test
&f('/tmp/t');

Treasure:
sub f{open($i,"<$_[0]");$x=$y=0;@l=<$i>;while($y<=$#l){$x=1+index$l[$#l-$y],$_[1];@a=($x,$y+1)if($x);$y++;}return\@a}

#test
@b=@{&f('/tmp/t','f')};
print join(",",@b);

I'll work on 6-9 tomorrow.

I’m a cheater & I ain’t played all 9 holes … yet. Nonetheless, here’s my hole 8, “Timber” solution in Perl (149 char).
One of my coworkers put this up as as a challenge at work. We’ve been having fun with it, especially me, since I have the lowest par solution so far!
Our rules were that it had to be a stand alone script that outputted true or false followed by a newline to STDOUT, and that no “shebang” was OK.
Below is the “minified” solution. I also put up a “gist” of the same that includes non-“minified” code & (often tortuously long) explanations of the reasoning behind my approach.

$r=tru;open F,pop;while(<F>){y/0/6/;s/^|\s|$/0/g;s#\\(?=0)|(?<=0)/|[^\\/0]#6#g;@n=split//;for(0..@n){!$n[$_]&&$l[$_]==6?$r=fals:1}@l=@n;}print$r,'e
'

Some indentation is left intact for readability but it was taken out when counting characters. The total is around 1227. Or not, I forgot a problem. 1486 1465 characters.
1. MIPS ASM (55 chars)
#a0 : the address of the null terminated string.
#a1 : the repetition count.
f:
li $v0,4
syscall
addi $a1,$a1,-1
bne $a1,$0,f
jr $ra

2. Scheme (52 chars)
(define (f t s n)(list-ref(string-search-all s t)n))

3. F# (39 chars)
let f x y=fun()->for i in 1..x() do y()

4. Powershell (133 chars)
Function f($p){
$r=(Get-Random)%100
$z="";for($b=$r*$r;$b -gt 0;$b--){$z+=[char](33+(Get-Random)%94);if($b%$r -eq 1){"$z">>$p;$z=""}}
}

5. C++ (184 152 chars)
#include <istream>
#include <string>
int*f(std::string p,char c){int*x=new int[2]();std::ifstream i(p);for(;i>>p;x[1]++)if((x[0]=p.find(c))>0)return x;}

6. C# (291 282 chars)
static void f(List<int> l)
{
    var z = "";
    var o = l[0].ToString();
    for (int j = 1; j < l.Count;j++)
    {
        int p = l[j-1];
        int i = l[j];
        var q = "/"+(i-p<0?"":"+")+(i-p).ToString()+"\\";
        o += new String(' ',q.Length)+i.ToString();
        z+=new String(' ',p.ToString().Length)+q;
    }
    Console.Out.Write(z+"\n"+o);
}

7. Haskell (318 306 chars)
I was looking for an excuse to try out Haskell. I thought I was clever by generating the list of positions via combinations of numbers, but with the number of characters it took I could have hard coded the damn thing. Oh well. The code is atrocious but it was fun to write anyway.
edit: Fixed so it correctly returns minutes.
w i s=[s!!(j!!1)!!(j!!0)/=' '|j<-mapM(const i)[1,2],j/=[2,2]]
k[e,r](i,o,n)|i&&o=[e, n]|i&&not o=[n, r]|not$o||i=[e, r]
g s=let[h,m]=foldl k[0,0](zipWith3(\x y z->(x,y,z))(w[1,2,3]s)(w[0,2,4]s)[11,9,7,12,6,1,3,5])in let u=mod(m*5)60 in if h==0 then[m,u]else[h,u]
f p = do
  s<-readFile p
  return$g$lines s

8. Lua (259 chars)
I was surprised to find that strings didn't support array style indexing, so I had to rely on sub.
function f (p)
    s=' ' g=''
    for l in io.open(p):lines() do l=l..s:rep(#g-#l) for v=1,#g do
        d=({['/']=v-1,['\\']=v+1,[s]=0})[g:sub(v,v)] or -1
        if l:sub(v,v)==s and (d<0 or d>0 and g:sub(d,d)==s and l:sub(d,d)==s) then
            return false
        end
    end g=l end
    return true
end

9. Python (187 chars)
Thanks to grc/Tyroid for the url shortener.
import urllib2
def f(s,r,p):[open(p,'a').write('\074h1\076'+i.split("\074")[0].replace(s,r)+'\074/h1\076') for i in urllib2.urlopen("http://x.co/3WYmQ").read().split("\074title\076")[2:]]

I am too lazy to modify it according to the competition rules
Meh, but it works fine...
from numpy import *
import sys

def greenway(c,n):
    print c*n

def somewhereintherough(t,s,n):
    i=-1
    count=0
    while(count<n):
        i = t.find(s,i+1)
        count+=1
    return i

def curryfordinner(x,y):
    def g():
        for i in range(x()):
            y()
    return g

def spew(p):
    f = open(p,'w')
    n = random.randint(1,28)
    for i in range(n):
        if(i>0):
            f.write('\n')
        str1 = ''.join([chr(random.randint(32,126)) for _ in range(n)])
        f.writelines(str1)
    f.close()
    print "Grid size: ",n,'x',n

def treasurehunt(p,c):
    f = open(p,'r')
    arr = f.readlines()
    n = len(arr)
    f.close()
    f = open(p,'r')
    found=False
    for i in range(n):
        line = f.readline()
        #print line
        loc = line.find(c)
        if(loc!=-1):
            print c,"found in",p,"at",i,loc
            found=True
            break
    if(not found):
        print c,"not in",p
    f.close()

def bridgeontheriverkwai(l):
    str_list = []
    for i in range(len(l)-1):
        sign = '+' if l[i+1]-l[i]>0 else '-'
        str_1 = '/'+sign+str(abs(l[i+1]-l[i]))+'\\'
        sys.stdout.write(' '*(len(str(l[i])))+str_1)
        str_list.append(str_1)
    print
    for i in range(len(l)):
        if i<len(l)-1:
            print str(l[i])+' '*(len(str_list[i])-1),
        else:
            print l[i]

def timeflieswhenyoureplayinggolf(p):
    f = open(p,'r')
    #clock = [[0]*5,[0]*5,[0]*5,[0]*5,[0]*5]
    line1 = f.readline()
    line2 = f.readline()
    line3 = f.readline()
    line4 = f.readline()
    line5 = f.readline()
    h = 0
    m = 0
    if line1.find('\\')!=-1:
        h = 11
        m = 55
    elif line1.find('|')!=-1:
        h = 12
        m = 0
    elif line1.find('/')!=-1:
        h = 1
        m = 5
    elif line5.find('/')!=-1:
        h = 7
        m = 35
    elif line5.find('|')!=-1:
        h = 6
        m = 30
    elif line5.find('\\')!=-1:
        h = 5
        m = 25
    elif line3[4]=='-':
        h = 3
        m = 15
    elif line3[0]=='-':
        h = 9
        m = 45

    if line2[1]=='\\' and h!=11:
        m = 55
    elif line2[3]=='/' and h!=1:
        m = 5
    elif line3[1]=='-' and h!=9:
        m = 45
    elif line3[3]=='-' and h!=3:
        m = 15
    elif line4[1]=='/' and h!=7:
        m = 35
    elif line4[3]=='\\' and h!=5:
        m = 25
    elif line2[2]=='|' and h!=12:
        m = 0
    elif line4[2]=='|' and h!=6:
        m = 30

    print h,m

def timber(p):
    f = open(p,'r')
    linecount=0
    line_size = 0
    line = f.readline()
    while(line):
        linecount+=1
        line_size = max(line_size,len(line)-1)
        line = f.readline()
    block = array([[0]*line_size]*linecount)
    f.seek(0)
    for i in range(linecount):
        line = f.readline()
        for j in range(len(line)-1):
            if(line[j]==' '):
                block[i][j]=0
            elif(line[j]=='/'):
                block[i][j]=1
            elif(line[j]=='\\'):
                block[i][j]=2
            else:
                block[i][j]=3
    f.close()
    for i in range(linecount):
        for j in range(line_size):
            if(block[i][j]==1 and j!=0 and block[i][j-1]==3):
                block[i][j]=4
        for j in range(line_size-1,0,-1):
            if(block[i][j]==2 and j!=line_size-1 and block[i][j+1]==3):
                block[i][j]=4
    for i in range(linecount):
        for j in range(line_size):
            if(block[i][j]==3 and i<linecount-1 and block[i+1][j]==0):
                print "Unsafe Structure"
                return
    print "Safe Structure"

def slackernews(s,r,p):
    import urllib2
    response = urllib2.urlopen('https://news.ycombinator.com')
    html = response.read()
    titles_list = []
    ix = -1
    count = 0
    index_list =  []
    while(count<21):
        ix = html.find("')
        end = line.find('<')
        titles_list.append(line[start+1:end])
    f = open(p,'w')
    for title in titles_list:
        title = title.replace(s,r)
        f.write('
'+title+'
')
    print "Done writing, Check : ",p
    f.close()

greenway('test!',2)
s='this is a cat. this is a dog. dog is an animal, animal is a beast in disguise.'
t='is'
ix=somewhereintherough(s,t,8)
print ix,s[ix:]
def x():
    return 4
def y():
    print ' !y_called! '
g = curryfordinner(x,y)
g()
spew('test.dat')
treasurehunt('test.dat','a')
bridgeontheriverkwai([-7,-22,6,9])
timeflieswhenyoureplayinggolf('clock.dat')
timber('block.dat')
slackernews('a','b','slacker.html')

Another work in progress here, and I'm at work so I'll head back later.
Greenway in Ruby (14 characters, 24 with #alligator), call with f.(c, n)
f=->c,n{p c*n}#alligator

Screenshot

Somewhere in the Rough in CoffeeScript (38 characters)
f=(t,s,n)->t.split(s,n).join(s).length

Screenshot

Curry for Dinner in JavaScript (54 characters)
f=function(x,y){return function(){for(i=x();i--;)y()}}

Screenshot

Spew in PHP (111 characters)
This requires short_open_tag in the PHP configuration file to be enabled. Otherwise the opening delimiter should be <?php, the @ symbols are used to silence PHP_NOTICE errors that are thrown for avoiding enclosing rand in quotes, and for not explicitly declaring the $s variable. This will generate a square grid of ascii characters between 4 and 30 characters on both axis.
<? @$r=rand;$x=$r(4,30);for($i=$x*$x;--$i;){@$s.=$i%$x!=0?chr($r(33,126)):"\n";}file_put_contents($argv[1],$s);

Screenshot

What is that terminal your using?

First code golf!  (Still a work in progress...)
1. Greenway
Language: Python 3.2.3
File size: 23 bytes
Code:
def f(c,n): print(c*n)

3. Curry for Dinner
Language: Python 3.2.3
File size: 64 bytes
Code:
def f(x,y):
    def g():
        for i in [1]*x(): y()
    return g

You will be docked points for using the same language twice, if I understood correctly.  If you are just doing it for fun, no problem.

@user2509848 I don't know 9 golf-able languages, so I'll have to be docked some. :(  Thanks for the heads up, though!

Ruby, Perl, Golfscript, and Mathematica are often winners

I only know C++, with some Java and less Python 3.2.3.  Nothing else but HTML and CSS (which can't be used anyway (CSS)).

1. Greenway (Python 2: 20)
def a(x,n):print x*n

Example input: a("asdf",3) -> string(asdfasdfasdf)
2. Somewhere in the Rough (Python 2: 47)
def b(t,s,n):return len(s.join(t.split(s)[:n]))

Example input: b("1,2,333,4,5,6",",",3) -> int(7)
3. Curry for Dinner (Javascript: 61)
function c(a,b){d=a();return function(){while(d){d--;b()}};};

Example input: function z(){ return 3; }; function y(){ console.log( '1' ) }; myfunc = c(z,y); myfunc(); -> logs string(1) to the console... 3 times.
As per the specs, c returns a function, and doesn't actually execute that function itself.
4. Spew (C++11: 171)
#include<fstream>
using namespace std;void d(string f){ofstream o;int i=rand()%10;int j=rand()%10;o.open(f);for(int x=0;x<i;x++){for(int y=0;y<j;y++){o.put(rand()%256);}}}

Not actually tested this, but should work.


text:
Party all week end for my birthday?
Knowing a given date (11/28/1973), and supposing I will die when I'm 99, what are the years when my birthday will be a thursday so that I will be able to party all week-end?

The question as it stands will get only "print xx" answers, since there is no input on which the output is dependant on.

This adds nothing interesting to existing questions such as this one.

js
var y = 1973 + 99;
while(y-- > 1973) 4!=new Date('11/23/'+y).getDay()||console.log(y);

Something like this:
c#
        var birthdate = new DateTime(1973,11,28);
        for (int i = 0; i <= 99; i++)
        {
            var date = birthdate.AddYears(i);
            if (date.DayOfWeek.Equals(DayOfWeek.Thursday))
            {
                Console.WriteLine(date.Year);
            }
        }

source: Stack Exchange

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

sort: votes


text:
Minify Brainfuck
Your challenge is to minify Brainfuck code, according to these rules:

Remove anything that is not one of +-><[].,.
For any group of consecutive + or - characters, if the amount of +s and -s is the same, remove them.
Do the same as above, but with > and <.
Remove sequences of the +->< characters if they do nothing. For example, you should remove +>-<->+<. (This may be the trickiest and hardest one to implement.) Make sure you don't get any false positives, like +>-<+>-<, which should not be removed.

Test cases:
Input
++++++[->++++++<]>.   prints a $
[-]<                  resets tape
>,[>,]<[.<]           reverses NUL terminated input string
++-->><<              does nothing

Output
++++++[->++++++<]>.[-],[>,]<[.<]

Input
Should disappear: ++>>+<+++<->-->-<<->-<
Should disappear: +++>-<--->+<
Should stay: +++>-<+>---<

Output
+++>-<+>---<

You may accept input and output however you would like - stdin/stdout, a function, etc., but input may not be hardcoded.
This is code-golf, so the shortest code in character count will win.

I know this is an old challenge, but the test cases are inadequate. ++>>++<<-- should output >>++<<, and that wasn't covered. Please add more test cases.

@mbomb007 did you examine the last test case, +++>-<+>---<? It can be shortened to avoid unnecessary pointer movement, but the expected output leaves it unchanged. My understanding based on looking at both the question and the answers is that Doorknob is cool with the spec being taken loosely; we must eliminate any no-op contiguous +->< sequences as explicitly stated, and beyond that it is permissible to do extra minifying as in your example ++>>++<<--, and we can also make rearrangements as long as they don't change the functionality of the code, e.g. >+<+ into +>+<.

@MitchSchwartz "Remove sequences of the +->< characters if they do nothing. For example, you should remove +>-<->+<. (This may be the trickiest and hardest one to implement.) Make sure you don't get any false positives, like +>-<+>-<, which should not be removed." - this is kind of vague

@mbomb007 And the second and third bullet points are redundant and unnecessary because they are included in the fourth bullet point. So what? It's a cool task. My comment was meant to be constructive and provide clarification, not to attack you. Please take it the way I intended, or tell me how I should have said it differently. Because you did not really address what I wrote; it just seems like you're trying to defend yourself without really being constructive. In what way do you find it vague? How would you rewrite it? Do you want to edit the question? Do you want to ask Doorknob?

Oh, so we only have to remove contiguous sequences?

Hmm, that's how I read it in order to fit with the test cases, but now I see that there is a fundamental difference between (1) +++>-<+>---< and (2) ++>>++<<--: the first case requires rearrangement in order to minify it, but the second case doesn't. In other words, the second case has a removable non-contiguous subsequence, but the first case doesn't. I think Doorknob would have to clarify this, because there are two different interpretations that both satisfy all the test cases in the problem statement. (But most answers took liberties with the spec, and were not penalized for it.)

Part of why I inferred contiguous may be that it would immediately exclude minifying +>.<- (on phone, can't input backticks), which seems to fit with what is intended, whereas with non-contiguous you might think that you have to minify that case.

REBEL - 104
_/^_$/$</([^][<>.,+-]|\+-|-\+|<>|><)//((?<X>(<|>))+[+-]+(?!\2)(?<-X><|>)+(?(X)(?!)))([+-]+)/$3$1/.+/$>$&

Usage:
Input: Reads one line from stdin.
Output: Prints one line to stdout.
Anomalies*:

Entering _ causes another line to be read and used, rather than outputting nothing.
The second test outputs ++++>----< instead of +++>-<+>---<. But that's OK, right? ;)
>-<+ etc. are replaced with +>-< etc.

Spoiler:

 Implementing anomaly #3 makes things quite trivial.

* It's not a bug, it's a feature!

"it's not a bug its a feature" +1!

Brainfuck, 579 bytes
,[<<+>>>>+<<[[<+>>+<-]++++++[>-------<-]>-[-[-[-[--------------[--[<+++++[>-----
-<-]>+[--[<<[-]>>-]]<]>[>>-<<<<<[-]<[<]<<<[<]>>>>>>>>[<]<-[+>]+[->+]>>>>+>[<-]<[
>+<-<]>]<]>[<<<[-]-[<]>>>>>>>>>>>[<]<<<<<<[<]<-[+>]+[-<+]<<<+<[>-<<<]>[-<+<]]]<]
>[+>[-<]<[<<]<[-]>>]]<]+>[-[<-]<[>+>+<<-<]<[-]>+>]<<[>-]>[,>]<]<+<[>]>[>>>[<<<<[
-<]<<<]>>>+>>>>[<<<<->>>>[>>>[-<]>>>>]]]>[<<<[<+[-->>]]>[-[.[-]]]>[<]>[<<++++++[
>+++++++<-]>+>>[<<.>>-]<<++>-[<.>-]+++[<+++++>-]+<<<<<<+>[<<[>->>>>>.[[-]<<<<]<<
<+>>>]>[->->>>>[-]]]<[->+[>>>>>]>>[<]<<<<<<<<[[-]<]>[++.[-]>>>>>>>]<]]>>]<[>>>>>
>>]+[-<<<<<[-]<<],]

With formatting and some comments:
,
[
  <<+>> >>+<<
  [
    [<+> >+<-]
    ++++++[>-------<-]
    >-
    [
      not plus
      -
      [
        not comma
        -
        [
          not minus
          -
          [
            not period
            --------------
            [
              not less than
              --
              [
                not greater than
                <+++++[>------<-]>+
                [
                  not open bracket
                  --
                  [
                    not close bracket
                    <<[-]>>-
                  ]
                ]
                <
              ]
              >
              [
                greater than
                >>-<<
                <<<[-]<[<]<<<[<]
                >>>>>>>>[<]
                <-[+>]
                +[->+]
                >>>>+>[<-]
                <[>+<-<]
                >
              ]
              <
            ]
            >
            [
              less than
              <<<[-]-[<]
              >>>> >>>>>>>[<]
              <<<<<<[<]
              <-[+>]
              +[-<+]
              <<<+<[>-<<<]
              >[-<+<]
            ]
          ]
          <
        ]
        >
        [
          minus
          +>[-<]
          <[<<]
          <[-]>>
        ]
      ]
      <
    ]
    +>
    [
      plus
      -[<-]
      <[>+>+<<-<]
      <[-]>+>
    ]
    <<
    [
      comma or period or bracket
      >-
    ]
    >[,>]
    <
  ]
  comma or period or bracket or eof
  <+<
  [
    start and end same cell
    >
  ]
  >
  [
    >>>
    [
      <<<<[-<]<<<
    ]
    >>>+>>>>
    [
      start right of end
      <<<<->>>>
      [>>>[-<]>>>>]
    ]
  ]
  >
  [
    <<<
    [
      <+[-->>]
    ]
    >[-[.[-]]]
    >[<]
    >
    [
      <<++++++[>+++++++<-]>+>>
      [<<.>>-]
      <<++>-[<.>-]
      +++[<+++++>-]
      +<<<<< <+>
      [
        <<
        [
          go left
          >->>>>>.
          [[-]<<<<]
          <<<+>>>
        ]
        >
        [
          toggle left right
          ->->>>>[-]
        ]
      ]
      <
      [
        toggle right left
        ->+[>>>>>]>>[<]
        <<<<<<<<
        [
          [-]<
        ]
        >
        [
          go right
          ++.[-]
          >>>>>>>
        ]
        <
      ]
    ]
    >>
  ]
  <[>>>>>>>]
  +[-<<<<<[-]<<]
  ,
]

This uses the same approach as Keith Randall's solution, minifying all contiguous sequences of +-<> optimally by simulation. For example, +++>-<+>---< becomes ++++>----< and >+<+<<+>+<->>>> becomes +<+>>+>.
Try it online.
(If a simulated cell's absolute value gets close to 256, there will be overflow issues.)
The overall structure is
while not EOF:
  while not EOF and next char not in ",.[]":
    process char
  print minified sequence (followed by the char in ",.[]" if applicable)

The tape is divided into 7-cell nodes; at the beginning of the inner loop, the memory layout is
0 s 0 c 0 a b
where s is a boolean flag for start cell, c is the current character, a is the negative part of the simulated cell value (plus one), and b is the positive part of the simulated cell value.
When the minified sequence is being printed, the memory layout is
d n e 0 0 a b
where d is a boolean flag for direction, a and b are as before (but become one/zero when printed), and n and e are only nonzero for the end node; n is related to how many times the node has been seen, and e is the value of the char that halted the inner loop (plus one).
Originally I considered keeping track of more information per node: leftmost and rightmost node as boolean flags, and node's position in relation to the start and end nodes. But we can avoid that by looking at neighboring cells when needed, and by doing left and right scans in order to find the start node.
When printing the minified sequence and deciding how to move the simulated pointer, we can take a general approach: start by moving away from the end node (in an arbitrary direction if start and end nodes are the same), turn around at leftmost and rightmost nodes, and stop based on the number of times the end node has been seen: 3 times if the start and end nodes are the same, otherwise 2.

Source: brainfuck. Target: brainfuck. +1

This fulfills an indefinite bounty

I'll let this attract some attention and award the bounty in a day or two

@MitchSchwartz Did you happen to test your code against your code? You may actually shorten it! #meta

@WallyWest (That appears to save 7 bytes!) Nevermind, the code in the permalink has linebreaks.

Python, 404 chars
This code does a perfect optimization of all subsequences of +-<>.  A bit more than you asked for, but there you go.
M=lambda n:'+'*n+'-'*-n
def S(b):
 s=p=0;t=[0];G,L='><'
 for c in b:
  if'+'==c:t[p]+=1
  if'-'==c:t[p]-=1
  if G==c:p+=1;t+=[0]
  if L==c:s+=1;t=[0]+t
 if p<s:k=len(t)-1;t,p,s,G,L=t[::-1],k-p,k-s,L,G
 r=[i for i,n in enumerate(t)if n]+[s,p];a,b=min(r),max(r);return(s-a)*L+''.join(M(n)+G for n in t[a:b])+M(t[b])+(b-p)*L
s=b=''
for c in raw_input():
 if c in'[].,':s+=S(b)+c;b=''
 else:b+=c
print s+S(b)

It works by simulating the +-<> operations on the tape t.  s is the starting position on the tape and p is the current position.  After simulation, it figures out the extent [a,b] that needs to be operated on and does all the +/- in one optimal pass.

CoffeeScript - 403 397
i=prompt().replace /[^\]\[,.+-><]/g,''
x=(c)->
 t={};p=n=0
 for d in c
  t[p]?=0;switch d
   when'+'then n=1;t[p]++;when'-'then n=1;t[p]--;when'<'then p--;when'>'then p++
 (n=0if v!=0)for k,v of t;n
s=e=0;((e++;(i=(i.substr 0,s)+i.substr e;e=s=0)if x (i.substr s,e-s).split "")while(i[e]||0)!in['[',']',0];e=++s)while s<=i.length
r=/(\+-|-\+|<>|><|^[<>]$)/g
i=i.replace r,'' while r.test i
alert i

Demo (please forgive the use of bit.ly here, the whole URL would break the markdown)
Uncompressed version (w/ debug code):
console.clear()
input = """Should disappear: ++>>+<+++<->-->-<<->-<
Should disappear: +++>-<--->+<
Should stay: +++>-<+>---<"""

input = input.replace /[^\]\[,.+-><]/g, ''
console.log input

execute = (code) ->
  stack = {}
  item = 0
  console.log code
  nop = false
  for char in code
    switch char
      when '+' then nop = true; stack[item]?=0;stack[item]++
      when '-' then nop = true; stack[item]?=0;stack[item]--
      when '<' then item--
      when '>' then item++
  console.debug stack
  (nop = false if v != 0) for k,v of stack
  nop
start = 0
end = 0

while start <= input.length
 while input.charAt(end) not in [ '[', ']', '' ]
  end++
  if execute (input.substring start, end).split("")
    input = (input.substring 0, start) + input.substring end
    end = start = 0
    console.log input
 end = ++start
input = input.replace /(\+-|-\+|<>|><|^(<|>)$)/g, '' while /(\+-|-\+|<>|><)/.test input
console.log 'Result: ' + input

An alternative way of posting Coffeescript demos is to use JSFiddle. In the left margin there's a "Languages" config pane which lets you use CoffeeScript instead of JS.

@PeterTaylor Thanks, i knew about JSFiddle before, but not that it is able to use CoffeeScript

This fails on >+.-<, producing the empty string instead of leaving it unchanged.

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


text:
Hardy–Ramanujan number generalization
\$1729\$, known as the Hardy–Ramanujan number, is the smallest positive integer that can be expressed as the sum of two cubes of positive integers in two ways (\$12^3+1^3=10^3+9^3=1729\$).  Given an integer \$n\$ (as input in whatever form is natural to your language of choice) find the smallest positive integer that can be expressed as the sum of two positive integers raised to the \$n\$th power in two unique ways.  No use of external sources.  Fewest characters wins.
Note that this is actually an unsolved problem for \$n>4\$.  For those numbers, let your program run forever in search, or die trying!  Make it so that if given infinite time and resources, the program would solve the problem.

You may (?) want to specify "the sum of two positive integers raised to the nth power". Otherwise, 91 (not 1729) is the solution for n=3, since 6^3+(−5)^3=4^3+3^3=91.  I learned this from your Wikipedia link so maybe your H-M reference makes this unnecessary by convention.  Cheers!

actually, 1 is the first solution: 1 = cbrt(0.5)^3 + cbrt(0.5)^3 = ...

Thanks for the suggestions and edit - I meant 2 positive integers!

@JanDvorak, ha, yes. Keeping it Real!

You say "find the smallest positive integer that" ..., as though there is one -- but for any n > 4, the existence of such numbers is an unsolved problem. Maybe you should say "find the smallest positive integer (if there is one) that" ... It's possible that the "answers" are nonterminating loops that find nothing.

Yeah good call - I didn't realize that the problem was unsolved.  I'll add a note.

APL  45  41
{⍺←1⋄2≤+/,⍺=(v∘.≤v)×∘.+⍨⍵*⍨v←⍳⌊⍺*.5:⍺⋄⍵∇⍨⍺+1}

Shorter but slower version of 41 chars:
{⍺←1⋄2≤+/,⍺=(v∘.≤v)×∘.+⍨⍵*⍨v←⍳⍺:⍺⋄⍵∇⍨⍺+1}

You can try it online, just paste the function and invoke it with a number:
      {⍺←1⋄2≤+/,⍺=(v∘.≤v)×∘.+⍨⍵*⍨v←⍳⌊⍺*.5:⍺⋄⍵∇⍨⍺+1} 2
50
      {⍺←1⋄2≤+/,⍺=(v∘.≤v)×∘.+⍨⍵*⍨v←⍳⌊⍺*.5:⍺⋄⍵∇⍨⍺+1} 3
1729

(The algorithm is quite dumb though, don't expect the online interpreter to compute n=4)
The answer for n=2 is 50 = 5² + 5² = 7² + 1² because its a number that "can be expressed as the sum of two squares of positive integers—doesn't say different—in two ways."
If you want to add the distinct clause, just change (v∘.≤v) into (v∘.<v), same number of chars, and n=2 becomes 65:
      {⍺←1⋄2≤+/,⍺=(v∘.<v)×∘.+⍨⍵*⍨v←⍳⌊⍺*.5:⍺⋄⍵∇⍨⍺+1} 2
65

I'm beating GolfScript? Can't be!!

nice!  And I did mean distinct integers, but I didn't specify, so more power to ya!  Back to the drawing board for the GolfScript...

Ruby, 132
n=$*[r=0].to_i;while r+=1
r.times{|a|r.times{|b|next if
a**n+b**n!=r;r.times{|c|r.times{|d|puts(r)if
c**n+d**n==r&&a!=c&&a!=d}}}}end

Pass n as command line argument. First line to stdout is the solution.
Optimized for code-golf, not performance. (Runs correctly. But slow. Does more work than needed.)

Here is a longer, slightly faster C program. Same correct but horrible algorithm. (I really need to study more theory!)
Tested for n=2, n=3.
C, 234
#include<stdio.h>#include<math.h>
r,a,b,c,d;main(n){scanf("%d",&n);while(++r){for(a=0;a<r;++a){for(b=a;b<r;++b){if(pow(a,n)+pow(b,n)!=r)continue;for(c=a+1;c<r;++c){for(d=0;d<r;++d){if(pow(c,n)+pow(d,n)==r&&a!=d)printf("%d\n",r);}}}}}}

The C version takes n on stdin. As above, first line to stdout is the solution.

GolfScript (30 chars)
:N{).,{)N?}%:P{1$\-P?)},,3<}do

Note: this is quite slow, because it does a brute-force search rather than something elegant like a priority queue. The most elegant thing about it is reusing N as a lower bound from which to search: this is valid because 1^N + 2^N > N for all N.
Takes N on the stack, leaves the corresponding taxicab number on the stack. To take N from stdin, prepend ~.
The version above allows x^N + x^N (so for N=2 it gives 50). To require adding distinct numbers (giving 65 instead), change the 3 to 4. To allow 0^N + x^N (giving 25), remove the ) immediately before N?.

GolfScript 53
1\.{;\).,{}@.@\{?}+%.`{\{+}+%~}+%$.`{\{=}+,,4=}+,.!}do)

Input is the initial number on the stack.  The number on top of the stack at the end is the answer.  I'll explain this in more detail when I get a chance.
E.g.
{1\.{;\).,@.@\{?}+%.`{\{+}+%~}+%$.`{\{=}+,,4=}+,.!}do)}:f
2 f -> 25
3 f -> 1729

This is pretty slow right now. It also counts 0 (so that 25 is the answer for n=2, since 25=5^2+0^2=3^2+4^2.  In order to not count 0, add the 2 characters (; after the first ,
1\.{;\).,(;{}@.@\{?}+%.`{\{+}+%~}+%$.`{\{=}+,,4=}+,.!}do)

To find that 2 f=65, since 65=8^2+1^2=5^2+6^2

Mathematica, 58 chars
A very very slow solution using generating function:
0//.i_/;(D[Sum[x^(n^#),{n,1,i}]^2,{x,i}]/.x->0)/i!<4:>i+1&

Jelly, 13 bytes
Œċ*§ċ⁸=2
1ç1#

Try it online!
This is very inefficient for \$n = 3\$ and doesn't complete within 60s. However, this can be fixed for an additional 4 bytes
How it works
Œċ*§ċ⁸=2 - Helper link. Takes an integer i on the left and a power n on the right
Œċ       - Yield all pairs, choosing with replacement
  *      - Raise each to the power n
   §     - Take the sum of each
    ċ⁸   - Count the occurrences of i in this list
      =2 - Is this equal to 2?

1ç1# - Main link. Takes a power n on the left
1    - Set the return value to 1
 ç1# - Return the first positive integer, i,
       where running the helper link with
      i on the left and n on the right is True

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


text:
Creating a quine in as many characters as possible
A code-bowling is not the same as a code-golf, in a Code-Bowling, you should solve the challenge in as many characters as possible. The goal of this Code-Bowling is to create a quine in as many characters as possible, but you still should try to remove redundant characters. For example, don't post a HQ9+ solution with 10,000,000 times the + character, because the code still works if you remove them. Also, don't use variables with a name of 100 characters long, because you could easily rename them to a name of one character.
Because this is a popularity-contest, the highest-voted answer wins. With 'redundant characters', I mean characters that can be removed, but the code will still work after removing them.

So, if you use a language which supports the null quine (an empty file), are all characters redundant?

@boothby: There are no characters, so they can't be redundant. Anyway, you won't win if you post a null quine.

No.  I mean: Python supports a null quine.  Therefore, I believe that any quine written in Python is 100% redundant: you can delete all of its characters and the result is a quine.

@boothby: I don't treat all characters in a language that supports a null quine as redundant characters.

I think that you should specify that all characters should be directly related to the execution of the quine code, so padding with whitespace, comments, useless string data, etc is disallowed.

I think this is much more impressive than the golf version.

@Sammitch: Because there are already some answers, it's not allowed to change the rules because this can make some answers invalid.

Brainfuck:  153,191 bytes
This is probably my largest BF binary. It prints it's own source including the intro text which is the Norwegian fairy tail The three billy goats Gruff (De tre bukkene Bruse). You cannot remove the story without removing the generating code so this Quine is designed to tell a story!
bf (A well known interpreter on Debian based linux distros) has too few cells by default so start it with:
bf -c35724 billy-quine.bf

Since StackExchange has a 30K limit I had to put it somewhere else. Beginning of the file follows:
[
Once upon a time there were three billy goats, names Gruff. They were on their
way to eat on the hillside, but they had to cross a bridge. Under the bridge
lived a troll, with eyes as big as saucers, and a nose as long as a poker.

The first goat over the bridge was the youngest Billy Goat Gruff. "Trip, trap,
trip, trap!" he walked across the bridge.

"Who's that tripping over my bridge?" roared the troll.

"I am the smallest Billy Goat Gruff, and I'm going up to the hillside to make
myself fat," said the billy goat, with a tiny voice.

"I'm coming to gobble you up," said the troll.

"Oh, no! please don't eat me. I'm too little!" said the billy goat. "Wait for
the second Billy Goat Gruff. He's much bigger."

"Well, be off with you," said the troll.

A little while later, the second Billy Goat Gruff crossed the bridge. "Trip,
trap, trip, trap, trip, trap" went the bridge.

"Who's that tripping over my bridge?" roared the troll.

"I am the second Billy Goat Gruff, and I'm going up to the hillside to make
myself fat," said the billy goat, with a medium voice.

"I'm coming to gobble you up," said the troll.

"Oh, no! Don't eat me. Wait for the last Billy Goat Gruff. He's much bigger."

"Very well! Be off with you," said the troll.

Next, the big Billy Goat Gruff crossed the bridge. "Trip, trap, trip, trap,
trip, trap!" went the bridge. This billy goat was heavy and the bridge creaked
and groaned under him.

"Who's that tramping over my bridge?" roared the troll.

"I am the big Billy Goat Gruff ," said the billy goat, with a big ugly voice.

"I 'm coming to gobble you up," roared the troll.

"No, you're not!" said the biggest Billy Goat Gruff. "I am bigger than you and
I could crush you into bits and bones."

"No, you're not!" said the biggest Billy Goat Gruff. "I am bigger than you and
I could crush you into bits and bones."

And when the troll saw how big the billy goat was, the troll let him pass. After
that, the three billy goats went to the hillside. They got so fat they could
hardly walk home. And if the fat hasn't fallen off, they're still fat; and so,

Snip, snap, snout. This tale's told out.
]
->>>>++++>++>++>>++++>++>+++>++>++++>++>++>+++++>+++>++>++++++>++>++++>+>+>+++>+>+>++++>+>+++>+>+>++++>++>++++>++>+++>++>++++>++>++>+++>>++++>+>+>+++>+>+>++++>+>+++>+>+>+++++>+++>+++++>+++>++>++>>++++>++>++>+++>+++++>+>+>>+>+>+>+>>>>+>+>>+>+>+++++>+++++>+>+>+>+>+++++>+++++>+>+>++++>++>++>++>++>++>++>++>++>++>++>++>++>++>++>++>++>>+>+>>+>+>>+>+>>>+>+>>>+>+>+>+++++>+>+>+>>+>+>+++++>+++>>>++>++++>++>++>++>++>++>>+>+>>+>+>+>+++++>+++>++>++++>>+>+>+>++++>++>>+>+++++>+++>++>++++>++>>+>+++++>+++>++++++>+>+>>++>++>++>++++>+>+>+>>++>++++++>++>++>+++++>+++>+++++>+++>>+>++++++>++++++>++++++>++++++>+++++>+>+++++>+++++>+>++++>++>++>>>>>>>>+>>>>>>+>+++++>+++>>>>>>>>>>+>++++>>++>+++++>+++>>++>++>++>++>++++++>+>++++>++>>>>>>>>>>+>+++++>+++>>>>>>+>++++>++++>++>++>+++++>+++++>+++>>>+>+++++>++++>>++>+++++>+++>+++>>++++>+++++>+++>++++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>>+>++++++>>>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>>+>++++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>+>++++++>>>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>+>++++++>+++++>++++++>>>>>>>++++++>+++++>+++++>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>+++++>+++++>+++++>++++++>+++++>+++++>+++++>+++++>+++++>++++++>>>>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>>+>++++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>>+>++++++>>>>>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>+>++++++>>>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>>>>>>>>>>>>++++++>>++>++++>+>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>+>++++++>>>>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>>+>++++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>>+>++++++>>>>>>>>>>>++++++>>++++++>++>++++>+>>>>>>++>+++++>+++>>>>>+>++++++>>>>++>++++>+>>>>>>>>++>+++++>+++>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>>>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>+>++++++>+++++>++++++>>>>>>>++++++>>++++++>+++++>+++++>+++++>+++++>+++++>++++++>>>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>+++++>+++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>+>++++++>+++++>++>++++>+>>>>>++>+++++>+++>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>+++++>+++++>+++++>+++++>+++++>++++++>>>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>+++++>+++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>+>++++++>>>>>>>>++++++>+++++>+++++>+++++>+++++>+++++>++++++>>>++>++++>+>>>>>>++>+++++>+++>>>>>>+>++++++>>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>+>++++++>++++++>>>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>+>++++++>+++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>++++++>>>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>>>>>>>>>>>>>>++++++>>++>++++>+>>>>>>>>>++>+++++>+++>>>>>>>>>+>++++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>+>++++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>+>++++++>+++++>++>++++>+>>>>>>++>+++++>+++>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>++++++>+++++>+++++>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>+>++++++>++++++>>>>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>>++++++>>>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>>+>++++++>>>>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>>>>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>+>++++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>>+>++++++>++>++++>+>>>>>>++>+++++>+++>>>>>+>++++++>+++++>+++++>+++++>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>>>>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>+>++++++>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>+++++>+++++>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>>+>++++++>>>>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>>+>++++++>>>>>>>>>>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>++++++>>>>>>>>>>>>++++++>+++++>+++++>+++++>+++++>+++++>++++++>+++++>+++++>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>+>++++++>+++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>>+>++++++>>>>>>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>+>++++++>>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>++++++>>>++>++++>+>>>>>++>+++++>+++>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>+>++++++>+++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>>+>++++++>+++++>++>++++>+>>>>>>++>+++++>+++>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>++++++>+++++>+++++>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>+>++++++>>>>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>+>++++++>+++++>+++++>+++++>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>>>>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>>+>++++++>>>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>+>++++++>+++++>+++++>+++++>++++++>>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>>>>++>++++>+>>>>>>>>++>+++++>+++>>>>>>>+>++++++>>>>++>++++>+>>>>>>>++>+++++>+++>>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>+++++>+++++>++++++>>>>>>>>++++++>++>++++>+>>>>>>>>>>++>+++++>+++>>>>>>>>>+>++++++>+++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>+>++++++>+++++>++++++>>>>>>>>>>>>++++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>+>++++++>+++++>+++++>+++++>++>++++>+>>>>>>>>>>>++>+++++>+++>>>>>>>>>>+>++++++>>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>>+>++++++>>>>>>>>>>>>>>++++++>>>>>>>>>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>>++>++++>+>>>>>++>+++++>+++>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>>>>>++>++++>+>>>>>>>>>>>++>+++++>+++>>>>>>>>>>+>++++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>+>++++++>+++++>+++++>+++++>+++++>++>++++>+>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++>+++++>+++>>>>>>>>>+>++++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>+++++>++++++>+++++....

Looks great, but which interpreter do you use? I used an online interpreter and I got a sequence of unicode characters.

@ProgramFOX Any BF that has at least 35724 cells work. I use bf in my answer, but I also got this online interpreter to work, but it's a tad slow.

Yes, that works! I'll accept your answer because I don't think someone will post a larger code, but if someone does, then I'll change my accept vote.

Java 2286+
This can be expanded easily by including lowercase class names and then moving on to unicode characters. I do believe that there are no redundant characters. However, you could replace characters to simplify this (If this is allowed, then no solution here will win because you could simply replace every character and get the shortest quine for the language). This is a true quine, with no sort of reading code.
Redundant characters removed version:
class Z{String s(){char q=34;String t="class Z{String s(){char q=34;String t=;t=t.substring(0,38)+q+t+q+t.substring(38);return t;}}class Y{String s(){return new Z().s();}}class X{String s(){return new Y().s();}}class W{String s(){return new X().s();}}class V{String s(){return new W().s();}}class U{String s(){return new V().s();}}class T{String s(){return new U().s();}}class S{String s(){return new T().s();}}class R{String s(){return new S().s();}}class P{String s(){return new R().s();}}class O{String s(){return new P().s();}}class N{String s(){return new O().s();}}class M{String s(){return new N().s();}}class L{String s(){return new M().s();}}class K{String s(){return new L().s();}}class J{String s(){return new K().s();}}class I{String s(){return new J().s();}}class H{String s(){return new I().s();}}class G{String s(){return new H().s();}}class F{String s(){return new G().s();}}class E{String s(){return new F().s();}}class D{String s(){return new E().s();}}class C{String s(){return new D().s();}}class B{String s(){return new C().s();}}class A{public String toString(){return new B().s();}}public class Q{public static void main(String...a){System.out.print(new A());}}";t=t.substring(0,38)+q+t+q+t.substring(38);return t;}}class Y{String s(){return new Z().s();}}class X{String s(){return new Y().s();}}class W{String s(){return new X().s();}}class V{String s(){return new W().s();}}class U{String s(){return new V().s();}}class T{String s(){return new U().s();}}class S{String s(){return new T().s();}}class R{String s(){return new S().s();}}class P{String s(){return new R().s();}}class O{String s(){return new P().s();}}class N{String s(){return new O().s();}}class M{String s(){return new N().s();}}class L{String s(){return new M().s();}}class K{String s(){return new L().s();}}class J{String s(){return new K().s();}}class I{String s(){return new J().s();}}class H{String s(){return new I().s();}}class G{String s(){return new H().s();}}class F{String s(){return new G().s();}}class E{String s(){return new F().s();}}class D{String s(){return new E().s();}}class C{String s(){return new D().s();}}class B{String s(){return new C().s();}}class A{public String toString(){return new B().s();}}public class Q{public static void main(String...a){System.out.print(new A());}}

Readable version:
class Z{

    String s(){
        char q=34;
        String t="class Z{String s(){char q=34;String "
                + "t=;t=t.substring(0,38)+q+t+q+t.substring(38);"
                + "return t;}}class Y{String s(){return new Z().s();"
                + "}}class X{String s(){return new Y().s();}}"
                + "class W{String s(){return new X().s();}}"
                + "class V{String s(){return new W().s();}}"
                + "class U{String s(){return new V().s();}}"
                + "class T{String s(){return new U().s();}}"
                + "class S{String s(){return new T().s();}}"
                + "class R{String s(){return new S().s();}}"
                + "class P{String s(){return new R().s();}}"
                + "class O{String s(){return new P().s();}}"
                + "class N{String s(){return new O().s();}}"
                + "class M{String s(){return new N().s();}}"
                + "class L{String s(){return new M().s();}}"
                + "class K{String s(){return new L().s();}}"
                + "class J{String s(){return new K().s();}}"
                + "class I{String s(){return new J().s();}}"
                + "class H{String s(){return new I().s();}}"
                + "class G{String s(){return new H().s();}}"
                + "class F{String s(){return new G().s();}}"
                + "class E{String s(){return new F().s();}}"
                + "class D{String s(){return new E().s();}}"
                + "class C{String s(){return new D().s();}}"
                + "class B{String s(){return new C().s();}}"
                + "class A{public String toString(){return new B().s();}}"
                + "public class Q{public static void main(String...a){System.out.print(new A());}}";
        t=t.substring(0,38)+q+t+q+t.substring(38);
        return t;
    }
}
class Y{

    String s(){
        return new Z().s();
    }
}
class X{

    String s(){
        return new Y().s();
    }
}
class W{

    String s(){
        return new X().s();
    }
}
class V{

    String s(){
        return new W().s();
    }
}class U{

    String s(){
        return new V().s();
    }
}
class T{

    String s(){
        return new U().s();
    }
}
class S{

    String s(){
        return new T().s();
    }
}
class R{

    String s(){
        return new S().s();
    }
}
class P{

    String s(){
        return new R().s();
    }
}
class O{

    String s(){
        return new P().s();
    }
}
class N{

    String s(){
        return new O().s();
    }
}
class M{

    String s(){
        return new N().s();
    }
}
class L{

    String s(){
        return new M().s();
    }
}
class K{

    String s(){
        return new L().s();
    }
}
class J{

    String s(){
        return new K().s();
    }
}
class I{

    String s(){
        return new J().s();
    }
}
class H{

    String s(){
        return new I().s();
    }
}
class G{

    String s(){
        return new H().s();
    }
}
class F{

    String s(){
        return new G().s();
    }
}
class E{

    String s(){
        return new F().s();
    }
}
class D{

    String s(){
        return new E().s();
    }
}
class C{

    String s(){
        return new D().s();
    }
}
class B{
    String s(){
        return new C().s();
    }
}
class A{
    public String toString(){
        return new B().s();
    }
}
public class Q{
    public static void main(String...a){
        System.out.print(new A());
    }
}

Python 2, jiggabytes.
Here's a small variant.  I'd use some dataset like all the phone conversations in the world over the last 6 months, but some jackass can't figure out power to the building.  Oh, and they haven't responded to my FOIA* request.
s='Another one got caught today, it\'s all over the papers. "Teenager Arrested in Computer Crime Scandal", "Hacker Arrested after Bank Tampering"...\n\nDamn kids. They\'re all alike.\n\nBut did you, in your three-piece psychology and 1950\'s technobrain, ever take a look behind the eyes of the hacker? Did you ever wonder what made him tick, what forces shaped him, what may have molded him?\n\nI am a hacker, enter my world...\n\nMine is a world that begins with school... I\'m smarter than most of the other kids, this crap they teach us bores me...\n\nDamn underachiever. They\'re all alike.\n\nI\'m in junior high or high school. I\'ve listened to teachers explain for the fifteenth time how to reduce a fraction. I understand it. "No, Ms. Smith, I didn\'t show my work. I did it in my head..."\n\nDamn kid. Probably copied it. They\'re all alike.\n\nI made a discovery today. I found a computer. Wait a second, this is cool. It does what I want it to. If it makes a mistake, it\'s because I screwed it up. Not because it doesn\'t like me... Or feels threatened by me.. Or thinks I\'m a smart ass.. Or doesn\'t like teaching and shouldn\'t be here...\n\nDamn kid. All he does is play games. They\'re all alike.\n\nAnd then it happened... a door opened to a world... rushing through the phone line like heroin through an addict\'s veins, an electronic pulse is sent out, a refuge from the day-to-day incompetencies is sought... a board is found. "This is it... this is where I belong..." I know everyone here... even if I\'ve never met them, never talked to them, may never hear from them again... I know you all...\n\nDamn kid. Tying up the phone line again. They\'re all alike...\n\nYou bet your ass we\'re all alike... we\'ve been spoon-fed baby food at school when we hungered for steak... the bits of meat that you did let slip through were pre-chewed and tasteless. We\'ve been dominated by sadists, or ignored by the apathetic. The few that had something to teach found us willing pupils, but those few are like drops of water in the desert.\n\nThis is our world now... the world of the electron and the switch, the beauty of the baud. We make use of a service already existing without paying for what could be dirt-cheap if it wasn\'t run by profiteering gluttons, and you call us criminals. We explore... and you call us criminals. We seek after knowledge... and you call us criminals. We exist without skin color, without nationality, without religious bias... and you call us criminals. You build atomic bombs, you wage wars, you murder, cheat, and lie to us and try to make us believe it\'s for our own good, yet we\'re the criminals.\n\nYes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive me for.\n\nI am a hacker, and this is my manifesto. You may stop this individual, but you can\'t stop us all... after all, we\'re all alike.\n;from hashlib import*;h=new("sha512");h.update(`s`);h=h.digest().encode("base64");print(%r==h)*(\'s=\'+`s`+s[2952:]%%h)';from hashlib import*;h=new("sha512");h.update(`s`);h=h.digest().encode("base64");print('25eLAyYiA1nZPZQ6u0QwdIcPdypqedXDgGtwY1E7R1cYo6amjKxOl18rmmyGBMHyzW7tQPjYziOk\nXNQd+Egpeg==\n'==h)*('s='+`s`+s[2952:]%h)

How it works
The quine starts by defining a string s which contains a payload followed by the quine code.  You'd like to delete that junk to golf the quine.  But you can't, because the quine contains a cryptographically strong hash of s.  If the hash of s doesn't match that in the quine, it doesn't print.
Initially, I'd used this article for the payload but a government conspiracy**  prevented me from pasting in the 34k program.  The choice of article was not random: the NSA may know how to delete characters from this quine to preserve the hash.  So, I used the Hacker Manifesto.  Not that I'm actually that kind of hacker... but it seemed appropriate to draw an analogy.
To really beef up security, I even included the length of the hashed string.  As everybody knows, this makes hashes like a million million times more secure.  But this is even better than that, because you'd have to delete some subset of the length if you've deleted some of the hashed text.
Here's the prequine.
s=open("anyfile").read()
t=""";from hashlib import*;h=new("sha512");h.update(`s`);h=h.digest().encode("base64");print(%%r==h)*('s='+`s`+s[%d:]%%%%h)"""%len(s)
from hashlib import*
h=new('sha512')
h.update(`s+t`)
h=h.digest().encode('base64')
print"s="+`s+t`+t%h

*BTLT+JTWAQFZC3zIr29pQO6BbKSz6lNS7vqbyrLj8osjiphxgkgr9GsySFBMp0ZCor8aTVc94Xdji4KaSX543Q==
** Or, y'know, because it was over the site size limit for a post.

Looks great, but it gives a syntax error.

@ProgramFOX I don't... perhaps it's a copy&paste issue?  Maybe you should try the prequine.

Again a syntax error. I'm using Python 3.3 on Windows.

@ProgramFOX ah, that'd be the print statement.  Use a python 2 later than 2.5.

Ruby, 2242 (I could have made it as long as I want)
require 'open-uri'
puts open('http://pastebin.com/raw.php?i=pQRy8Mn8').read
#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Learn to forbid network access ;-)

Wouldn't With 'redundant characters', I mean characters that can be removed, but the code will still work after removing them. apply to comments?

@Kyle None of the characters are redundant. If you remove the comments, it doesn't work.

Perhaps it is because I don't use Ruby, but I get #<StringIO:0x7ff7d2181bf0> (or other address) as output in both my IDE and terminal. What is supposed to occur?

@Kyle Oops, sorry,I didn't actually test it (since I'm answering from my phone right now) fixed (and updated pastebin)

Interesting solution, but it is not a true quine (It reads its own source code, well a copy of it anyways). +1

seems tha tyou like to find loopholes :)

Fortran - 1359
 program quine
    character(len=48)::l(16),n
    integer::i,j,k
    data l/&
       'program quine                                   ',&
       '   character(len=48)::l(16),n                   ',&
       '   integer::i,j,k                               ',&
       '   data l/&                                     ',&
       '   do i=1,4;print*,l(i);enddo                   ',&
       '   do i=1,15                                    ',&
       '      n=l(i);j=index(n,'''''''');k=0            ',&
       '      do while(j/=0)                            ',&
       '         n=n(:k+j-1)//''''''''//n(k+j:47)       ',&
       '         k=k+j+1;j=index(n(k+1:),'''''''')      ',&
       '      enddo                                     ',&
       '      print*,''      '''''',n,'''''',&''        ',&
       '   enddo                                        ',&
       '   print*,''      '''''',l(16),''''''/''        ',&
       '   do i=5,16;print*,l(i);enddo                  ',&
       'end program quine                               '/
    do i=1,4;print*,l(i);enddo
    do i=1,15
       n=l(i);j=index(n,'''');k=0
       do while(j/=0)
          n=n(:k+j-1)//''''//n(k+j:47)
          k=k+j+1;j=index(n(k+1:),'''')
       enddo
       print*,'      ''',n,''',&'
    enddo
    print*,'      ''',l(16),'''/'
    do i=5,16;print*,l(i);enddo
 end program quine

I might try bloating this some, but I don't think I can do that. Note that this is an adapted version of this code to satisfy the non-redundancy.

Python - infinity
print(r"print(r"print(r"print ...

And so on and so forth...

Isn't this just a syntax error? Even if it works, aren't most of those prints redundant (contrary to the requirements in the specs: remove redundant characters).

Pascal
source code 2479 bytes, so code is about 2300 char, too lazy to count :)
program as;
var
  st : array[1..18] of string;
  i,j : integer;
begin
  st[1] := #112+#114+#111+#103+#114+#97+#109+#32+#97+#115+#59;
  st[2] := #118+#97+#114;
  st[3] := #32+#32+#115+#116+#32+#58+#32+#97+#114+#114+#97+#121+#91+#49+#46+#46+#49+#56+#93+#32+#111+#102+#32+#115+#116+#114+#105+#110+#103+#59;
  st[4] := #32+#32+#105+#44+#106+#32+#58+#32+#105+#110+#116+#101+#103+#101+#114+#59;
  st[5] := #98+#101+#103+#105+#110;
  st[6] := #32+#32+#102+#111+#114+#32+#105+#32+#58+#61+#32+#49+#32+#116+#111+#32+#53+#32+#100+#111;
  st[7] := #32+#32+#32+#32+#119+#114+#105+#116+#101+#108+#110+#40+#115+#116+#91+#105+#93+#41+#59;
  st[8] := #32+#32+#102+#111+#114+#32+#105+#32+#58+#61+#32+#49+#32+#116+#111+#32+#49+#56+#32+#100+#111+#32+#98+#101+#103+#105+#110;
  st[9] := #32+#32+#32+#32+#119+#114+#105+#116+#101+#40+#39+#32+#32+#115+#116+#91+#39+#44+#32+#105+#44+#32+#39+#93+#32+#58+#61+#32+#39+#41+#59;
  st[10] := #32+#32+#32+#32+#102+#111+#114+#32+#106+#32+#58+#61+#32+#49+#32+#116+#111+#32+#108+#101+#110+#103+#116+#104+#40+#115+#116+#91+#105+#93+#41+#32+#100+#111;
  st[11] := #32+#32+#32+#32+#32+#32+#105+#102+#32+#106+#32+#60+#62+#32+#108+#101+#110+#103+#116+#104+#40+#115+#116+#91+#105+#93+#41+#32+#116+#104+#101+#110+#32+#119+#114+#105+#116+#101+#40+#39+#35+#39+#44+#32+#111+#114+#100+#40+#115+#116+#91+#105+#93+#32+#91+#106+#93+#41+#44+#32+#39+#43+#39+#41;
  st[12] := #32+#32+#32+#32+#32+#32+#101+#108+#115+#101+#32+#119+#114+#105+#116#101+#108+#110+#40+#39+#35+#39+#44+#32+#111+#114+#100+#40+#115+#116+#91+#105+#93+#32+#91+#106+#93+#41+#44+#32+#39+#59+#39+#41+#59;
  st[13] := #32+#32+#101+#110+#100+#59;
  st[14] := #32+#32+#102+#111+#114+#32+#105+#32+#58+#61+#32+#54+#32+#116+#111+#32+#49+#56+#32+#100+#111+#32+#98+#101+#103+#105+#110;
  st[15] := #32+#32+#32+#32+#105+#102+#32+#105+#32+#60+#62+#32+#49+#56+#32+#116+#104+#101+#110+#32+#119+#114+#105+#116+#101+#108+#110+#40+#115+#116+#91+#105+#93+#41;
  st[16] := #32+#32+#32+#32+#101+#108+#115+#101+#32+#119+#114+#105+#116+#101+#108+#110+#40+#39+#101+#110+#100+#46+#39+#41+#59;
  st[17] := #32+#32+#101+#110+#100+#59;
  st[18] := #101+#110+#100;
  for i := 1 to 5 do
    writeln(st[i]);
  for i := 1 to 18 do begin
    write('  st[', i, '] := ');
    for j := 1 to length(st[i]) do
      if j <> length(st[i]) then write('#', ord(st[i] [j]), '+')
      else writeln('#', ord(st[i] [j]), ';');
  end;
  for i := 6 to 18 do begin
    if i <> 18 then writeln(st[i])
    else writeln('end.');
  end;
end.

[off topic] Why did you just delete your most recent post? (I voted to undelete it)

I missed some important stuff while writing task

Then you should have used the question sandbox first...