Skip to content

Instantly share code, notes, and snippets.

@authorNari
authorNari / gist:1273387
Created October 9, 2011 06:53
rubyconf2011 note
OK, Let's begin. Hello, Everybody.
My name is Narihiro Nakamura.
Today, I'm talking about "Parallel worlds of CRuby's GC".
I'm very happy now, because I'm meeting attendee in rubyconf.
And, one of my dreams is to talk in rubyconf.
So, I'm very happy and exciting.
Today is my first presentation in English.
My English is not good.

(ruby-core:18872の翻訳)

Title: [RIP] Guy Decoux.

こんにちわ。

2008年7月のはじめにGuy Decouxが亡くなりました。 彼の死をみなさんに伝えるのは悲しいことです。53歳でした。

@authorNari
authorNari / ouput_backtrace_at_gc.patch
Created December 9, 2013 09:03
GCのタイミングでバックトレース吐く奴。Ruby1.9.3用。
diff --git a/gc.c b/gc.c
index 1d3ac79..2b833da 100644
--- a/gc.c
+++ b/gc.c
@@ -2585,7 +2585,8 @@ garbage_collect(rb_objspace_t *objspace)
{
INIT_GC_PROF_PARAMS;
- if (GC_NOTIFY) printf("start garbage_collect()\n");
+ fprintf(stderr, "garbage_collect(%d)\n", objspace->count);
@authorNari
authorNari / lazy_sweep_factor.patch
Last active December 30, 2015 03:59
eager sweepを指定したオブジェクト生成分遅らせるGC.stressみたいなやつ。Ruby2.0.0用。 環境変数をRUBY_DELAY_SWEEP_INTERVAL=2に設定で「2個生成したあとにsweep,mark」みたいなことができる。 lazy sweepのバグをあぶり出すために作成。
diff --git a/gc.c b/gc.c
index 84af4d6..278661e 100644
--- a/gc.c
+++ b/gc.c
@@ -76,6 +76,7 @@ typedef struct {
unsigned int initial_malloc_limit;
unsigned int initial_heap_min_slots;
unsigned int initial_free_min;
+ unsigned int initial_delay_sweep_interval;
#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE
@authorNari
authorNari / Gemfile
Created September 5, 2013 01:47
気になる動画の変化を検知してメールしてくれるやつ
source 'https://rubygems.org'
gem 'sqlite3', "1.3.7"
gem 'activerecord', "3.2.13"
gem 'nokogiri', "1.5.9"
gem "gmail-mailer", "0.4.5"
CXX = g++
CXXFLAGS = -g -Wall -fno-rtti -fno-exceptions -shared --std=c++0x -fPIC
GECKO_PATH = /home/nari/apps/xulrunner-sdk-22_x86_64
GECKO_SDK_PATH = $(GECKO_PATH)/sdk
GECKO_IDL_PATH = $(GECKO_PATH)/idl
GECKO_INCLUDE_PATH = $(GECKO_PATH)/include
GECKO_LIB_PATH = $(GECKO_PATH)/lib
@authorNari
authorNari / xchat_hide.py
Created July 12, 2013 06:41
xchat-gnome python plugin
# event list from here.
# https://github.com/xchataqua/xchat/blob/0253ca11761127b59488d0b69dd059dbe9cde699/src/common/textevents.in
# You can load this via following command.
# /py load xchat_hide.py
__module_name__ = "hide print"
__module_version__ = "1.0"
__module_description__ = "Hide unwanted print messages"
__module_author__ = "Narihiro Nakamura <authornar@gmail.com>"
import xchat
-- ruby 1.9.3 r39859
Generating RI format into /home/nari/source/ruby/ruby-github/.ext/rdoc...
Files: 775
Classes: 1375 ( 708 undocumented)
Modules: 305 ( 151 undocumented)
Constants: 2258 ( 828 undocumented)
Attributes: 1020 ( 440 undocumented)
Methods: 10483 (3107 undocumented)
--- ruby 2.0.0 - r41499
Generating RI format into /home/nari/source/ruby/ruby-github/.ext/rdoc...
Files: 907
Classes: 1411 ( 0 undocumented)
Modules: 312 ( 4 undocumented)
Constants: 2282 ( 724 undocumented)
Attributes: 1138 ( 340 undocumented)
Methods: 10859 (2549 undocumented)
---
#slide.rab
= ((' '))
: allotted-time
30m
: theme
nari-ext
---
# ext.rb