Skip to content

Instantly share code, notes, and snippets.

View victusfate's full-sized avatar
🚀

Mark Essel victusfate

🚀
View GitHub Profile
# Original blog post about Rubinius performance on the alioth mandelbrot benchmark:
# http://rfc2616.wordpress.com/2010/10/16/rubinius-vs-the-benchmark-from-hell/
#
# Problems with assumptions in the blog post:
# * The C <-> Ruby comparison is apples to oranges because the Ruby code
# is written to use blocks rather than loops. That imposes the overhead
# of additional execution contexts per pixel.
# * The output is written a byte at a time, which requires a fairly deep
# chain of methods before the byte is handed off to the OS.
# * The work is done in the script body. Unless the implementation has
<script type="text/javascript">
/* <![CDATA[ */
jQuery(document).ready(function(){
jQuery.noConflict();
var jq = jQuery;
jq.ajax({
url: '/rss',
type: 'GET',
dataType: 'xml',
error: function (xhr, status, e) {
$('.submittable').live('change', function() {
$(this).parents('form:first').submit();
});
~/projects/jruby ➔ gem install yajl-ruby
Building native extensions. This could take a while...
Successfully installed yajl-ruby-0.7.7
1 gem installed
Installing ri documentation for yajl-ruby-0.7.7...
Installing RDoc documentation for yajl-ruby-0.7.7...
~/projects/jruby ➔ jruby -rubygems -e "require 'yajl'; p Yajl::Parser.parse('{\"foo\": 1145}')"
{"foo"=>1145}
@stan
stan / prime.rb
Created May 22, 2010 09:16 — forked from atnan/prime.rb
class Integer
def prime?
!("1" * self).match(/^1?$|^(11+?)\1+$/).nil?
end
end
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.