Skip to content

Instantly share code, notes, and snippets.

View tak1n's full-sized avatar

Benjamin Klotz tak1n

View GitHub Profile
--------------------
=== Checking for required stuff failed. ===
Makefile wasn't created. Fix the errors above.
"ruby.h"
2:
3: #include <openssl/ssl.h>
/* end */
de/capi/ruby/backward -I/home/benny/rubinius/staging/vm/include/capi -I. -g -O2 -fPIC conftest.c -o conftest.i"
@tak1n
tak1n / 2.1.6
Created April 16, 2015 08:18
Rubinius Melbourne
rubinius ➤ gem install rubinius-melbourne -v '2.3.1.0' git:master* 2.1.6
Error loading RubyGems plugin "/home/benny/.gem/ruby/2.1.6/gems/yard-0.8.2.1/lib/rubygems_plugin.rb": cannot load such file -- rubygems/doc_manager (LoadError)
Fetching: rubinius-melbourne-2.3.1.0.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing rubinius-melbourne:
ERROR: Failed to build gem native extension.
/home/benny/.rubies/2.1.6/bin/ruby extconf.rb
make "DESTDIR=" clean
@tak1n
tak1n / 2.0.0-p645
Created April 16, 2015 08:36
Melbourne 2
rubinius ➤ gem install rubinius-melbourne -v '2.3.1.0' git:master* 2.0.0
Building native extensions. This could take a while...
ERROR: Error installing rubinius-melbourne:
ERROR: Failed to build gem native extension.
/home/benny/.rubies/2.0.0/bin/ruby extconf.rb
make "DESTDIR="
compiling encoding_compat.cpp
g++: error: unrecognized command line option ‘-Wshorten-64-to-32’
rubinius ➤ ruby -v git:master* 2.2.2-gcc
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
rubinius ➤ gem install rubinius-melbourne -v '2.3.1.0' git:master* 2.2.2-gcc
Fetching: rubinius-melbourne-2.3.1.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed rubinius-melbourne-2.3.1.0
Parsing documentation for rubinius-melbourne-2.3.1.0
Installing ri documentation for rubinius-melbourne-2.3.1.0
Done installing documentation for rubinius-melbourne after 0 seconds
1 gem installed
# require 'rubinius/profiler' if RUBY_ENGINE == 'rbx'
large_file = File.join(File.dirname(__FILE__), 'large.txt')
large_handle = File.open(large_file, 'r')
# if RUBY_ENGINE == 'rbx'
# profiler = Rubinius::Profiler::Instrumenter.new
# profiler.start
# end
@tak1n
tak1n / -Xjit.profile
Created May 23, 2015 17:34
Rubinius IO bench
rubinius-bugs ➤ time ruby -Xjit.profile bm_io.rb git:master*
Calculating -------------------------------------
small file 1.000 i/100ms
large file 1.000 i/100ms
-------------------------------------------------
small file 15.033 (± 0.0%) i/s - 75.000
large file 0.034 (± 0.0%) i/s - 1.000 in 29.436828s
Thread 1: total running time: 66.197004546s
% cumulative self self total
@tak1n
tak1n / constant
Created May 25, 2015 10:40
throw and UncaughtThrowError
rubinius-bugs ➤ chruby 2.0.0 git:master*
rubinius-bugs ➤ irb git:master*
irb(main):001:0> p UncaughtThrowError
NameError: uninitialized constant UncaughtThrowError
from (irb):1
from /home/benny/.rubies/2.0.0/bin/irb:12:in `<main>'
irb(main):002:0> exit
rubinius-bugs ➤ chruby 2.1.6 git:master*
rubinius-bugs ➤ irb
```
irb(main):004:0> Rubinius::FFI::Platform::POSIX.method(:chroot)
=> #<Method: Module#chroot (defined in #<Class:Rubinius::FFI::Platform::POSIX>)>
=> #<Method: Module#rmdir (defined in #<Class:Rubinius::FFI::Platform::POSIX>)>
irb(main):003:0> Rubinius::FFI::Platform::POSIX.method(:dirfd)
NameError: undefined method `dirfd' for class Module
from kernel/common/kernel.rb:527:in `method'
from (irb):3
from kernel/common/block_environment.rb:53:in `call_on_instance'
@tak1n
tak1n / diff
Last active August 29, 2015 14:21
rubinius ➤ gd git:2.2*
diff --git a/kernel/common/dir.rb b/kernel/common/dir.rb
index 47d72c1..722fec0 100644
--- a/kernel/common/dir.rb
+++ b/kernel/common/dir.rb
@@ -174,6 +174,10 @@ class Dir
self
end
+ def fileno
rubinius ➤ gd git:2.2*
diff --git a/kernel/common/dir.rb b/kernel/common/dir.rb
index 47d72c1..722fec0 100644
--- a/kernel/common/dir.rb
+++ b/kernel/common/dir.rb
@@ -174,6 +174,10 @@ class Dir
self
end
+ def fileno