Permalink
Browse files

Move to "Surinx" name.

  • Loading branch information...
1 parent 03f31f6 commit e6ea1bf8d0d882da20ccf33cae0410cdcc4d52ce @headius committed Aug 26, 2009
View
10 README.txt
@@ -1,18 +1,18 @@
-==Preparing to run Juby==
+==Preparing to run Surinx==
You will need MLVM/Da Vinci machine with current patches.
Compile the bootstrap class:
- javac src/com/headius/juby/SimpleJavaBootstrap.java
+ javac src/com/headius/surinx/SimpleJavaBootstrap.java
-==Compiling Juby source==
+==Compiling Surinx source==
-jruby -J-cp src -J-XX:+EnableInvokeDynamic bin/jubyc <src.jb>
+jruby -J-cp src -J-XX:+EnableInvokeDynamic bin/surinxc <src.jb>
or
-jruby -J-cp src -J-XX:+EnableInvokeDynamic bin/jubyc -e "juby script here"
+jruby -J-cp src -J-XX:+EnableInvokeDynamic bin/surinxc -e "surinx script here"
The latter will produce a "dash_e.class"
View
8 bin/juby → bin/surinx
@@ -4,14 +4,14 @@ require 'java'
$CLASSPATH << File.join(File.dirname(__FILE__), '..', 'src')
begin
- require 'juby'
+ require 'surinx'
rescue LoadError
begin
require 'rubygems'
- require 'juby'
+ require 'surinx'
rescue LoadError
$: << File.join(File.dirname(__FILE__), '..', 'lib')
- require 'juby'
+ require 'surinx'
end
end
@@ -24,7 +24,7 @@ elsif ARGV[0]
name = ARGV[0]
index = 1
else
- raise "usage: jubyc -e \"script\" or jubyc <file.jb>"
+ raise "usage: surinxc -e \"script\" or surinxc <file.sx>"
end
node = JRuby.parse(src)
View
8 bin/jubyc → bin/surinxc
@@ -4,14 +4,14 @@ require 'java'
$CLASSPATH << File.join(File.dirname(__FILE__), '..', 'src')
begin
- require 'juby'
+ require 'surinx'
rescue LoadError
begin
require 'rubygems'
- require 'juby'
+ require 'surinx'
rescue LoadError
$: << File.join(File.dirname(__FILE__), '..', 'lib')
- require 'juby'
+ require 'surinx'
end
end
@@ -22,7 +22,7 @@ elsif ARGV[0]
src = File.read(ARGV[0])
name = ARGV[0]
else
- raise "usage: jubyc -e \"script\" or jubyc <file.jb>"
+ raise "usage: surinxc -e \"script\" or surinxc <file.sx>"
end
node = JRuby.parse(src)
View
34 examples/Fib.java
@@ -0,0 +1,34 @@
+public class Fib {
+ public static void main(String[] args) {
+ System.out.println(fib(Long.valueOf(40)));
+ System.out.println(fib(Long.valueOf(40)));
+ System.out.println(fib(Long.valueOf(40)));
+ System.out.println(fib(Long.valueOf(40)));
+ System.out.println(fib(Long.valueOf(40)));
+ System.out.println(fib(Long.valueOf(40)));
+ System.out.println(fib(Long.valueOf(40)));
+ System.out.println(fib(Long.valueOf(40)));
+ System.out.println(fib(Long.valueOf(40)));
+ System.out.println(fib(Long.valueOf(40)));
+ }
+
+ public static Long fib(Long a) {
+ if (lt(a, Long.valueOf(2))) {
+ return a;
+ } else {
+ return plus(fib(minus(a, Long.valueOf(1))), fib(minus(a, Long.valueOf(2))));
+ }
+ }
+
+ public static Long plus(Long a, Long b) {
+ return a + b;
+ }
+
+ public static Long minus(Long a, Long b) {
+ return a - b;
+ }
+
+ public static Boolean lt(Long a, Long b) {
+ return a < b;
+ }
+}
View
0 examples/fib.jb → examples/fib.sx
File renamed without changes.
View
0 examples/loop.jb → examples/loop.sx
File renamed without changes.
View
0 examples/loop_floats.jb → examples/loop_floats.sx
File renamed without changes.
View
1 lib/juby.rb
@@ -1 +0,0 @@
-require 'juby/compiler'
View
1 lib/surinx.rb
@@ -0,0 +1 @@
+require 'surinx/compiler'
View
0 lib/juby/ast.rb → lib/surinx/ast.rb
File renamed without changes.
View
4 lib/juby/compiler.rb → lib/surinx/compiler.rb
@@ -1,4 +1,4 @@
-require 'juby/ast'
+require 'surinx/ast'
require 'bitescript'
require 'jruby'
@@ -154,7 +154,7 @@ def bootstrap
@cb.static_init do
ldc this.name
invokestatic java.lang.Class, "forName", [java.lang.Class, string]
- invokestatic com.headius.juby.SimpleJavaBootstrap, "registerBootstrap", [void, java.lang.Class]
+ invokestatic com.headius.surinx.SimpleJavaBootstrap, "registerBootstrap", [void, java.lang.Class]
returnvoid
end
@cb.bootstrapped = true
View
4 nbproject/project.properties
@@ -1,10 +1,10 @@
-file.reference.juby-src=src
+file.reference.surinx-src=src
javac.classpath=\
${file.reference.indy_mock.jar}
main.file=
platform.active=default
source.encoding=UTF-8
src.bin.dir=bin
-src.dir=${file.reference.juby-src}
+src.dir=${file.reference.surinx-src}
src.examples.dir=examples
src.lib.dir=lib
View
2 nbproject/project.xml
@@ -3,7 +3,7 @@
<type>org.netbeans.modules.ruby.rubyproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/ruby-project/1">
- <name>juby</name>
+ <name>surinx</name>
<source-roots>
<root id="src.bin.dir"/>
<root id="src.dir" name="src"/>
View
2 ...com/headius/juby/SimpleJavaBootstrap.java → ...m/headius/surinx/SimpleJavaBootstrap.java
@@ -3,7 +3,7 @@
* and open the template in the editor.
*/
-package com.headius.juby;
+package com.headius.surinx;
import java.dyn.CallSite;
import java.dyn.Linkage;

0 comments on commit e6ea1bf

Please sign in to comment.