text:
Compact a Befunge program
Befunge is a 2-dimensional esoteric programming language. The basic idea is that (one-character) commands are placed on a 2-dimensional grid. Control flow walks across the grid, executing commands it passes over, and changing direction when it hits an arrow (>^<v). Commands are stack-based; see this list. See also http://esolangs.org/wiki/Befunge.
The specification for Befunge-98 is available.
Problem
Write a program that transforms a Befunge program into a more compact representation. For example, the following program prints 0:
>   0   v

>   @   .

^       <

In this case, it could be compacted without changing the program's behavior by removing rows of spaces, to give
>0v
>@.
^ <

More sophisticated transformations could rotate or mirror sequences of commands and eliminate unnecessary control-flow commands in order to compact the program. For example, with this program:
>12345v
      6
v....7<
.
.
.
@

you might tuck the end of the program into the hole:
>12345v
>...@ 6
^....7<

For the first example, the most compact program possible is
>0.@

You may use any transformations as long as the output program gives the same result.
Input programs
Input programs are valid Befunge-98 programs.
You may assume that the input program is deterministic. That is, it does not use commands that read external state: the user input commands & and ~, the randomizer ?, and the self-modifying code commands p and g.
You may assume the input program terminates.
Scoring
This is not a code golf, but a problem to write a program that performs code golfing.
The input is a set of test cases (Befunge programs that satisfy the input restrictions above). The total score is the sum of the scores for the test cases.
Score for each test case
The score is the area of the convex hull of the non-empty cells in the output program, where each cell is treated as a square whose four corners are lattice points in the Cartesian plane. For example, a program of
>   v
 @  <

