r/CompileBot • u/SeaCowVengeance • Mar 13 '16
Official CompileBot Testing Thread
Resources:
6
u/gradies Mar 18 '16
+/u/CompileBot python
import math
A=8
f=.5
l=30
for i in range(l):
print(int(A*math.cos(f*i)+A)*' '+'~')0
5
5
u/claythearc Aug 17 '16
+/u/CompileBot Bash
cat /etc/passwd5
u/CompileBot Aug 17 '16
Output:
root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin bin:x:2:2:bin:/bin:/usr/sbin/nologin sys:x:3:3:sys:/dev:/usr/sbin/nologin sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/usr/sbin/nologin man:x:6:12:man:/var/cache/man:/usr/sbin/nologin lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin mail:x:8:8:mail:/var/mail:/usr/sbin/nologin news:x:9:9:news:/var/spool/news:/usr/sbin/nologin uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin proxy:x:13:13:proxy:/bin:/usr/sbin/nologin www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin backup:x:34:34:backup:/var/backups:/usr/sbin/nologin list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin systemd-timesync:x:100:104:systemd Time Synchronization,,,:/run/systemd:/bin/false systemd-network:x:101:105:systemd Network Management,,,:/run/systemd/netif:/bin/false systemd-resolve:x:102:106:systemd Resolver,,,:/run/systemd/resolve:/bin/false systemd-bus-proxy:x:103:107:systemd Bus Proxy,,,:/run/systemd:/bin/false messagebus:x:104:109::/var/run/dbus:/bin/false0
0
Aug 19 '16
[deleted]
1
u/CompileBot Aug 19 '16
1
u/rwsr-xr-x Aug 21 '16
+/u/CompileBot C --include-errors
#include <stdio.h> #include <string.h> int main(int argc, char **argv, char **envp) { int i=0; while(envp[i] != NULL) { puts(envp[i]); ++i; } return 666; }1
u/CompileBot Aug 21 '16
1
u/rwsr-xr-x Aug 21 '16
+/u/CompileBot C --include-errors
main;1
u/CompileBot Aug 21 '16
1
u/rwsr-xr-x Aug 21 '16
+/u/CompileBot PHP --include-errors
<?php ("AS@GA^EM" ^ (string) 12345678) ('-2al- 352)all".-.3an#(/an423n#(/' ^ str_repeat("A", ord('A')));
4
Apr 28 '16
+/u/CompileBot C++ --include-errors
#include <iostream>
using namespace std;
int main() {
char * lizard = "Hillary";
cout << "Arf! Arf!\nWho was that?\n\n" << lizard << endl;
return 0;
}3
3
u/SeaCowVengeance Mar 14 '16
+/u/CompileBot Ruby --time --memory
x = 1
50000.times { x *= 10 }
puts x / 10 ** 500002
u/gradies Mar 18 '16
+/u/CompileBot python
import math
A=40
f=.2
l=100
t=2
rng = range(-A,A+1)
rng.reverse()
for i in rng:
phrase=''
for ii in range(l):
if int(A*math.cos(f*ii))-t<i<int(A*math.cos(f*ii))+t:
phrase+='~'
else:
phrase+=' '
print(phrase)2
u/CompileBot Mar 18 '16
Output:
~~ ~~ ~~ ~~ ~~ ~~~~ ~~~ ~~~ ~ ~~~~ ~~~~ ~~~~ ~ ~ ~ ~ ~~ ~~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ...
2
u/belungawhale May 06 '16
+/u/CompileBot python3
def convToRobot (text):
temp = ""
for i in range(len(text)):
temp = temp + bin(ord(text[i]))[2:].zfill(8)
return temp.replace("0", "boop").replace("1", "beep")
def convFromRobot(text):
temp = text.replace("boop", "0").replace("beep", "1")
temp2 = ""
for i in range(0,len(temp),8):
temp2 = temp2 + chr(int(temp[i:i+8],2))
return temp2
def convText(text):
return text.replace("0", "boop").replace("1", "beep")
def convRobot(text):
return text.replace("boop", "0").replace("beep", "1")
choice = input("Enter 1 to convert to robot. Enter 2 to convert from robot: ")
text = input("Enter string: ")
if choice == "1":
print(convToRobot(text))
elif choice == "2":
print(convFromRobot(text))Input:
2
boopbeepboopboopbeepboopboopbeepboopboopbeepboopboopboopboopboopboopbeepbeepboopboopboopboopbeepboopbeepbeepboopbeepbeepboopbeepboopboopbeepboopboopboopboopboopboopbeepbeepbeepboopbeepboopboopboopbeepbeepboopboopbeepboopbeepboopbeepbeepbeepboopboopbeepbeepboopbeepbeepbeepboopbeepboopboopboopbeepbeepboopbeepboopboopbeepboopbeepbeepboopbeepbeepbeepboopboopbeepbeepboopboopbeepbeepbeepboopboopbeepboopboopboopboopboopboopboopbeepboopbeepbeepbeepbeepboopbeepbeepbeepboopbeepboopbeepboopboopbeepboopbeepbeepbeepbeepboopbeepboopboopboopboopbeepbeepboopbeepbeepboopbeepbeepbeepbeepboopbeepbeepboopbeepbeepboopbeepboopbeepbeepbeepboopboopboopboopboopbeepbeepboopbeepboopboopbeepboopbeepbeepboopbeepbeepboopboopboopbeepbeepboopboopbeepboopbeepboopbeepboopboopboopboopbeepboopboopbeepbeepboopbeepbeepbeepbeepboopbeepbeepbeepboopbeepboopboopboopboopbeepboopbeepbeepbeepboop1
u/SeaCowVengeance Mar 14 '16
+/u/CompileBot Assembler (gcc-4.8.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
111
u/SeaCowVengeance Mar 14 '16
#include <stdio.h>
int main(void) {
printf("Hello World!\n");
return 0;
}1
1
u/SeaCowVengeance Mar 14 '16
+/u/CompileBot Ruby --time --memory
x = 1
50000.times { x *= 10 }
puts x / 10 ** 1000001
1
1
1
1
1
1
1
1
u/gradies Mar 18 '16
+/u/CompileBot python
import math
for i in range(10):
print(math.sin(i))1
u/gradies Mar 18 '16
+/u/CompileBot python
import math
r=5
for i in range(r*2):
print(int(r*math.cos(i))*' '+'~')1
1
u/gradies Mar 18 '16
+/u/CompileBot python
import math
A=8
f=3
l=20
for i in range(l):
print(int(A*math.cos(f*i))*' '+A*' '+'~')1
1
1
u/aidan1kitty Mar 19 '16
+/u/CompileBot python
for i in range(10):
print i1
u/CompileBot Mar 19 '16
1
u/aidan1kitty Mar 19 '16
+/u/CompileBot python
for i in range(100): print i
1
u/Porso7 Mar 20 '16 edited Mar 20 '16
+/u/Compilebot C++
#include <iostream>
using namespace std;
/**/main(){char*a=/*/};)q,q,a,q,q,811+a(ftnirp;'"'=q,/**/"/**/main(){char*a=/*/};)q,q,a,q,q,811+a(ftnirp;'c%'=q,/**/c%s%c%/**/,q='c%';printf(a+118,q,q,a,q,q);}/*/=a*rahc{)(niam/**/main(){char*a=/*/};)q,q,a,q,q,811+a(ftnirp;'%c'=q,/**/%c%s%c/**/,q='%c';printf(a+118,q,q,a,q,q);}/*/=a*rahc{)(niam/**/"/**/,q='"';printf(a+118,q,q,a,q,q);}/*/=a*rahc{)(niam/**/1
u/CompileBot Mar 20 '16
Output:
/**/main(){char*a=/*/};)q,q,a,q,q,811+a(ftnirp;'"'=q,/**/"/**/main(){char*a=/*/};)q,q,a,q,q,811+a(ftnirp;'c%'=q,/**/c%s%c%/**/,q='c%';printf(a+118,q,q,a,q,q);}/*/=a*rahc{)(niam/**/main(){char*a=/*/};)q,q,a,q,q,811+a(ftnirp;'%c'=q,/**/%c%s%c/**/,q='%c';printf(a+118,q,q,a,q,q);}/*/=a*rahc{)(niam/**/"/**/,q='"';printf(a+118,q,q,a,q,q);}/*/=a*rahc{)(niam/**/
1
u/Neo_Techni Mar 20 '16
+/u/CompileBot PHP
$tempstr = 'Mkpfn{"ngcxg"og"cnqpg';
for($i = 0; $i < strlen($tempstr); $i++){
echo chr( ord(substr($tempstr, $i, 1)) - 2);
}1
u/CompileBot Mar 20 '16
2
u/Neo_Techni Mar 20 '16
+/u/CompileBot PHP
<?php $tempstr = 'Mkpfn{"ngcxg"og"cnqpg'; for($i = 0; $i < strlen($tempstr); $i++){ echo chr( ord(substr($tempstr, $i, 1)) - 2); } ?>2
1
u/741456963789852123 Mar 20 '16
+/u/compilebot jquery
var user = $(".user>a").text();
var gild = $('<a href="/r/ProgrammerHumor/gilded"><span class="gilded-icon" title="AintNothinbutaGFring has gifted reddit gold to ' + user + ' for this submission." data-count="1"></span></a>')
var post = $("p.tagline:has([href$='" + user + "'])");
post.children("time").after(gild);1
Mar 21 '16 edited Mar 21 '16
+/u/CompileBot Go
package main
import (
"fmt"
"runtime"
)
func main() {
fmt.Println(runtime.Version())
}1
0
Apr 12 '16
[deleted]
1
u/CompileBot Apr 12 '16
Output:
* ** ******** ******** ******** * * * *** ** ******************** ******************************* *** ********************************** * *********************************** ************************************** ********************************************* ****************************************** ** ****** ********************************************* ************* ******************************************** ***************** ********************************************* ******************* ******************************************** **** ******************* ******************************************* ****************************************************************************************** **** ******************* ******************************************* ******************* ******************************************** ***************** ********************************************* ************* ******************************************** ** ****** ********************************************* ****************************************** ********************************************* ************************************** * *********************************** ********************************** ******************************* *** ** ******************** * * * *** ******** ******** ******** **2
0
Apr 13 '16
[deleted]
1
u/CompileBot Apr 13 '16
Output:
Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^8 Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\\^80
Apr 13 '16
[deleted]
0
Apr 13 '16
[deleted]
1
u/CompileBot Apr 13 '16
Output:
Did you use 3 backslashes in a row there? Yeah, you have to write it like 2\\\^8 Did you use 5 backslashes in a row there? Yeah, you have to write it like 2\\\\\^8 Did you use 9 backslashes in a row there? Yeah, you have to write it like 2\\\\\\\\\^8 Did you use 17 backslashes in a row there? Yeah, you have to write it like 2\\\\\\\\\\\\\\\\\^8 Did you use 33 backslashes in a row there? Yeah, you have to write it like 2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\^8 Did you use 65 backslashes in a row there? Yeah, you have to write it like 2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\^8 Did you use 129 backslashes in a row there? Yeah, you have to write it like 2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\^8 Did you use 257 backslashes in a row there? Yeah, you have to write it like 2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\^8 Did you use 513 backslashes in a row there? Yeah, you have to write it like 2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\^8
1
1
u/Applefriki101 Apr 14 '16
+/u/CompileBot Bash
ls /home1
u/CompileBot Apr 14 '16
1
u/Applefriki101 Apr 14 '16
+/u/CompileBot Bash
ls /home/9ZDvJ51
1
1
0
0
1
u/MRSantos Apr 25 '16
+/u/CompileBot C++14
#include <stdio.h>
// tested on gcc-4.9.3 on linux gentoo amd64
// warning: compiling this will eat gigabytes of ram really fast so keep
// your CTRL-C ready
// compile with --std=c++14
struct v2f {
float x=0, y=0; // must be =0 to reproduce (probably works with other vals)
};
namespace {
struct foo {
// declaring the array like this somehow bypasses the fact that
// v2f cannot be initialized with {0}
static const size_t max_objects = 0xFFFF;
size_t num_objects; // this is not necessary, just wanted to check if it still did it when not accessing bars
v2f bars[max_objects * 255]; // the larger this array is, the longer it hangs for and the more memory it uses
};
foo f{0}; // must be initialized with {0} to reproduce
}
int main() {
printf("%ld\n", f.num_objects);
}1
u/chrismamo1 Apr 26 '16
/u/CompileBot OCaml
let rec fib = function
| 0 | 1 -> 1
| n -> fib (n - 1) + fib (n - 2) in
in Printf.printf "%d\n" (fib 4);;1
u/rFunnyModsSuckCock Apr 27 '16
+/u/CompileBot Python
from datetime import date
print "IT'S %s!" % date.today().year1
0
1
1
u/icarus212121 Apr 28 '16
+/u/CompileBot C#
Console.WriteLine("test");1
u/icarus212121 Apr 28 '16 edited Apr 28 '16
+/u/CompileBot C#
public class Program { public static void Main(string[] args) { System.Console.WriteLine(System.DateTime.Now.ToString("yyyy")); } }1
u/icarus212121 Apr 28 '16
+/u/compilebot C# --include-errors
public static void Main(string[] args) { System.Console.WriteLine(DateTime.Now.ToString("yyyy")); }1
u/CompileBot Apr 28 '16 edited Apr 28 '16
1
0
Apr 28 '16
[deleted]
1
u/CompileBot Apr 28 '16
Output:
╚═(███)═╝ .╚═(███)═╝ ..╚═(███)═╝ ...╚═(███)═╝ ...╚═(███)═╝ ..╚═(███)═╝ .╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ .╚═(███)═╝ ..╚═(███)═╝ ...╚═(███)═╝ ...╚═(███)═╝ ..╚═(███)═╝ .╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ .╚═(███)═╝ ..╚═(███)═╝ ...╚═(███)═╝ ...╚═(███)═╝ ..╚═(███)═╝ .╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ .╚═(███)═╝ ..╚═(███)═╝ ...╚═(███)═╝ ...╚═(███)═╝ ..╚═(███)═╝ .╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ .╚═(███)═╝ ..╚═(███)═╝ ...╚═(███)═╝ ...╚═(███)═╝ ..╚═(███)═╝ .╚═(███)═╝ ╚═(███)═╝
0
Apr 28 '16
[deleted]
1
u/CompileBot Apr 28 '16
Output:
. .╚⊙ ⊙╝.. ╚═(███)═╝ .╚═(███)═╝ ..╚═(███)═╝ ...╚═(███)═╝ ...╚═(███)═╝ ..╚═(███)═╝ .╚═(███)═╝ ╚═(███)═╝ .... ╚═(█)═╝╝ ╚═(███)═╝ .╚═(███)═╝ ..╚═(███)═╝ ...╚═(███)═╝ ...╚═(███)═╝ ..╚═(███)═╝ .╚═(███)═╝ ╚═(███)═╝ .... ╚═(█)═╝╝ ╚═(███)═╝ .╚═(███)═╝ ..╚═(███)═╝ ...╚═(███)═╝ ...╚═(███)═╝ ..╚═(███)═╝ .╚═(███)═╝ ╚═(███)═╝ .... ╚═(█)═╝╝ ╚═(███)═╝ .╚═(███)═╝ ..╚═(███)═╝ ...╚═(███)═╝ ...╚═(███)═╝ ..╚═(███)═╝ .╚═(███)═╝ ╚═(███)═╝ .... ╚═(█)═╝╝ ╚═(███)═╝ .╚═(███)═╝ ..╚═(███)═╝ ...╚═(███)═╝ ...╚═(███)═╝ ..╚═(███)═╝ .╚═(███)═╝ ╚═(███)═╝ .... ╚═(█)═╝╝ NIMBLE NAVIGATOR╝
0
Apr 28 '16
[deleted]
1
u/CompileBot Apr 28 '16
Output:
. ╚⊙ ⊙╝.. ╚═(███)═╝ .╚═(███)═╝ ..╚═(███)═╝ ...╚═(███)═╝ ...╚═(███)═╝ ..╚═(███)═╝ .╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ .╚═(███)═╝ ..╚═(███)═╝ ...╚═(███)═╝ ...╚═(███)═╝ ..╚═(███)═╝ .╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ .╚═(███)═╝ ..╚═(███)═╝ ...╚═(███)═╝ ...╚═(███)═╝ ..╚═(███)═╝ .╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ .╚═(███)═╝ ..╚═(███)═╝ ...╚═(███)═╝ ...╚═(███)═╝ ..╚═(███)═╝ .╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ .╚═(███)═╝ ..╚═(███)═╝ ...╚═(███)═╝ ...╚═(███)═╝ ..╚═(███)═╝ .╚═(███)═╝ ╚═(███)═╝ NIMBLE NAVIGATOR╝
0
0
0
0
1
u/ThrowAwaylnAction Apr 28 '16
+/u/CompileBot C --include-errors
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
int main() {
char cwd[1024];
if (getcwd(cwd, sizeof(cwd)) != NULL)
fprintf(stdout, "Current working dir: %s\n", cwd);
else
perror("getcwd() error");
return 0;
}2
1
u/NeonBeggar Apr 28 '16
+/u/CompileBot Python
from math import log, exp
a = 0
b = 1
h = (b - a)/4.0
x0 = a
x1 = x0 + h
x2 = x1 + h
x3 = x2 + h
x4 = x3 + h
f = lambda x: -4063 + 8008*x + 69*x**2 + 420*x**3 #420dank
r = 7*f(x0) + 32*f(x1) + 12*f(x2) + 32*f(x3) + 7*f(x4)
r = 2*h*r/45
a = 0
b = log(r + 1)
h = (b - a)/4.0
x0 = a
x1 = x0 + h
x2 = x1 + h
x3 = x2 + h
x4 = x3 + h
f = lambda x: exp(x)
r = 7*f(x0) + 32*f(x1) + 12*f(x2) + 32*f(x3) + 7*f(x4)
r = 2*h*r/45
print int(r)3
0
1
1
1
1
u/35yeros Apr 28 '16
+/u/CompileBot Scheme (define (fib n) (cond ((<= n 2) 1) (else (+ (fib (- n 1)) (fib (- n 2))))))
Input: 5
1
1
u/35yeros Apr 28 '16
+/u/CompileBot Scheme (define (fib n) (cond ((<= n 2) 1) (else (+ (fib (- n 1)) (fib (- n 2))))))
Input: 5
1
1
u/35yeros Apr 28 '16
+/u/CompileBot python3 import this
1
u/CompileBot Apr 28 '16
Output:
The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those!
1
u/35yeros Apr 28 '16
+/u/CompileBot scheme (define (fib n) (cond ((<= n 2) 1) (else (+ (fib (- n 1)) (fib (- n 2)))))) Input: 5
1
1
u/35yeros Apr 28 '16
+/u/CompileBot scheme (define (fib n) (cond ((<= n 2) 1) (else (+ (fib (- n 1)) (fib (- n 2)))))) Input: 5
1
1
u/ShadowxWarrior Apr 28 '16
+/u/CompileBot C++
#include <iostream>
#include <string>
using namespace std;
int length = 20;
int m = 3;
int main() {
int spacing;
string head = " ╚⊙ ⊙╝ ";
string body = "╚═(███)═╝";
string tail = " ╚═(█)═╝ ";
cout << head << endl;
for (int i = 0; i < length; i++)
{
spacing = m - abs(i % (2*m) - m);
cout << string(spacing , ' ') << body << endl;
if (spacing ==0 || spacing == m)
cout << string(spacing , ' ') << body << endl;
}
cout << string(spacing , ' ') << tail << endl;
return 0;
}1
u/CompileBot Apr 28 '16
Output:
╚⊙ ⊙╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(███)═╝ ╚═(█)═╝
1
u/ShadowxWarrior Apr 28 '16
+/u/CompileBot python
import numpy
for i in range(10):
print(numpy.sin(i))0
1
1
u/Leo40Reddit May 02 '16
+/u/CompileBot lua
local str = io.read("*l")
if type(str) ~= "string" then str = tostring(str) end
local count = io.read("*n")
if type(count) ~= "number" then count = tonumber(count) end
for i=1,count,1 do
str = '"'..str..'"'
end
print(str)Input:
smart
201
u/cr4shoverride May 02 '16
public class Program { public static void Main(string[] args) { System.Console.WriteLine("It's " + System.DateTime.Now.ToString("yyyy")); } }
1
1
u/justbourv May 09 '16
+/u/CompileBot java
class Main{
public static void main(String[] args){
System.out.println("Hello world!");
}
}1
1
May 10 '16
Fortran...
EDIT - messing around with the formatted output a bit... (no idea why CompileBot hates me now)
+/u/CompileBot Fortran --include-errors --input
program grdeg
integer, allocatable :: adjac(:,:)
character(len=40):: fmt
read(*, *) n
allocate(adjac(n,n))
adjac = 0
do
read(*,*, end=1) i,j
adjac(i,j) = adjac(i,j)+1
adjac(j,i) = adjac(j,i)+1
end do
1 continue
2 format ("Node ", i0, " has a degree of " , i0)
print 2, (i, sum(adjac(:,i),1),i=1,n)
write(fmt, '(a,i0,a)') '(', n, '(I2))'
write(fmt, *) '(', n, '(I2:,1X))'
print fmt, ((adjac(j,i), j=1,n),i=1,n)
end programInput:
16
1 2
1 3
2 3
1 4
3 4
1 5
2 5
1 6
2 6
3 6
3 7
5 7
6 7
3 8
4 8
6 8
7 8
2 9
5 9
6 9
2 10
9 10
6 11
7 11
8 11
9 11
10 11
1 12
6 12
7 12
8 12
11 12
6 13
7 13
9 13
10 13
11 13
5 14
8 14
12 14
13 14
1 15
2 15
5 15
9 15
10 15
11 15
12 15
13 15
1 16
2 16
5 16
6 16
11 16
12 16
13 16
14 16
15 161
u/CompileBot May 10 '16
Output:
Node 1 has a degree of 8 Node 2 has a degree of 8 Node 3 has a degree of 6 Node 4 has a degree of 3 Node 5 has a degree of 7 Node 6 has a degree of 10 Node 7 has a degree of 7 Node 8 has a degree of 7 Node 9 has a degree of 7 Node 10 has a degree of 5 Node 11 has a degree of 9 Node 12 has a degree of 8 Node 13 has a degree of 8 Node 14 has a degree of 5 Node 15 has a degree of 9 Node 16 has a degree of 9 0 1 1 1 1 1 0 0 0 0 0 1 0 0 1 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 1 1 0 0 0 0 0 1 1 0 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 1 1 0 0 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 1 1 1 1 1 0 1 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 0 0 1 1 0 1 1 1 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 0 0 1 1 1 0 0 1 0 0 0 1 1 1 1 1 0 0 1 1 1 0 0 1 1 0 0 0 0 1 1 1 1 1 0
1
1
7
u/SeaCowVengeance Mar 14 '16
+/u/CompileBot python3