Skip to content

Instantly share code, notes, and snippets.

View chrisseaton's full-sized avatar

Chris Seaton chrisseaton

View GitHub Profile
o = "foo".to_java
fenv = o.getClass().getDeclaredField("value")
fenv.setAccessible(true)
p fenv.get(o)
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scalatra#scalatra_2.11;maven(org.scalatra, scalatra_2.11): not found
[warn] :: org.scalatra#scalatra-scalate_2.11;maven(org.scalatra, scalatra_2.11): not found
[warn] :: org.scalatra#scalatra-specs2_2.11;maven(org.scalatra, scalatra_2.11): not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.scalatra:scalatra_2.11:maven(org.scalatra, scalatra_2.11) (/Users/chrisseaton/Documents/army/scala-army/project/build.scala#L25)
tmpfilename = "#{tmpdir}/ruby_tmp.#{$$}"
tmp = open(tmpfilename, "w")
tmp.print "tvi925\n";
tmp.print "tvi920\n";
tmp.print "vt100\n";
tmp.print "Amiga\n";
tmp.print "paper\n";
tmp.close
Array#[]=
Array#collect!
Array#concat
Array#delete_if
Array#eql?
Array#hash
Array#initialize
Array#insert
Array#join
Array#map
$ ~/.rbenv/versions/2.2.1/bin/ruby -I vendor/jruby/1.9/gems/benchmark-ips-2.1.0/lib mandelbrot.rb
Calculating -------------------------------------
while 2.000 i/100ms
loop 1.000 i/100ms
-------------------------------------------------
while 20.800 (± 4.8%) i/s - 624.000
loop 15.778 (± 6.3%) i/s - 473.000
Comparison:
while: 20.8 i/s
# Typical mode, runs the block as many times as it can
x.report("addition") { 1 + 2 }
# To reduce overhead, the number of iterations is passed in
# and the block must run the code the specific number of times.
# Used for when the workload is very small and any overhead
# introduces incorrectable errors.
x.report("addition2") do |times|
i = 0
while i < times
-> Array#each_with_index(core):core: Array#each_with_index
-> ExceptionTranslatingNode@153cb763
-> SequenceNode@2c3158e0
CheckArityNode@412ebe64
-> EachWithIndexObjectRubyProcNode@6f731759
-> YieldDispatchHeadNode@1f84327b
-> CachedYieldDispatchNode(block in each_with_index:core:/core/rubinius/common/struct.rb:142)
-> OptimizedDirectCallNode(target=block in each_with_index:core:/core/rubinius/common/struct.rb:142 <split-0-U>)
UninitializedYieldDispatchNode@39549f33
SelfNode@dbddbe3
/tmp/ruby-build.20150303225220.396 ~
HTTP/1.1 200 OK
Via: 1.1 cc184e2737613cc16ea7b900e5384df1.cloudfront.net (CloudFront)
Date: Tue, 03 Mar 2015 22:54:39 GMT
ETag: "e5973d6e0a16f0390dc2a7478db83ff5"
Server: AmazonS3
X-Cache: Miss from cloudfront
X-Amz-Cf-Id: Lbwf-nsqPgdPMd6mU_cOwocddIUAhW_NLZat-mMY9bXKaQ6zGRntQA==
Content-Type: binary/octet-stream
Accept-Ranges: bytes
2015-02-10T20:18:04.922Z: RubyModule: looking for org.jruby.gen.org$jruby$RubyBasicObject$POPULATOR
2015-02-10T20:18:04.956Z: RubyModule: looking for org.jruby.gen.org$jruby$RubyObject$POPULATOR
2015-02-10T20:18:04.956Z: RubyModule: Could not find it, using default populator
class ShouldWrapper
def initialize(value)
@value = value
end
def ==(other)
if @value == other
puts ":)"
else