Skip to content

Instantly share code, notes, and snippets.

View yorickpeterse's full-sized avatar

Yorick Peterse yorickpeterse

View GitHub Profile
Starting program: /home/yorickpeterse/.rubies/rbx-git/bin/rbx -S bundle install
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff4cf7700 (LWP 17025)]
[New Thread 0x7ffff48f6700 (LWP 17026)]
[New Thread 0x7ffff44f5700 (LWP 17027)]
[New Thread 0x7fffe7fff700 (LWP 17028)]
[New Thread 0x7fffe7bfe700 (LWP 17029)]
lib/ll/parser.rll:11:1:error: first/first conflict, multiple branches start with the same terminals
X = A | A;
^
lib/ll/parser.rll:11:5:error: branch starts with: T_NAME, epsilon
X = A | A;
^
lib/ll/parser.rll:11:9:error: branch starts with: T_NAME, epsilon
X = A | A;
^
lib/ll/parser.rll:8:5:error: first/follow conflict, branch can start with epsilon and is followed by (non) terminals

Thread::Backtrace::Location

The Location class is used by Kernel#caller_locations to store information of every call frame in a call stack. Instances of this class can store information such as:

  • The path to the file where the frame originated from
  • The name of the context of the frame (method name, "block", etc)
  • The line number where the frame originated from
** Invoke install (first_time)
** Invoke build:build (first_time)
** Invoke vm/vm (first_time)
** Invoke vm/gen/config_variables.h (first_time, not_needed)
** Invoke library/rubinius/configuration.rb (first_time, not_needed)
** Invoke config.rb (first_time, not_needed)
** Invoke vm/gen/signature.h (first_time, not_needed)
** Invoke kernel/signature.rb (first_time, not_needed)
** Invoke kernel/bootstrap/load_order.txt (first_time, not_needed)
** Invoke kernel/common/load_order.txt (first_time, not_needed)
Thread 8 (Thread 0x7fb85e81b700 (LWP 14846)):
#0 0x00007fb85d8f28cf in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1 0x000000000089397d in wait (this=<optimized out>, mutex=...) at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/util/thread.hpp:448
#2 worker_wait (this=<optimized out>) at vm/gc/finalize.cpp:420
#3 rubinius::FinalizerThread::run (this=0x1fbdb80, state=0x7fb85e81aec0) at vm/gc/finalize.cpp:142
#4 0x000000000060b0a1 in rubinius::InternalThread::run (ptr=0x1fbdb80) at vm/internal_threads.cpp:46
#5 0x00007fb85d8ed314 in start_thread () from /usr/lib/libpthread.so.0
#6 0x00007fb85ca8224d in clone () from /usr/lib/libc.so.6
Starting program: /home/yorickpeterse/Private/Projects/ruby/rubinius/staging/bin/rbx -e foo
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff7f8f700 (LWP 25155)]
[New Thread 0x7ffff4cf7700 (LWP 25156)]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7066410 in pthread_join () from /usr/lib/libpthread.so.0
Starting program: /home/yorickpeterse/.rubies/rbx-git/bin/ruby -e Rubinius::VariableScope.new.locals
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff7f8f700 (LWP 15561)]
[New Thread 0x7ffff4cf7700 (LWP 15562)]
[New Thread 0x7ffff4bf6700 (LWP 15563)]
[New Thread 0x7ffff4af5700 (LWP 15564)]
[New Thread 0x7ffff49f4700 (LWP 15565)]
git clone git@github.com:YorickPeterse/oga.git
git checkout ruby-ll # if this complains, use git checkout -b ruby-ll origin/ruby-ll
bundle install
gem install oga
rake generate fixtures
# To benchmark the old parser, open benchmark/benchmark_helper.rb
# and replace the require_relative on line 5 with require 'oga'
# Then to benchmark it:
require 'benchmark/ips'
module Enumerable
def each_cons(num)
n = Rubinius::Type.coerce_to_collection_index num
raise ArgumentError, "invalid size: #{n}" if n <= 0
return to_enum(:each_cons, num) {
if (enum_size = enumerator_size).nil?
nil
# Based on the JSON output as listed at
# http://www.w3.org/TR/html5/syntax.html#named-character-references
DECODE_MAPPING = {
"&Aacute;" => [193].pack('U'),
"&Aacute" => [193].pack('U'),
"&aacute;" => [225].pack('U'),
"&aacute" => [225].pack('U'),
"&Abreve;" => [258].pack('U'),
"&abreve;" => [259].pack('U'),
"&ac;" => [8766].pack('U'),