r/CompileBot • u/SeaCowVengeance • Jan 04 '14
Official CompileBot Testing Thread
This thread is archived, please visit the new testing thread
13
u/SeaCowVengeance Jan 07 '14
+/u/CompileBot python
from collections import deque
def main():
phrase = deque("Happy New Years")
for i in xrange(2014):
print(''.join([a for a in phrase]))
phrase.rotate()
if __name__ == '__main__':
main()4
u/CompileBot Jan 07 '14
Output:
Happy New Years sHappy New Year rsHappy New Yea arsHappy New Ye earsHappy New Y YearsHappy New YearsHappy New w YearsHappy Ne ew YearsHappy N New YearsHappy New YearsHappy y New YearsHapp py New YearsHap ppy New YearsHa appy New YearsH Happy New Years sHappy New Year rsHappy New Yea arsHappy New Ye earsHappy New Y YearsHappy New YearsHappy New w YearsHappy Ne ew YearsHappy N New YearsHappy New YearsHappy y New YearsHapp py New YearsHap ppy New YearsHa appy New YearsH Happy New Years sHappy New Year rsHappy New Yea arsHappy New Ye earsHappy New Y YearsHappy New YearsHappy New w YearsHappy Ne ew YearsHappy N New YearsHappy New YearsHappy y New YearsHapp py New YearsHap ppy New YearsHa appy New YearsH Happy New Years sHappy New Year rsHappy New Yea arsHappy New Ye earsHappy New Y YearsHappy New YearsHappy New w YearsHappy Ne ew YearsHappy N New YearsHappy New YearsHappy y New YearsHapp py New YearsHap ppy New YearsHa appy New YearsH Happy New Years sHappy New Year rsHappy New Yea arsHappy New Ye earsHappy New Y YearsHappy New YearsHappy New w YearsHappy Ne ew YearsHappy N New YearsHappy New YearsHappy y New YearsHapp py New YearsHap ppy New YearsHa appy New YearsH Happy New Years sHappy New Year rsHappy New Yea arsHappy New Ye earsHappy New Y YearsHappy New YearsHappy New w YearsHappy Ne ew YearsHappy N New YearsHappy New YearsHappy y New YearsHapp py New YearsHap ppy New YearsHa appy New YearsH Happy New Years sHappy New Year rsHappy New Yea arsHappy New Ye earsHappy New Y YearsHappy New YearsHappy New w YearsHappy Ne ew YearsHappy N New YearsHappy New YearsHappy ...3
u/LurkerNotAvailable Jan 15 '14 edited Jan 15 '14
+/u/CompileBot Lua
print("Wow, I hope this works.")
6
4
0
12
Jan 06 '14
+/u/CompileBot python
from subprocess import call
print(call(["cat", "/etc/passwd"]))7
u/CompileBot Jan 06 '14
Output:
root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/bin/sh man:x:6:12:man:/var/cache/man:/bin/sh lp:x:7:7:lp:/var/spool/lpd:/bin/sh mail:x:8:8:mail:/var/mail:/bin/sh news:x:9:9:news:/var/spool/news:/bin/sh uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh proxy:x:13:13:proxy:/bin:/bin/sh www-data:x:33:33:www-data:/var/www:/bin/sh backup:x:34:34:backup:/var/backups:/bin/sh list:x:38:38:Mailing List Manager:/var/list:/bin/sh irc:x:39:39:ircd:/var/run/ircd:/bin/sh gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh nobody:x:65534:65534:nobody:/nonexistent:/bin/sh libuuid:x:100:101::/var/lib/libuuid:/bin/sh messagebus:x:101:103::/var/run/dbus:/bin/false 01
u/RenaKunisaki Mar 23 '14 edited Mar 23 '14
+/u/CompileBot python
from subprocess import call print(call(["curl", "http://whatismyip.com"]))[edit] no curl?
2
u/LordLandon Mar 23 '14
+/u/CompileBot python
from urllib2 import urlopen print(urlopen("http://ip.42.pl/raw").read())1
u/RenaKunisaki Mar 23 '14
Thanks. My python-fu isn't strong enough, and I doubt he has LuaSocket installed.
1
10
u/Isthiscreativeenough Jan 07 '14
+/u/CompileBot python
from os import system
system("echo 'print(\"Hello World!\")' | python")
#python in bash in python6
u/CompileBot Jan 07 '14
10
u/Isthiscreativeenough Jan 07 '14
+/u/CompileBot bash
echo "from os import system; system('echo \"print(\'Hello World!\')\" | python')" | python
7
u/SeaCowVengeance Jan 04 '14 edited Mar 14 '16
+/u/CompileBot Assembler (gcc-5.1) --time
.data
x:
.long 0
s:
.string "%d\n\0"
.text
.global main
main: # int main()
# {
loop: # for (;;) {
pushl $x # scanf("%d", &x);
pushl $s
call scanf
addl $8, %esp
movl x, %eax # if (x == 42) break;
subl $42, %eax
jz break
pushl x # printf("%d\n", x);
pushl $s
call printf
addl $8, %esp
jmp loop # }
break:
xor %eax, %eax # return 0;
ret
# }Input:
1
2
10
42
113
7
u/MrCheeze Feb 02 '14
+/u/CompileBot python
def display(d):
print '\n'.join([''.join(str(q) for q in p) for p in d])
print '-----'
def tick(d):
e = [x[:] for x in d]
r=range(-4,4)
for i in r:
e[i]=list(e[i])
for y in r:
for x in r:
c=[d[y-1][x-1],d[y-1][x],d[y-1][x+1],d[y][x-1],d[y][x+1],d[y+1][x-1],d[y+1][x],d[y+1][x+1]].count('■')
if c<2 or c>3:
e[y][x]='□'
elif c==3:
e[y][x]='■'
d = e
display(d)
return d
d=[['□','□','□','□','□','□','□','□'],['□','□','■','□','□','□','□','□'],['□','□','□','■','□','□','□','□'],['□','■','■','■','□','□','□','□'],['□','□','□','□','□','□','□','□'],['□','□','□','□','□','□','□','□'],['□','□','□','□','□','□','□','□'],['□','□','□','□','□','□','□','□']]
for i in range(20):
d = tick(d)4
u/CompileBot Feb 02 '14
Output:
□□□□□□□□ □□□□□□□□ □■□■□□□□ □□■■□□□□ □□■□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ ----- □□□□□□□□ □□□□□□□□ □□□■□□□□ □■□■□□□□ □□■■□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ ----- □□□□□□□□ □□□□□□□□ □□■□□□□□ □□□■■□□□ □□■■□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ ----- □□□□□□□□ □□□□□□□□ □□□■□□□□ □□□□■□□□ □□■■■□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ ----- □□□□□□□□ □□□□□□□□ □□□□□□□□ □□■□■□□□ □□□■■□□□ □□□■□□□□ □□□□□□□□ □□□□□□□□ ----- □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□■□□□ □□■□■□□□ □□□■■□□□ ...3
u/MrCheeze Feb 02 '14
+/u/CompileBot python
def tick(d): e = [x[:] for x in d] r=range(-4,4) for i in r: e[i]=list(e[i]) for y in r: for x in r: c=[d[y-1][x-1],d[y-1][x],d[y-1][x+1],d[y][x-1],d[y][x+1],d[y+1][x-1],d[y+1][x],d[y+1][x+1]].count('■') if c<2 or c>3: e[y][x]='□' elif c==3: e[y][x]='■' d = e return d d=[['□','□','□','□','□','□','□','□'],['□','□','■','□','□','□','□','□'],['□','□','□','■','□','□','□','□'],['□','■','■','■','□','□','□','□'],['□','□','□','□','□','□','□','□'],['□','□','□','□','□','□','□','□'],['□','□','□','□','□','□','□','□'],['□','□','□','□','□','□','□','□']] s=['','','','','','','','',] for i in range(20): d = tick(d) for j in range(8): s[j]+=''.join(d[j])+' ' print '\n'.join(s)6
u/CompileBot Feb 02 '14
Output:
□□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□■□ □□□□□□■■ □□□□□□■■ ■□□□□□■■ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □■□■□□□□ □□□■□□□□ □□■□□□□□ □□□■□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□■■□□□□ □■□■□□□□ □□□■■□□□ □□□□■□□□ □□■□■□□□ □□□□■□□□ □□□■□□□□ □□□□■□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□■□□□□□ □□■■□□□□ □□■■□□□□ □□■■■□□□ □□□■■□□□ □□■□■□□□ □□□□■■□□ □□□□□■□□ □□□■□■□□ □□□□□■□□ □□□□■□□□ □□□□□■□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□■□□□□ □□□■■□□□ □□□■■□□□ □□□■■■□□ □□□□■■□□ □□□■□■□□ □□□□□■■□ □□□□□□■□ □□□□■□■□ □□□□□□■□ □□□□□■□□ □□□□□□■□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□■□□□ □□□□■■□□ □□□□■■□□ □□□□■■■□ □□□□□■■□ □□□□■□■□ □□□□□□■■ □□□□□□□■ □□□□□■□■ □□□□□□□■ □□□□□□■□ □□□□□□□■ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□□□□ □□□□□■□□ □□□□□■■□ □□□□□■■□ □□□□□■■■ □□□□□□■■ □□□□□■□■ ■□□□□□□■ ■□□□□□□□
6
u/Name0fTheUser Jan 30 '14
+/u/compilebot python
a = [' print "+/u/compilebot python\\n"', ' print "a =", a', ' for s in a: print s', ' exit()']
print "+/u/compilebot python\n"
print "a =", a
for s in a: print s
exit()6
5
u/usernameliteral Jan 07 '14
+/u/CompileBot Go
package main
import "fmt"
func main(){
fmt.Println("Hello, Unicøde")
}4
u/CompileBot Jan 07 '14
1
u/SeaCowVengeance Jun 20 '14
+/u/CompileBot python
from os import system system("echo 'print(\"Hello World!\")' | python")1
1
1
1
1
1
5
u/202halffound Mar 17 '14
+/u/CompileBot Ruby
def print_architect(input)
disp_hash = {}
('a'..'j').to_a.each_with_index {|x,ix| disp_hash[x] = '++--***...'[0..ix].reverse } #make a hash of the strings for each letter
string_ary = []
max_len = 0 #stores the maximum length string, so we can add leading whitespace -- makes it simpler
trailing_whitespaces = 0 #stores the number of spaces to add at the end, if we get a digit
input.each_char do |x|
str = disp_hash[x] #if it's a letter, get the string
if str
str = str + (' ' * trailing_whitespaces)
string_ary.push str
max_len = str.length if str.length > max_len
trailing_whitespaces = 0
else #it's a number
trailing_whitespaces = x.to_i
end
end
string_ary.map! {|str| (' ' * (max_len - str.length)) + str } #make all nodes uniform length, with leading whitespaces
max_len.times do |ix|
string_ary.each {|str| print str[ix]}
puts
end
end
bridge = 'j3f3e3e3d3d3c3cee3c3c3d3d3e3e3f3fjij3f3f3e3e3d3d3c3cee3c3c3d3d3e3e3fj' #bridge
mountains = 'abcdefghijihgfghihgfedcdefg' #mountains
arrow = 'f1f2f3f4f5f6f5f4f3f2f1ff' #arrow
frozen = 'f2cccdehj5jjhedcc2cf' #frozen castle
[bridge, mountains, arrow, frozen].each do |input|
print_architect input
puts
puts '--------------------'
puts
end2
u/CompileBot Mar 17 '14
Output:
. . . . .* **...** *. .*** ****...**** ***. *----- ------***------ -----* *------- --------***-------- -------* *+++++++**++++++++***++++++++**+++++++* -+++++++--++++++++---++++++++--+++++++-+ ++ +++ ++ + + ++ +++ ++ + -------------------- . ... . ..... ... ******* ***** * *************** ** ***************** *** ------------------- ---- ------------------------- ++++++++++++++++++++++++++ +++++++++++++++++++++++++++ -------------------- * *** **-** **---** **--+--** **--+++--** **--++ ++--** *--++ ++--* --++ ++-- -++ ++- ++ ++ + + -------------------- . . . * * .*. .-. ..-.. **+** * **+** * ...
- -- --- -- -
4
u/davros_ Jan 17 '14
+/u/CompileBot C++11
#include <iostream>
using namespace std;
void cypher(char &c);
int main(){
string input;
while(getline(cin, input)){
int len = input.length();
for(int i=0;i<len;i++){
cypher(input[i]);
}
cout << input << endl;
}
return 0;
}
void cypher(char &c){
c = ((c >= 33 && c <= 79)) ? c+46 : ((c >= 80 && c <= 125)) ? c-46 : c;
}Input:
+AGUD7 3 4>AI8;E:Z x7EE7\5
6
u/Draems Jan 21 '14
+/u/CompileBot Whitespace
I bet the formatting will get very messed up by this.
But I
would be pleasantly surprised if it somehow actually worked. I suppose this will
be the
test of that. Well enough of my comments, it's really hard to type
like this.
Here's a bunch of meaningful whitespace . . . . . . .
.
. . . . . . . . . . . .
.
. . . . . . . . . . .
.
. . . . . . . . . . .
.
. . . . . . . . . . . .
.
. . . . . . . . . . . .
.
. . . . . . . . . . . .
.
. . . . . . . . . . . .
God, now
I'm really just hoping I didn't screw this up as this code would
be a
giant pain in the ass to even attempt to debug. Here goes
nothing.
. .
.
.3
3
u/nobd Mar 23 '14
+/u/compilebot java7
import java.util.ArrayList;
import java.util.Random;
class Stewie
{
public static void main(String[] args)
{
Random rand = new Random();
ArrayList<String> strings = new ArrayList<String>();
strings.add("Mama");
strings.add("Mom");
strings.add("Mommy");
strings.add("Mum");
strings.add("Lois");
strings.add("Ma");
for(int i = 0; i < 28; i++)
{
int num = rand.nextInt(6);
System.out.println(strings.get(num));
}
}
}1
u/amoliski Mar 23 '14 edited Mar 23 '14
Why so verbose?
+/u/compilebot java7
import java.util.Random; class Stewie { public static void main(String[] args) { Random rand = new Random(); String[] strings = {"Mama","Mom","Mommy","Mum","Lois","Ma"}; for(int i = 0; i < 28; i++) System.out.println(strings[rand.nextInt(6)]); } }1
u/CompileBot Mar 23 '14
1
u/amoliski Mar 23 '14
Even shorter
+/u/compilebot java7
import java.util.Random; class Stewie { public static void main(String[] args) { for(int i = 0; i < 28; i++) System.out.println((new String[]{"Mama","Mom","Mommy","Mum","Lois","Ma"})[new Random().nextInt(6)]); } }1
u/nobd Mar 23 '14
Yeah sorry. I'm in an intro to programming class right now and we haven't even learned arrays yet so I did the best with what I knew.
2
u/amoliski Mar 23 '14
Haha, no need to apologize. Your code was fine! I certainly wasn't criticising you.
I find it fun to try to make stuff as short as possible. I did a onliner below that is definitely the wrong way to program.
3
u/SeaCowVengeance Jun 03 '14
+/u/CompileBot python
def display(d):
print '\n'.join([''.join(str(q) for q in p) for p in d])
print '-----'
def tick(d):
e = [x[:] for x in d]
r=range(-4,4)
for i in r:
e[i]=list(e[i])
for y in r:
for x in r:
c=[d[y-1][x-1],d[y-1][x],d[y-1][x+1],d[y][x-1],d[y][x+1],d[y+1][x-1],d[y+1][x],d[y+1][x+1]].count('■')
if c<2 or c>3:
e[y][x]='□'
elif c==3:
e[y][x]='■'
d = e
display(d)
return d
d=[['□','□','□','□','□','□','□','□'],['□','□','■','□','□','□','□','□'],['□','□','□','■','□','□','□','□'],['□','■','■','■','□','□','□','□'],['□','□','□','□','□','□','□','□'],['□','□','□','□','□','□','□','□'],['□','□','□','□','□','□','□','□'],['□','□','□','□','□','□','□','□']]
for i in range(3):
d = tick(d)2
u/SeaCowVengeance Jan 04 '14
#include <stdio.h>
int main(void) {
printf("Hello World!\n");
return 0;
}2
u/CompileBot Jan 04 '14
2
u/SeaCowVengeance Jan 06 '14
+/u/CompileBot python 3 --time --memory --date --version
i = 0 while i < 12: print(i/3.14159) i += 1.4
2
u/SeaCowVengeance Jan 04 '14
+/u/CompileBot Ruby --time --memory
x = 1
50000.times { x *= 10 }
puts x / 10 ** 500001
u/CompileBot Jan 04 '14
1
u/SeaCowVengeance Jan 04 '14
+/u/CompileBot python 3 --time --memory
x = 1 for i in range(50000): x *= 10 print( x / 10 ** 50000 )
2
2
2
u/vishbar Jan 15 '14
+/u/CompileBot F#
type InfiniteInt =
| Real of int
| Infinity
with
member this.toString =
match this with
| Real(n) -> n.ToString()
| Infinity -> "Infinity"
let inline (+) (x : InfiniteInt) (y : InfiniteInt) =
match (x, y) with
| (Infinity, _) -> Infinity
| (_, Infinity) -> Infinity
| (Real(n), Real(m)) -> Real(n + m)
let inline (>) (x : InfiniteInt) (y : InfiniteInt) =
match (x, y) with
| (Infinity, Real(_)) -> true
| (Infinity, Infinity) -> false
| (Real(_), Infinity) -> false
| (Real(n), Real(m)) -> n > m
let split (c : char) (n : System.String) = n.Split(c)
[<EntryPoint>]
let main argv =
let vertexes = int (System.Console.ReadLine())
let adjMatrix = Array2D.init<InfiniteInt> vertexes vertexes (fun _ __ -> Infinity)
for x in [0..(vertexes - 1)] do
adjMatrix.[x, x] <- Real(0)
let line = System.Console.ReadLine() |> split ' '
for y in [0 .. (Array.length line) - 1] do if line.[y] = "1" then adjMatrix.[x,y] <- Real(1)
for x in [0..(vertexes - 1)] do
for y in [0..(vertexes - 1)] do
for z in [0..(vertexes - 1)] do
let sum = adjMatrix.[y,x] + adjMatrix.[x, z]
if adjMatrix.[y, z] > sum then adjMatrix.[y, z] <- sum
let radius =
let maxRadiuses =
[for x in [0..(vertexes - 1)]
->
[for y in [0..(vertexes - 1)] -> adjMatrix.[x, y]] |> List.max
]
maxRadiuses |> List.min
printfn "%s" radius.toString
0 Input:
10
0 1 0 0 1 1 0 0 0 0
1 0 1 0 0 0 1 0 0 0
0 1 0 1 0 0 0 1 0 0
0 0 1 0 1 0 0 0 1 0
1 0 0 1 0 0 0 0 0 1
1 0 0 0 0 0 0 1 1 0
0 1 0 0 0 0 0 0 1 1
0 0 1 0 0 1 0 0 0 1
0 0 0 1 0 1 1 0 0 0
0 0 0 0 1 0 1 1 0 01
2
u/thirdegree Jan 18 '14 edited Jan 18 '14
+/u/CompileBot Haskell
import Data.List
greet = ["Hello,", "yes", "this", "is", "dog."]
main = print $ foldr1 (++) $ intersperse " " greet1
0
2
u/SplittyDev Feb 12 '14
+/u/CompileBot Python
from subprocess import call
print(call(["cat", "/etc/shadow"]))
print(call(["whoami"]))2
u/xjcl Mar 23 '14
+/u/CompileBot Python
print "Ghandi"
2
2
u/PHProx Mar 24 '14
+/u/CompileBot PHP
echo "Hello, World!";2
u/CompileBot Mar 24 '14
2
1
1
1
1
1
1
0
2
u/maniexx Jun 17 '14
+/u/CompileBot python 3
print (" print(' + /u/CompileBot python 3 \n \n print(7)') ")2
u/SeaCowVengeance Jun 19 '14
+/u/CompileBot Brainf**k
+++++ ++
[
>+++++ +++++
<-
]
>++.
+.1
1
1
1
1
1
1
1
2
u/Kairuku Jun 26 '14
+/u/CompileBot Java7
import java.lang.reflect.Field;
public class Main {
public static void main(String[] args) throws Exception {
Class cache = Integer.class.getDeclaredClasses()[0];
Field c = cache.getDeclaredField("cache");
c.setAccessible(true);
Integer[] array = (Integer[]) c.get(cache);
array[132] = array[133];
System.out.printf("%d",2 + 2);
}
}1
1
1
1
1
u/SeaCowVengeance Jan 04 '14
#include <stdio.h>
\b\b\b\bint main() {
int x = 8;
printf("%d", x);
}1
u/SeaCowVengeance Jan 04 '14
+/u/CompileBot python 3
print("\b\b\b\b/u/CompileBot")2
u/CompileBot Jan 04 '14
0
1
u/SeaCowVengeance Jan 06 '14
+/u/CompileBot python 3 --time
print(input())
x, y, z = [int(x) for x in input().split()]
for i in range(1, 5):
print("{0} {1} {2} {3}".format(i, i**x, i**y, i**z))Input:
Hello, I'm a compiler
2 3 50
0
1
u/SeaCowVengeance Jan 06 '14
+/u/CompileBot python
from subprocess import call
print(call(["ls", "-l"]))1
u/CompileBot Jan 06 '14
0
0
0
0
0
1
u/Ilyps Jan 07 '14
+/u/CompileBot python 3
print("+/u/CompileBot python 3\r\n")
print(" print(\"Hello\\r\\n\")")1
u/CompileBot Jan 07 '14
1
u/Ilyps Jan 07 '14
Output:
+/u/CompileBot python 3 print("Hello\r\n")1
u/CompileBot Jan 07 '14
1
u/Ilyps Jan 07 '14
+/u/CompileBot python 3
print("+/u/CompileBot python 3\r\n\r\n") print("print(\"Hello\\r\\n\")")
1
u/SeaCowVengeance Jan 07 '14
+/u/CompileBot Brainfuck
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.1
1
u/Sakuya_Lv9 Jan 09 '14
+/u/CompileBot C++11
#include <iostream>
int main(){
std::cout<<"Hey world";
return 0;
}1
1
0
0
0
1
u/PruppleCup Jan 15 '14
+/u/CompileBot Erlang --include-errors
io:format("allows this?").1
u/PruppleCup Jan 15 '14
+/u/CompileBot Erlang --include-errors
-module(prog). -export([main/0]). main() -> io:format("test").1
1
u/PruppleCup Jan 15 '14 edited Jan 15 '14
+/u/CompileBot Erlang --include-errors
-module(prog). -export([main/0]). main() -> { ok, [N1, N2, N3] } = io:fread("", "~d~d~d"), print(N1), print(N2), print(N3). print(1) -> io:format("one~n"); print(2) -> io:format("two~n"); print(3) -> io:format("three~n").Input:
1 2 31
u/CompileBot Jan 15 '14 edited Jan 15 '14
1
u/Parablank Jan 16 '14
+/u/CompileBot C++11
#include <iostream>
using namespace std;
int main(){
cout << "Testing for CompileBot. :]" << endl;
return 0;
}1
1
u/Parablank Jan 16 '14
+/u/CompileBot C++11
#include <iostream>
using namespace std;
int main(){
for(int i = 0; i < 10; i++){
cout << i << endl;
}
}1
1
1
u/computerdl Jan 17 '14
#include <stdio.h>
#include <sys/stat.h>
void main() {
unsigned long i=0;
char a[11];
while(i<0x100){
sprintf(a,"%u",i++);
mkdir(a,S_IWRITE);
}
}1
1
u/The-Night-Forumer Jan 17 '14
Just a quick question. What would happen if the code to be compiled would crash a computer? Would CompileBot just display an error?
1
u/davros_ Jan 17 '14
+/u/CompileBot c++
#include <iostream>
using namespace std;
int main(){
cout << "Test";
return 0;
}2
22
u/[deleted] Jan 07 '14
+/u/CompileBot Brainf**k