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
m=255 | |
r=(0..256) | |
j=0 | |
Sk=r.to_a.map{|i|j=(j+S[i]+K[i%16])&m} | |
St=[] | |
i=j=0 | |
r.each{|i| | |
i&=m | |
j=(j+S[i])&m | |
S[i],S[j]=S[j],S[i] |
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 'bundler/setup' | |
require 'celluloid' | |
class Something | |
include Celluloid | |
include Celluloid::Logger | |
def perform | |
# some complex operation | |
sleep 10 |
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
1 min: | |
~Painless Javascript | |
koting hatduklgg | |
with wind tunnel | |
~tenderlove.dup jremsikjr | |
~iwanttolearnruby.com | |
(collecting resources for learning ruby) |
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
var http = require('http') | |
var fork = require('child_process').fork; | |
function fib(n) { | |
if (n < 2) { | |
return 1; | |
} else { | |
return fib(n - 2) + fib(n - 1); | |
} | |
} |
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
╭─tony@wintermute ~/1595740 ‹ruby-1.9.3› ‹master*› | |
╰─$ ruby xmlbench.rb | |
11.250000 1.260000 12.510000 ( 12.515502) | |
11.610000 1.310000 12.920000 ( 12.922546) | |
11.660000 1.450000 13.110000 ( 13.107651) | |
11.500000 1.400000 12.900000 ( 12.901641) | |
11.440000 1.280000 12.720000 ( 12.712830) | |
╭─tony@wintermute ~/1595740 ‹jruby-1.6.5.1› ‹master*› | |
╰─$ ruby xmlbench.rb |
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 -d -W2 --vv test.rb | |
rubinius 1.2.4dev (1.8.7 77994afa yyyy-mm-dd) [x86_64-apple-darwin10.7.0] | |
Options: | |
Interpreter type: static | |
JIT disabled | |
An exception occurred running test.rb | |
Tried to use object of type PackedObject (45) as type LookupTable (35) (TypeError) | |
Backtrace: |