![http://www.machu.jp/posts/20100816/p01/](https://cdn-ak-scissors.b.st-hatena.com/image/square/7e9b2bd864480b2693c4711dabc761c4740d1e0f/height=288;version=1;width=512/http%3A%2F%2Ffarm5.staticflickr.com%2F4136%2F4893935111_3bcccef7b6.jpg)
photo credit: kentbye 以前グラフ構造を描画するでGraphvizを紹介したが,今回はRubyからGraphvizを使う方法を紹介する. まずGraphviz本体とRubyからGraphvizを使うためにruby-graphvizをインストールする.(Macでの例) # sudo port install graphviz # sudo gem install ruby-graphviz –remote http://github.com/glejeune/Ruby-Graphvizにサンプルがいくつか用意されているが,作ってみる. require "rubygems" require "graphviz" $node_num = nil $arc_num = nil $s_no = nil $t_no = nil $node = Array.new class Nod
SWIGでLLVMのRuby bindingを書いていて、やっぱりGC周りではまってしまった。 具体的には、オブジェクトの開放の順番を指定しないといけないのだが、 Rubyではfinalizerの実行順は不定だし、先に消えてほしいオブジェクトからリファレンスを持ったりしてみたのだが、 rootからの参照を一度に消されるとどうしようもない。 そこで試しに以下のようなコードを書いてみたところうまくいった。 module OrderedFinalizer @@queue = [] def self.add(*v) @@queue << weaken_reference(v) end def self.weaken_reference(v) v.last.map!(&:object_id) v end def self.step @@queue.each do |group| unless gro
An interview with Paul Graham : The Setup And what software? I use surprisingly little client software. All I really use on my Mac is Firefox and Terminal. I use the usual Unix utilities (vi for editing). I use Arc for programming, which in turn runs on top of MzScheme. Paul Grahamもvi使ってるってことでShibuya.lisp Hackathon #1でArcの@mgikenさんもvimを使ってることに納得。VimShellを使ってるとお聞きしたので僕もSBCLでやってみた。 % vi Error detect
This is my personal site, which used to have a blog of sorts and some other stuff. It has fallen into disrepair more times that I can count, so it's just a directory of other links to information about me or things I work on now. Hopefully you weren't here for something else. Keybase Professional Profile (LinkedIn) Projects (via Sourcehut) Projects (via Github) Corporate social media has become a
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く