]> iEval git - gruntmaster-daemon.git/commitdiff
Add Julia
authorSergiu <srg.pscs@gmail.com>
Thu, 21 Jan 2016 03:32:46 +0000 (05:32 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 23 Jan 2016 15:51:09 +0000 (15:51 +0000)
gruntmaster-compile
lib/Gruntmaster/Daemon.pm
t/01-jobs.t
t/problems/hello/tests/julia/meta.yml [new file with mode: 0644]
t/problems/hello/tests/julia/prog.jl [new file with mode: 0644]

index 78c474530b6e38efebc0df3ae912757115f527c5..794b514b63edb71c5cb5c13f1c52980bb21c67d5 100755 (executable)
@@ -30,10 +30,11 @@ given ($format){
        exec 'ghc', qw/-DONLINE_JUDGE -Wall -O2 -o/, $basename, $name when 'HASKELL';
        exec 'rustc', qw/-O -o/, $basename, $name when 'RUST';
 
-       when ([qw/GOLFSCRIPT PERL PYTHON RUBY SBCL/]){
+       when ([qw/GOLFSCRIPT JULIA PERL PYTHON RUBY SBCL/]){
                open IN, '<', $name;
                open OUT, '>', $basename;
                print OUT "#!/usr/bin/golfscript\n"    if $_ eq 'GOLFSCRIPT';
+               print OUT "#!/usr/bin/julia -O\n"      if $_ eq 'JULIA';
                print OUT "#!/usr/bin/perl\n"          if $_ eq 'PERL';
                print OUT "#!/usr/bin/python\n"        if $_ eq 'PYTHON';
                print OUT "#!/usr/bin/ruby\n"          if $_ eq 'RUBY';
@@ -84,6 +85,10 @@ Compile commands for each format:
 
   javac $input
 
+=item JULIA
+
+  cp $input $output
+
 =item PASCAL
 
   fpc -dONLINE_JUDGE -O2 $input
index b64d56ab14fce8f8e586f5d0d00e5b8a040d15ce..db2c757ac7bcef45f243eee0ed2ea5a4ad410d40 100644 (file)
@@ -24,8 +24,9 @@ use constant FORMAT_EXTENSION => {
        GOLANG => 'go',
        GOLFSCRIPT => 'gs',
        HASKELL => 'hs',
-       MONO => 'cs',
        JAVA => 'java',
+       JULIA => 'jl',
+       MONO => 'cs',
        PASCAL => 'pas',
        PERL => 'pl',
        PYTHON => 'py',
index d178f851744e666039c220f187bf04838b78ed20..1270358fbebe1d60fc0b1ce5024b51b524fa710c 100644 (file)
@@ -24,6 +24,7 @@ use constant COMPILER => {
           GOLFSCRIPT golfscript
           MONO gmcs
           JAVA javac
+          JULIA julia
           PASCAL fpc
           GOLANG go
           GCCGO gccgo
@@ -34,7 +35,7 @@ use constant COMPILER => {
           RUST rustc
           SBCL sbcl/};
 
-my %needs_fork = map { $_ => 1 } qw/GOLANG GOLFSCRIPT GCCGO JAVA RUBY/;
+my %needs_fork = map { $_ => 1 } qw/GOLANG GOLFSCRIPT GCCGO JAVA JULIA RUBY/;
 
 my $loglevel = $ENV{TEST_LOG_LEVEL} // ($ENV{TEST_VERBOSE} ? 'TRACE' : 'OFF');
 my $log_conf = <<CONF;
diff --git a/t/problems/hello/tests/julia/meta.yml b/t/problems/hello/tests/julia/meta.yml
new file mode 100644 (file)
index 0000000..316d258
--- /dev/null
@@ -0,0 +1,7 @@
+test_name: Julia
+test_description: Hello world in Julia
+problem: hello
+files:
+  prog:
+    format: JULIA
+    name: prog.jl
diff --git a/t/problems/hello/tests/julia/prog.jl b/t/problems/hello/tests/julia/prog.jl
new file mode 100644 (file)
index 0000000..e9265cb
--- /dev/null
@@ -0,0 +1 @@
+println("Hello World!")
This page took 0.032527 seconds and 4 git commands to generate.