Skip to content

Instantly share code, notes, and snippets.

>> require 'rawr'
NameError: uninitialized constant Rawr::JRubyBatchCompiler::JRubyCompiler
from /opt/jruby-1.5.0.RC1/lib/ruby/gems/1.8/gems/rawr-1.3.8/lib/jruby_batch_compiler.rb:6
from /opt/jruby-1.5.0.RC1/lib/ruby/gems/1.8/gems/rawr-1.3.8/lib/jruby_batch_compiler.rb:31:in `require'
from /opt/jruby-1.5.0.RC1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /opt/jruby-1.5.0.RC1/lib/ruby/gems/1.8/gems/rawr-1.3.8/lib/rawr.rb:13
from /opt/jruby-1.5.0.RC1/lib/ruby/gems/1.8/gems/rawr-1.3.8/lib/rawr.rb:36:in `require'
from /opt/jruby-1.5.0.RC1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from (irb):1
require 'jruby/jrubyc'
require 'ostruct'
module Rawr
class JRubyBatchCompiler
include JRubyCompiler
def self.compile_argv
dest_dir = ARGV.pop
# TODO: add ability to carry options through
ruby-1.9.1-p378 > i = 2
=> 2
ruby-1.9.1-p378 > p = Proc.new { i }
=> #<Proc:0x000001009bec10@(irb):44>
ruby-1.9.1-p378 > p.call
=> 2
ruby-1.9.1-p378 > i = 3
=> 3
ruby-1.9.1-p378 > p.call
=> 3
ruby-1.9.1-p378 > i = 2
=> 2
ruby-1.9.1-p378 > p = Proc.new {
ruby-1.9.1-p378 > if j == nil
ruby-1.9.1-p378 ?> j = i
ruby-1.9.1-p378 ?> end
ruby-1.9.1-p378 ?> j
ruby-1.9.1-p378 ?> }
=> #<Proc:0x000001008d7318@(irb):52>
ruby-1.9.1-p378 > p.call
ruby-1.9.1-p378 > i = 2
=> 2
ruby-1.9.1-p378 > i = 3
=> 3
ruby-1.9.1-p378 > p = proc {i = 2; proc {i}}.call
=> #<Proc:0x000001008dc398@(irb):3>
ruby-1.9.1-p378 > p.call
=> 2
ruby-1.9.1-p378 > i = 4
=> 4
int i = 0;
int j = 3;
j = i;
i = 2;
// value of j is 0
{dan@godel ~}$ irb
ruby-1.9.1-p378 > x = 0
=> 0
ruby-1.9.1-p378 > y = 3
=> 3
ruby-1.9.1-p378 > x = y
=> 3
ruby-1.9.1-p378 > y = 2
=> 2
ruby-1.9.1-p378 > x
ruby-1.9.1-p378 > # i'd like this to print 0, 1, 2, 3. not sure how to change things.
ruby-1.9.1-p378 >
ruby-1.9.1-p378 > ps = []
=> []
ruby-1.9.1-p378 > for i in 0..3
ruby-1.9.1-p378 ?> ps.push(proc { puts i })
ruby-1.9.1-p378 ?> end
=> 0..3
ruby-1.9.1-p378 >
ruby-1.9.1-p378 > for p in ps
ruby-1.9.1-p378 > ps = []
=> []
ruby-1.9.1-p378 > 3.times do |i|
ruby-1.9.1-p378 > ps.push(proc { i })
ruby-1.9.1-p378 ?> end
=> 3
ruby-1.9.1-p378 >
ruby-1.9.1-p378 > ps.each do |p|
ruby-1.9.1-p378 > puts p.call
ruby-1.9.1-p378 ?> end
{dan@d-128-95-10-133 ~/proj/ovaimp}$ ls lib/libJAUIModel.jnilib
lib/libJAUIModel.jnilib
{dan@d-128-95-10-133 ~/proj/ovaimp}$ scala
Welcome to Scala version 2.8.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_20).
Type in expressions to have them evaluated.
Type :help for more information.
scala> :cp lib
Added '/Users/dan/proj/ovaimp/lib'. Your new classpath is:
.:/Users/dan/proj/ovaimp/lib