Skip to content

Instantly share code, notes, and snippets.

View yorickpeterse's full-sized avatar

Yorick Peterse yorickpeterse

View GitHub Profile
digraph pick_ruby {
rankdir = "TB";
size = "8.5";
esep = 1;
splines = true;
graph [fontname = "Open Sans" fontsize=18];
edge [fontname = "Open Sans" fontsize=18];
node [shape = "rect" fontname = "Open Sans" fontsize=18];
"Do you want concurrency and/or parallelism?" -> "Are you a sadist?" [label = "No"];
def on_call_id(input, arg)
orig_input = original_input_literal
node = node_literal
ids_var = unique_literal('ids')
matched = unique_literal('id_matched')
id_str_var = unique_literal('id_string')
attr_var = unique_literal('attr')
matched_assign = matched.assign(literal(XML::NodeSet).new)
Jul 31 14:36:47 [11334] <Warn> Object::copy_object: invalid ivars_ reference for da0381d640a7fea68cab4c88c6d0cbb8
Jul 31 14:36:47 [11334] <Warn> Object::copy_object: invalid ivars_ reference for da0381d640a7fea68cab4c88c6d0cbb8
Jul 31 14:36:47 [11334] <Warn> Object::copy_object: invalid ivars_ reference for {"id":7706,"reviewer_origin":"ceec4312394b8b53fa0de01bae6d7f0f","travel_type":null,"travel_composition":null}
Jul 31 14:36:47 [11334] <Warn> Object::copy_object: invalid ivars_ reference for {"id":7706,"reviewer_origin":"ceec4312394b8b53fa0de01bae6d7f0f","travel_type":null,"travel_composition":null}
Jul 31 14:36:47 [11334] <Warn> Object::copy_object: invalid ivars_ reference for {"id":7706,"reviewer_origin":"ceec4312394b8b53fa0de01bae6d7f0f","travel_type":null,"travel_composition":null}
Jul 31 14:36:47 [11334] <Warn> Object::copy_object: invalid ivars_ reference for {"id":7706,"reviewer_origin":"ceec4312394b8b53fa0de01bae6d7f0f","travel_type":null,"travel_composition":null}
Jul 31 14:36:47 [11334] <Warn> O
$:.unshift(File.expand_path('../lib', __FILE__))
require 'oga'
require 'benchmark/ips'
require 'nokogiri'
query = 'foo/bar/baz > 20'
ast = Oga::XPath::Parser.new(query).parse
compiler = Oga::XPath::Compiler.new
block = compiler.compile(ast)
# Generated from XPath "20 > root/a"
lambda do |node, variables = nil|
op_left1 = begin
20.0
end
op_right2 = begin
catch(:value) do ||
node.children.each do |node|
if (node.is_a?(Oga::XML::Attribute) || node.is_a?(Oga::XML::Element)) && node.name == "root"
trap 'USR2' do
Rubinius::VM.dump_heap("/tmp/rbx-#{Process.pid}.dump")
end
require 'oga'
require 'thread'
xml = <<-EOF
<people>
<person>
<name>Alice</name>
</person>
</people>
EOF
(gdb) r
Starting program: /home/yorickpeterse/.rubies/rbx-git/bin/rbx populate_queue.rb
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff1210700 (LWP 31314)]
Connecting...
Starting threads...
[New Thread 0x7fffd37d7700 (LWP 31320)]
[# ] [ 1910/6146778] [ 0.03%] [00:04] [04:11:05] [ 407.89/s][New Thread 0x7fffd13ce700 (LWP 31329)]
[New Thread 0x7fffd0bcc700 (LWP 31331)]
Starting program: /home/yorickpeterse/.rubies/rbx-git/bin/rbx -Xint populate_queue.rb
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
y[New Thread 0x7ffff1290700 (LWP 26649)]
Connecting...
Starting threads...
[New Thread 0x7fffdb9db700 (LWP 26669)]
Signature mismatch
[# ] [ 1530/6142194] [ 0.02%] [00:03] [03:32:39] [ 481.27/s]Signature mismatch
[# ] [ 5090/6142194] [ 0.08%] [00:07] [02:33:18] [ 667.21/s]Signature mismatch
Starting program: /home/yorickpeterse/.rubies/rbx-git/bin/ruby populate_queue.rb
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff1210700 (LWP 19395)]
[New Thread 0x7fffd37d7700 (LWP 19413)]
[New Thread 0x7fffd33d6700 (LWP 19414)]
[New Thread 0x7fffd0bcc700 (LWP 19424)]
[New Thread 0x7fffd0fcd700 (LWP 19423)]
[New Thread 0x7fffd13ce700 (LWP 19422)]
[New Thread 0x7fffd17cf700 (LWP 19421)]