- [AST Specialisation and Partial Evaluation for Easy High-Performance Metaprogramming][7] ([PDF][7pdf])
Chris Seaton, Oracle Labs
Sun 30 Oct 2016, 11:30-12:00 - Meta'16
Abstract
[] ~/projects/rubyspec $ git log | grep 2015 | wc -l | |
1021 | |
[] ~/projects/rubyspec $ git log | grep 2014 | wc -l | |
410 | |
[] ~/projects/rubyspec $ git log | grep 2013 | wc -l | |
961 | |
[] ~/projects/rubyspec $ git log | grep 2012 | wc -l |
diff --git a/core/src/main/java/org/jruby/RubyArray.java b/core/src/main/java/org/jruby/RubyArray.java | |
index 04fbeef..1c32bb39 100644 | |
--- a/core/src/main/java/org/jruby/RubyArray.java | |
+++ b/core/src/main/java/org/jruby/RubyArray.java | |
@@ -71,6 +71,7 @@ import org.jruby.util.io.EncodingUtils; | |
import java.io.IOException; | |
import java.lang.reflect.Array; | |
+import java.lang.reflect.Field; | |
import java.util.Arrays; |
#include <stdio.h> | |
#include <unistd.h> | |
#include <signal.h> | |
#include <string.h> | |
#include <errno.h> | |
void on_signal(int sig) { | |
printf("\nIN handler\n"); | |
//nothing | |
} |
$ cat benchmark.yml | |
# Config for benchmark_driver.gem | |
type: command_stdout | |
name: optcarrot | |
command: bin/optcarrot --benchmark examples/Lan_Master.nes | |
metrics_type: | |
unit: fps | |
stdout_to_metrics: | | |
match = stdout.match(/^fps: (?<fps>\d+\.\d+)$/) | |
Float(match[:fps]) |
I've used Cucumber quite a bit on my last job. It's an excellent tool, and I believe readable tests are the way to the future. But I could never get around to write effective scenarios, or maintain the boatload of text that the suite becomes once you get to a point where you have decent coverage. On top of that, it didn't seem to take much for the suite to become really slow as tests were added.
A while ago I've seen a gist by Lachie Cox where he shows how to use RSpec and Capybara to do front-end tests. That sounded perfect for me. I love RSpec, I can write my own matchers when I need them with little code, and it reads damn nicely.
So for my Rails Rumble 2010 project, as usual, I rolled a Sinatra app and figured I should give the idea a shot. Below are my findings.
#include <sys/time.h> | |
#include <sys/types.h> | |
#include <sys/resource.h> | |
#include <sys/wait.h> | |
#include <spawn.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <unistd.h> |
In the project I'm working on we wanted to have a Category model which we wanted to be nestable. But we also liked the user to have a draggable interface to manage and rearrange the order of his categories. So we chose awesome_nested_set for the model and jQuery.nestedSortable for the UI.
It took me some time to arrange things to work properly so I wanted to share my work in case it helps anybody.
you might want to take a look at a demo app
#!/usr/bin/env ruby | |
private def benchmark(name = nil, &block) | |
raise "needs a block" unless block | |
binding = block.binding | |
file, line = block.source_location | |
start_line = line - 1 | |
lines = File.readlines(file) | |
indent = lines.fetch(start_line)[/^(\s+)/, 1] |
$VERBOSE = nil | |
require File.expand_path('../rooby', __FILE__) | |
Person = Rooby::Class.new 'Person' do | |
define :initialize do |name| | |
@name = name | |
end | |
define :name do |