Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add clojure support.

  • Loading branch information...
commit c35d6d8885a7db7840d938d314d2c19e5d54552a 1 parent be2b713
@nbeloglazov nbeloglazov authored
View
7 README
@@ -33,7 +33,7 @@ Installing python specific packages
$ sudo apt-get install python-yaml
-Installing addeditional dependences for tester
+Installing additional dependences for tester
$ sudo apt-get install timeout
@@ -44,4 +44,7 @@ $ tar xvf gprolog-1.4.0.tar.gz
$ cd gprolog-1.4.0/src
$ ./configure
$ make
-$ sudo make install
+$ sudo make install
+
+Installing clojure (run gen_playgrounds.py script before to create playground)
+$ wget http://search.maven.org/remotecontent\?filepath\=org/clojure/clojure/1.4.0/clojure-1.4.0.jar -O %PATH_TO_PlAYGROUND%/sandbox-files/clojure-1.4.0.jar
View
6 gen_playgrounds/java.policy
@@ -0,0 +1,6 @@
+grant {{
+ permission java.io.FilePermission "{0}-", "read";
+ permission java.util.PropertyPermission "*", "read";
+ permission java.lang.RuntimePermission "createClassLoader";
+}};
+
View
8 languages/clojure.py
@@ -0,0 +1,8 @@
+from task import Task
+
+SANDBOX_FILES_PATH = '/home/playground/sandbox-files/'
+
+class ClojureTask(Task):
+
+ execute_string = "java -Djava.security.manager -Xmx140m -Djava.security.policy={0}java.policy -cp {0}clojure-1.4.0.jar clojure.main {{0}}solution.clj".format(SANDBOX_FILES_PATH)
+ filenames = ["solution.clj"]
View
0  tasks/CLOJURE/__init__.py
No changes.
View
0  tasks/CLOJURE/hello-world/00.in
No changes.
View
1  tasks/CLOJURE/hello-world/00.out
@@ -0,0 +1 @@
+Hello, world.
View
0  tasks/CLOJURE/hello-world/__init__.py
No changes.
View
1  tasks/CLOJURE/hello-world/solution/solution.clj
@@ -0,0 +1 @@
+(println "Hello, world.")
View
6 tasks/CLOJURE/hello-world/task.py
@@ -0,0 +1,6 @@
+from languages.clojure import ClojureTask
+
+# Description
+# Write 'Hello, world.' to console.
+
+task = ClojureTask()
Please sign in to comment.
Something went wrong with that request. Please try again.