Skip to content

Instantly share code, notes, and snippets.

View chrisseaton's full-sized avatar

Chris Seaton chrisseaton

View GitHub Profile
chrisseaton@Chriss-MacBook-Pro-2:~/Documents/ruby/jruby [master] $ jt run -Xtruffle.backtraces.hide_core_files=false ../test.rb
$ /Users/chrisseaton/Documents/ruby/jruby/bin/jruby -X+T -Xtruffle.backtraces.hide_core_files=false ../test.rb
../test.rb:2:in `bar': foo (RuntimeError)
from ../test.rb:7:in `block in foo'
from core: Array#each:in `Array#each'
from ../test.rb:6:in `foo'
from ../test.rb:12:in `block in <main>'
from core:/core/rubinius/common/kernel.rb:537:in `loop'
from ../test.rb:11:in `<main>'
FAILED (pid 37636 exit 1): /Users/chrisseaton/Documents/ruby/jruby/bin/jruby -X+T -Xtruffle.backtraces.hide_core_files=false ../test.rb
package org.jruby.truffle.nodes.core.array;
import java.util.EnumSet;
import com.oracle.truffle.api.object.*;
import org.jruby.truffle.om.dsl.api.UnexpectedLayoutRefusalException;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.CompilerAsserts;
import org.jruby.truffle.nodes.core.array.ArrayNodes.ArrayLayout;
import org.jruby.truffle.nodes.core.BasicObjectLayoutImpl;
module ModuleSpecs
module A
CONSTANT_A = :a
#OVERRIDE = :a
#def ma(); :a; end
#def self.cma(); :a; end
end
module B

Truffle

JRuby 9000 includes an preliminary version of support for the Truffle language implementation framework and Graal VM from Oracle Labs. In future releases, Truffle will provide an extremely high performance and compatible backend for JRuby. The Truffle backend supports almost all Ruby language features and the majority of the core library, and is able to run simple gems and web frameworks such as Sinatra. It has no support for RubyGems, Rails or any database drivers, does not work on Windows, and is not ready to be tested with applications at this stage. More information on Truffle and Graal can be found in the JRuby Wiki https://github.com/jruby/jruby/wiki/Truffle.

# Copied with little modifications from: http://benchmarksgame.alioth.debian.org/u32/program.php?test=nbody&lang=yarv&id=2
# 10000000
SOLAR_MASS = 4 * Math::PI**2
DAYS_PER_YEAR = 365.24
class Planet
property :x
property :y
require 'parser'
file = '/Users/chrisseaton/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/parser-2.2.2.5/lib/parser/lexer.rb'
source_buffer = Parser::Source::Buffer.new(file)
source_buffer.read
lexer = Parser::Lexer.new('0')
lexer.source_buffer = source_buffer
NotImplementedError: NotImplementedError
initialize at /Users/chrisseaton/Documents/ruby/concurrent-ruby/lib/concurrent/synchronization/abstract_object.rb:32
initialize at /Users/chrisseaton/Documents/ruby/concurrent-ruby/lib/concurrent/at_exit.rb:12
Concurrent at /Users/chrisseaton/Documents/ruby/concurrent-ruby/lib/concurrent/at_exit.rb:93
(root) at /Users/chrisseaton/Documents/ruby/concurrent-ruby/lib/concurrent/at_exit.rb:4
require at org/jruby/RubyKernel.java:1071
(root) at /Users/chrisseaton/.rbenv/versions/jruby-1.7.19/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1
require at /Users/chrisseaton/.rbenv/versions/jruby-1.7.19/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54
require at org/jruby/RubyKernel.java:1071
(root) at /Users/chrisseaton/Documents/ruby/concurrent-ruby/lib/concurrent.rb:4
[exec] 1)
[exec] IPAddr#hton converts IPAddr to network byte order ERROR
[exec] TypeError: Truffle doesn't have a case for the org.jruby.truffle.nodes.core.BignumNodesFactory$RightShiftNodeFactory$RightShiftNodeGen node with values of type Bignum(org.jruby.truffle.runtime.core.RubyBignum) java.lang.Long=112
[exec] path/build/lib/ruby/truffle/mri/../../stdlib/ipaddr.rb:241:in `>>': Truffle doesn't have a case for the org.jruby.truffle.nodes.core.BignumNodesFactory$RightShiftNodeFactory$RightShiftNodeGen node with values of type Bignum(org.jruby.truffle.runtime.core.RubyBignum) java.lang.Long=112 (TypeError)
[exec] from path/build/lib/ruby/truffle/mri/../../stdlib/ipaddr.rb:241:in `block in hton'
[exec] from path/build/lib/ruby/truffle/mri/../../stdlib/ipaddr.rb:240:in `hton'
[exec] from path/build/spec/ruby/library/ipaddr/hton_spec.rb:8:in `block in <main>'
[exec] from core:/core/rubinius/common/enumerable.rb:354:in `block in all?'
[exec] from core:/core
$ ./mvnw -Pcomplete
[INFO] Scanning for projects...
deprecated repository, use :url => '...'
deprecated repository, use :url => '...'
deprecated repository, use :url => '...'
deprecated repository, use :url => '...'
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.jruby:jruby-complete:[unknown-version]: Could not find artifact org.jruby:jruby-artifacts:pom:9.0.0.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @
@
[ERROR] The build could not read 1 project -> [Help 1]