This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Calculating ------------------------------------- | |
evaluator 1.097k i/100ms | |
generated 8.711k i/100ms | |
------------------------------------------------- | |
evaluator 10.641k (±13.5%) i/s - 52.656k | |
generated 99.626k (± 1.1%) i/s - 505.238k | |
Comparison: | |
generated: 99626.2 i/s | |
evaluator: 10641.4 i/s - 9.36x slower |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'slop' | |
puts Slop.parse do |opt| | |
opt.on '--version', 'Lee has been slacking off' do | |
puts 'ehm' | |
exit | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'oga' | |
document = Oga.parse_html <<-EOF | |
<div>this should</div> | |
<span>really go</span> | |
<b>away</b> | |
<h1>First Title</h1> | |
Hello world, how are you <b>doing?</b> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'oga' | |
document = Oga.parse_html <<-EOF | |
Hello world, how are you <b>doing?</b> | |
EOF | |
document.xpath('descendant-or-self::b').each do |b_node| | |
text = Oga::XML::Text.new(:text => "**#{b_node.inner_text}**") | |
b_node.before(text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark/ips' | |
require 'ostruct' | |
struct = Struct.new(:name) | |
Benchmark.ips do |bench| | |
bench.report 'Struct' do | |
struct.new(:name => 'Alice') | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cargo run | |
Compiling aeon v0.0.1 (file:///home/yorickpeterse/Private/Projects/rust/aeon) | |
Running `target/debug/aeon` | |
thread '<main>' panicked at 'RefCell<T> already borrowed', /build/rust/src/rustc-1.0.0/src/libcore/cell.rs:436 | |
thread '<main>' panicked at 'arithmetic operation overflowed', /build/rust/src/rustc-1.0.0/src/liballoc/rc.rs:784 | |
stack backtrace: | |
1: 0x7f3d7ababa99 - sys::backtrace::write::h85e36588f6ec519ed4r | |
2: 0x7f3d7abaf0bf - panicking::on_panic::h6e154bbd20295560jrw | |
3: 0x7f3d7aba82d2 - rt::unwind::begin_unwind_inner::h58d8677c31c147e6t6v | |
4: 0x7f3d7aba899c - rt::unwind::begin_unwind_fmt::h924efd716b4278c074v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ make | |
mkdir -p target | |
clang -Wextra -Wall -pedantic -std=c++11 src/register.cpp src/variable_scope.cpp src/heap.cpp src/compiled_code.cpp src/call_frame.cpp src/instruction.cpp src/object.cpp -o target/aeon | |
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib64/crt1.o: In function `_start': | |
(.text+0x20): undefined reference to `main' | |
/tmp/register-9740a5.o: In function `std::vector<aeon::Object*, std::allocator<aeon::Object*> >::_M_range_check(unsigned long) const': | |
src/register.cpp:(.text._ZNKSt6vectorIPN4aeon6ObjectESaIS2_EE14_M_range_checkEm[_ZNKSt6vectorIPN4aeon6ObjectESaIS2_EE14_M_range_checkEm]+0x5a): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)' | |
/tmp/register-9740a5.o: In function `void std::vector<aeon::Object*, std::allocator<aeon::Object*> >::_M_insert_aux<aeon::Object*>(__gnu_cxx::__normal_iterator<aeon::Object**, std::vector<aeon::Object*, std::allocator<aeon::Object*> > >, aeon::Object*&&)': | |
src/register.cpp:(.text._ZNSt6vectorIPN4aeon6ObjectESaIS2_EE13 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Starting program: /home/yorickpeterse/.rubies/rbx-git/bin/rbx -Xcapi.lock /tmp/crashssl.rb | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/usr/lib/libthread_db.so.1". | |
rubysl-openssl: 2.3.1 | |
rubysl-digest: 2.0.7 | |
Starting threads... | |
An exception occurred running /tmp/crashssl.rb: | |
Expected digest "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" to equal "83103cff21a7a50e45eb90c29ca9d24204d95fe7369565ec1d5339750da386ab" (RuntimeError) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ruby /tmp/crashssl.rb | |
rubysl-openssl: 2.3.1 | |
rubysl-digest: 2.0.7 | |
Starting threads... | |
An exception occurred running /tmp/crashssl.rb: | |
Expected digest "70b9d40465992fa71a861e050481fb1a4bed5c8aa127272e7bf5838a3b0ab240" to equal "83103cff21a7a50e45eb90c29ca9d24204d95fe7369565ec1d5339750da386ab" (RuntimeError) | |
Backtrace: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rubysl-openssl: 2.3.0 | |
rubysl-digest: 2.0.7 | |
Starting threads... | |
expected 56397360f80a778204fb02da0c6590613ae45f7b5335f8cd8db46a809bd33ce5 to equal 83103cff21a7a50e45eb90c29ca9d24204d95fe7369565ec1d5339750da386ab | |
expected 56397360f80a778204fb02da0c6590613ae45f7b5335f8cd8db46a809bd33ce5 to equal 83103cff21a7a50e45eb90c29ca9d24204d95fe7369565ec1d5339750da386ab | |
expected 70b9d40465992fa71a861e050481fb1a4bed5c8aa127272e7bf5838a3b0ab240 to equal 83103cff21a7a50e45eb90c29ca9d24204d95fe7369565ec1d5339750da386ab | |
expected 70b9d40465992fa71a861e050481fb1a4bed5c8aa127272e7bf5838a3b0ab240 to equal 83103cff21a7a50e45eb90c29ca9d24204d95fe7369565ec1d5339750da386ab | |
expected 9292f26a8d1ce66f44eda88a679821f650e1d523ce6d1cff9d3e2ebfc79a3499 to equal 83103cff21a7a50e45eb90c29ca9d24204d95fe7369565ec1d5339750da386ab | |
expected 9292f26a8d1ce66f44eda88a679821f650e1d523ce6d1cff9d3e2ebfc79a3499 to equal 83103cff21a7a50e45eb90c29ca9d24204d95fe7369565ec1d5339750da386ab | |
expected 70b9d40465992fa71a861e050481fb1a4bed5c8aa127272e7bf5838a3b0ab24 |