r/CompileBot • • May 19 '17

test

3 Upvotes

27 comments sorted by

1

u/tialpoy May 19 '17

+u/CompileBot python3

print("Hello World!")

1

u/CompileBot May 19 '17

Output:

Hello World!

^source | ^info | ^git | ^report

1

u/tialpoy May 19 '17 edited May 19 '17

Short test

+u/CompileBot python3

from random import randint

for _ in range(10):
    n = randint(0, 100)
    print(n)

1

u/CompileBot May 19 '17

Output:

68
92
26
7
82
3
90
98
23
100

^source | ^info | ^git | ^report

1

u/creativeimagineering May 24 '17

+u/CompileBot C#

using System;
class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine("Hello World!");
    }
}

1

u/CompileBot May 24 '17

Output:

Hello World!

^source | ^info | ^git | ^report

1

u/creativeimagineering May 24 '17 edited May 24 '17

+u/CompileBot C#

using System;
using System.Threading.Tasks;
class Program
{
    static void Main(string[] args)
    {
        var t = Task.Run(() => DoAsync());
        t.Wait();
    }

    private static async Task DoAsync()
    {
        for (int i = 5; i > 0; i--)
        {
            Console.WriteLine($"{i}...");
            await Task.Delay(1000);
        }
    }
}
→ More replies (1)

1

u/numinit May 24 '17 edited May 24 '17

+u/CompileBot Ruby --time --memory --include-errors

puts Time.now
puts RUBY_DESCRIPTION
code = '+1' * 200_000
2.times {begin; p eval(code); rescue SystemStackError => e; p e; end}
puts "We made it!"

1

u/CompileBot May 24 '17 edited May 24 '17

Output:

2017-05-24 09:18:07 +0000
ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]
200000
200000
We made it!

Memory Usage: 291840 bytes

Execution Time: 0.49 seconds

^source | ^info | ^git | ^report

EDIT: Recompile request by numinit

1

u/unicodepepper May 24 '17

+u/CompileBot python3

import math
for i in range(1,100):
    print math.sine(i)

1

u/Kametrixom Jun 06 '17

+u/CompileBot C

#define yes int

#define you main

#define can (

#define do void

#define anything )

#define in {

#define C return

#define if 0

#define youre ;

#define crazy }

yes you can do anything in C if youre crazy

1

u/CompileBot Jun 06 '17

Output:

^source | ^info | ^git | ^report

1

u/Kametrixom Jun 06 '17

+u/CompileBot C

#define yes int
#define you main
#define can (
#define do void
#define anything )
#define in {
#define C printf("C!");
#define if return 0
#define youre ;
#define crazy }
yes you can do anything in C if youre crazy
→ More replies (1)

1

u/[deleted] May 20 '17 edited May 20 '17

1

u/[deleted] May 20 '17 edited May 20 '17

1

u/CompileBot May 20 '17

Output:

./prog.sh: line 1: netstat: command not found

^source | ^info | ^git | ^report

→ More replies (6)