gets a score of 9.5.
If your program does not terminate in a reasonable amount of time and memory on a particular input, the score is that of the input program. (This is because you could trivially add a time-limiting wrapper that outputs the input program unchanged if your program doesn't terminate in time.)
If the test-case program has a different result (or fails to terminate) after processing with your program, the score is the score of the input program plus a penalty of 100 points.

What's to prevent running the program to completion and writing a Befunge program that prints the same output?

Are "get" and "put" allowed?  If you allow "put" (self-modifying code), it will be hard to do anything.

Where does the execution begin from? Top left corner? If so, can you explain the output of the 2nd example? . means output integer, but if you start from the top left, then there is not integer in the stack to output.

@elssar yes, . outputs an integer. But also, when there isn't enough parameters on the stack, befunge pretends there is a sufficient amount of zeroes there instead. So the second example would output 000.

@KeithRandall: Writing a new program with the same output works only for programs with a short output. g and p are not allowed (sorry, forgot about those; edited).

@elssar: That was a typo; I meant the arrow to go to the right. Daniero explained correctly what was written.

@Mechanicalsnail oh, okay. Also, please edit the question and correct the typo

@elssar: Fixed. I thought I had fixed it a while ago, but apparently not.

is = (eval) to be allowed? It's hard to do any stack optimisations in presence of this instruction. () (load/unload semantics) is also problematic in this sense. Should we treat them as black boxes that don't overwrite the code?

also, the jump instruction (pop a number and jump that many instructions) is truly lethal to any optimisation

@JanDvorak: I did Befunge 93 - gp?&~.  You're crazy to try Befunge 98 (nastiness abounds in many instructions, including =jk{}()).

@KeithRandall supporting jk() is easy: any time I encounter one of ()=gijopsxy, I run away in terror. I will probably treat {}k as stack-blackboxes, which taint ("mess with horriby") the stack, but can still be layouted. ()=gijopsxy break layouting. I might add support for jkx with a constant argument, however, and y really only taints the stack, not layouting. My code is far from done, however

I spent a long plane ride coding this one up.  I've written a pseudo befunge compiler which runs the befunge program, extracts basic blocks, and lays them out in a compact representation.
Link to the program.
When run on this 99 bottles program:
92+9*                           :. v  <
>v"bottles of beer on the wall"+910<
,:
^_ $                             :.v
            >v"bottles of beer"+910<
            ,:
            ^_ $                     v
>v"Take one down, pass it around"+910<
,:
^_ $                           1-v
                                 :
        >v"bottles of beer"+910.:_          v
        ,:
        ^_ $                          ^
                    >v" no more beer..."+910<
                    ,:
                    ^_ $$ @

It generates the following output:
92+9*:.019+"llaw eht no "v
v  _v# :"bottles of beer"<
>    ,:    v
^  _v#     <
    >$:.019+"reeb f"v
 v _  v#:"bottles o"<
 >     ,:  v
 ^ _  v#   <
      >$019+"dnuo"v
     v"pass it ar"<
     >" ,nwod eno"v
 v _    v#:"Take "<
 >       ,:v
 ^ _    v# <
        >$1-:v
 v _      v# <
 >         :.019+"reeb "v
  v_  v#   :"bottles of"<
  >        ,v
  ^_  v#   :<
      >    $019+"llaw"v
           v" on the "<
           >"reeb fo "v
^  _^#      :"bottles"<
          >019+"...r"v
v  _v#:" no more bee"<
>    ,:    v
^  _v#     <
    >$$@

It actually isn't much more compact than the source, but it will probably do better on larger/sparser programs.
The program is laid out with a routing area on the left and basic block contents on the right.  A basic block is usually laid out in an even number of rows so the entrance and exit adjoin the routing area.  At the end of each basic block, the gadget #^_v and variants, laid out right-to-left, do the conditional branch and route flow into columns.  At the start of each basic block, these columns are routed into the rows for the destination basic block.
In addition, if the output is short it just generates the output explicitly, like this:
"output">:#,_@

I haven't done anything to optimize the basic blocks themselves, just the layout.  Todo.
So where are the tests?

the source code link seems to be 500 right now. Server misconfiguration?

@JanDvorak: indeed.  Fixed.

Sed, 5 chars
So, even if this is not codegolf, here's a solution that will have a rather good codelength to score ratio, but not necessarily a good score.
/^$/d

It simply removes blank lines.

Your code is not correct! You can not simply remove blank lines. I can not write a 2d code in comment. But consider a case that direction is toward down, and a constant string is started ("). Every blank line in the way should be treated as a space character. If we print out that string, the code you generated does not have that spaces in output!

Look at the code in http://ideone.com/BdcRcf It should print b a. But after your shortening, it will print ba.


text:
Shortest program that throws StackOverflow Error
Write a program that throws a StackOverflow Error or the equivalent in the language used. For example, in java, the program should throw java.lang.StackOverflowError.
You are not allowed to define a function that calls itself or a new class(except the one containing main in java). It should use the classes of the selected programming language.
And it should not throw the error explicitly.

I don't understand "use the classes of the selected programming language"

Is it ok to define a function that calls inner function like this def s{def t=s;t} ?

In most languages, classes are only a special kind of data structure, not the center of the universe. Many don't even have such a thing.

The funny thing here is that languages that require tail recursion elimination (and implementations that support it when the languages does not require it)---which are in a very real sense better---are at a disadvantage on this. TwiNight's answer links to the version of this that exists on Stack Overflow from the early days.

@PrinceJohnWesley, I wanted to say to use the structures/functions of the programming language, not to define something new; to avoid answers like define a function which calls itself.

I wonder if certain Math Errors in calculators could be called stackoverflows, if so then 99! would be a very short one on my casio

Does a compile-time overflow violate the rules at all?

From the java doc: Thrown when a stack overflow occurs because an application recurses too deeply. http://docs.oracle.com/javase/6/docs/api/java/lang/StackOverflowError.html

Is this even possible in JS?

Befunge, 1
I don't know Befunge, but...
1

from Stack overflow code golf

Explanation: 1 is a numeric literal that gets pushed to the stack when encountered. In Befunge, control flow wraps around until it encounters an @ to end the program.

I didn't know there was this question on StackOverflow. I searched only on this site before posting.

I'm mildly flattered to see my answer here.

This works in ><> too.

Python (2.7.3), 35 characters
import sys
sys.setrecursionlimit(1)

This operation itself succeeds, but both script and interactive will immediately throw RuntimeError: 'maximum recursion depth exceeded' afterward as a consequence.
Inspired by elssar's answer.

I thought about putting that up as my solution instead, but wasn't sure if the error could be considered a stack overflow. Though, essentially, that is what it is, right?

@elssar: I guess there are two ways to overflow the stack: make the used part of the stack larger, or make the unused part of the stack smaller. If you imagine a bucket filling with water, you can overflow it by adding more water, but you can also overflow it by shrinking the bucket.

Coq
Compute 70000.

70000 is just syntactic sugar for S (S ( ... (S O) ...)) with 70000 S's. I think it's the type checker that causes the stack overflow.
Here's a warning that is printed before the command is executed:
Warning: Stack overflow or segmentation fault happens when working with large
numbers in nat (observed threshold may vary from 5000 to 70000 depending on
your system limits and on the command executed).

That might let you think Coq is an incredibly dumb language... funny...

@leftaroundabout Actually not. The Nat type is a type level peano numeral that must act as if it is a linked list.

@FUZxxl: my comment was not not meant ironically at all. Decide for yourself if you want to include classical logic into that sentence, or prefer to stay constructive...

@leftaroundabout Oops... sorry. I forgot that the markdown parser always eats those nice <irony>-tags.

Javascript 24 characters
Browser dependent answer (must have access to apply):
eval.apply(0,Array(999999))

eval was the shortest global function name that I could find (anyone know of one that is shorter?)
apply allows us to convert an array into function parameters, the first parameter being the context of the function (this)
Array(999999) will create an array with the listed length. Not sure what the maximum number of arguments is, but it's less than this, and more than 99999

IE9:
SCRIPT28: Out of stack space
SCRIPT2343: Stack overflow at line: 20

Chrome 24:
Uncaught RangeError: Maximum call stack size exceeded

FireFox 18
RangeError: arguments array passed to Function.prototype.apply is too large

Note — Due to the single threaded nature of javascript, infinite loops end up locking the UI and never throwing an exception.
while(1);
for(;;);

Neither of these qualify.
Update — this shaves off three characters:
eval.apply(0,Array(1e7))

MDN says that eval is the shortest.

eval.apply(0,Array(1e6)) saves 3 chars, you can even go with 9e9 at no cost

apply is a standard ECMAScript feature. There is nothing browser dependent. Unless you are talking about really old browsers, but this wouldn't work in hypothetical Netscape 2 with apply anyway, because Array class doesn't exist in Netscape 2.

new shortest in ES6: eval(...Array(9e9))

Probably non-standard, throws in Chrome from the console. dir.apply(0,Array(1e7));

Java - 35
class S{static{new S();}{new S();}}

Didn't OP say no new classes? I don't see a public static void main in there. Or am I just failing to understand Java?

@B1KMusic There are no new classes, there's only one class (S). The code uses a static initializer, it throws the SO before the jvm figures out there's no main method. Works with java 6.

I understand the static block. But what is the next block ?

@NicolasBarbulesco That's an initializer block, it's executed when you construct a new instance.

Java8 & Eclipse: trying to run this program, no Exception is thrown, sorry...

@LuigiCortese I think it only works with java 6 or older

Python 2.7 (12 chars)
exec('{'*99)

results in a «s_push: parser stack overflow»

I get SyntaxError: unexpected EOF while parsing

With exec('{'*101) I get MemoryError

In Python2, exec is a statement, so you can just use exec'{'*999 (99 doesn't seem to be enough)

You need at least 100 to trigger a MemoryError. And that ≠ stack overflow

Mathematica, 4 chars
x=2x

$RecursionLimit::reclim: Recursion depth of 1024 exceeded. >>

"You may not define function that calls itself"

That isn't a function, it's a variable (unless it isn't at all what it looks like).

You took my idea.

Clojure, 12 chars
(#(%%)#(%%))

Running in the repl:
user=> (#(%%)#(%%))
StackOverflowError   user/eval404/fn--407 (NO_SOURCE_FILE:1)

This reminds me of the lambda calculus expression (\x.xx)(\x.xx), but I don't know clojure well enough to tell for sure if this is what's happening. I also don't see why the aforementioned expression would result in a stack overflow, so maybe you're doing some trickery with the Y-combinator? This answer interests me and an explanation would be nice.

Java - 113 chars
I think this stays within the spirit of the "no self-calling methods" rule. It doesn't do it explicitly, and it even goes through a Java language construct.
public class S {
    public String toString() {
        return ""+this;
    }
    public static void main(String[] a) {
        new S().toString();
    }
}

Condensed Version:
public class S{public String toString(){return ""+this;}public static void main(String[] a){new S().toString();}}

Well, ""+this is actually ""+this.toString(), so the method calls itself.

@TrueSoft Pretty sure java throws in a StringBuilder object there. toString will likely be called from within there.

By the time the compiler and optimizer are done, the toString() method ends up being public java.lang.String toString() { return this.toString(); }

C, 19 bytes
main(){int i[~0u];}

@Thomas Yes it is a stack overflow on any machine where local variables are allocated on the stack. Since the C language has no concept of a stack overflow indication (it's all undefined behavior; one of them manifests itself as a segfault), this does fit the original requirement.

OK, sorry, accepted.

it gives main.c:1:16: error: size of array 'i' is negative for me on gcc 4.8.1. The unsigned version main(){int i[~0U];} works.

Doesn't work for me after I manually configured a 4GB stack.

@FUZxxl Interesting; are your ints 32 bit? If so, sizeof(i) is 16GB. Does using an ul or ull suffix make a difference? Some systems over-commit memory and only crash if the memory is written to.

Nothing accesses the array, so it is not generated and no error. At least initializing or using it is necessary to error.

You can golf off 1byte by doing this main(int i[~0u]){}

@AlbertRenshaw I don't think this works, because the argument declaration is equivalent to int *i and will neither allocate memory nor crash.

GolfScript (8 chars)
{]}333*`

Result:
$ golfscript.rb overflow.gs
golfscript.rb:246:in `initialize': stack level too deep (SystemStackError)
from /home/pjt33/bin/golfscript.rb:130:in `new'
from /home/pjt33/bin/golfscript.rb:130:in `ginspect'
from /home/pjt33/bin/golfscript.rb:130:in `ginspect'
from /home/pjt33/bin/golfscript.rb:130:in `map'
from /home/pjt33/bin/golfscript.rb:130:in `ginspect'
from /home/pjt33/bin/golfscript.rb:130:in `ginspect'
from /home/pjt33/bin/golfscript.rb:130:in `map'
from /home/pjt33/bin/golfscript.rb:130:in `ginspect'
 ... 993 levels...
from (eval):4
from /home/pjt33/bin/golfscript.rb:293:in `call'
from /home/pjt33/bin/golfscript.rb:293:in `go'
from /home/pjt33/bin/golfscript.rb:485

Basically this creates a heavily nested data structure and then overflows the stack when trying to turn it into a string.

For me, this doesn't throw an error, but outputs [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[[[[[[[""]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]] (and so on, output too long for comments)

@ProgramFOX, there will be some value which you can replace 333 with and it will break. 333 was the smallest value which broke for me, but if you have a different version of Ruby (or maybe the same version on a different OS, for all I know) it might handle a different number of stack frames before overflowing.

Breaks at 3192 on my machine, so 6.? still works without adding characters.

x86 assembly, NASM syntax, 7 bytes
db"Pëý"

"Pëý" is 50 EB FD in hexadecimal, and
_loop:
push eax
jmp _loop

in x86 assembly.

Ruby, 12
eval"[]"*9e3

Gives
SystemStackError: stack level too deep

Presumably system-dependent, but you can add orders of magnitude by bumping the last digit up (not recommended).
Edit for explanation: Similarly to some other examples, this creates a string of [][][]...repeated 9000 times, then evaluates it: the rightmost [] is parsed as a function call to the rest, and so on.  If it actually got to the beginning, it would throw an ArgumentError because [] is an object with a [] method that requires one argument, but my machine throws an error a little before the stack is over nine thousand.

hmm... crashed IRB :P

Which version? ruby 1.9.2 throws “ArgumentError: wrong number of arguments (0 for 1..2)”.

Found an old ruby 1.8.7. There the posted code works as described.

Odd, it works on my 1.8.7, 1.9.2, and 1.9.3.

I would have said def f;f;end;f

That wouldn't fit the full problem description. And is longer.

Rebol (11 Chars)
do s:[do s]

Yields:
>> do(s:[do s])
** Internal error: stack overflow
** Where: do do do do do do do do do do do do do do do do
do do do do do do do do do do do do do do do do do do do
do do do do do do do do do do do do do do do do do do do
do do do do do do do do do do do do do do do do do do do
do do do do do do do do do do do do do do do do do do do
do do do do do do do do do do do do do do do do do do do
do do do do do do do do do do do do do do do do do do do
do do do do do do do do do do do do do do do do do do do
do do do do do do do do do do do do do do do do do do do
do do do do do do do do do do do do do do do do do do do
do do do do do do do do do do do do...

Though Rebol has functions, closures, and objects...this doesn't define any of those.  It defines a data structure, which in the code-as-data paradigm can be treated as code using DO.
We can probe into the question of "what is S" with the REPL:
>> s: [do s]
== [do s]

>> type? s
== block!

>> length? s
== 2

>> type? first s
== word!

>> type? second s
== word!

DO never turns this into a function, it invokes the evaluator in the current environment on the structure.

+1 ... I hadn't noticed that my answer was defining a function and that was against the rules, but edited my answer to use DO...then noticed you'd already submitted that answer.  So I just deleted mine, but since I'd written up why this isn't defining an object/function/closure I thought I'd put the explanation into yours.  Also I think the do do do do is kind of funny and worth including.  :-)  Hope that's ok!

Casio Calculator, 11 keypresses
It's quite hard to count bytes/tokens in this "language" - I've given the number of keypresses required, excluding Shift, Alpha (the second shift key) and = at the end - this certainly fits into 1 byte per keypress.
Tested on the fx-85GT PLUS model, which is a standard, non-graphing, "non-programmable" scientific calculator. Other models will work.
Just stack up 11 cube roots:
3√ 3√ 3√ 3√
3√ 3√ 3√ 3√
3√ 3√ 3√
It doesn't even give a syntax error about the missing number under the square root.
This doesn't seem to work with square roots.
Alternatively, repeat cos( 31 times.
Output
Stack ERROR

[AC]  :Cancel
[<][>]:Goto

I believe that this qualifies as a stack overflow. The stack seems to be tiny...

I always thought it was called stack error because you "stacked up" too many roots :P

My Canon calculator gives a stack error with just about any operator (excluding at least +, -, * and /) if it is repeated 25 times or more. For instance, this causes stack error (without syntax error): (((((((((((((((((((((((((

C, 35 characters
main(){for(;;)*(int*)alloca(1)=0;}

Why store anything in the assigned space?

@PeterTaylor: Because a segmentation fault is only generated when memory outside the available stack space is accessed. Just calling alloca only decrements the stack pointer.

In this case, it's impossible to solve this problem in C.

@dmckee, Not all segmentation faults are stack overflows, but I'd say this one is, since it's the result of exceeding the stack capacity.

The initial int  isn't needed, and you can call alloca within the while() (but assign 1).

@dmckee, alloca allocates from the stack.

@Job: This needs an #include<stdlib.h>, though, I think... but you can use the implicit int return type and just main(){*(int*)alloca(9999999)=0;}.

Or maybe that's not guaranteed to do the trick, but for(;;) instead of while(1) saves the same number of characters.

I improved my answer a bit, thanks to everyone for the tips!

@ugoren: I don't really understand what you mean...

@minitech: That's not guaranteed to cause a stack overflow.

@job - I see you did remove the int. My other suggestion is no longer needed (while(*(int*)alloca(1)=1); is the same length).

Thinking about this more: are you sure it's necessary to store something in the assigned address in order to access unavailable stack space? Unless alloca is inlined it seems to me that the stack frame used to call it should move one byte further each time.

@PeterTaylor: It probably depends on the implementation but in my case alloca(1) is basically translated to sub $1, %esp so the stack isn't touched.

error: ‘alloca’ was not declared in this scope

FreeBSD allocates on the stack.  Linux allocates in the data area.  So it depends which OS you use.

Also, in some OS you have to assign the allocated space a value, because the OS won't actually allocate the space until it is needed.  But maybe that's just for malloc.

Interestingly enough, on my machine using the latest GCC, there is no stackoverflow. The code compiles down to .L2: jmp .L2, generating an infinite loop that never errors.

@BЈовић Compile with a C89 compiler.

@StephenMontgomery-Smith alloca() always allocated on the stack.

FORTH, 13 bytes
BEGIN 1 AGAIN

overflows the value stack

: X X ; X (9) must overflow return stack

won't work (X isn't defined while defining the call and that's a self reference/recursion

@ratchetfreak, those control words can only be used in a compile state, so they need to be wrapped in a :...; word definition. That adds at least 6 characters, plus at least 2 more for this to execute as a program.  You might be able to do it shorter, but here's an example: : F BEGIN 1 AGAIN ; F.  I suggest this because the question asks: "Write a program." Anyways, gave you an upvote for Forth, regardless of char count! :-)

Common Lisp, 7 characters
#1='#1#

Beautiful...I was planning to use #1=(#1#) for the terminal and (print #1=(#1#)), but your solution is so much better.

Actually that doesn't overflow at read time, only when you attempt to print it.  So aside from the 1 character difference, yours is no better.

You're right, just edited that out.  I'm not sure if there's a way to cause an overflow at read-time.

Actually, #.#1='#1# causes a read-time overflow :-)

Python - 11 chars
exec'('*999

>>> exec'('*999
s_push: parser stack overflow
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
MemoryError

Very clever solution.

Postscript, 7
{1}loop

Eg.
$ gsnd
GPL Ghostscript 9.06 (2012-08-08)
Copyright (C) 2012 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>{1}loop
Error: /stackoverflow in 1
Operand stack:
   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   %loop_continue   --nostringval--   --nostringval--   false   1   %stopped_push   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   %loop_continue
Dictionary stack:
   --dict:1168/1684(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 8
GS<1>

Haskell (GHC, no optimization), 25
main=print$sum[1..999999]

sum is lazy in the total.  This piles up a bunch of thunks, then tries to evaluate them all at the end, resulting in a stack overflow.

i always thought sum was implemented using foldl'. isn't it?

Alas, it isn't: http://hackage.haskell.org/package/base/docs/src/Data-List.html#sum

C#: 106 86 58 46 32 28
32: Getters can SO your machine easy in C#:
public int a{get{return a;}}

No need for setter public int a {get{return a;}}

This violates the rule "You are not allowed to define a function which calls itself". Admittedly it's hidden behind syntax sugar, but it's still missing the point of the challenge.

Adding the setter somewhat circumvents the rule, because you now have two functions calling each other.  But I wonder: does that still violate the OP's intentions behind this challenge?

The idea as I understand it is to find some excessively nested recursion in the interpreter or standard API of the language. This might not be too easy in C#.

Why "public string"?  "int" works just as well: int a { get { return a; } }

Fair point.  I was able to remove four characters because of a space before the first curly brace, too!

PHP 5.4, 33 characters
for($n=1e5;$n--;)$a=(object)[$a];

This causes a stack overflow when the nested stdClass objects are automatically destroyed:
$ gdb -q php
Reading symbols from /usr/bin/php...(no debugging symbols found)...done.
(gdb) set pagination 0
(gdb) r -nr 'for($n=1e5;$n--;)$a=(object)[$a];'
Starting program: /usr/bin/php -nr 'for($n=1e5;$n--;)$a=(object)[$a];'
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00000000006debce in zend_objects_store_del_ref_by_handle_ex ()
(gdb) bt
#0  0x00000000006debce in zend_objects_store_del_ref_by_handle_ex ()
#1  0x00000000006dee73 in zend_objects_store_del_ref ()
#2  0x00000000006a91ca in _zval_ptr_dtor ()
#3  0x00000000006c5f78 in zend_hash_destroy ()
#4  0x00000000006d909c in zend_object_std_dtor ()
#5  0x00000000006d9129 in zend_objects_free_object_storage ()
#6  0x00000000006dee53 in zend_objects_store_del_ref_by_handle_ex ()
#7  0x00000000006dee73 in zend_objects_store_del_ref ()
#8  0x00000000006a91ca in _zval_ptr_dtor ()
#9  0x00000000006c5f78 in zend_hash_destroy ()
#10 0x00000000006d909c in zend_object_std_dtor ()
#11 0x00000000006d9129 in zend_objects_free_object_storage ()
[...]
#125694 0x00000000006dee53 in zend_objects_store_del_ref_by_handle_ex ()
#125695 0x00000000006dee73 in zend_objects_store_del_ref ()
#125696 0x00000000006a91ca in _zval_ptr_dtor ()
#125697 0x00000000006c5f78 in zend_hash_destroy ()
#125698 0x00000000006d909c in zend_object_std_dtor ()
#125699 0x00000000006d9129 in zend_objects_free_object_storage ()
#125700 0x00000000006dee53 in zend_objects_store_del_ref_by_handle_ex ()
#125701 0x00000000006dee73 in zend_objects_store_del_ref ()
#125702 0x00000000006a91ca in _zval_ptr_dtor ()
#125703 0x00000000006c4945 in ?? ()
#125704 0x00000000006c6481 in zend_hash_reverse_apply ()
#125705 0x00000000006a94e1 in ?? ()
#125706 0x00000000006b80e7 in ?? ()
#125707 0x0000000000657ae5 in php_request_shutdown ()
#125708 0x0000000000761a18 in ?? ()
#125709 0x000000000042c420 in ?? ()
#125710 0x00007ffff5b6976d in __libc_start_main (main=0x42bf50, argc=3, ubp_av=0x7fffffffe738, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe728) at libc-start.c:226
#125711 0x000000000042c4b5 in _start ()

+1 for what must be PHP's second appearance on CodeGolf!

Q/k (16 chars)
Not sure if this is in the spirit of the challenge but I don't think it breaks the rules:
s:{f`};f:{s`};f`

It's a shame C# requires so much typing, you inspired my answer!

A bunch in the same style:
Python, 30
(lambda x:x(x))(lambda y:y(y))

Javascript, 38
(function(x){x(x)})(function(y){y(y)})

Lua, 44
(function(x) x(x) end)(function(y) y(y) end)

In Python x=lambda y:y(y);x(x) is shorter (20 chars). This function is not recursive. x calls any function passed to it as an argument.

Ruby 2.0 - ->x{x[x]}[->y{y[y]}]

Mathematica #@#&[#@#&]

You're just using recursion, then why not do just that, for example in JS: (function x(){x()})() ?

@xem Requirements say no recursion, that is why.

In Lua, you can just remove all the whitespace. You don't need the spaces between the function and the "end" keyword.

LaTeX: 8 characters
\end\end

This is the same code used in this answer. Essentially, the \end macro expands itself repeatedly, resulting in a stack overflow: TeX capacity exceeded, sorry [input stack size=5000]. A more detailed explanation can be found here.

INTERCAL, 12 bytes
(1)DO(1)NEXT

Explanation:
NEXT is INTERCAL's version of a subroutine call (or, at least, the closest you can get). It pushes the current position onto the NEXT stack and jumps to the given label.
However, if the NEXT stack length exceeds 80, you get what's pretty much the INTERCAL version of a stack overflow:
ICL123I PROGRAM HAS DISAPPEARED INTO THE BLACK LAGOON
    ON THE WAY TO 1
        CORRECT SOURCE AND RESUBNIT

Try it on Ideone..

"HAS DISAPPEARED INTO THE BLACK LAGOON" what is this, ArnoldC?

Mornington Crescent, 139 133
Take Northern Line to Bank
Take Circle Line to Temple
Take Circle Line to Temple
Take Circle Line to Bank
Take Northern Line to Angel

X86 assembly (AT&T), 33 characters
Note that although I'm using the label main as a jump target, this is not a recursive function.
.globl main
main:push $0;jmp main

Nice idea: this is a sort of recursion-without-recursion!

using a86: dd 0fdeb60 10 characters!

Python (17):
c='exec c';exec c

hm, I get KeyError: 'unknown symbol table entry'

Groovy (27 chars)
a=[:];b=[a:a];a.b=b;print b

And so it goes:
Caught: java.lang.StackOverflowError
    java.lang.StackOverflowError

Python, real stack overflow: 38
a=[];eval("[x "+"for x in a "*800+"]")

Error message:
s_push: parser stack overflow
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
MemoryError

Explanation:
[x for x in a for x in a]

is the same as
y = []
for x in a:
    for x in a:
        y.append(x)

so the above eval produces 800 nested for loops :)

Ah just noticed that someone else already exploited the parser in a similar, more elegant way: http://codegolf.stackexchange.com/a/9370/6491

C -- 34 characters, no libraries
Though competative with Job's answer,
o(){O();}
O(){o();o();}
main(){o();}

violates the spirt of the challenge by showing how to evade the restriction on constructing a simple recursion. You can save 4 character by removing one call from O, but gcc is smart enough to recongnise that if you use -O3.1
The trick is quite general and can be done in fortran 77, too (142 characters):
      program o
      i=j()
      stop
      end
      function j()
      j=k()
      end
      function k()
      k=j()
      k=j()
      end

Again, gcc can optimize away a single call in each.

1 I suppose it inlines one of them and then applys tail recursion elimination. How cool is that!?!.

O(){o(o());} saves a character. Replacing O with recursive main call saves more.

‘You are not allowed to define a function that calls itself.’ I think we both agree that using an intermediary doesn't excuse it, so why post it as a ‘solution’?

Because poking your nose through loopholes in the question description is a prestigious line of work with a long and glorious tradition on [codegolf.se]?

Tcl, 15 chars
interp r {} 1;a

gives

too many nested evaluations (infinite loop?)

the interp r stands for interp recursionlimit (you can abbreviate subcommands). a calls (because not known) unknown, which calls a lot of other stuff.

J, 3 chars
$:1

This does call itself. But it does not define a function that calls itself. Rather $: keeps invoking the largest verb it is enclosed in.
$:1
|stack error
|       $:1

Javascript, ES6 21
eval('{'.repeat(1e7))

Due to the nature of javascript, nesting a bunch of blocks causes a stackoverflow.
For more information see https://stackoverflow.com/questions/17306367/why-does-nesting-a-bunch-of-blocks-causes-a-stack-overflow-in-javascript
eval('('.repeat(1e7))

eval('['.repeat(1e7))

Other similar cases
eval('+'.repeat(1e7))

eval('-'.repeat(1e7))

Vitsy, 1 byte
Obviously non-competing due to language creation date.
This feature of my language was entirely unintended. Because of how loops work in my language, they can be finicky if you don't match braces. So, for a one-byte solution, I give you this:
[
Posted on my Showcase your language one vote at a time! answer...

The shortest stack overflow error you'll ever see.
Basically, in Vitsy, the [ represents "start while loop". While in a while loop, the program will wrap around the line - which means it starts another while loop, which wraps around the line and starts another while...
You get it.

Try it online!

Brachylog, 4 bytes
$G~l

Try it online!
Explanation
$G is 1,000,000,000. $G~l is thus: “Create a list of length 1,000,000,000”, which does not fit the stack.

Groovy, 5 bytes
run()

Example execution:
$ groovy -e "run()"
Caught: java.lang.StackOverflowError
java.lang.StackOverflowError
    at script_from_command_line.run(script_from_command_line)
    at script_from_command_line.run(script_from_command_line:1)
    at script_from_command_line.run(script_from_command_line:1)
    ...

works as a command line script (groovy -e), standalone groovy script, and in the groovy shell.
We are not defining a new function here so not breaking the rules as far as I can understand.
This works because the groovy compiler adds an implicit run method behind the scenes and calling this method ourselves causes a StackOverflowException.
Essentially the above run() call gets translated to something like the below code by the groovy compiler before its handed off for execution by the jvm:
// class generated by groovy compiler
class ScriptName {
  def args

  def main(args) {
    new ScriptName(args: args).run()
  }

  def run() {
    // user code start
    run() // our call
    // user code end
  }
}

VBScript, 101 characters
Not the smallest script, but created as a proof of concept
i=2
s="sub[2](b):i=i+1:d=replace(b,i-1,i):execute d:call getref("""&i&""")(d):end sub"
execute s
[2]s

This code creates new named functions on the fly by executing a string that creates a function and giving the new function this string as a parameter. The function creates a new function and calls it. Results in a Microsoft VBScript runtime error: Out of stack space: 'execute' error.

Scheme:
((lambda (x) (x x)) (lambda (x) (x x))

Citing the question: "you are not allowed to define function that calls itself"

These functions aren't written to call themselves. Instead, (lambda (x) (x x) is a function with one parameter that x, that calls x as a function, passing x as a argument.

In Racket: ((λ (x) (x x)) (λ (x) (x x)))

Burlesque, 5 characters
1R@p^

Range from one to infinity, push all elements to stack -> StackOverflow.

PERL, 19 chars
sub c{sub d{c()}d}c

Originally I posted this solution (11 chars), but I overlook that rule "You are not allowed to define a function that calls itself":
sub c{c()}c

It's a pitty that PERL doesn't allow this sub c{c}c - would look really cute :-)

You can get down to 18 characters with sub c{sub d{&c}d}c. I also tried sub c{&{$_[0]}}c\&c, but that one is also 19 characters.

LI, 1 byte
R

Reruns the program with the given input.  Every time this is done, another two functions are added to the interpreter's stack (one interpreting the program string and another interpreting the function R), eventually overflowing the stack.

Lua
function b()b()end b() --stack overflow

Alternatively,
a={}setmetatable(a,{__index=function()return a.a end})a(a.a) --C stack overflow

"You are not allowed to define a function that calls itself". That aside, what language is this?

@PeterTaylor: These are two separate  Lua programs.

The first one is syntactically broken. Try a=function(b)b(b)end;a(a) for 25 characters. It defines a function that calls its parameter, passing itself as the parameter. Certainly evades the tail recursion optimization, and skirts the spirit of not writing a directly recursive function.

dc, 7 chars
[ddx]dx

You may watch how it consumes memory :-)
dc -e'[ddx]dx' & watch -n 1 "ps l|grep $!|grep -v grep"

When run in OpenBSD dc(1), this program overflows the data stack, not the call stack. The question never said which stack to overflow! Running dc -e '[dx ]dx overflows the call stack, because OpenBSD won't optimize tail recursion if there is space in x ].

@kernigh what is "data stack"? There is only one stack present, and this is a call stack.

Java + SnakeYaml and a quirk over jva.awt.point :P; length=104
class A{public static void main(String[]a){new org.yaml.snakeyaml.Yaml().dump(new java.awt.Point());}}

C#
(59)
With a Main method:
static void Main(){unsafe{int* p=stackalloc int[1000000];}}

(39)
Just the code that causes the exception:
unsafe{int* p=stackalloc int[1000000];}

x86_64 ASM - 7 bytes
48 81 EC 00 00 60 09

Here is a mnemonic version.
SUB RSP, 0x9600000

This instruction by setting the stack pointer to above the maximum size, (at least on Unix) Since the stack grows downwards we use subtraction instead of addition.
You could probably also exchange RSP with RBP top set the base pointer of stack to overflow. This would require you to change EC to ED in the hex representation.
Although this doesn't throw an error, the stack is overflowed as we set the size that the stack is filled to a number above the maximum stack size.
You could improve this answer to 4 bytes if you are using an operating system with a stack size to less than one byte.
48 81 EC FF

TECO, 4 bytes
I was thinking about what tasks would be best to do in TECO, and realized that infinite loops and stack overflows are among its greatest talents.
<[a>

Pushes the contents of register a to the stack in an infinite loop.
Result of running code:
*<[a>$$
?PDO   Push-down list overflow

Neoscript, 22 bytes
try 1/0;catch e retry;

The division by 0 crash and execute the catch block, which call the try..catch block again, the division by 0 crash and excute the catch block again, etc...

SmileBASIC, 63 bytes
PRGEDIT 1FOR I=0TO 16384PRGSET"GOSUB"+(@_+HEX$(I))*2NEXT
EXEC 1

Error: Stack overflow in 1:16385
This generates code like:
GOSUB @_0@_0
GOSUB @_1@_1
...

No recursion is used, just 16385 GOSUBs, enough to fill the call stack.
And a boring and possibly cheating answer in 10 bytes:
@A
GOSUB@A

Error: Stack overflow in 0:2

‘You are not allowed to define a function that calls itself.’

It's not a function though. Functions in SB are created using DEF, for example: a:DEF a:a:END would trigger a stack overflow.

Semantics. Gosub is used to call a subprogram, and it overflows because you're pushing the same return point on the stack. So this overflows the stack for the same reason, in the same manner, as calling a recursive function in some other programming language. This solution is against the rules.

At that point you might as well ban anything that involves any type of stack, then, which would make this impossible.

How does that follow? Just read the rules. Recursively calling the same function is prohibited, but e.g. calling loads of different non-recursive functions isn't. How is that so hard to understand?

And, as an afterthought, not only is the rule and the spirit behind it easy to understand, but the reason the rule is there is pretty obvious too: anyone can overflow the stack with a recursive function. There's no trick to it and programs overflowing the stack through a recursive function call are utterly uninteresting. Just look at your own submission.

Look at “dofile’a’” in Lua. It’s just a program which recursively calls itself, just like you would define a function that calls itself. The only difference is the name (just like mine).

Whitespace, 12 bytes - Fills the stack

Try it online!
Explanation
nssn ; Declare label ''
sssn ; Push 0
nsnn ; Jump to label ''

Cloned from Shortest program that continually allocates memory. Whitespace is actually somewhat competitive for this question, I'm surprised we hadn't already had an answer.
This program loops and continuously pushes the value 0 to the stack, causing the stack to grow until the interpreter crashes (with the equivalent of a stack overflow error in whatever language the interpreter uses).

Braingolf, 5 bytes
1[l>]

Pushes a 1, then repeatedly pushes the length of the stack and moves it to the beginning of the stack. The loop will only exit if the first item in the stack is 0, so this loop will continually increase the length of the stack until eventually it reaches python3's deque limit.

GW-Basic, 18 bytes
In GW-Basic there's no separate stack overflow error as such; when the stack overflows you get error 7, ‘Out of memory’. The trick is to make sure you got this because you've ran out of stack space and not for some other reason. Enter:
CLEAR,,241:?SIN(0)

This will immediately result in:
Out of memory
Ok

The number 241 is important. Firstly, it cannot be 0 because that will yield error 5 ‘Illegal function call’. But it also cannot be 240 or less, because although you will get the out of memory error above, CLEAR won't actually have adjusted the stack space. So in that case the error isn't a real stack overflow, but it acts more like an illegal argument error of sorts. ‘This is too small for us to work with at all, no can do, sorry.’ You can easily check this:
CLEAR,,999
Ok
CLEAR,,1
Out of memory
Ok
?SIN(0)
 0
Ok
CLEAR,,240
Out of memory
Ok
?SIN(0)
 0
Ok
CLEAR,,241
Ok
?SIN(0)
Out of memory

C#: 62 (full program)
(full program, not excerpt like other one, although it's based on it)
class A{static int a{get{return a;}} static void Main(){a=a;}}

I think someone else already posted that.

R - 5 (plus 18 for the command line switch)
Using a ridiculously small memory allocation (--max-mem-size=32M), you can do this easily:
1:1e9

I tried this without setting the memory limit, and that caused my computer to hang. I don't know if it would have overflowed or not. If not, a score of 6 (1:1e99) would surely do it.

Exhausted memory is not a stack overflow.

fish shell (14 characters)
In my opinion, this doesn't count as declaring a function that calls itself. Could be shorter if this pull request would be applied (by one character), but considering it wasn't yet (and I'm not going to do this just to make my code shorter), this has to work.
alias ls ll;ls

In Java : 131 characters
public class HelloWorld{public HelloWorld(){main(new String[]{"3","4"});}public static void main(String []args){new HelloWorld();}}

The question is a code-golf question, so remove all unnecessary whitespace, 'golf' your code and add the character count.

Violates the you may not define a function that calls itself rule. main() transitively calls itself

Batch (7 chars)
It requires CALL or the execution of the calling batch ends right after starting itself again.
CALL %0

I'm not defining a function which calls itself, hence Batch doesn't even have functions. Also I did not create any classes. So this is valid.

Node.js REPL (15)
eval(RegExp.$1)

Sample session:
> eval(RegExp.$1)
RangeError: Maximum call stack size exceeded
    at eval (eval at <anonymous> (repl:1:12), <anonymous>:1:12)
    at eval (eval at <anonymous> (repl:1:12), <anonymous>:1:12)
    at eval (eval at <anonymous> (repl:1:12), <anonymous>:1:12)
    at eval (eval at <anonymous> (repl:1:12), <anonymous>:1:12)
    at eval (eval at <anonymous> (repl:1:12), <anonymous>:1:12)
    at eval (eval at <anonymous> (repl:1:12), <anonymous>:1:12)
    at eval (eval at <anonymous> (repl:1:12), <anonymous>:1:12)
    at eval (eval at <anonymous> (repl:1:12), <anonymous>:1:12)
    at eval (eval at <anonymous> (repl:1:12), <anonymous>:1:12)
    at eval (eval at <anonymous> (repl:1:12), <anonymous>:1:12)

C, 24 characters (no cheating)
x(){main();}main(){x();}

Compile with default cc settings and ignore warnings.
C, 10 characters (with cheat)
X{Y;}Y{X;}

compile with:
cc -DX='x()' -DY='main()'

Violates the you may not define a function that calls itself rule. main() transitively calls itself.

CoffeeScript/Javascript - Only in Chrome (24 chars)
Sorry for waking up an old post
This only works in Google Chrome (tested in Firefox and Chrome):
JSON.stringify a:5,->a:5

http://coffeescript.org/#try:JSON.stringify%20a%3A5%2C-%3Ea%3A5
This is not converting a circular structure to JSON. Actually, it uses the replacer function: the replacer function returns another object so the object ends up stringifying that object whose replacer also returns an object.
It gets compiled to the following JavaScript:
JSON.stringify({
  a: 5
}, function() {
  return {
    a: 5
  };
});

Tested on Chrome 39.

Lua, 29 bytes
This one causes a stack overflow by generating a new function every call and calling it.
l=loadstring s='l(s)()'l(s)()

Here are some other creative answers:
9 bytes:
dofile'a'

This causes a C-stack overflow.  Requires you put it in a file named a.
39 bytes:
package.loaded.a=z require'a'

This causes a C-stack overflow.  Requires to be put in a file named a and requires LUA_PATH=a.

Ruby - Proc fun - 18
a=->(b){b[b]};a[a]

Basic recursive solution. In irb ends up with:
SystemStackError: stack level too deep

 ANTLR4 / Java, 103 Bytes
grammar P;
r:(C|N)+;
C:(('p'|'i')P);
P:(N|S)*;
N:[0-9]+;
S:[A-Za-z0-9_]*;
WS:[ \r\n]+ -> skip;

To use:
Better create a new directory to put the file in, I used the common aliases shown on the antlr4 site.
antlr4 P.g4 && javac P*.java && echo 'Press Ctrl-D in 5 secs.' && grun P r -gui

Don't have any idea why this works, and I think it can be golfed much.

Rust, 29 bytes
fn main(){let a=[0;9000000];}

I hadn't thought it would be that easy. It actually gives segmentation fault, but given that it's rust, I'm pretty sure it's the stack that throws in the towel.
I wonder if the compiler ought to give a warning about stuff like this?

Java (OpenJDK 9), 70 bytes
public class Main{public static void main(String[] args){main(args);}}

Try it online!

You are not allowed to define a function that calls itself. The exception for main was meant for creating a new class, not for recursion.

That is quite the same as the Groovy Solution.

Also, is it even necessary to pass main args?

I do, I pass args, the String[] which the main method receives. could name it shorter as I see it

source: Stack Exchange

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

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

sort: votes


text:
Determine which of two ImageMagick .TXT images is more saturated
You have two images (64x64 pixels each):

Your program must take the file names of each of them as command line arguments and determine which has more average saturation among their pixels.
The images are in ImageMagick .txt format.  You can download and convert these images using convert pic.png pic.txt or download the raw text (saturated, desaturated)
Ignore the first line of the file (required).
Solutions in Assembly get 50% of their characters for free.  Brainfuck, whitespace, and close variants, get 25% of their characters for free.  (e.g. if it takes 200 characters in Brainfuck; mark it as 200-50=150.)
Describe your output.  It could be the name of the more saturated image; the index of it (0 for first, 1 for second); true for the first, false for the second, etc.  Just let us know.
It should be able to take either the saturated or desaturated image first, and accurately report the more saturated (test both ways).  The filenames shouldn't be considered when evaluating saturation (e.g. no if filename contains 'desaturated'...)
Shortest answer wins.  Happy coding :-)

What a hideous-looking input file format. Is it documented anywhere?

@PeterTaylor, indeed!  .txt image documentation

@beary605, you can join the two files together if that makes it easier :-)

How many of the 52 possible colour spaces must be supported? What bit depths must be supported? How should (partially) transparent pixels be treated for the purposes of averaging?

How will you know that the saturation values are correctly computed?

Of course its possible in Brainfuck. Except the bit about filenames and reading them.

-1 for scoring languages unequally

J (96 94 92)
echo/:(+/@:(m%(m=.>./)-<./)"1@:>@:(".&.>)@:((': (\(.*?\))';,1)&rxall)@:(1!:1)@:<)&.>2}.ARGV

Takes input from the command line as .txt files. It can take any number of files, and outputs a list of indices from saturated to unsaturated, i.e.:
$ jconsole saturated.j saturated.txt desaturated.txt
0 1
$ jconsole saturated.j desaturated.txt saturated.txt
1 0

I've simplified the normal formula a bit: it does not bother to normalize the RGB values to [0..1], it uses the sum of the saturation per pixel rather than the average, and it actually calculates the inverse of the saturation and then sorts up. As long as the images are the same size (which they are), this does not affect the sort order which is what it's about.
Explanation:

2}.ARGV: the command line minus its first two elements
&.>: for each of these, do:
(1!:1)@:<: read file
((': (\(.*?\))';,1)&rxall): use a regex to match the pixel values
(".&.>): execute each match as J code. (1,2,3) becomes the list 1 2 3 so now we have the pixel values.
>: make a matrix from the list of lists
"1: operate on the rows of the matrix
(m%(m=.>./)-<./): MAX / (MAX - MIN), the inverse of the saturation
+/: sum
/:: sort up, so that the images are sorted in S^(-1) ascending, which gives the same order as S descending.
echo: output the list

Impressive!  Nice explanation, too.

bash etc. and Image Magick (136 chars)
for x in "$@";do convert "$x" -colorspace HSL -channel G -separate -scale 1x1 t.txt
echo `sed "1d;s%.*#\(..\).*%\1%" t.txt` $x;done|sort

The way I see it, the easiest way to deal with the complexities of the Image Magick file format is to let Image Magick do it. t.txt seems to be the shortest possible filename which guarantees the correct output file format. The first 4 " could arguably be removed, but that would decrease robustness in the face of filenames with spaces in.
Sample output:
$ ./cmpsat.sh img-sat.txt img-desat.txt rose:
24 img-desat.txt
69 rose:
FE img-sat.txt

Mathematica  92 215
Edit
To work directly with the Magick files I had to make substantial revisions to my first try.

Filenames
Stored as variables, x, y.
x = "http://pastebin.com/raw.php?i=5f3B4uxP";
y = "http://pastebin.com/raw.php?i=VdjDm9HK";

The following routine sorts image files by average saturation (least to greatest). (Spaces added for readability.)
i = Image; d = DigitCharacter;
f[t_] := {Mean[Flatten[ImageData[ColorConvert[i[i[Partition[(StringCases[URLFetch[t],
   "rgb(" ~~ a : d .. ~~ "," ~~ b : d .. ~~ "," ~~c : d .. ~~ ")" :> ToExpression
   /@ {a, b, c}])/255., 64]]], "RGB" -> "HSB"]], 1][[All, 2]]], t}

Usage
Sort@{f[x], f[y]}

Output (saturation value, followed by filename).

{{0.229977, "http://pastebin.com/raw.php?i=VdjDm9HK"},
  {0.958346, "http://pastebin.com/raw.php?i=5f3B4uxP"}}

Explanation
URLFetch[x] fetches the Magick textfile, the name of which is stored in x
StringCases[URLFetch[t],
       "rgb(" ~~ a : d .. ~~ "," ~~ b : d .. ~~ "," ~~c : d .. ~~ ")" :> ToExpression
       /@ {a, b, c}])/255., 64]]], "RGB" -> "HSB"] finds the RGB values and, along with Partition converts them to the format Mathematica expects to find RGB files in.
ColorConvert converts to Hue-Saturation-Brightness values.
Mean and [[All,2]] find the mean saturation values for the file.

I think the OP is asking to get the input as a *.txt file (in ImageMagik format) and not in png format. it isn't very clear, though

here in 79 chars f={a,b};Sort[{Mean@Mean[ImageData@ColorConvert[Import@#,"HSB"]][[;;,2]],#}&/@f]

I was wondering about the formatting issue myself.  As for your code, I'm puzzled why the double use of Mean, but I'll look more closely.

Mean@Mean is equivalent to Mean@Flatten[...,1] but shorter

Not a real solution, because it doesn't use the .txt files (as @belisarius said), but cool nonetheless.

@FakeRainBrigand This version uses the .txt files.

Brainf**k, 117 - 25% = 87.75
Requires an interpreter with 8-bit wrapping cells (this is the most common type).
>+[,<++++[->--------<]>[>+<]++++[->++++++++<]>]>>
>+[,<++++[->--------<]>[>+<]++++[->++++++++<]>]>
[-<<<[-]>>>]<<<[.]

Just input the text render of the first image and the second image. Make sure the files end with the NUL character (ASCII value 0). If the first image is larger, it will output how much larger it is than the second one (in the ASCII value). If the second image is larger, nothing will be printed.

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


text:
Longest non-repeating Game-of-Life sequence
Given a positive integer N,
determine the starting pattern on a N x N-grid that yield
the longest non-repeating sequence under Game of Life-rules, and ends
with a fixed pattern (cycle of length 1), played on a torus.
The goal is not the shortest program, but the quickest.
Since the world is finite, you will eventually end up in a loop,
thus repeating an already visited state. If this loop has period 1, then the starting pattern is a valid candidate.
Output: Starting pattern and total number of unique states in the sequence (including starting pattern).
Now, the 1x1-torus is special, since a cell may be considered neighbouring to itself or not, but in practice, there is no problem, a single living cell will in either case just die (of overcrowding or loneliness).
Thus, input 1 yields a sequence of length 2, the sequence being one cell living, then forever dead.
The motivation for this question is that is an analogue of the busy beaver function, but definitely less complex, since we have a bound on memory. This will be a nice sequence to include on OEIS, as well.
For N=3, the sequence length is 3, any pattern on the left hand side reaches a completely black 3x3-square, and then dies. (All patterns that are part of 1-cycle removed).

For future reference, question should be tagged to specify the type of challenge. Other options include [king-of-the-hill] (where proposed programs play against each other) and [ai-player] where they compete against a common challange and kind of defaults to [code-challenge] for metrics of the code other then simple length.

It is also usual with [fastest-code] to say a few words about how you plan to evaluate that (asymptotic complexity, or run it on your machine or something else).

Ah, allright. Best code is the one that manages to compute sequence length for largest N within, say 2 hours. The obvious complexity is 2^(N^2), so if it is possible to improve this, this would be nice.

At non-trivial sizes each pattern is part of an isomorphism class of 8N^2 patterns, so if there's a quick way of canonicalising then that gives a moderate boost.

@Paxinum 2 hours on what sort of hardware?

Say 4-8 core ordinary desktop, CPU.

Has this sequence been added to OEIS?

Not that I am aware of, would be happy to see it there.

I have submitted this sequence (2, 2, 3, 10, 52, 91) to the OEIS as A294241.

C++ up to N=6
3x3 answer 3: 111 000 000
4x4 answer 10: 1110 0010 1100 0000
5x5 answer 52: 11010 10000 11011 10100 00000
6x6 answer 91: 100011 010100 110011 110100 101000 100000

This technique is centered around a fast next state function.  Each board is represented as a bitmask of N^2 bits, and bit-twiddly tricks are used to compute the next state for all cells at once.  next compiles down to about 200 100 assembly instructions for N <= 8.  Then we just do the standard try-all-states-until-they-repeat and pick the longest one.
Takes a few seconds up to 5x5, a few hours for 6x6.
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
using namespace std;

#define N 6

typedef uint64_t board;

// board is N bits by N bits, with indexes like this (N=4):
//  0  1  2  3
//  4  5  6  7
//  8  9 10 11
// 12 13 14 15

#if N==3
#define LEFT_COL (1 + (1<<3) + (1<<6))
#define RIGHT_COL ((1<<2) + (1<<5) + (1<<8))
#define ALL 0x1ffULL
#elif N==4
#define LEFT_COL 0x1111ULL
#define RIGHT_COL 0x8888ULL
#define ALL 0xffffULL
#elif N==5
#define LEFT_COL (1ULL + (1<<5) + (1<<10) + (1<<15) + (1<<20))
#define RIGHT_COL ((1ULL<<4) + (1<<9) + (1<<14) + (1<<19) + (1<<24))
#define ALL 0x1ffffffULL
#elif N==6
#define LEFT_COL (1 + (1<<6) + (1<<12) + (1<<18) + (1<<24) + (1ULL<<30))
#define RIGHT_COL ((1<<5) + (1<<11) + (1<<17) + (1<<23) + (1<<29) + (1ULL<<35))
#define ALL 0xfffffffffULL
#else
#error "bad N"
#endif

static inline board north(board b) {
  return (b >> N) + (b << N*N-N);
}
static inline board south(board b) {
  return (b << N) + (b >> N*N-N);
}
static inline board west(board b) {
  return ((b & ~LEFT_COL) >> 1) + ((b & LEFT_COL) << N-1);
}
static inline board east(board b) {
  return ((b & ~RIGHT_COL) << 1) + ((b & RIGHT_COL) >> N-1);
}

board next(board b) {
  board n1 = north(b);
  board n2 = south(b);
  board n3 = west(b);
  board n4 = east(b);
  board n5 = north(n3);
  board n6 = north(n4);
  board n7 = south(n3);
  board n8 = south(n4);

  // add all the bits bitparallel-y to a 2-bit accumulator with overflow
  board a0 = 0;
  board a1 = 0;
  board overflow = 0;
#define ADD(x) overflow |= a0 & a1 & x; a1 ^= a0 & x; a0 ^= x;

  a0 = n1; // no carry yet
  a1 ^= a0 & n2; a0 ^= n2; // no overflow yet
  a1 ^= a0 & n3; a0 ^= n3; // no overflow yet
  ADD(n4);
  ADD(n5);
  ADD(n6);
  ADD(n7);
  ADD(n8);
  return (a1 & (b | a0)) & ~overflow & ALL;
}
void print(board b) {
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      printf("%d", (int)(b >> i*N+j & 1));
    }
    printf(" ");
  }
  if (b >> N*N) printf("*");
  printf("\n");
}

int main(int argc, char *argv[]) {
  // Somewhere in the starting pattern there are a 1 and 0 together.  Using translational
  // and rotational symmetry, we can put these in the first two bits.  So we need only consider
  // 1 mod 4 boards.

  board steps[10000];
  int maxsteps = -1;
  for (board b = 1; b < 1ULL << N*N; b += 4) {
    int nsteps = 0;
    board x = b;
    while (true) {
      int repeat = steps + nsteps - find(steps, steps + nsteps, x);
      if (repeat > 0) {
        if (repeat == 1 && nsteps > maxsteps) {
          printf("%d: ", nsteps);
          print(b);
          maxsteps = nsteps;
        }
        break;
      }
      steps[nsteps++] = x;
      x = next(x);
    }
  }
}

You might get a moderate improvement out of next by counting rather than sorting. #define H(x,y){x^=y;y&=(x^y);} and then something like H(n1,n2);H(n3,n4);H(n5,n6);H(n7,n8);H(n1,n3);H(n5,n7);H(n2,n4);H(n6,n8);H(n1,n5);H(n3,n7);H(n2,n6);H(n2,n3);H(n2,n5); return n2 & (b | n1) & ~(n3|n4|n5|n6|n7|n8) & ALL;

Really cool solution!

@PeterTaylor: thanks, I implemented (a different scheme for) counting, saved a bunch of instructions.

I see the following possible solution approaches:

Heavy theory. I know there is some literature on Life on a torus, but I haven't read much of it.
Brute force forwards: for every possible board, check its score. This is basically what Matthew and Keith's approaches do, although Keith reduces the number of boards to check by a factor of 4.

Optimisation: canonical representation. If we can check whether a board is in canonical representation much quicker than it takes to evaluate its score, we get a speed-up of a factor of about 8N^2. (There are also partial approaches with smaller equivalence classes).
Optimisation: DP. Cache the score for each board, so that rather than walking them through until they converge or diverge we just walk until we find a board we've seen before. In principle this would give a speed-up by a factor of the average score / cycle length (maybe 20 or more), but in practice we're likely to be swapping heavily. E.g. for N=6 we'd need capacity for 2^36 scores, which at a byte per score is 16GB, and we need random access so we can't expect good cache locality.
Combine the two. For N=6, the full canonical representation would allow us to reduce the DP cache to about 60 mega-scores. This is a promising approach.

Brute force backwards. This seems odd at first, but if we assume that we can easily find still lifes and that we can easily invert the Next(board) function, we see that it has some benefits, although not as many as I originally hoped.

We don't bother with diverging boards at all. Not much of a saving, because they are quite rare.
We don't need to store scores for all of the boards, so there should be less memory pressure than the forward DP approach.
Working backwards is actually quite easy by varying a technique I saw in the literature in the context of enumerating still lifes. It works by treating each column as a letter in an alphabet and then observing that a sequence of three letters determines the middle one in the next generation. The parallel with enumerating still lifes is so close that I've refactored them together into an only slightly awkward method, Prev2.
It might seem that we can just canonicalise the still lifes, and get something like the 8N^2 speed-up for very little cost. However, empirically we still get a big reduction in the number of boards considered if we canonicalise at each step.
A surprisingly high proportion of boards have a score of 2 or 3, so there is still memory pressure. I found it necessary to canonicalise on the fly rather than building the previous generation and then canonicalising. It might be interesting to reduce memory usage by doing depth-first rather than breadth-first search, but doing so without overflowing the stack and without doing redundant calculations requires a co-routine / continuation approach to enumerating the previous boards.

I don't think that micro-optimisation will let me catch up with Keith's code, but for the sake of interest I'll post what I have. This solves N=5 in about a minute on a 2GHz machine using Mono 2.4 or .Net (without PLINQ) and in about 20 seconds using PLINQ; N=6 runs for many hours.
using System;
using System.Collections.Generic;
using System.Linq;

namespace Sandbox {
    class Codegolf9393 {
        internal static void Main() {
            new Codegolf9393(4).Solve();
        }

        private readonly int _Size;
        private readonly uint _AlphabetSize;
        private readonly uint[] _Transitions;
        private readonly uint[][] _PrevData1;
        private readonly uint[][] _PrevData2;
        private readonly uint[,,] _CanonicalData;

        private Codegolf9393(int size) {
            if (size > 8) throw new NotImplementedException("We need to fit the bits in a ulong");

            _Size = size;
            _AlphabetSize = 1u << _Size;

            _Transitions = new uint[_AlphabetSize * _AlphabetSize * _AlphabetSize];
            _PrevData1 = new uint[_AlphabetSize * _AlphabetSize][];
            _PrevData2 = new uint[_AlphabetSize * _AlphabetSize * _AlphabetSize][];
            _CanonicalData = new uint[_Size, 2, _AlphabetSize];

            InitTransitions();
        }

        private void InitTransitions() {
            HashSet<uint>[] tmpPrev1 = new HashSet<uint>[_AlphabetSize * _AlphabetSize];
            HashSet<uint>[] tmpPrev2 = new HashSet<uint>[_AlphabetSize * _AlphabetSize * _AlphabetSize];
            for (int i = 0; i < tmpPrev1.Length; i++) tmpPrev1[i] = new HashSet<uint>();
            for (int i = 0; i < tmpPrev2.Length; i++) tmpPrev2[i] = new HashSet<uint>();

            for (uint i = 0; i < _AlphabetSize; i++) {
                for (uint j = 0; j < _AlphabetSize; j++) {
                    uint prefix = Pack(i, j);
                    for (uint k = 0; k < _AlphabetSize; k++) {
                        // Build table for forwards checking
                        uint jprime = 0;
                        for (int l = 0; l < _Size; l++) {
                            uint count = GetBit(i, l-1) + GetBit(i, l) + GetBit(i, l+1) + GetBit(j, l-1) + GetBit(j, l+1) + GetBit(k, l-1) + GetBit(k, l) + GetBit(k, l+1);
                            uint alive = GetBit(j, l);
                            jprime = SetBit(jprime, l, (count == 3 || (alive + count == 3)) ? 1u : 0u);
                        }
                        _Transitions[Pack(prefix, k)] = jprime;

                        // Build tables for backwards possibilities
                        tmpPrev1[Pack(jprime, j)].Add(k);
                        tmpPrev2[Pack(jprime, i, j)].Add(k);
                    }
                }
            }

            for (int i = 0; i < tmpPrev1.Length; i++) _PrevData1[i] = tmpPrev1[i].ToArray();
            for (int i = 0; i < tmpPrev2.Length; i++) _PrevData2[i] = tmpPrev2[i].ToArray();

            for (uint col = 0; col < _AlphabetSize; col++) {
                _CanonicalData[0, 0, col] = col;
                _CanonicalData[0, 1, col] = VFlip(col);
                for (int rot = 1; rot < _Size; rot++) {
                    _CanonicalData[rot, 0, col] = VRotate(_CanonicalData[rot - 1, 0, col]);
                    _CanonicalData[rot, 1, col] = VRotate(_CanonicalData[rot - 1, 1, col]);
                }
            }
        }

        private ICollection<ulong> Prev2(bool stillLife, ulong next, ulong prev, int idx, ICollection<ulong> accum) {
            if (stillLife) next = prev;

            if (idx == 0) {
                for (uint a = 0; a < _AlphabetSize; a++) Prev2(stillLife, next, SetColumn(0, idx, a), idx + 1, accum);
            }
            else if (idx < _Size) {
                uint i = GetColumn(prev, idx - 2), j = GetColumn(prev, idx - 1);
                uint jprime = GetColumn(next, idx - 1);
                uint[] succ = idx == 1 ? _PrevData1[Pack(jprime, j)] : _PrevData2[Pack(jprime, i, j)];
                foreach (uint b in succ) Prev2(stillLife, next, SetColumn(prev, idx, b), idx + 1, accum);
            }
            else {
                // Final checks: does the loop round work?
                uint a0 = GetColumn(prev, 0), a1 = GetColumn(prev, 1);
                uint am = GetColumn(prev, _Size - 2), an = GetColumn(prev, _Size - 1);
                if (_Transitions[Pack(am, an, a0)] == GetColumn(next, _Size - 1) &&
                    _Transitions[Pack(an, a0, a1)] == GetColumn(next, 0)) {
                    accum.Add(Canonicalise(prev));
                }
            }

            return accum;
        }

        internal void Solve() {
            DateTime start = DateTime.UtcNow;
            ICollection<ulong> gen = Prev2(true, 0, 0, 0, new HashSet<ulong>());
            for (int depth = 1; gen.Count > 0; depth++) {
                Console.WriteLine("Length {0}: {1}", depth, gen.Count);
                ICollection<ulong> nextGen;

                #if NET_40
                nextGen = new HashSet<ulong>(gen.AsParallel().SelectMany(board => Prev2(false, board, 0, 0, new HashSet<ulong>())));
                #else
                nextGen = new HashSet<ulong>();
                foreach (ulong board in gen) Prev2(false, board, 0, 0, nextGen);
                #endif

                // We don't want the still lifes to persist or we'll loop for ever
                if (depth == 1) {
                    foreach (ulong stilllife in gen) nextGen.Remove(stilllife);
                }

                gen = nextGen;
            }
            Console.WriteLine("Time taken: {0}", DateTime.UtcNow - start);
        }

        private ulong Canonicalise(ulong board)
        {
            // Find the minimum board under rotation and reflection using something akin to radix sort.
            Isomorphism canonical = new Isomorphism(0, 1, 0, 1);
            for (int xoff = 0; xoff < _Size; xoff++) {
                for (int yoff = 0; yoff < _Size; yoff++) {
                    for (int xdir = -1; xdir <= 1; xdir += 2) {
                        for (int ydir = 0; ydir <= 1; ydir++) {
                            Isomorphism candidate = new Isomorphism(xoff, xdir, yoff, ydir);

                            for (int col = 0; col < _Size; col++) {
                                uint a = canonical.Column(this, board, col);
                                uint b = candidate.Column(this, board, col);

                                if (b < a) canonical = candidate;
                                if (a != b) break;
                            }
                        }
                    }
                }
            }

            ulong canonicalValue = 0;
            for (int i = 0; i < _Size; i++) canonicalValue = SetColumn(canonicalValue, i, canonical.Column(this, board, i));
            return canonicalValue;
        }

        struct Isomorphism {
            int xoff, xdir, yoff, ydir;

            internal Isomorphism(int xoff, int xdir, int yoff, int ydir) {
                this.xoff = xoff;
                this.xdir = xdir;
                this.yoff = yoff;
                this.ydir = ydir;
            }

            internal uint Column(Codegolf9393 _this, ulong board, int col) {
                uint basic = _this.GetColumn(board, xoff + col * xdir);
                return _this._CanonicalData[yoff, ydir, basic];
            }
        }

        private uint VRotate(uint col) {
            return ((col << 1) | (col >> (_Size - 1))) & (_AlphabetSize - 1);
        }

        private uint VFlip(uint col) {
            uint replacement = 0;
            for (int row = 0; row < _Size; row++)
                replacement = SetBit(replacement, row, GetBit(col, _Size - row - 1));
            return replacement;
        }

        private uint GetBit(uint n, int bit) {
            bit %= _Size;
            if (bit < 0) bit += _Size;

            return (n >> bit) & 1;
        }

        private uint SetBit(uint n, int bit, uint value) {
            bit %= _Size;
            if (bit < 0) bit += _Size;

            uint mask = 1u << bit;
            return (n & ~mask) | (value == 0 ? 0 : mask);
        }

        private uint Pack(uint a, uint b) { return (a << _Size) | b; }
        private uint Pack(uint a, uint b, uint c) {
            return (((a << _Size) | b) << _Size) | c;
        }

        private uint GetColumn(ulong n, int col) {
            col %= _Size;
            if (col < 0) col += _Size;
            return (_AlphabetSize - 1) & (uint)(n >> (col * _Size));
        }

        private ulong SetColumn(ulong n, int col, uint value) {
            col %= _Size;
            if (col < 0) col += _Size;

            ulong mask = (_AlphabetSize - 1) << (col * _Size);
            return (n & ~mask) | (((ulong)value) << (col * _Size));
        }
    }
}

I'm also working on another version to walk backwards from fixed points.  I've already enumerated the fixed points up to N=8 (for N=8 there are 84396613 of them before canonicalization).  I've got a simple prev working, but it is too slow.  Part of the problem is just the sizes of things, for N=6 the empty board has 574384901 predecessors (before canonicalization).

3 days and 11 hours to confirm that 91 is the answer for 6x6.

Factor
USING: arrays grouping kernel locals math math.functions math.parser math.order math.ranges math.vectors sequences sequences.extras ;
IN: longest-gof-pattern

:: neighbors ( x y game -- neighbors )
game length :> len
x y game -rot 2array {
    { -1 -1 }
    { -1 0 }
    { -1 1 }
    { 0 -1 }
    { 0 1 }
    { 1 -1 }
    { 1 0 }
    { 1 1 }
} [
    v+ [
        dup 0 <
        [ dup abs len mod - abs len mod ] [ abs len mod ]
        if
    ] map
] with map [ swap [ first2 ] dip nth nth ] with map ;

: next ( game -- next )
dup [
    [
        neighbors sum
        [ [ 1 = ] [ 2 3 between? ] bi* and ]
        [ [ 0 = ] [ 3 = ] bi* and ] 2bi or 1 0 ?
    ] curry curry map-index
] curry map-index ;

: suffixes ( seq -- suffixes )
{ }
[ [ [ suffix ] curry map ] [ 1array 1array ] bi append ]
reduce ;

! find largest repeating pattern
: LRP ( seq -- pattern )
dup length iota
[ 1 + [ reverse ] dip group [ reverse ] map reverse ] with
map dup [ dup last [ = ] curry map ] map
[ suffixes [ t [ and ] reduce ] map [ ] count ] map
dup supremum [ = ] curry find drop swap nth last ;

: game-sequence ( game -- seq )
1array [
    dup [
        dup length 2 >
        [ 2 tail-slice* [ first ] [ last ] bi = not ]
        [ drop t ] if
    ] [ LRP length 1 > not ] bi and
] [ dup last next suffix ] while ;

: pad-to-with ( str len padstr -- rstr )
[ swap dup length swapd - ] dip [ ] curry replicate ""
[ append ] reduce prepend ;

:: all-NxN-games ( n -- games )
2 n sq ^ iota [
    >bin n sq "0" pad-to-with n group
    [ [ 48 = 0 1 ? ] { } map-as ] map
] map ;

: longest-gof-pattern ( n -- game )
all-NxN-games [ game-sequence ] map [ length ] supremum-by but-last ;

Some time stats:
IN: longest-gof-pattern [ 3 longest-gof-pattern ] time dup length . .
Running time: 0.08850873500000001 seconds

3
{
   { { 1 1 1 } { 0 0 0 } { 0 0 0 } }
   { { 1 1 1 } { 1 1 1 } { 1 1 1 } }
   { { 0 0 0 } { 0 0 0 } { 0 0 0 } }
}

IN: longest-gof-pattern [ 4 longest-gof-pattern ] time dup length . .
Running time: 49.667698828 seconds

10
{
  { { 0 1 1 0 } { 0 1 0 0 } { 0 1 0 0 } { 1 1 0 1 } }
  { { 0 1 1 0 } { 0 1 0 0 } { 0 1 0 0 } { 0 0 0 1 } }
  { { 0 1 1 0 } { 0 1 0 0 } { 0 0 1 0 } { 1 1 0 0 } }
  { { 0 1 1 0 } { 0 1 0 0 } { 0 0 1 0 } { 0 0 0 1 } }
  { { 0 1 1 0 } { 0 1 0 0 } { 0 0 1 0 } { 1 1 0 1 } }
  { { 0 1 1 0 } { 0 1 0 0 } { 0 0 1 1 } { 0 0 0 1 } }
  { { 0 1 0 1 } { 0 1 0 1 } { 0 0 1 1 } { 1 1 0 1 } }
  { { 1 1 0 1 } { 1 1 0 1 } { 0 0 0 0 } { 1 1 0 0 } }
  { { 1 1 0 1 } { 1 1 0 1 } { 0 0 1 1 } { 1 1 1 1 } }
  { { 0 0 0 0 } { 0 0 0 0 } { 0 0 0 0 } { 0 0 0 0 } }
}

And testing 5 crashed the REPL. Hmph.
The most inefficient portion of the program is probably the function game-sequence. I might be able to make it better later.

Cool! I think your output is 1 too large, for 3x3-patterns, the longest non-repeating sequence has length 3, not 4...


text:
Gregorian to Noxu Time System Conversion
The world's changing to a new time system!  We need to update our computer programs.  Given an input of epoch time (number of seconds since January 1st, 1970 00:00), print out a time in the new Noxu date-time format.
864 seconds make one Fluffster.  100 Fluffsters make a Skizzle.  There are 4 Skizzles in one Zestpond.  Their names are Looplab, Sevit, Hexteria, and Sinpad.  There are 91 Zestponds in one Lulerain.
The format is Lulerain Zestpond-Skizzle-Fluffster.  Fluffsters are rounded to two decimal places.  An example would be 50 13-Sevit-40.90.
Given that epoch 0 was 0 0-Looplab-00.00, create a program that takes input either via stdin or as a command line argument of any epoch time between 0 and 2^32, and prints out the Noxu equivalent.
Time of edit:
1357510372 -> 43 14-Sinpad-92.56

Random test data:
675416077 -> 21 43-Sevit-31.57
330585453 -> 10 46-Hexteria-22.05
1328127085 -> 42 20-Sinpad-84.13
837779784 -> 26 58-Looplab-52.53
1240280676 -> 39 39-Sinpad-10.04
122646385 -> 3 81-Sinpad-51.83
1311245658 -> 41 63-Looplab-45.44
57792972 -> 1 76-Looplab-90.01
788388068 -> 25 6-Looplab-86.19
304341865 -> 9 61-Hexteria-47.53
417857784 -> 13 26-Looplab-31.69
671276878 -> 21 31-Sevit-40.83
1259758896 -> 40 5-Looplab-54.28
604286664 -> 19 19-Hexteria-5.86
646395018 -> 20 50-Sevit-42.38
563025133 -> 17 82-Looplab-49.46
96133144 -> 3 5-Looplab-65.21
101542552 -> 3 20-Sinpad-26.10
1006825856 -> 32 1-Sevit-7.70
928867348 -> 29 48-Hexteria-77.95
1235022079 -> 39 24-Hexteria-23.70
439505287 -> 13 88-Hexteria-86.67
99686711 -> 3 15-Sevit-78.14
379859609 -> 12 7-Looplab-52.33
1167091685 -> 37 10-Looplab-0.56
612032437 -> 19 41-Sinpad-70.88
503040778 -> 15 90-Hexteria-23.12
1084809411 -> 34 44-Sinpad-66.45
1105664386 -> 35 14-Sevit-4.15
197303893 -> 6 24-Sinpad-60.99
368559287 -> 11 65-Sevit-73.25
686824300 -> 21 76-Sevit-35.53
196468204 -> 6 22-Sevit-93.75
673542185 -> 21 37-Sinpad-62.71
993063782 -> 31 52-Sevit-79.38
270951743 -> 8 56-Looplab-1.55
1074506753 -> 34 15-Looplab-42.08
198143696 -> 6 27-Sevit-32.98
539601298 -> 17 14-Sevit-38.54
110090607 -> 3 45-Hexteria-19.68
276492708 -> 8 72-Looplab-14.71
113389138 -> 3 55-Looplab-37.43
571578220 -> 18 15-Sinpad-48.87
1238516450 -> 39 34-Hexteria-68.11
742293312 -> 23 54-Sinpad-35.78
1031929490 -> 32 73-Sinpad-62.84
503091914 -> 15 90-Hexteria-82.31
264094386 -> 8 36-Looplab-64.80
483820698 -> 15 34-Sinpad-77.66
548410387 -> 17 39-Sinpad-34.24

Could you please post a test set?

@belisarius, I added some :-)

@belisarius, I made a typo in my post.  It's supposed to be 864 instead of 846.  Should be a simple fix in your code.  I updated the test data and description.

dc - 81
2k864/0k100~[Looplab]0:a[Sevit]1:a[Hexteria]2:a[Sinpad]3:ar4~;ar91~rn32Pn45dPrnPp

Expects the epoch time already on the stack so invoke as, e.g.
dc -e `date +%s` -e '2k864/0k100~[Looplab]0:a[Sevit]1:a[Hexteria]2:a[Sinpad]3:ar4~;ar91~rn32Pn45dPrnPp'

to get the current Noxu time or add one character to accept the time from stdin
?2k864/0k100~[Looplab]0:a[Sevit]1:a[Hexteria]2:a[Sinpad]3:ar4~;ar91~rn32Pn45dPrnPp

annotated version
2 k             # set the precision to 2 decimal places
864 /           # divide the number of seconds by 864 to get fluffsters
0 k             # set the precision back to 0 decimal places
100 ~           # divrem by 100; fluffsters are at the top skizzles under it
[Looplab] 0 :a  # set a[0] to the string Looplab
[Sevit] 1 :a    # set a[1] to Sevit
[Hexteria] 2 :a # set a[2] to Hexteria
[Sinpad] 3 :a   # set a[3] to Sinpad
r               # swap fluffsters and skizzles on the stack
4 ~             # divrem the skizzles by 4; skizzles on top zestpond under it
;a              # use the skizzle as an index into a
r               # swap the skizzle string and zestponds
91 ~            # divrem the zestponds by 91; zestponds on top lulerain under
r               # swap zestponds and lulerains
# now the stack has (from top to bottom)
# lulerains
# zestponds
# skizzle (as the name)
# fluffster
n               # pop and print the lulerains (without a newline)
32 P            # print a space character
n               # pop and print the zestponds
45 d P          # print a - and leave 45 on the top of the stack
r               # swap the 45 and the skizzle name
n               # pop and print the skizzle name
P               # print a - from the 45 that was on the stack
p               # finally print the fluffster (with a newline)

When the number of fluffsters is less than 1 there is no leading zero printed, to get the leading zero, it is
2k864/0k100~[Looplab]0:a[Sevit]1:a[Hexteria]2:a[Sinpad]3:ar4~;ar91~rn32Pn45dPrnPd[0n]sb1>bp

at a cost of 10 extra characters (d[0n]sb1>b)

APL, 87
t[3]←(1+3⌷t←137 91 4 100⊤⍎2⍕⎕÷864)⌷'Looplab' 'Sevit' 'Hexteria' 'Sinpad'
'  '⎕R'-'⍕t

APL has an advantage in these time system conversion challenges due to the built-in encode function, at the cost of expensive string manipuation
Explanation
(using 1357510372 as example)
⎕÷864 takes user input from screen, divide by 864 (1571192.56018519)
⍎2⍕ and round to 2 dp.  (1571192.56)
137 91 4 100⊤ Then, converts to Noxu Time System (43 14 3 92.56)
t← and assign that to variable t.
1+3⌷ take the 3rd item from t, add 1 to account for 1-based indexing, (4)
(...)⌷'Looplab' 'Sevit' 'Hexteria' 'Sinpad' convert to Skizzle name, (Sinpad)
t[3]← and finally plug back into the 3rd item of t.
⍕t Convert t to a string representation, (43 14  Sinpad  92.56)
'  '⎕R'-' and replaces 2 spaces with a dash (43 14-Sinpad-92.56)

Very impressive!

@FakeRainBrigand Actually this doesn't force 2 dp (So input 0 gives 0 0-Looplab-0). If you insist on it, it would cost 23 chars.

Or, as some of the tests don't include a leading zero in case of Fluffster < 10, it would cost 22 chars instead.

Mathematica 152
Still has some format issues. Spaces added for clarity
Flatten@{#[[5]], {Looplab, Sevit, Hexteria,  Sinpad}[[#[[4, 2]] + 1]],
        N[#[[3, 2]] + #[[2, 2]]/864, 4]} &@
               FoldList[QuotientRemainder[#1[[1]], #2] &, {#, 0}, {864, 100, 4, 91}]&

Python, 123
x=input()
b=86400
c=b*4
d=c*91
print x/d,'%d-%s-%.2f'%(x%d/c,['Looplab','Sevit','Hexteria','Sinpad'][x%d%c/b],x%d%c%b/864.)

Nice work.  It used 6 lines; I wonder if it could be condensed any more.

a=864. will save two chars on the print line, i believe (you can remove the *1./a and just have /a). Just set b to 86400 instead of a*100.

I don't see why you can't just inline a

Ruby, 114 112
x=gets.to_f
puts'%d %d-%s-%.2f'%[x/d=91*c=4*b=86400,(x%=d)/c,%w[Looplab Sevit Hexteria Sinpad][x%c/b],x%c%b/864]

Meh. Basically grc's solution but with inline assignments.
Edit: Saved 2 chars by changing to_i to to_f so I don't need the float literal later.


text:
Non-transitive dice game
Those of you who like Numberphile would be familiar with Dr. James Grime, who described a non-transitive dice game on his channel.
The game consists of three 6-faced dice:

Die 1: 3,3,3,3,3,6
Die 2: 2,2,2,5,5,5
Die 3: 1,4,4,4,4,4

Two players each select a die to use. They roll them and the higher die wins, best-of-whatever.
Probabilistically, die 1 beats dies 2 with >50% chance. Similarly, die 2 beats die 3, and, interestingly, die 3 beats die 1.
Write a program taking 1, 2 or 3 as input. This indicates the die the user chooses. The program then choose the die that would beat the user and output the results of 21 rolls, and "Computer/User wins with x points"
Rules

Code-golf, votes as tiebreaker
You must use RNG (or the likes) to actually simulate the dice rolls.
I am not too strict on output format. It's okay as long as you show the dices, somehow separate between the 21 rolls (in a way different from how you separate the dice in the same roll), and output that sentence above.
Input can be stdin, command line argument, from screen, etc.

Example
Input
1

Output
4 3
4 3
4 3
4 3
4 3
4 3
4 3
4 3
4 3
4 6
1 3
4 3
4 3
1 3
4 3
1 3
4 3
4 3
4 3
4 3
4 6
 Computer wins with 16 points

Here, the user chooses die 1 and his rolls are shown on the right column. The program chooses die 3 and beats him.

GolfScript, 112 105 characters
3,21*{..+6rand<3*+)}%3/\{)\.+-1%>2<.p~<}+,,"User
Computer"n/1$11<=" wins with "+\[.~22+]$1>~+" points"+

Run it online.
The script expects the input on STDIN and then prints the outcome of the dice rolls (first column computer, second user) and the final statistics to STDOUT.

APL (106 114)
'Computer' 'User'[1+X],'wins with','points',⍨|Z-21×X←11>Z←+/>/⎕←⍉↑{⍵[{?6}¨⍳21]}¨(↓5 6⍴545170074510753⊤⍨18⍴7)[⎕+⍳2]

Explanation:

(↓5 6⍴545170074510753⊤⍨18⍴7)[⎕+⍳2]: The big number is a base-7 representation of the dice. We make a 6x5 matrix containing the values of the dice in the order: 2 3 1 2 3. Ask for user input and add this to the vector 1 2, and select these lines from the matrix. Because the list of dice is shifted, the user now gets the one he selected (on the right) and the computer gets the stronger one.
{⍵[{?6}¨⍳21]}¨: do 21 rolls for each of these two dice.
⎕←⍉↑: put the rolls in matrix form and output them.
Z←+/>/: get the score of the computer (amount of times the computer's value was higher than the user's)
X←11>Z: set X to whether the user won (if 11 is higher than the computer's score).
'Computer' 'User'[1+X]. X is whether the user won.
'wins with','points',⍨|Z-21×X: Z is the computer's score, so if the computer won display Z, otherwise display 21-Z.

The score is not the difference of the totals (which is expected to be 0 for all pairs of dice), instead, the winner of each of the 21 rolls get 1 point. In the example, the user has 5 points (from winning 5 rolls: 4-6, 1-3, 1-3, 1-3, 4-6) and the computer get the 16 points rest.

@TwiNight: fixed it

Negative points when user wins. You can fix by |Z-21×X which doesn't change char count

R - 228
d=matrix(rep(c(rep(3,5),6,2,2,2,5,5,5,1,rep(4,5)),2),6)
x=scan()
r=expand.grid(Computer=d[,x+2],User=d[,x])[sample(36,21,T),]
print(r)
s=summary.factor(names(r)[max.col(r)])
cat(names(which.max(s)),"wins with",max(s),"points\n")

Example run:
> source('ntd.R')
1: 2
2:
Read 1 item
     Computer User
28          3    5
31          3    5
36          6    5
18          6    2
11          3    2
31.1        3    5
14          3    2
8           3    2
9           3    2
17          3    2
2           3    2
29          3    5
3           3    2
16          3    2
4           3    2
21          3    5
14.1        3    2
23          3    5
16.1        3    2
17.1        3    2
19          3    5
Computer wins with 14 points

You can replace summary.factor with table, saving 9 characters.

Mathematica 208 172 166 159
Spaces added for clarity
b=Boole;{#, Row@{
         If[# > 10, "Play", "Comput"], "er wins with ",
         Max[#, 21 - #], " points"} &@ Total[b[#1 > #2] & @@@ #]} &@
   Table[1 + i + 3 b[6 Random[] > 2 i + 1],{21}, {i, {#, Mod[# + 1, 3]}}] &

I think the output is supposed to list the values of each roll of the dice.

@dude yep, I lost it while testing. I made a quick fixup just to keep the ball running. I'll think later how to improve it.

It now seems to be working fine.

@dude Much better now

Really nice. +1

@Mr.Wizard The usage of the deprecated Random[] made me happy :)

Mathematica 234 247
Code
g@n_ := {t = RandomChoice[{{5, 25, 1, 5}/36 -> {{3, 1}, {3, 4}, {6, 1}, {6, 4}},
         {5, 1, 5, 1}/12 -> {{2, 3}, {2, 6}, {5, 3}, {5, 6}},
         {1, 1, 5, 5}/12 -> {{1, 2}, {1, 5}, {4, 2}, {4, 5}}}[[n]], 21],
         Row[{If[(c = Count[t, {x_, y_} /; y > x]) > 10, "Computer ", "Player "],
         "wins with ", If[c > 10, c, 21 - c], " points"}]}

Usage

{Player's roll, Computer's roll}

g[1]
g[2]
g[3]

Explanation
n is the number 1, 2, or 3 that corresponds to the die of the player.
Because  n also determines (but does not equal) the die of the computer, we can generate all possible rolls of the dice when n=1, n=2, n=3.  We can also determine their respective probabilities.
Examine the data right after RandomChoice:

{5, 25, 1, 5}/36 -> {{3, 1}, {3, 4}, {6, 1}, {6, 4}}

If the player draws die 1, the only possible outcomes are the following 4 pairs
{{3, 1}, {3, 4}, {6, 1}, {6, 4}}
The respective probabilities of these pairs are
{5, 25, 1, 5}/36, that is,
{5/36, 25/36, 1/36, 5/36}
RandomChoice[<data>, 21] outputs 21 rolls of the two dice.

C,  205  191
p;r(c){return 1+c+3*(rand()%6>2*c);}main(i,c,q,s){for(c=51-getchar();++i<23;printf("%u %u\n",q,s))q=r(c),p+=(s=r(-~c%3))<q;printf("%ser wins with %u points",p<11?"Comput":"Us",p<11?21-p:p);}

Reads the user's choice from stdin.

Some tips: for(c=51-getchar(p=0);, printf("%ser wins), reorder expression in r to start with ( and save space.

And more: (c+1)%3 -> -~c%3, make p static (initialized to 0), remove {} after for (;->, within them), use p<11?: twice within printf instead of assigning p,q.

And you can set s,q in the loop printf, and increment p afterwards, thus saving parentheses. Also change the c assignment to use %3 or %7, giving a different order of 0,1,2.

Ruby 1.8, 165
i,s,*d=getc,21,[4]*5<<1,[3]*5<<6,[2,5]*3
puts"#{s.times{p r=[i,i-1].map{|o|d[o%3][rand 6]};s+=r[0]<=>r[1]}>s?"Human":"Computer"} wins with #{[s/=2,21-s].max} points"

getc gets the ascii value of the input (ruby 1.8 only), which happily is congruent modulo 3 to its integer value.
s starts out at 21, so s.times{code} will execute code 21 times and return 21.  On each iteration, the loop either adds or subtracts 1 from s depending on who wins, so we can see who won by seeing whether s has ended up below 21.  Neat so far, but then I need the clumsy expression [s/=2,21-s].max to extract the actual number of points.  I've long wanted to do arithmetic with the return value of <=>, so I'm happy anyway.

Factor
With includes: 388
Without: 300
USING: arrays formatting io kernel math math.parser prettyprint random sequences ;
IN: N
CONSTANT: d { { 3 3 3 3 3 6 } { 2 2 2 5 5 5 } { 1 4 4 4 4 4 } }
: p ( -- ) 1 read string>number [ 3 mod 1 + ] keep [ 1 - d nth ] bi@ 2array 21 iota [ drop first2 [ random ] bi@ [ 2array . ] 2keep < ] with map [ ] count [ 11 > "Comput" "Play" ? ] [ "er wins with %d points" sprintf ] bi append print ;

Yeah, Factor's not really the language to use when golfing, but it's nice.

Python 182
from random import*
u=2+input()
r=[eval("int(choice(`0x1d67e987c0e17c9`[i%3::3])),"*21)for i in(u,u-1)]
U,C=map(sum,r)
print r,['Us','Comput'][U<C]+'er wins with %d points'%abs(U-C)

R 206
u=scan()
D=list(c(rep(3,5),6),c(2,5),c(1,rep(4,5)))
S=sample
U=S(D[[u]],21,T)
C=S(D[[(u+1)%%3+1]],21,T)
print(cbind(U,C))
W=sum(U>C)
I=(W>10)+1
cat(c("Computer","User")[I],"wins with",c(21-W,W)[I],"points")