Skip to content

Instantly share code, notes, and snippets.

View macournoyer's full-sized avatar

Marc-André Cournoyer macournoyer

View GitHub Profile
Process: Vim [2098]
Path: /Applications/MacVim.app/Contents/MacOS/Vim
Identifier: Vim
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: MacVim [2096]
Date/Time: 2009-01-21 16:19:43.164 -0500
OS Version: Mac OS X 10.5.6 (9G55)
Report Version: 6
$ 2009-01-21 16:14:23.083 Vim[1983:10b] ERROR: Failed to load dictionaries.
Most likely this is because you have symlinked directly to
the Vim binary, which Cocoa does not allow. Please use an
alias or the mvim shell script instead. If you have not used
a symlink, then your MacVim.app bundle is incomplete.
E254: Cannot allocate color Red
E254: Cannot allocate color White
E254: Cannot allocate color Blue
def self.memoize_with_memcache(name)
define_method "#{name}_with_memo" do
key = [self.class.name, id.to_s] * '/'
Cache.get(key) || Cache.put(key, name_without_memo)
end
alias_method_chain :name, :memo
end
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <string.h>
#define JIT_ALLOC_FUNC(size) \
(u8 *)mmap(NULL, size, PROT_READ|PROT_WRITE|PROT_EXEC, \
(MAP_PRIVATE|MAP_ANON), -1, 0)
typedef unsigned char u8;
def strrev(s)
class TmpObject < ActiveRecord::Base
acts_as_an_object_with_a_reversed_string_column :tmp
end
TmpObject.new(s).reversed_tmp
end
jruby$ rake
(in /Users/marc/projects/jruby)
Buildfile: build.xml
prepare:
[mkdir] Created dir: /Users/marc/projects/jruby/build/classes
[mkdir] Created dir: /Users/marc/projects/jruby/build/classes/jruby
[mkdir] Created dir: /Users/marc/projects/jruby/build/classes/test
[mkdir] Created dir: /Users/marc/projects/jruby/build/test-results
[mkdir] Created dir: /Users/marc/projects/jruby/build/test-results/html
@macournoyer
macournoyer / gist:78194
Created March 12, 2009 17:52
tinyrb benchmark
======================environment======================
yarv
command: ruby19
version: ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-darwin9.6.0]
jruby
command: ~/projects/jruby/bin/jruby -server --fast
version: jruby 1.3.0 (ruby 1.8.6 patchlevel 287) (2009-03-12 rev 9393) [x86_64-java]
mri
command: ruby
version: ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-darwin9.3.0]
(in /Users/marc/projects/rubinius)
CC vm/test/runner.cpp
In file included from vm/test/runner.cpp:21:
./vm/test/test_access_variable.hpp:5:28: error: builtin/task.hpp: No such file or directory
In file included from vm/test/runner.cpp:878:
./vm/test/test_contexts.hpp:4:32: error: builtin/contexts.hpp: No such file or directory
In file included from vm/test/runner.cpp:3742:
./vm/test/test_objectmemory.hpp:3:21: error: vm/gc.hpp: No such file or directory
./vm/test/test_objectmemory.hpp:4:26: error: vm/gc_root.hpp: No such file or directory
In file included from vm/test/runner.cpp:4535:
tinyrb$ ~/projects/rubinius/bin/rbx bench/bm_vm1_const.rb
An exception has occurred:
is not a class/module (TypeError)
Backtrace:
Kernel(NilClass)#__const_set__ at kernel/common/kernel.rb:378
main.__script__ at bench/bm_vm1_const.rb+5
CompiledMethod#activate_as_script at kernel/common/compiled_method.rb:146
CompiledMethod#as_script at kernel/common/compiled_method.rb:139
Compiler::Utils.single_load at kernel/compiler/compile.rb:236
require ::File.dirname(__FILE__) + '/../lib/thin'
app = proc do |env|
if env["PATH_INFO"].match(/\.js/)
[
200,
{ 'Content-Type' => 'text/javascript' },
["var a = 'muffin';"]
]