#shibuyarb に参加した + LTしてきた
死霊ないけど、「gemの命名規約について」という感じで、飛び入りでLTしたw 内容は、CPANは素晴しい、gemはクソ、という感じです。 #shibuyarb
— kentaro (@kentaro) June 20, 2012
(ツイートは釣りです)
というわけで、本日行われたShibuya.rbで、ひとの発表を聞いていたら意識が高まったので、飛び入りで、ブラウザであれこれページを開きつつLTしてきた。
写真1: Rubyistの集まりで、YAPC::Asiaティーシャツ着用で発表する私
ふりかえると、話したい内容、あと3個ぐらいはあったなーという感じだったのだけど、いろいろ時間なくてスライド作れてなかったのが敗因であった。ふだんから、いつでも喋れるよう、ネタをスライドの形にしておこう、と思ったのであった。
今日の内容、資料とかないので、以下、おおまかに話した内容など。
gemの名前付けについて
RubyGems Guide
- 命名規則について
- ディレクトリ構成
- gemの名前
- library_name/LibraryName
- snake_case/CamelCase
- library_name-extra/LibraryName::Extra
- namespaceの区切りの::と-(ハイフン)が可換
- library_name/LibraryName
Ericさん、かく語りき
- Eric Hodelさんの資料読みましょう
- http://rubykaigi.org/2011/en/schedule/details/17S03
- 発表スライド
bundle gem fooする前に
- まずはguide読みましょう
- 粒度の小さいライブラリに独自の名前をつけるのやめよう
- 全体は知らんけど、我々からでも正しい名前付けを
- とはいえ、
bundle gem
コマンドは上記の規約に沿った構成のテンプレ吐いてはくれないけどね……。- パッチ書くかな
追記
とかいってたらmiyagawaさんにreplyいただいたので、内容をこちらにも転載。
Posted to Hatena Blog#shibuyarb に参加した + LTしてきた - delirious thoughts htn.to/AK6agG
— kentaro (@kentaro) June 20, 2012
@kentaro I talked at the naming thing at YAPC, but with different conclusions :)
— Tatsuhiko Miyagawa (@miyagawa) June 20, 2012
@miyagawa とはいえ、rubygemsだとか、周辺サイトが内容や依存の関連とかでいい感じにするのがいいよね……みたいな感じになりましたw
— kentaro (@kentaro) June 20, 2012
@kentaro CPAN (and PyPI) has issues when u have many libs that do the similar thing. Data::ICal, ICal::Parser, Net::ICal. iCal::Fast etc.
— Tatsuhiko Miyagawa (@miyagawa) June 20, 2012
@kentaro and often, names like ::Fast, ::Lite and ::Simple turn up and they're subjective, and you'll get ::Any and it's chaos.
— Tatsuhiko Miyagawa (@miyagawa) June 20, 2012
@miyagawa we talked about the same problem in gems, eg. backbone-rails/rails-backbone/backbone-on-rails. To give original names can be good.
— kentaro (@kentaro) June 20, 2012
@kentaro oh yeah that's madness. The worst one is to append 2 or 3. and you'll get pyoauth2, which doesn't support OAuth 2.0.
— Tatsuhiko Miyagawa (@miyagawa) June 20, 2012
@miyagawa that's totally crazy... anyway, i think each communities need moderate improving from each other.
— kentaro (@kentaro) June 20, 2012
@kentaro agreed. That's my talk theme for this summer :)
— Tatsuhiko Miyagawa (@miyagawa) June 20, 2012
@miyagawa lightning talk requires some extreme points of view for fun ;)
— kentaro (@kentaro) June 20, 2012
@kentaro it's called trolling :)
— Tatsuhiko Miyagawa (@miyagawa) June 20, 2012
@miyagawa i'm a perler at all ><
— kentaro (@kentaro) June 20, 2012