My Recent Pastes (901 and counting)
Pastes by headius (901 and counting)
Below are the 15 most recent pasties by headius.
October 13, 2009
10:39AM EDT
by headius
View more (9 lines)
~/projects/jruby ➔ jruby -e "def foo; foo; end; foo" Error: Your application used more stack memory than the safety cap of 1024k. Specify -J-Xss####k to increase it (#### = cap size in KB). Specify -w for full StackOverflowError stack trace
September 26, 2009
4:30PM EDT
by headius
View more (647 lines)
LoadService: trying builtinLib: builtin/core_ext/symbol.class LoadService: trying builtinLib: builtin/core_ext/symbol.rb LoadService: trying resourceFromLoadPath: /Users/headius/projects/jruby/lib/ruby/site_ruby/1.8/builtin/core_ext/symbol.class LoadService: trying resourceFromLoadPath: /Users/headius/projects/jruby/lib/ruby/site_ruby/1.8/builtin/core_ext/symbol.rb LoadService: trying resourceFromLoadPath: /Users/headius/projects/jruby/lib/ruby/site_ruby/shared/builtin/core_ext/symbol.class
May 15, 2009
5:36PM EDT
by headius
View more (8 lines)
~/projects/jruby ➔ jruby -e "require 'fcntl'; p Fcntl.constants" ["F_SETFL", "FREAD", "F_GETFL", "F_LOG2PHYS", "F_RDLCK", "F_PATHPKG_CHECK", "F_SETFD", "F_FREEZE_FS", "F_SETSIZE", "FFSYNC", "F_NOCACHE", "F_ADDSIGS", "F_RDAHEAD", "F_ALLOCATECONTIG", "F_ALLOCATEALL", "F_GLOBAL_NOCACHE", "FWRITE", "F_SETLKW", "F_SETOWN", "FNDELAY", "FASYNC", "F_THAW_FS", "FAPPEND", "F_FULLFSYNC", "F_MARKDEPENDENCY", "F_SETLK", "F_CHKCLEAN", "F_PREALLOCATE", "F_WRLCK", "F_WRITEBOOTSTRAP", "F_READBOOTSTRAP", "F_GETOWN", "F_GETLK", "F_GETPATH", "F_DUPFD", "F_UNLCK", "FNONBLOCK", "F_GETFD", "F_RDADVISE"] ~/projects/jruby ➔ ruby -e "require 'fcntl'; p Fcntl.constants" ["F_DUPFD", "F_WRLCK", "O_ACCMODE", "F_SETLKW", "O_NDELAY", "F_SETFD", "O_NOCTTY", "F_UNLCK", "O_WRONLY", "F_SETLK", "O_NONBLOCK", "F_GETLK", "O_EXCL", "F_RDLCK", "O_RDWR", "F_SETFL", "O_APPEND", "F_GETFD", "O_CREAT", "FD_CLOEXEC", "O_RDONLY", "F_GETFL", "O_TRUNC"]
April 18, 2009
11:54AM EDT
by headius
View more (25 lines)
require 'spec/ruby' if ::Spec::Ruby.version < "1.8.7" # based on Bounded Spec InstanceExec (Mauricio Fernandez) # http://eigenclass.org/hiki/bounded+space+instance_exec
April 16, 2009
4:42PM EDT
by headius
View more (9 lines)
require 'benchmark' (ARGV[0] || 1).to_i.times do Benchmark.bm(30) do |bm| bm.report("control") { 1_000_000.times { a = ''; a = 'hello'; a = 'hello'; a = 'hello' } }
April 14, 2009
8:20PM EDT
by headius
View more (30 lines)
diff --git a/src/java/org/jruby/ext/openssl/x509store/Purpose.java b/src/java/org/jruby/ext/openssl/x509store/Purpose.javaindex 59df5e7..9a2a668 100755--- a/src/java/org/jruby/ext/openssl/x509store/Purpose.java+++ b/src/java/org/jruby/ext/openssl/x509store/Purpose.java@@ -32,6 +32,7 @@ import java.util.ArrayList;
April 14, 2009
5:47PM EDT
by headius
View more
(18 lines)
Includes file attachment.
if alpha if beta if charlie if delta echo
February 04, 2009
1:39AM EDT
by headius
View more (8 lines)
[java]
[java] 1)
[java] 'Struct aligns fields correctly long long, followed by an int' FAILED
[java] expected: 64,
[java] got: 16 (using ==)
February 02, 2009
1:28PM EDT
by headius
◆ ruby -e "p(0.7 * 24)" 16.8 ◆ jruby -e "p(0.7 * 24)" 16.799999999999997
January 23, 2009
4:57PM EDT
by headius
View more (41 lines)
masgn an expression (array is needed):
LINENUMBER 1 L0
ALOAD 1
ICONST_0
January 23, 2009
4:52PM EDT
by headius
View more (21 lines)
Multiple assignment benchmark
JRuby 1.2
user system total real
control, 1m while loop 0.056000 0.000000 0.056000 ( 0.055758)
January 22, 2009
4:36PM EDT
by headius
View more (19 lines)
JRuby
user system total real
control, 1m while loop 0.052000 0.000000 0.052000 ( 0.051715)
near closure, 1m x10 a,a=a,a 0.067000 0.000000 0.067000 ( 0.066145)
in closure, 1m x10 a,a=a,a 0.055000 0.000000 0.055000 ( 0.055218)
January 22, 2009
4:27PM EDT
by headius
View more (66 lines)
[headius @ cnutter:~/projects/rbx] ◆ ruby benchmark/rubinius/bm_splat.rb Rehearsal --------------------------------------------------- a = 1 0.160000 0.000000 0.160000 ( 0.158555) a,b = *splat 0.410000 0.000000 0.410000 ( 0.414168)
January 22, 2009
3:15AM EDT
by headius
View more (19 lines)
require 'benchmark' def bench_rescue(bm) bm.report("control") { 1_000_000.times { foo1 } } bm.report("one rescue") { 1_000_000.times { foo2a } }
January 22, 2009
2:50AM EDT
by headius
View more (15 lines)
JRuby user system total real control 0.090000 0.000000 0.090000 ( 0.089813) one rescue 0.269000 0.000000 0.269000 ( 0.269248) one rescue + raise 0.253000 0.000000 0.253000 ( 0.253457)
