Skip to content

Instantly share code, notes, and snippets.

@reklis
Created October 2, 2014 20:05
Show Gist options
  • Save reklis/6694ad5fb01991a79a1a to your computer and use it in GitHub Desktop.
Save reklis/6694ad5fb01991a79a1a to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
make clean all
echo "ruby\t" $(ruby test.rb)
echo "python\t" $(python test.py)
echo "node\t" $(node test.js)
echo "java\t" $(java test)
echo "c\t" $(./test.o)
all: test.class test.o
test.class: test.java
javac test.java
test.o: test.c
clang test.c -o test.o
clean:
rm test.class
rm test.o
public class test {
public static void main(String[] argv) {
double nine = 9.0d;
double pointOhOhOne = 0.001d;
double result = nine * pointOhOhOne;
System.out.println(result);
}
}
#!/usr/bin/env node
var nine = 9.0;
var pointOhOhOne = 0.001;
var result = nine * pointOhOhOne;
console.log(result);
#!/usr/bin/env python
nine = 9.0
pointOhOhOne = 0.001
result = nine * pointOhOhOne
print result
#!/usr/bin/env ruby
nine = 9.0
pointOhOhOne = 0.001
result = nine * pointOhOhOne
print result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment