1 2 3 4 5 6 7 8 | using System; public module HelloWorld { public Main() : void { Console.WriteLine("Hello world!"); } } |
-
upload with new input
-
result: Success time: 0.06s memory: 13352 kB returned value: 0
<["Foo"]>
Hello world!
-
result: Success time: 0.06s memory: 13352 kB returned value: 0
аааав ввв
Hello world!
-
result: Success time: 0.07s memory: 13352 kB returned value: 0
gege
Hello world!
-
result: Success time: 0.06s memory: 13352 kB returned value: 0
xxx
Hello world!
-
result: Success time: 0.07s memory: 13352 kB returned value: 0
def title = "Programming language authors"; def authors = ["Anders Hejlsberg", "Simon Peyton-Jones"]; // 'xml' - macro from Nemerle.Xml.Macro library which alows to inline XML literals into the nemerle-code def html = xml <# <html> <head> <title>$title</title> </head> <body> <ul $when(authors.Any())> <li $foreach(author in authors)>$author</li> </ul> </body> </html> Trace.Assert(html.GetType().Equals(typeof(XElement))); WriteLine(html.GetType());Hello world!
-
result: Success time: 0.07s memory: 13352 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("?"); } }Hello world!
-
result: Success time: 0.06s memory: 13352 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("Hello plop!"); } }Hello world!
-
result: Success time: 0.07s memory: 13352 kB returned value: 0
macro @if (cond, e1, e2) syntax ("if", "(", cond, ")", e1, Optional (";"), "else", e2){ /* <[ ]> defines an area of quasi-quotation, the Nemerle compiler transforms a code in a such block to an AST tree, such transformations are somewhat similar to an Expression compiling in C# */ <[ match ($cond : bool) { | true => $e1 | _ => $e2 } ]>} // using this macro in code: def max = if (a > b) a else b;// during a compile time the upper line will be transformed to the following: def max = match (a > b){ | true => a | _ => b }Hello world!
-
result: Success time: 0.07s memory: 13352 kB returned value: 0
Hello world!
-
result: Success time: 0.07s memory: 13352 kB returned value: 0
Console.WriteLine("test");Hello world!
-
result: Success time: 0.06s memory: 13352 kB returned value: 0
jh
Hello world!
-
result: Success time: 0.07s memory: 13352 kB returned value: 0
Console.WriteLine("toodles!"};Hello world!
-
result: Success time: 0.07s memory: 13352 kB returned value: 0
Console.WriteLine("toodles!"};Hello world!
-
result: Success time: 0.06s memory: 13352 kB returned value: 0
Hello me!
Hello world!
-
result: Success time: 0.07s memory: 13352 kB returned value: 0
def x=3
Hello world!
-
result: Success time: 0.07s memory: 13352 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("этот язык кусок дерьма!"); Console.WriteLine("Тот кто это написал уныл и ничтожен!"); } }Hello world!
-
result: Success time: 0.06s memory: 13352 kB returned value: 0
yes
Hello world!
-
result: Success time: 0.07s memory: 13352 kB returned value: 0
Hello world!
-
result: Success time: 0.06s memory: 13352 kB returned value: 0
using System; def factorial(n, acc) { | (0, _) | (1, _) => acc | _ => factorial(n - 1, n * acc) } def partedFactorial = factorial(_, 1); Console.WriteLine(partedFactorial(5));Hello world!
-
result: Success time: 0.06s memory: 13352 kB returned value: 0
990
Hello world!
-
result: Success time: 0.04s memory: 14344 kB returned value: 0
using Nemerle.Collections; using Nemerle.Peg; using Nemerle.Text; using Nemerle.Utility; using Nemerle; using System; using System.Collections.Generic; using System.Console; using System.Linq; using SCG = System.Collections.Generic; namespace BF { [PegGrammar(Options = EmitDebugSources, cmds, grammar{ newLine = "\n" /"\r\n" /"\r" /"\u2028" /* line separator */ /"\u2029"; /* paragraph separator */ command : Commands = '+'/'-'/'<'/'>'/'?'/'.'; begin_while : Commands = '['; end_while : Commands = ']'; while_loop : Commands = begin_while cmds* end_while; cmds : List[Commands] = (while_loop / command)+ newLine? ; })] class Parser { command (t : NToken) : Commands { match (this._parsingSource.OriginalText[t.StartPos]) { | '+' => Commands.Add(); | '-' => Commands.Sub(); | '>' => Commands.Inc(); | '<' => Commands.Dec(); | '?' => Commands.C_in(); | '.' => Commands.Cout(); | _ => throw InvalidOperationException() } } while_loop ( Begin : Commands, Cmds : List[List[Commands]], EndAt : Commands) : Commands.While { Commands.While( Begin:>Commands.W_beg, EndAt:>Commands.W_end, Cmds[0] ) } begin_while ( _t : NToken ) : Commands { Commands.W_beg(); } end_while ( _t : NToken ) : Commands { Commands.W_end(); } cmds ( cs : List[Commands], _n : NToken ) : List[Commands] { cs } } public variant Commands { | Add | Sub | Dec | Inc | C_in | Cout | W_beg | W_end | While { Begin: W_beg; EndAt: W_end; Exprs: List[Commands]; } } public class bf_World { public mutable ptr :int; public mutable mem : array [byte]; private mutable O_FN : char->void; private mutable I_FN : void->char; public this(o : char->void, i:void->char) { mem=array(65536); I_FN=i; O_FN=o; } public cell : byte { get { this.mem[this.ptr] } set { this.mem[this.ptr]=value } } public Output(c:char) : void { O_FN(c) } public Input() : char { I_FN() } } public class BF { public static Run(ast : List[BF.bfc],mutable s : bf_World) : bf_World { foreach( cmd in ast) match (cmd) { | Inc => s.ptr++; | Dec => s.ptr--; | Add => s.cell++; | Sub => s.cell--; | While => while(s.cell!=0){ s=Run((cmd:>Commands.While).Exprs,s); }; | C_in => s.cell= (s.Input()):>byte; | Cout => s.Output( s.cell:>char); } s } } module Program { Main() : void { def p=BF.Parser(); def ast=p.Parse("+++++++[>+++++++>++++++++++++>+<<<<-]>++.>+.+++++..+++.>++.<<+++++++++++.>.+++.------.--------.>+.>."); if( ast.HasValue){ def d=BF.BF.Run(ast.Value, BF.bf_World( (c)=>Write(c), ()=>Console.Read():>Char) ); } else{()} _ = ReadLine(); } } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using Nemerle.Collections; using Nemerle.Peg; using Nemerle.Text; using Nemerle.Utility; using Nemerle; using System; using System.Collections.Generic; using System.Console; using System.Linq; using SCG = System.Collections.Generic; namespace BF { [PegGrammar(Options = EmitDebugSources, cmds, grammar{ newLine = "\n" /"\r\n" /"\r" /"\u2028" /* line separator */ /"\u2029"; /* paragraph separator */ command : Commands = '+'/'-'/'<'/'>'/'?'/'.'; begin_while : Commands = '['; end_while : Commands = ']'; while_loop : Commands = begin_while cmds* end_while; cmds : List[Commands] = (while_loop / command)+ newLine? ; })] class Parser { command (t : NToken) : Commands { match (this._parsingSource.OriginalText[t.StartPos]) { | '+' => Commands.Add(); | '-' => Commands.Sub(); | '>' => Commands.Inc(); | '<' => Commands.Dec(); | '?' => Commands.C_in(); | '.' => Commands.Cout(); | _ => throw InvalidOperationException() } } while_loop ( Begin : Commands, Cmds : List[List[Commands]], EndAt : Commands) : Commands.While { Commands.While( Begin:>Commands.W_beg, EndAt:>Commands.W_end, Cmds[0] ) } begin_while ( _t : NToken ) : Commands { Commands.W_beg(); } end_while ( _t : NToken ) : Commands { Commands.W_end(); } cmds ( cs : List[Commands], _n : NToken ) : List[Commands] { cs } } public variant Commands { | Add | Sub | Dec | Inc | C_in | Cout | W_beg | W_end | While { Begin: W_beg; EndAt: W_end; Exprs: List[Commands]; } } public class bf_World { public mutable ptr :int; public mutable mem : array [byte]; private mutable O_FN : char->void; private mutable I_FN : void->char; public this(o : char->void, i:void->char) { mem=array(65536); I_FN=i; O_FN=o; } public cell : byte { get { this.mem[this.ptr] } set { this.mem[this.ptr]=value } } public Output(c:char) : void { O_FN(c) } public Input() : char { I_FN() } } public class BF { public static Run(ast : List[BF.bfc],mutable s : bf_World) : bf_World { foreach( cmd in ast) match (cmd) { | Inc => s.ptr++; | Dec => s.ptr--; | Add => s.cell++; | Sub => s.cell--; | While => while(s.cell!=0){ s=Run((cmd:>Commands.While).Exprs,s); }; | C_in => s.cell= (s.Input()):>byte; | Cout => s.Output( s.cell:>char); } s } } module Program { Main() : void { def p=BF.Parser(); def ast=p.Parse("++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>."); if( ast.HasValue){ def d=BF.BF.Run(ast.Value, BF.bf_World( (c)=>Write(c), ()=>Console.Read():>Char) ); } else{()} _ = ReadLine(); } } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("Hello world!"); } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : int { Console.WriteLine("Hello world!"); return -1; } }Hello world!
-
result: Success time: 0.04s memory: 14344 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("Hellof world!"); } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("Test"); } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : void } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("!"); } }Hello world!
-
result: Success time: 0.05s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("Hel4545lo world!"); } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("Hel4545lo world!"); } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("Hello world!"); } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
Console.WriteLine("test");Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
Console.WriteLine("fodinha");Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
Console.WriteLine("fodinha");Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
Console.WriteLine("fodinha");Hello world!
-
result: Success time: 0.05s memory: 13320 kB returned value: 0
using Nemerle.Collections; using Nemerle.Peg; using Nemerle.Text; using Nemerle.Utility; using Nemerle; using System; using System.Collections.Generic; using System.Console; using System.Linq; using SCG = System.Collections.Generic; namespace BF { [PegGrammar(Options = EmitDebugSources, cmds, grammar{ newLine = "\n" /"\r\n" /"\r" /"\u2028" /* line separator */ /"\u2029"; /* paragraph separator */ command : Commands = '+'/'-'/'<'/'>'/'?'/'.'; begin_while : Commands = '['; end_while : Commands = ']'; while_loop : Commands = begin_while cmds* end_while; cmds : List[Commands] = (while_loop / command)+ newLine? ; })] class Parser { command (t : NToken) : Commands { match (this._parsingSource.OriginalText[t.StartPos]) { | '+' => Commands.Add(); | '-' => Commands.Sub(); | '>' => Commands.Inc(); | '<' => Commands.Dec(); | '?' => Commands.C_in(); | '.' => Commands.Cout(); | _ => throw InvalidOperationException() } } while_loop ( Begin : Commands, Cmds : List[List[Commands]], EndAt : Commands) : Commands.While { Commands.While( Begin:>Commands.W_beg, EndAt:>Commands.W_end, Cmds[0] ) } begin_while ( _t : NToken ) : Commands { Commands.W_beg(); } end_while ( _t : NToken ) : Commands { Commands.W_end(); } cmds ( cs : List[Commands], _n : NToken ) : List[Commands] { cs } } public variant Commands { | Add | Sub | Dec | Inc | C_in | Cout | W_beg | W_end | While { Begin: W_beg; EndAt: W_end; Exprs: List[Commands]; } } public class bf_World { public mutable ptr :int; public mutable mem : array [byte]; private mutable O_FN : char->void; private mutable I_FN : void->char; public this(o : char->void, i:void->char) { mem=array(65536); I_FN=i; O_FN=o; } public cell : byte { get { this.mem[this.ptr] } set { this.mem[this.ptr]=value } } public Output(c:char) : void { O_FN(c) } public Input() : char { I_FN() } } public class BF { public static Run(ast : List[BF.bfc],mutable s : bf_World) : bf_World { foreach( cmd in ast) match (cmd) { | Inc => s.ptr++; | Dec => s.ptr--; | Add => s.cell++; | Sub => s.cell--; | While => while(s.cell!=0){ s=Run((cmd:>Commands.While).Exprs,s); }; | C_in => s.cell= (s.Input()):>byte; | Cout => s.Output( s.cell:>char); } s } } module Program { Main() : void { def p=BF.Parser(); def ast=p.Parse("++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>."); if( ast.HasValue){ def d=BF.BF.Run(ast.Value, BF.bf_World( (c)=>Write(c), ()=>Console.Read():>Char) ); } else{()} _ = ReadLine(); } } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using Nemerle.Collections; using Nemerle.Peg; using Nemerle.Text; using Nemerle.Utility; using Nemerle; using System; using System.Collections.Generic; using System.Console; using System.Linq; using SCG = System.Collections.Generic; namespace BF { [PegGrammar(Options = EmitDebugSources, cmds, grammar{ newLine = "\n" /"\r\n" /"\r" /"\u2028" /* line separator */ /"\u2029"; /* paragraph separator */ command : Commands = '+'/'-'/'<'/'>'/'?'/'.'; begin_while : Commands = '['; end_while : Commands = ']'; while_loop : Commands = begin_while cmds* end_while; cmds : List[Commands] = (while_loop / command)+ newLine? ; })] class Parser { command (t : NToken) : Commands { match (this._parsingSource.OriginalText[t.StartPos]) { | '+' => Commands.Add(); | '-' => Commands.Sub(); | '>' => Commands.Inc(); | '<' => Commands.Dec(); | '?' => Commands.C_in(); | '.' => Commands.Cout(); | _ => throw InvalidOperationException() } } while_loop ( Begin : Commands, Cmds : List[List[Commands]], EndAt : Commands) : Commands.While { Commands.While( Begin:>Commands.W_beg, EndAt:>Commands.W_end, Cmds[0] ) } begin_while ( _t : NToken ) : Commands { Commands.W_beg(); } end_while ( _t : NToken ) : Commands { Commands.W_end(); } cmds ( cs : List[Commands], _n : NToken ) : List[Commands] { cs } } public variant Commands { | Add | Sub | Dec | Inc | C_in | Cout | W_beg | W_end | While { Begin: W_beg; EndAt: W_end; Exprs: List[Commands]; } } public class bf_World { public mutable ptr :int; public mutable mem : array [byte]; private mutable O_FN : char->void; private mutable I_FN : void->char; public this(o : char->void, i:void->char) { mem=array(65536); I_FN=i; O_FN=o; } public cell : byte { get { this.mem[this.ptr] } set { this.mem[this.ptr]=value } } public Output(c:char) : void { O_FN(c) } public Input() : char { I_FN() } } public class BF { public static Run(ast : List[BF.bfc],mutable s : bf_World) : bf_World { foreach( cmd in ast) match (cmd) { | Inc => s.ptr++; | Dec => s.ptr--; | Add => s.cell++; | Sub => s.cell--; | While => while(s.cell!=0){ s=Run((cmd:>Commands.While).Exprs,s); }; | C_in => s.cell= (s.Input()):>byte; | Cout => s.Output( s.cell:>char); } s } } module Program { Main() : void { def p=BF.Parser(); def ast=p.Parse("++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>."); if( ast.HasValue){ def d=BF.BF.Run(ast.Value, BF.bf_World( (c)=>Write(c), ()=>Console.Read():>Char) ); } else{()} _ = ReadLine(); } } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; def factorial(n, acc) { | (0, _) | (1, _) => acc | _ => factorial(n - 1, n * acc) } def partedFactorial = factorial(_, 1); Console.WriteLine(partedFactorial(35));Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; def factorial(n, acc) { | (0, _) | (1, _) => acc | _ => factorial(n - 1, n * acc) } def partedFactorial = factorial(_, 1); Console.WriteLine(partedFactorial(35));Hello world!
-
result: Success time: 0.04s memory: 14344 kB returned value: 0
using System; def factorial(n, acc) { | (0, _) | (1, _) => acc | _ => factorial(n - 1, n * acc) } def partedFactorial = factorial(_, 1); Console.WriteLine(partedFactorial(15));Hello world!
-
result: Success time: 0.05s memory: 13320 kB returned value: 0
using System; def factorial(n, acc) { | (0, _) | (1, _) => acc | _ => factorial(n - 1, n * acc) } def partedFactorial = factorial(_, 1); Console.WriteLine(partedFactorial(5));Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("Hell o world!"); } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
Hello world!
-
result: Success time: 0.04s memory: 14344 kB returned value: 0
using System; def factorial(n, acc) { | (0, _) | (1, _) => acc | _ => factorial(n - 1, n * acc) } def partedFactorial = factorial(_, 1); Console.WriteLine(partedFactorial(5));Hello world!
-
result: Success time: 0.04s memory: 14344 kB returned value: 0
Hello world!
-
result: Success time: 0.05s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("этот язык кусок дерьма!"); Console.WriteLine("Тот кто это написал уныл и ничтожен!"); } }Hello world!
-
result: Success time: 0.04s memory: 14344 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("этот язык кусок дерьма!"); Console.WriteLine("Тот кто это написал уныл и ничтожен!"); } }Hello world!
-
result: Success time: 0.04s memory: 14344 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("этот язык кусок дерьма!"); Console.WriteLine("Тот кто это написал уныл и ничтожен!"); } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
derp
Hello world!
-
result: Success time: 0.05s memory: 13320 kB returned value: 0
using System; def factorial(n, acc) { | (0, _) | (1, _) => acc | _ => factorial(n - 1, n * acc) } def partedFactorial = factorial(_, 1); Console.WriteLine(partedFactorial(5));Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("Hello world!"); } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; public module Test { public Main() : void { Console.WriteLine("Test"); } }Hello world!
-
result: Success time: 0.05s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("этот язык кусок дерьма!"); Console.WriteLine("Тот кто это написал уныл и ничтожен!"); } }Hello world!
-
result: Success time: 0.04s memory: 14344 kB returned value: 0
using System; def factorial(n, acc) { | (0, _) | (1, _) => acc | _ => factorial(n - 1, n * acc) } def partedFactorial = factorial(_, 1); Console.WriteLine(partedFactorial(5));Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; def factorial(n, acc) { | (0, _) | (1, _) => acc | _ => factorial(n - 1, n * acc) } def partedFactorial = factorial(_, 1); Console.WriteLine(partedFactorial(5));Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("этот язык кусок дерьма!"); } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("Hello plop!"); } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("Supercalifragilistic!"); } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("Cacas!"); } }Hello world!
-
result: Success time: 0.04s memory: 14344 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("Caca!"); } }Hello world!
-
result: Success time: 0.05s memory: 13320 kB returned value: 0
using System.Console; public module HelloWorld { public Main() : void { WriteLine("Hello world!"); } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
using System; public module HelloWorld { public Main() : void { Console.WriteLine("Hello world!"); } }Hello world!
-
result: Success time: 0.04s memory: 13320 kB returned value: 0
Hello world!



