Skip to content

Instantly share code, notes, and snippets.

@qmx
qmx / gist:1407191
Created November 29, 2011 23:43 — forked from anonymous/gist:1406238
yammer moving away from scala
Originally:
https://gist.github.com/7565976a89d5da1511ce
Hi Donald (and Martin),
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I
appreciate the tone. This is a Yegge-long response, but given that you and
Martin are the two people best-situated to do anything about this, I'd rather
err on the side of giving you too much to think about. I realize I'm being very
critical of something in which you've invested a great deal (both financially
public class MyTest {
public void test(){}
}
From acf44a7936dd7611bc8cd64b07b5fced357f5202 Mon Sep 17 00:00:00 2001
From: Douglas Campos <[email protected]>
Date: Sat, 12 Nov 2011 02:42:40 -0200
Subject: [PATCH] generating shared lib
patch adapted from http://code.google.com/p/leveldb/issues/detail?id=27
---
Makefile | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
ruby-1.8.7-p352 :001 > def one_arg(a); puts "one"; end
=> nil
ruby-1.8.7-p352 :002 > def one_arg(a,b); puts "two"; end
=> nil
ruby-1.8.7-p352 :003 > one_arg(1)
ArgumentError: wrong number of arguments (1 for 2)
from (irb):3:in `evaluate'
from org/jruby/RubyKernel.java:1011:in `eval'
from /Volumes/v2/git/jruby/lib/ruby/1.8/irb.rb:158:in `eval_input'
from /Volumes/v2/git/jruby/lib/ruby/1.8/irb.rb:271:in `signal_status'
require 'java'
x = java.util.concurrent.Executors.new_cached_thread_pool
x.execute { puts "hello" }
qmx@gondor ~/tmp » jruby threads.rb
starting thread 1
starting thread 0
starting thread 2
starting thread 3
starting thread 4
ending thread 2
ending thread 3
ending thread 1
ending thread 0
From 7d0e281d713b2f0c70b57206a9388d9cbe158e6e Mon Sep 17 00:00:00 2001
From: Douglas Campos <[email protected]>
Date: Tue, 7 Jun 2011 20:49:30 -0300
Subject: [PATCH] allowing blocks with arity > 2
---
src/org/jruby/RubyEnumerable.java | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/org/jruby/RubyEnumerable.java b/src/org/jruby/RubyEnumerable.java
Compiled from "ClosureTest.java"
final class ClosureTest$1 implements ClosureTest$Closure {
final java.lang.Object val$o;
ClosureTest$1(java.lang.Object);
Code:
0: aload_0
1: aload_1
2: putfield #1 // Field val$o:Ljava/lang/Object;
5: aload_0
@qmx
qmx / Gemfile
Created June 10, 2011 03:25 — forked from napcs/Gemfile
warbler + sinatra problem
source :rubygems
gem 'sinatra', '1.2.3'
gem 'tilt', "1.3"
gem 'rack', "1.2.2"
gem 'sinatra-respond_to', '0.7.0'
// first iteration: simple guard by version string
if(isRubyVersion("1.9.2-p136")){
// ....
}
// second iteration: Version object with semantic versioning, etc
RubyVersion v = version("1.9.2-p136");
v.major() // 1.9
v.minor() // 2