Skip to content

Instantly share code, notes, and snippets.

Avatar

Karol Hosiawa hosiawak

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am hosiawak on github.
  • I am hosiawak (https://keybase.io/hosiawak) on keybase.
  • I have a public key ASDsQLbWDgviO_U4JShCQ_q0QHMnSJiX_OnEqaofGLrmyAo

To claim this, I am signing this object:

View gist:15661b9f9d269f8e4f7a9a62db444429
# Ubuntu Server Quick Install
# by Dustin Kirkland <kirkland@ubuntu.com>
# * Documentation: http://bit.ly/uquick-doc
d-i debian-installer/locale string en_US.UTF-8
d-i debian-installer/splash boolean false
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i console-setup/variantcode string
d-i netcfg/get_nameservers string
View gist:8736935
karol@brenta: (master) $ sudo pip uninstall asciinema requests
Uninstalling asciinema:
/Library/Python/2.7/site-packages/asciinema-0.9.7-py2.7.egg-info
/Library/Python/2.7/site-packages/asciinema/__init__.py
/Library/Python/2.7/site-packages/asciinema/__init__.pyc
/Library/Python/2.7/site-packages/asciinema/__main__.py
/Library/Python/2.7/site-packages/asciinema/__main__.pyc
/Library/Python/2.7/site-packages/asciinema/asciicast.py
/Library/Python/2.7/site-packages/asciinema/asciicast.pyc
/Library/Python/2.7/site-packages/asciinema/commands/__init__.py
View gist:8731733
karol@brenta: (master) $ asciinema rec
Traceback (most recent call last):
File "/usr/local/bin/asciinema", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
View gist:6039750
karol@brenta:~/projects/personal/rubinius (master) $ ./bin/benchmark benchmark/real_world/bench_red_black_tree.rb
=== bin/rbx ===
#delete
Error in benchmark/real_world/bench_red_black_tree.rb:
An exception occurred
undefined method `color' on nil:NilClass. (NoMethodError)
Backtrace:
Kernel(NilClass)#color (method_missing) at kernel/delta/kernel.rb:81
RedBlackTree#delete_fixup at benchmark/real_world/bench_red_black_tree.rb:292
View gist:5046399
[BUG] cross-thread violation on rb_gc()
(null)
Abort trap: 6
View Rubinius vs. Ruby head (Float ops)
karol@brenta:~/projects/personal/rubinius (master) $ ruby-head --version
ruby 2.0.0dev (2013-02-18) [x86_64-darwin12.2.1]
karol@brenta:~/projects/personal/rubinius (master) $ ./bin/benchmark -t ./bin/rbx -t ^ruby-head benchmark/core/float/
Found rvm-managed ruby: ruby-head
=== ./bin/rbx ===
Float + Float => Float
39644327.2 (±1.9%) i/s - 197996600 in 4.996082s (cycle=147100)
Float + Fixnum => Float
39234682.7 (±1.3%) i/s - 196176456 in 5.000912s (cycle=199976)
Float + Bignum => Float
View Rubinius vs. jRuby (Float ops)
karol@brenta:~/projects/personal/rubinius (master) $ ./bin/benchmark -t ./bin/rbx -t ^jruby-head benchmark/core/float/
Found rvm-managed ruby: jruby-head
=== ./bin/rbx ===
Float + Float => Float
39686069.1 (±1.8%) i/s - 198278330 in 4.997819s (cycle=150782)
Float + Fixnum => Float
39260502.9 (±1.3%) i/s - 196248960 in 4.999449s (cycle=204426)
Float + Bignum => Float
17241576.8 (±1.4%) i/s - 86161361 in 4.998290s (cycle=186901)
Float <=> Float 61874317.8 (±2.2%) i/s - 309180168 in 4.999567s (cycle=203676)
View gist:4961167
karol@brenta:~/projects/personal/rubinius (master) $ ./bin/benchmark -t ./bin/rbx -t ^maglev-head -t ^jruby-head -t ^ruby-2.0.0-preview1 -t ^ruby-1.8.7-p248 benchmark/octane/bench_raytrace.rb
Found rvm-managed ruby: maglev-head
Found rvm-managed ruby: jruby-head
Found rvm-managed ruby: ruby-2.0.0-preview1
Found rvm-managed ruby: ruby-1.8.7-p248
=== ./bin/rbx ===
#render_scene 527.3 (±3.0%) i/s - 2640 in 5.011487s (cycle=33)
=== /Users/karol/.rvm/rubies/maglev-head/bin/ruby ===
#render_scene 191.0 (±1.6%) i/s - 969 in 5.074275s (cycle=19)
=== /Users/karol/.rvm/rubies/jruby-head/bin/ruby ===
View etc.c
#ifdef HAVE_GETGRENT
static VALUE
setup_group(grp)
struct group *grp;
{
VALUE mem;
char **tbl;
mem = rb_ary_new();
tbl = grp->gr_mem;