<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ruby | Democratizing Data</title><link>https://b94feae1.chezo-uno.pages.dev/categories/ruby/</link><atom:link href="https://b94feae1.chezo-uno.pages.dev/categories/ruby/index.xml" rel="self" type="application/rss+xml"/><description>Ruby</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><copyright>© Aki Ariga 2017-2025</copyright><lastBuildDate>Wed, 24 Apr 2019 12:10:28 +0900</lastBuildDate><image><url>https://b94feae1.chezo-uno.pages.dev/media/icon_hu_9ca82a90e0d162db.png</url><title>Ruby</title><link>https://b94feae1.chezo-uno.pages.dev/categories/ruby/</link></image><item><title>Ruby for Data Science and Machine Learning</title><link>https://b94feae1.chezo-uno.pages.dev/blog/2019-04-24_ruby-for-data-science-and-machine-learning-9f03e99125e0/</link><pubDate>Wed, 24 Apr 2019 12:10:28 +0900</pubDate><guid>https://b94feae1.chezo-uno.pages.dev/blog/2019-04-24_ruby-for-data-science-and-machine-learning-9f03e99125e0/</guid><description>&lt;p>I attended &lt;a href="https://rubykaigi.org/2019" target="_blank" rel="noopener">RubyKaigi 2019&lt;/a> held at Fukuoka from Apr 18 to Apr 21. This year’s RubyKaigi was a really great opportunity for me to know the possibility of Data Science and Machine Learning for Ruby.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="" srcset="
/blog/2019-04-24_ruby-for-data-science-and-machine-learning-9f03e99125e0/0_yHSEXuY1I2U_4ysS_hu_ba80b4ff0712d769.webp 400w,
/blog/2019-04-24_ruby-for-data-science-and-machine-learning-9f03e99125e0/0_yHSEXuY1I2U_4ysS_hu_ebcd1537c35f24eb.webp 760w,
/blog/2019-04-24_ruby-for-data-science-and-machine-learning-9f03e99125e0/0_yHSEXuY1I2U_4ysS_hu_7c0dd767e51ccdbc.webp 1200w"
src="https://b94feae1.chezo-uno.pages.dev/blog/2019-04-24_ruby-for-data-science-and-machine-learning-9f03e99125e0/0_yHSEXuY1I2U_4ysS_hu_ba80b4ff0712d769.webp"
width="760"
height="570"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h3 id="data-science-andruby">Data Science and Ruby&lt;/h3>
&lt;p>As many of you may know, Ruby is widely known for web application with such as Ruby on Rails, but there is another momentum of Ruby or non-Python language. Here is the list of the sessions about Data Science.&lt;/p>
&lt;ul>
&lt;li>&lt;a href="http://youchan.org/RubyKaigi2019" title="http://youchan.org/RubyKaigi2019" target="_blank" rel="noopener">Ruby for NLP&lt;/a>&lt;/li>
&lt;li>A Deep Learning Adventure \[[repo](https://github.com/nusco/deep_learning_adventure)\] (talked by Paolo Perrotta, the author of Metaprogramming Ruby!)&lt;/li>
&lt;li>&lt;a href="https://docs.google.com/presentation/d/1wYBqdlv-rBqCcjqaT4pbqYnpA9cDlTr2iKpGAQ-Mz-I/edit" title="https://docs.google.com/presentation/d/1wYBqdlv-rBqCcjqaT4pbqYnpA9cDlTr2iKpGAQ-Mz-I/edit" target="_blank" rel="noopener">Ruby Data Workshop&lt;/a>&lt;/li>
&lt;li>Reducing ActiveRecord memory consumption using Apache Arrow&lt;/li>
&lt;li>&lt;a href="https://speakerdeck.com/sonots/red-chainer-and-cumo-practical-deep-learning-in-ruby-at-rubykaigi-2019" title="https://speakerdeck.com/sonots/red-chainer-and-cumo-practical-deep-learning-in-ruby-at-rubykaigi-2019" target="_blank" rel="noopener">Red Chainer and Cumo: Practical Deep Learning in Ruby&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.slideshare.net/nagachika/make-ruby-differentiable" title="https://www.slideshare.net/nagachika/make-ruby-differentiable" target="_blank" rel="noopener">Make Ruby Differentiable&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="center-of-data-science-withruby">Center of data science with Ruby&lt;/h3>
&lt;p>There is three core software supporting these movements:&lt;/p>
&lt;ol>
&lt;li>Apache Arrow&lt;/li>
&lt;li>Numo/Cumo&lt;/li>
&lt;li>Red Chainer (Deep Learning framework ported from Chainer, implemented in Python)&lt;/li>
&lt;/ol>
&lt;p>Apache Arrow is a cross-language data structure for in-memory data. Kohei Sutou, the creator of Red Arrow, Ruby binding of Apache Arrow, who is a Japanese PMC of Apache Arrow. He has also been organizing an initiative called Red Data tools, monthly developer meet-ups for Ruby data tools. The meetup drives Ruby data ecosystem, especially for beginners. I heard from mrkn, a Ruby committer, that Arrow is trying to implement data manipulations those pandas does as C++ code. That means, calculations of tabula style data, a.k.a. DataFrame can be done in Apache Arrow’s Table format so that Ruby would be able to be suitable for data manipulation.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="" srcset="
/blog/2019-04-24_ruby-for-data-science-and-machine-learning-9f03e99125e0/0_r3ToqacydBaYmyh1_hu_5bf288d78440e599.webp 400w,
/blog/2019-04-24_ruby-for-data-science-and-machine-learning-9f03e99125e0/0_r3ToqacydBaYmyh1_hu_2c800cc30d68f0ea.webp 760w,
/blog/2019-04-24_ruby-for-data-science-and-machine-learning-9f03e99125e0/0_r3ToqacydBaYmyh1_hu_2ddd692749e08648.webp 1200w"
src="https://b94feae1.chezo-uno.pages.dev/blog/2019-04-24_ruby-for-data-science-and-machine-learning-9f03e99125e0/0_r3ToqacydBaYmyh1_hu_5bf288d78440e599.webp"
width="600"
height="409"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>Another essential thing is Numo, which enables to handle numeric array like Numpy and is the fundamental part of DS/ML execution. Cumo is the GPU version of Numo and 75 times faster than Numo for the hello world for Deep Learning, a.k.a. MNIST. The talk about Cumo suggested that many Deep Learning related executions depend on CUDA so that scripting languages can be just a wrapper of them.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="" srcset="
/blog/2019-04-24_ruby-for-data-science-and-machine-learning-9f03e99125e0/0_0R6wvTiO6WQw79bD_hu_9eada8f08a0e6165.webp 400w,
/blog/2019-04-24_ruby-for-data-science-and-machine-learning-9f03e99125e0/0_0R6wvTiO6WQw79bD_hu_f0d11f01d34876bf.webp 760w,
/blog/2019-04-24_ruby-for-data-science-and-machine-learning-9f03e99125e0/0_0R6wvTiO6WQw79bD_hu_d0dc73faea4bed0a.webp 1200w"
src="https://b94feae1.chezo-uno.pages.dev/blog/2019-04-24_ruby-for-data-science-and-machine-learning-9f03e99125e0/0_0R6wvTiO6WQw79bD_hu_9eada8f08a0e6165.webp"
width="600"
height="450"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>Red Chainer enables Deep Learning tasks, but it seems still young. Rather than that, &lt;a href="https://github.com/pfnet-research/menoh-ruby" title="https://github.com/pfnet-research/menoh-ruby" target="_blank" rel="noopener">Menoh-Ruby&lt;/a> can be a great tool, which allows to inference/predict with pre-trained models with PyTorch, Chainer, or any other frameworks which can export ONNX, the intermediate format of DL.&lt;/p>
&lt;h3 id="so-how-will-be-the-ruby-data-science-goingon">So, how will be the Ruby data science going on?&lt;/h3>
&lt;p>Looking at those momenta of Apache Arrow and Cumo, I feel the data science on Ruby would become much easier since the core problems which are related to execution speed can be hidden into C++/GPU layer. And using Menoh-Ruby can be a good opportunity for Ruby on Rails applications to serve prediction results on Ruby!&lt;/p>
&lt;p>Red Data tools also create opportunities for many software engineers to jump into ML/DS world. One of my friends told me why he started working on Red Data tools that he wanted to change his field, and it’s an excellent area to join.&lt;/p>
&lt;p>If you interested in this movement, let’s join &lt;a href="https://red-data-tools.github.io/" target="_blank" rel="noopener">Red Data tools&lt;/a>!&lt;/p></description></item><item><title>homebrewを移動してiRubyが壊れたときに見直すポイント</title><link>https://b94feae1.chezo-uno.pages.dev/post/2016-10-29_homebrew-----iruby---------------6a02e5194ff2/</link><pubDate>Sat, 29 Oct 2016 13:50:25 +0900</pubDate><guid>https://b94feae1.chezo-uno.pages.dev/post/2016-10-29_homebrew-----iruby---------------6a02e5194ff2/</guid><description>&lt;p>kawasaki.rb #041 で得た知見です。&lt;/p>
&lt;p>/opt 以下から /usr/local 以下にhomebrewの場所を戻しました。理由はhomebrew caskが/optから/usr/localに移ったためなんですが、これに伴いrbenvで入れたirubyがopensslを/opt以下から探すようになってしまったため、壊れてしまいました。&lt;/p>
&lt;p>いつもはjupyterでパーフェクトRubyの読み会をやっていたんですが、この日はこれを解決するのが間に合いませんでした。&lt;/p>
&lt;p>で、このときにどうしたかというと、以下の記事に従って解決しました。&lt;/p>
&lt;p>&lt;a href="http://qiita.com/yohm13/items/46d9d5247b6e4f1e5164" title="http://qiita.com/yohm13/items/46d9d5247b6e4f1e5164" target="_blank" rel="noopener">&lt;strong>iruby (jupyter) でrubyのバージョンを切り替える手順 - Qiita&lt;/strong>&lt;br>
_iRuby(Jupyter上で動くruby)を利用する際にRubyのバージョンを切り替える手順について MacOS ElCapitan IRuby 0.2.9 jupyterにkernelとして登録されているirubyはjupyterに…_qiita.com&lt;/a>&lt;a href="http://qiita.com/yohm13/items/46d9d5247b6e4f1e5164" target="_blank" rel="noopener">&lt;/a>&lt;/p>
&lt;p>iruby register &amp;ndash;force&lt;br>
jupyter kernelspec install&lt;br>
iruby notebook&lt;/p>
&lt;p>これで大丈夫です。&lt;br>
実際には、僕は &lt;code>iruby register --force&lt;/code> をやって、それを &lt;code>/.ipython/kernels/ruby/kernel.json&lt;/code> にコピーしました。&lt;/p>
&lt;p>困ったところとしては、ipythonからjupyterに名前が変わったので &lt;code>~/.jupyter&lt;/code> 以下に何かおけばいいだろうと思って色々こねこねしてたんですが、結局大事なのは &lt;code>~/.ipython&lt;/code> が重要でした。 &lt;code>jupyter --paths&lt;/code> をやると &lt;code>~/.jupyter&lt;/code> しかでてこないので騙されてしまいました。気をつけてください。&lt;/p></description></item><item><title>kawasaki.rb #011 を開催しました #kwskrb</title><link>https://b94feae1.chezo-uno.pages.dev/post/2014-04-26-kawasaki-dot-rb-number-011-wokai-cui-simasita-number-kwskrb/</link><pubDate>Sat, 26 Apr 2014 22:06:31 +0000</pubDate><guid>https://b94feae1.chezo-uno.pages.dev/post/2014-04-26-kawasaki-dot-rb-number-011-wokai-cui-simasita-number-kwskrb/</guid><description>&lt;p>4/23に&lt;a href="http://kawasakirb.doorkeeper.jp/events/10187" target="_blank" rel="noopener">kawasaki.rb #011&lt;/a>を開催しました。&lt;br>
次回で1年になるのかと思うと、感慨深いです。&lt;br>
なお、kawasaki.rbは毎月第4水曜の19:30-開催しています。(最終週だと思われていたのでご説明)&lt;/p>
&lt;p>&lt;a href="http://togetter.com/li/659659" target="_blank" rel="noopener">togetter&lt;/a>&lt;/p>
&lt;h1 id="パーフェクトruby読書会">パーフェクトRuby読書会&lt;/h1>
&lt;p>2-9 例外 〜 2-12 組込みの変数/定数までを読みました。&lt;/p>
&lt;p>組込み変数の、&lt;code>$-F&lt;/code>はワンライナーの&lt;code>-F&lt;/code>と互換だよねー、といった話や、RailsとMySQLで&lt;code>precision&lt;/code>を使おうとしたら予約語でハマったという話が出ました。&lt;/p>
&lt;p>次回は、ついに3章に突入です。&lt;/p>
&lt;h1 id="angularjssinatraでturbolinks-snowcrush-さん">AngularJS+SinatraでTurbolinks: &lt;a href="https://twitter.com/snowcrush" target="_blank" rel="noopener">@snowcrush&lt;/a> さん&lt;/h1>
&lt;iframe src="//www.slideshare.net/slideshow/embed_code/key/4x7qUwiCK5o84T" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> &lt;/iframe> &lt;div style="margin-bottom:5px"> &lt;strong> &lt;a href="//www.slideshare.net/minoritokuda/angular-jssinatraturbolinks" title="Angular jsとsinatraでturbolinks" target="_blank">Angular jsとsinatraでturbolinks&lt;/a> &lt;/strong> from &lt;strong>&lt;a href="//www.slideshare.net/minoritokuda" target="_blank">Minori Tokuda&lt;/a>&lt;/strong> &lt;/div>
&lt;p>@snowcrush さんのblogは、AngularJS + Sinatraで構成されているそうですが、&lt;br>
google botsはJSで動的に生成されたページにindexを貼ってくれないので、&lt;br>
なんとかして拾えるようにしましたという話。&lt;br>
&amp;ldquo;これってTurbolinksじゃん！Railsで良いじゃん！&amp;ldquo;という結論には、笑ってしまいました。&lt;/p></description></item><item><title>kawasaki.rb #010 を開催しました #kwskrb</title><link>https://b94feae1.chezo-uno.pages.dev/post/2014-03-30-kawawaki-dot-rb-number-010-wokai-cui-simasita-number-kwskrb/</link><pubDate>Sun, 30 Mar 2014 22:06:20 +0000</pubDate><guid>https://b94feae1.chezo-uno.pages.dev/post/2014-03-30-kawawaki-dot-rb-number-010-wokai-cui-simasita-number-kwskrb/</guid><description>&lt;p>kawasaki.rbもいよいよ10回目を開催してきました。&lt;br>
まさかの1日二回LTという展開でしたが、無事に話すことが出来て良かったです。&lt;/p>
&lt;p>togetterは&lt;a href="http://togetter.com/li/648447" target="_blank" rel="noopener">こちら&lt;/a>&lt;/p>
&lt;h2 id="パーフェクトruby読書会">パーフェクトRuby読書会&lt;/h2>
&lt;p>2-7-7 Regexp, 2-7-8 %記法の括弧, 2-7-9 手続きオブジェクト(Proc), 2-8 様々な代入式まで読みました。&lt;/p>
&lt;h2 id="はじめて翻訳記事を書いたら300ブクマ超えた話-chezou">はじめて翻訳記事を書いたら300ブクマ超えた話 (chezou)&lt;/h2>
&lt;p>&lt;a href="https://chezo.uno/post/2014-01-18-ke-xue-ji-suan-niokerujun-zhi-hua-aruihanazepythongazhao-shi-nita-yan-yu-nosieawoduo-tuteiruka/" target="_blank" rel="noopener">前々回の話&lt;/a>を翻訳した時に思ったことを書きました。&lt;/p>
&lt;iframe src="//www.slideshare.net/slideshow/embed_code/key/bQD8lAbyLDM2WL" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> &lt;/iframe> &lt;div style="margin-bottom:5px"> &lt;strong> &lt;a href="//www.slideshare.net/chezou/rails-32784327" title="はじめて翻訳記事を書いたら300ブクマ超えた話" target="_blank">はじめて翻訳記事を書いたら300ブクマ超えた話&lt;/a> &lt;/strong> from &lt;strong>&lt;a href="https://www.slideshare.net/chezou" target="_blank">Aki Ariga&lt;/a>&lt;/strong> &lt;/div>
&lt;h2 id="jekyll-ドキュメントの日本語翻訳レポジトリを作った話kk_さん">Jekyll ドキュメントの日本語翻訳レポジトリを作った話(&lt;a href="https://twitter.com/kk_Ataka" target="_blank" rel="noopener">@kk_Ataka&lt;/a>さん)&lt;/h2>
&lt;p>@kk_Atakaさんによる、Jekyllのドキュメントの翻訳の話。&lt;br>
ご本人のブログの記事をもとにお話していただきました。&lt;br>
&lt;a href="http://d.hatena.ne.jp/kk_Ataka/20140314/1394723421" target="_blank" rel="noopener">Jekyllドキュメントの日本語翻訳リポジトリ「jekyllrb.com.jp」を作成しました - kk_Atakaの日記&lt;/a>&lt;/p>
&lt;p>特に、本家のリポジトリが英語しか想定しておらず、「言語ごとの翻訳を本体に入れるつもりはない」と言われているため、&lt;br>
本家との差分をどう管理していけば良いのか、という話を議論しました。&lt;br>
懇親会で、&lt;a href="https://twitter.com/merborne" target="_blank" rel="noopener">@merborne&lt;/a>さんの&lt;a href="http://melborne.github.io/2014/02/17/update-togglate-for-renewed-proposal-to-translation/" target="_blank" rel="noopener">Togglate&lt;/a>を使って本体の更新を反映させやすくできると良いですねーと盛り上がりました。&lt;/p>
&lt;h2 id="railsのhelperでnamed-capture使ったらハマった話-chezou">Railsのhelperでnamed capture使ったらハマった話 (chezou)&lt;/h2>
&lt;p>当日人気のない話でしたが、ActiveSupport::SafeBufferはRegexp.last_matchがそのままだと取れないので気をつけよう、という話でした。&lt;/p>
&lt;iframe src="//www.slideshare.net/slideshow/embed_code/key/LcsZkYnrInT2wl" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> &lt;/iframe> &lt;div style="margin-bottom:5px"> &lt;strong> &lt;a href="//www.slideshare.net/chezou/namd-capture-with" title="gsub with ActiveSupport::SafeBuffer" target="_blank">gsub with ActiveSupport::SafeBuffer&lt;/a> &lt;/strong> from &lt;strong>&lt;a href="https://www.slideshare.net/chezou" target="_blank">Aki Ariga&lt;/a>&lt;/strong> &lt;/div>
&lt;p>次回は、4/23(水)に開催予定です。&lt;br>
申し込みは下記からおねがいします。&lt;/p>
&lt;p>&lt;a href="http://kawasakirb.doorkeeper.jp/events/10187" target="_blank" rel="noopener">Kawasaki.rb #011 - Kawasaki.rb | Doorkeeper&lt;/a>&lt;/p></description></item><item><title>kawasaki.rb #009を開催しました #kwskrb</title><link>https://b94feae1.chezo-uno.pages.dev/post/2014-03-01-kawasaki-dot-rb-number-009wokai-cui-simasita-number-kwskrb/</link><pubDate>Sat, 01 Mar 2014 12:03:51 +0000</pubDate><guid>https://b94feae1.chezo-uno.pages.dev/post/2014-03-01-kawasaki-dot-rb-number-009wokai-cui-simasita-number-kwskrb/</guid><description>&lt;p>去る2/26(水)に&lt;a href="http://kawasakirb.doorkeeper.jp/events/8859" target="_blank" rel="noopener">kawasaki.rb #009&lt;/a>を開催しました。&lt;/p>
&lt;p>togetterのまとめはこちらです。&lt;br>
&lt;a href="http://togetter.com/li/635478" target="_blank" rel="noopener">kawasaki.rb #009 まとめ #kwskrb - Togetterまとめ&lt;/a>&lt;/p>
&lt;h2 id="パーフェクトruby読書会">パーフェクトRuby読書会&lt;/h2>
&lt;p>2-7-4 配列, 2-7-5 ハッシュ, 2-7-6 範囲(Range)をやりました。&lt;/p>
&lt;p>Hashでは、自分で作ったクラスをHashのkeyに用いる場合はどうすればいいのか、という話がでました。&lt;br>
自作クラスに&lt;code>hash&lt;/code>メソッドと&lt;code>eql?(other)&lt;/code>メソッドを定義すれば、&lt;br>
自作クラスでも同値性判定が行われるという確認をしました。&lt;br>
(やっててよかった、レシピブック&amp;amp;yokohama.rb&amp;hellip;)&lt;/p>
&lt;p>コードで書くと、こういう感じですね。&lt;/p>
&lt;pre>&lt;code>class Fooattr\_reader :a, :bdef initialize(a, b) @a, @b = a, b enddef hash@a%10 + @b%7enddef eql?(obj) @a == obj.a &amp;amp;&amp;amp; @b == obj.b endendf1 = Foo.new(1, 2) f2 = Foo.new(1, 2) f1.eql?(f2) # =\&amp;gt; trueh = {} h[f1] = &amp;quot;foo&amp;quot;h[f2] # =\&amp;gt; &amp;quot;foo&amp;quot;
&lt;/code>&lt;/pre>
&lt;p>Rangeでは、&lt;code>(1..-1)&lt;/code>のような負の数までのRangeってなんであるんだろう？という話をしました。&lt;br>
使用するケースとしては、Arrayにアクセスするとき&lt;code>ary[1..-1]&lt;/code>というのを渡すよねー、という話になりました。&lt;/p>
&lt;h2 id="lt">LT&lt;/h2>
&lt;h3 id="bestgemsorg-ぺけみさおさん">BestGems.org (ぺけみさおさん)&lt;/h3>
&lt;p>LTは&lt;a href="https://twitter.com/xmisao" target="_blank" rel="noopener">ぺけみさお&lt;/a>さんによる &lt;a href="http://www.xmisao.com/presentation/kawasaki_rb_9/index.html#/" target="_blank" rel="noopener">ランキングから見るRubyGems -BestGems.orgのご紹介-&lt;/a> と、&lt;a href="https://twitter.com/aflc_jp" target="_blank" rel="noopener">@aflc_jp&lt;/a> さんによるpandasの紹介(資料公開されたら追記します)が発表されました。&lt;/p>
&lt;p>ぺけみさおさんの、BestGems.orgはRubyGems.orgを毎日クローリングして、&lt;br>
DL数の変化を見ているというシンプルながら価値のありそうなアプローチでランキングを作られていました。&lt;br>
実際にランキング作って分析するのって、楽しいですよね。&lt;/p>
&lt;p>ランキングを分析していると&lt;a href="https://github.com/avdi/naught" target="_blank" rel="noopener">naught&lt;/a>というgemの人気が上がっているとのことでした。&lt;/p>
&lt;h3 id="pandas紹介するよaflc_jpさん">pandas紹介するよ(aflc_jpさん)&lt;/h3>
&lt;p>aflc_jpさんのpandasの紹介は、Pythonのデータ分析によく使われるライブラリである&lt;br>
&lt;a href="http://pandas.pydata.org/" target="_blank" rel="noopener">pandas&lt;/a>の基本と使い方のexampleを紹介してもらいました。&lt;/p>
&lt;p>&lt;a href="http://aflc.github.io/kawasaki.rb/2-pandas/introduce_pandas.slides.html#/" target="_blank" rel="noopener">資料&lt;/a>&lt;br>
&lt;a href="http://aflc.github.io/kawasaki.rb/2-pandas/medalists.html" target="_blank" rel="noopener">デモ&lt;/a>&lt;/p>
&lt;p>説明を聞くと、pandasはRでよく使われているDataFrameを扱えるようにしているところが特徴のようで、&lt;br>
SQL likeにgroupbyして集計をしやすくなっているという話でした。&lt;br>
例としてはオリンピックのメダルのデータを使って、日本が歴代メダル数を稼いだ種目などを表にしていました。&lt;br>
Excelに出力することもできるので、分析はpandasでreportingはexcelで、という使い分けができるようです。&lt;/p>
&lt;p>改めて実感したのは、IPython notebookは便利だなーということ。&lt;br>
IJuliaで便利さは実感していたのですが、Rubyの実行もブラウザベースでやれるようになるそうなので、&lt;br>
kawasaki.rbのパーフェクトRuby読み会でもIPythonベースにしようかなー。&lt;/p>
&lt;p>次回は、3/26(水)に開催予定です&lt;/p></description></item><item><title>kawasaki.rb #008 を開催しました #kwskrb</title><link>https://b94feae1.chezo-uno.pages.dev/post/2014-01-24-kawasaki-dot-rb-number-008-wokai-cui-simasita-number-kwskrb/</link><pubDate>Fri, 24 Jan 2014 22:05:59 +0000</pubDate><guid>https://b94feae1.chezo-uno.pages.dev/post/2014-01-24-kawasaki-dot-rb-number-008-wokai-cui-simasita-number-kwskrb/</guid><description>&lt;p>2014/1/22にkawasaki.rbの第8回ミートアップを開催しました。&lt;/p>
&lt;p>togetterはこちら&lt;br>
&lt;a href="http://togetter.com/li/620212" target="_blank" rel="noopener">http://togetter.com/li/620212&lt;/a>&lt;/p>
&lt;h2 id="パーフェクトruby">パーフェクトRuby&lt;/h2>
&lt;p>パーフェクトRubyは、2.7.3シンボルまでやりました。&lt;br>
ヒアドキュメントの様々なテクニックを学ぶことが出来ました。&lt;/p>
&lt;p>ヒアドキュメントに、第2引数渡せたり、&lt;/p>
&lt;p>&lt;a href="https://gist.github.com/chezou/8600203" target="_blank" rel="noopener">https://gist.github.com/chezou/8600203&lt;/a>&lt;/p>
&lt;p>バッククオートでくくると、ヒアドキュメントの実行結果が帰ってくるとか。&lt;/p>
&lt;p>&lt;a href="https://gist.github.com/chezou/8600230" target="_blank" rel="noopener">https://gist.github.com/chezou/8600230&lt;/a>&lt;/p>
&lt;p>あと、&lt;code>===&lt;/code>は&lt;code>case...when&lt;/code>のためだけのもの、という感じだそうで、&lt;code>=~&lt;/code>や&lt;code>!~&lt;/code>のような左辺と右辺の対称性がないからハマるという話でした。 when節には、lamdaを渡せるのは初めて知りました。&lt;/p>
&lt;p>&lt;a href="https://gist.github.com/chezou/8600244" target="_blank" rel="noopener">https://gist.github.com/chezou/8600244&lt;/a>&lt;/p>
&lt;p>いつ使うんだろう。。。&lt;/p>
&lt;h2 id="chezou-なぜ科学計算にはpythonか">chezou &amp;ldquo;なぜ科学計算にはPythonか？&amp;rdquo;&lt;/h2>
&lt;p>&lt;a href="http://www.slideshare.net/chezou/python-forsc" target="_blank" rel="noopener">http://www.slideshare.net/chezou/python-forsc&lt;/a>&lt;/p>
&lt;p>本当は、はじめてはてブでホッテントリ入りした、的な話をしながら、技術的な話の翻訳についての悩みなどアレコレを話そうと思ったのですが(実際、そっちのほうが資料は多くなった)、会場からの希望でこちらの話をしました。&lt;br>
&lt;a href="https://twitter.com/merborne" target="_blank" rel="noopener">merborne&lt;/a>さんの&lt;a href="http://melborne.github.io/2014/01/23/contribute-to-english-based-opensource-project-or-sinatra-japanese-readme/" target="_blank" rel="noopener">英語圏のオープンソースプロジェクトに貢献する最も簡単な方法またはsinatra/README.jp.mdまたは彼はなぜ私を愛するようになったか | hp12c&lt;/a>という話にも通ずるところがあるのですが、技術的な話の翻訳って日本人同士で協力し合うことができないかなー、とか思ったりします。&lt;br>
なので、この話も来月以降に翻訳の話はしたいと思います。&lt;/p>
&lt;p>なんで、Rubyではダメなのか？という話やら、GPU屋さんはPythonの方が人気だねとか、昔「京でRを動かしたいんですが」とかいう話が&amp;hellip;、4,5年前に科学計算がRubyの3番目位の注力事項になっていたのがmrubyに流れてしまった、など様々な話題が展開されました。&lt;/p>
&lt;p>個人的には、一番重要なのはNumPy,Scipyのレイヤーをどうやって作り続けていくかということと、統計や機械学習のデファクトなgemができるといいのかなー、と思いました。&lt;/p>
&lt;p>あと、Numpyのベンチマークを探していたら&lt;a href="http://julialang.org/benchmarks/" target="_blank" rel="noopener">Juliaのベンチマーク&lt;/a>&lt;sup id="fnref-1716-bench">&lt;a href="#fn-1716-bench" rel="footnote">1&lt;/a>&lt;/sup>に行き着いたのですが、実はGoが結構速いということに驚きました。(GoってOpenBLAS使えないですよね？)&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="" srcset="
/post/2014-01-24-kawasaki-dot-rb-number-008-wokai-cui-simasita-number-kwskrb/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388-2014-01-25-0-57-51_hu_609c3dbc15d0dd64.webp 400w,
/post/2014-01-24-kawasaki-dot-rb-number-008-wokai-cui-simasita-number-kwskrb/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388-2014-01-25-0-57-51_hu_1e4e2167b0044812.webp 760w,
/post/2014-01-24-kawasaki-dot-rb-number-008-wokai-cui-simasita-number-kwskrb/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388-2014-01-25-0-57-51_hu_70577b2f18c85bc6.webp 1200w"
src="https://b94feae1.chezo-uno.pages.dev/post/2014-01-24-kawasaki-dot-rb-number-008-wokai-cui-simasita-number-kwskrb/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388-2014-01-25-0-57-51_hu_609c3dbc15d0dd64.webp"
width="760"
height="581"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;br>
&lt;a href="http://julialang.org/benchmarks/" target="_blank" rel="noopener">http://julialang.org/benchmarks/&lt;/a> より引用&lt;/p>
&lt;p>もしかすると、並行処理とも相性のいいGoでの科学計算ライブラリが充実する日が来るかもしれません。&lt;/p>
&lt;p>Rubyのコミュニティなのに、Pythonの話をしていて、、、と思うのですが、次回はPythonistaな方の立場からお話を聞こうと思います。&lt;/p>
&lt;hr>
&lt;ol>
&lt;li>&lt;/li>
&lt;/ol>
&lt;p>「シングルスレッドでのベンチマークは、科学計算ではあまり価値がない」と&lt;a href="https://twitter.com/drmaruyama" target="_blank" rel="noopener">@drmaruyama&lt;/a>さんの言葉↩&lt;/p></description></item><item><title>kawasaki.rb #007 を開催しました #kwskrb</title><link>https://b94feae1.chezo-uno.pages.dev/post/2014-01-24-kawasaki-dot-rb-number-007-wokai-cui-simasita-number-kwskrb/</link><pubDate>Fri, 24 Jan 2014 22:05:53 +0000</pubDate><guid>https://b94feae1.chezo-uno.pages.dev/post/2014-01-24-kawasaki-dot-rb-number-007-wokai-cui-simasita-number-kwskrb/</guid><description>&lt;p>2013/12/18にkawasaki.rbの第7回を開催しました。&lt;br>
この会から、(同じミューザ川崎内ですが)NTT-ATさんに会場をお借りするようになりました。&lt;/p>
&lt;p>第6回で、居酒屋LTをやることを挫折したので、毎月会議室でミートアップを行うようになりました。&lt;/p>
&lt;p>togetterのまとめはこちら&lt;br>
&lt;a href="http://togetter.com/li/606572" target="_blank" rel="noopener">http://togetter.com/li/606572&lt;/a>&lt;/p>
&lt;p>パーフェクトRubyは、2.6のモジュールまでやりました。&lt;/p>
&lt;h2 id="chezou-active-modelとnaive-bayesを仲良くするbaby_faceを使ってみた">chezou &amp;ldquo;Active ModelとNaive Bayesを仲良くする baby_faceを使ってみた&amp;rdquo;&lt;/h2>
&lt;p>&lt;a href="http://www.slideshare.net/chezou/merone-upload-29446373" target="_blank" rel="noopener">http://www.slideshare.net/chezou/merone-upload-29446373&lt;/a>&lt;/p>
&lt;p>&lt;a href="http://yoshiori.github.io/blog/2013/12/09/babyface-gem/" target="_blank" rel="noopener">yoshiori さんが作ったBabyFace&lt;/a>というGemを使ったサンプルアプリとして&lt;a href="https://github.com/chezou/merone" target="_blank" rel="noopener">Merone&lt;/a>を作りました。&lt;br>
BabyFaceはActiveModelなどとナイーブベイズ分類器とをつなぎ合わせることができる便利なGemです。&lt;br>
なんてことはない、投稿したテキストが、DQかモンハンかSkyrimかを判定するだけの簡単なアプリです。&lt;br>
最初はHerokuに上げておこうと思ったのですが、無料で使うにはDBのレコード数の制限が厳しいとかあったので、localで動かしたものでデモをしました。&lt;/p>
&lt;p>ポイントとしては、学習が&lt;/p>
&lt;pre>&lt;code>def self.create\_with\_train(text, category) e = Entry.create(comment: text) method = &amp;quot;train\_#{category}&amp;quot;.intern e.baby\_face.send(method) enddef self.open\_and\_create(file, category) line = 0 open(file) do |f| while l = f.gets next if l.nil? || l.chomp!.empty? break if line == 10000 line += 1 create\_with\_train(l, category) endendend
&lt;/code>&lt;/pre>
&lt;p>これくらいで簡単にかけることと、日本語の分かち書きには&lt;a href="https://github.com/6/tiny_segmenter" target="_blank" rel="noopener">TinySegmenter&lt;/a>を使いました。これならmecab&amp;amp;bindingのインストールとか要らない！便利！とか思っていたら、今どきはhomebrewでサクッとはいるんですね。。。&lt;/p>
&lt;pre>&lt;code>def segment(text) @tagger ||= TinySegmenter.new @tagger.segment(text, ignore\_punctuation: true)end
&lt;/code>&lt;/pre>
&lt;h2 id="suginoyさんの自分のほしいものをどんどんつくろうよという話">&lt;a href="https://twitter.com/suginoy" target="_blank" rel="noopener">@suginoy&lt;/a>さんの&amp;quot;自分のほしいものをどんどんつくろうよ&amp;quot;という話&lt;/h2>
&lt;p>いつもblogにはお世話になっている、suginoyさんの、Railsだと簡単にWebアプリケーション書けるんだから、自分のほしいものを皆どんどんつくろうよ、というお話。&lt;/p>
&lt;ul>
&lt;li>Rubyのカンファレンスサイトをscrapingしてきて、podcastにしちゃえ&lt;/li>
&lt;li>&lt;a href="http://knsmr.github.io/reijiro/" target="_blank" rel="noopener">reijiro&lt;/a>をゴニョゴニョしている&lt;/li>
&lt;li>suicaの使用履歴とかをRailsで管理できるようにしてます&lt;/li>
&lt;/ul>
&lt;p>などなど、いい話でした。&lt;/p>
&lt;p>懇親会では、Kanagawa Ruby会議やりたいですなー、とか盛り上がりました。&lt;/p></description></item><item><title>kawasaki.rb #006 を開催しました #kwskrb</title><link>https://b94feae1.chezo-uno.pages.dev/post/2014-01-24-kawasaki-dot-rb-number-006-wokai-cui-simasita-number-kwskrb/</link><pubDate>Fri, 24 Jan 2014 22:05:48 +0000</pubDate><guid>https://b94feae1.chezo-uno.pages.dev/post/2014-01-24-kawasaki-dot-rb-number-006-wokai-cui-simasita-number-kwskrb/</guid><description>&lt;p>去る2013/11/27にkawasaki.rbの第6回を開催しました。&lt;br>
togetterは&lt;a href="http://togetter.com/li/595791" target="_blank" rel="noopener">こちら&lt;/a>&lt;/p>
&lt;h2 id="kon_yuさんのappiumを使ったiosandroid受け入れテスト">&lt;a href="https://twitter.com/kon_yu" target="_blank" rel="noopener">@kon_yu&lt;/a>さんの&amp;quot;Appiumを使ったiOS(Android)受け入れテスト&amp;quot;&lt;/h2>
&lt;p>&lt;a href="http://www.slideshare.net/kon_yu/appiumiosandroid" target="_blank" rel="noopener">http://www.slideshare.net/kon_yu/appiumiosandroid&lt;/a>&lt;/p>
&lt;p>テスト自動化フレームワークである&lt;a href="http://appium.io/jp/index.html" target="_blank" rel="noopener">Appium&lt;/a>を使うことで、Rspecを書いてiOSの検査ができます。更に、スクリーンショットを自動で撮ることで、デザインのレイアウト崩れなどの検査をしやすくすることができます。&lt;/p>
&lt;p>実際に動いている動画を見ると、なるほど！と思うので、こちらを見ると良いと思います。&lt;/p>
&lt;p>&lt;a href="http://www.youtube.com/watch?feature=player_embedded&amp;amp;v=oTIEt11cXNk" target="_blank" rel="noopener">http://www.youtube.com/watch?feature=player_embedded&amp;amp;v=oTIEt11cXNk&lt;/a>&lt;/p>
&lt;h2 id="chezouのrubyと機械学習">chezouの&amp;quot;Rubyと機械学習&amp;quot;&lt;/h2>
&lt;p>&lt;a href="http://www.slideshare.net/chezou/ruby-28923469" target="_blank" rel="noopener">http://www.slideshare.net/chezou/ruby-28923469&lt;/a>&lt;/p>
&lt;p>タイトルは大分大きく出ていますが、最近訳した&lt;a href="https://chezo.uno/post/2014-01-18-ke-xue-ji-suan-niokerujun-zhi-hua-aruihanazepythongazhao-shi-nita-yan-yu-nosieawoduo-tuteiruka/" target="_blank" rel="noopener">記事&lt;/a>の興味のベースになっている話でも有ります。
なぜ、PythonではRubyに比べて、科学計算が活発に行われているか？という点に対して、NumPyやSciPyといった数値計算のライブラリが活発に利用されているから、Railsで機械学習を扱えるライブラリがあまりないから、という話をしました。&lt;/p>
&lt;p>余談ですが、会場に使ったお店は、予約の段階でプロジェクターを使えると聞いていたのですが、当日現地に行ったら、「持参したプロジェクターを使えます」という話にすり替わっていました。。。&lt;/p></description></item><item><title>Kawasaki.rb #005を開催しました #kwskrb</title><link>https://b94feae1.chezo-uno.pages.dev/post/2014-01-24-kawasaki-dot-rb-number-005wokai-cui-simasita-number-kwskrb/</link><pubDate>Fri, 24 Jan 2014 22:05:31 +0000</pubDate><guid>https://b94feae1.chezo-uno.pages.dev/post/2014-01-24-kawasaki-dot-rb-number-005wokai-cui-simasita-number-kwskrb/</guid><description>&lt;p>大分たってしまいましたが、2013/10/23にKawasaki.rb #005を行いました。&lt;/p>
&lt;p>&lt;a href="https://twitter.com/mametter" target="_blank" rel="noopener">@mametter&lt;/a> さんによる&lt;a href="https://github.com/mame/quine-relay" target="_blank" rel="noopener">quine-relay&lt;/a>の話をしていただきました。&lt;br>
quine-relayとは50言語&lt;sup id="fnref-1648-lang">&lt;a href="#fn-1648-lang" rel="footnote">1&lt;/a>&lt;/sup>が次々に次の言語を生成し、一周してRubyに戻ってくるというコードであります。&lt;/p>
&lt;p>togetterによるまとめはこちらになります。&lt;br>
&lt;a href="http://togetter.com/li/581020" target="_blank" rel="noopener">http://togetter.com/li/581020&lt;/a>&lt;/p>
&lt;p>肝心のスライドは、諸般の事情[^problem]により公開できなさそう、ということですが、&lt;br>
Quineの解説は以下の資料が詳しいです。&lt;/p>
&lt;p>&lt;a href="http://www.slideshare.net/mametter/ruby-2012" target="_blank" rel="noopener">http://www.slideshare.net/mametter/ruby-2012&lt;/a>&lt;/p>
&lt;iframe src="//www.slideshare.net/slideshow/embed_code/key/HSa6r0tKylPW2z" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> &lt;/iframe> &lt;div style="margin-bottom:5px"> &lt;strong> &lt;a href="//www.slideshare.net/mametter/ruby-2012" title="Ruby を用いた超絶技巧プログラミング（夏のプログラミングシンポジウム 2012）" target="_blank">Ruby を用いた超絶技巧プログラミング（夏のプログラミングシンポジウム 2012）&lt;/a> &lt;/strong> from &lt;strong>&lt;a href="//www.slideshare.net/mametter" target="_blank">mametter&lt;/a>&lt;/strong> &lt;/div>
&lt;p>ポイントとしては、&amp;ldquo;いかに次の言語の文字列をprintするか&amp;quot;というところが大きいようです。&lt;br>
特に、エスケープが増えてしまうと、様々な言語の制限(主に文字数制限)に引っかかってしまい実行できなくなるという問題があるようで、takesakoさんの&lt;a href="http://www.namazu.org/~takesako/diary/?date=20050831" target="_blank" rel="noopener">ppencode&lt;/a>やら文字列圧縮などを使い工夫することで、それらをうまく回避しているとのことです。&lt;/p>
&lt;p>また、内部では&lt;a href="https://github.com/mame/quine-relay/blob/master/src/code-gen.rb" target="_blank" rel="noopener">code-gen.rb&lt;/a>で次の言語でのprint文を書けば、順番に生成するようになっているので、言語を増やしたいとかいう人はpull-requestを送るといいと思います。(D言語とかJSXとか、TypeScriptとか&amp;hellip;)&lt;br>
なお、言語の選定基準はDebianのapt-getで導入できる言語、というのを想定していたとのことです。(が、MacではhomebrewがClojureのサポートを打ち切った等の問題が有り、VMでやるのが良さそうです。)&lt;/p>
&lt;p>なお、quine-relayは経済効果をも生み出していたようで（！）、Quoraだかredditだかで「quine-relayの解説したらお礼にお金を払うよ！」と言っていた人に解説をした人がいくばくかのお金をもらっていたそうです。&lt;br>
(もちろん、mameさんにはなんのお金も渡っていないですよ)&lt;/p>
&lt;hr>
&lt;ol>
&lt;li>&lt;/li>
&lt;/ol>
&lt;p>有名なBrainfuckやWhitespaceに始まり、果てはVerilogとかINTERCALとか！&lt;br>
[^problem] : 様々な&lt;a href="http://twitter.com/mrkn/status/392974009199259648" target="_blank" rel="noopener">争いの種&lt;/a>が含まれるため ↩&lt;/p></description></item><item><title>Kawasaki.rb #004を開催しました #kwskrb</title><link>https://b94feae1.chezo-uno.pages.dev/post/2013-10-06-kawasaki-dot-rb-number-004wokai-cui-simasita-number-kwskrb/</link><pubDate>Sun, 06 Oct 2013 12:10:10 +0000</pubDate><guid>https://b94feae1.chezo-uno.pages.dev/post/2013-10-06-kawasaki-dot-rb-number-004wokai-cui-simasita-number-kwskrb/</guid><description>&lt;p>9/25(水)にKawsaki.rbの第4回ミートアップを行いました。&lt;br>
今回は偶数回なので、居酒屋LTの回でした。&lt;/p>
&lt;p>例によって、鍋をつつきながらパーフェクトRubyを読みました。&lt;br>
パーフェクトRubyは「2-1-3 トップレベル」まで行きました。&lt;/p>
&lt;h2 id="lt1-sinatra-hijackerと-rack-hijacking-apiの紹介-minori-tokudaさん">LT1: Sinatra Hijackerと （Rack Hijacking API）の紹介 (Minori Tokudaさん)&lt;/h2>
&lt;p>LT1本目は、Tokudaさん(&lt;a href="https://twitter.com/snowcrush" target="_blank" rel="noopener">@snowcrush&lt;/a>)による&lt;a href="https://github.com/minoritea/sinatra-hijacker" target="_blank" rel="noopener">Sinatra Hijacker&lt;/a>のご紹介。&lt;/p>
&lt;iframe src="//www.slideshare.net/slideshow/embed_code/key/BSA3YyJloFxpdA" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> &lt;/iframe> &lt;div style="margin-bottom:5px"> &lt;strong> &lt;a href="//www.slideshare.net/minoritokuda/sinatra-hijacker" title="Sinatra hijacker" target="_blank">Sinatra hijacker&lt;/a> &lt;/strong> from &lt;strong>&lt;a href="//www.slideshare.net/minoritokuda" target="_blank">Minori Tokuda&lt;/a>&lt;/strong> &lt;/div>
&lt;p>Rack Hijacking APIを使って、ソケットを横取りしてSinatraでWebsocketの通信をしよう！というライブラリです。&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-rb" data-lang="rb">&lt;span class="line">&lt;span class="cl">&lt;span class="nb">require&lt;/span> &lt;span class="s1">&amp;#39;sinatra/hijacker&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">class&lt;/span> &lt;span class="nc">YourApp&lt;/span> &lt;span class="o">&amp;lt;&lt;/span> &lt;span class="no">Sinatra&lt;/span>&lt;span class="o">::&lt;/span>&lt;span class="no">Base&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">register&lt;/span> &lt;span class="no">Sinatra&lt;/span>&lt;span class="o">::&lt;/span>&lt;span class="no">Hijacker&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">websocket&lt;/span> &lt;span class="s1">&amp;#39;/ws&amp;#39;&lt;/span> &lt;span class="k">do&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">ws&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">onopen&lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="n">ws&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">send_data&lt;/span> &lt;span class="s2">&amp;#34;hello&amp;#34;&lt;/span>&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">end&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">end&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>こんなかんじで、シンプルにwebsocketの通信ができるようになります。お手軽ですね。&lt;/p>
&lt;h2 id="lt2-リアルタイム形態素解析-morph-websocket-chezou">LT2: リアルタイム形態素解析 morph-websocket (@chezou)&lt;/h2>
&lt;iframe src="//www.slideshare.net/slideshow/embed_code/key/mUUmC2lBKEjKIP" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> &lt;/iframe> &lt;div style="margin-bottom:5px"> &lt;strong> &lt;a href="//www.slideshare.net/chezou/morphwebsocket" title="リアルタイム形態素解析 morph-websocket / kawasaki.rb #004" target="_blank">リアルタイム形態素解析 morph-websocket / kawasaki.rb #004&lt;/a> &lt;/strong> from &lt;strong>&lt;a href="//www.slideshare.net/chezou" target="_blank">Aki Ariga&lt;/a>&lt;/strong> &lt;/div>
&lt;p>LT2本目は、自分の&lt;a href="https://chezo.uno/post/2012-11-10-websocketwoshi-tuteriarutaimunixing-tai-su-jie-xi-wosurumorph-websocketwozuo-tutemita/" target="_blank" rel="noopener">morph-websocket&lt;/a>のご紹介とデモでした。websocketつながりということで紹介させていただきました。&lt;/p>
&lt;p>形態素解析器Kyteaをバインディングしてwebsocket使って叩けるようにしましたよ、というお話です。&lt;br>
KyteaじゃなくてMeCabでもできるんですけど、作ったときはなぜかRubyバインディングがうまく呼べなかったのでKyteaだけにしたという感じでした。&lt;/p>
&lt;h2 id="次回は">次回は&lt;/h2>
&lt;p>ついに、mameさんによる&lt;a href="https://github.com/mame/quine-relay" target="_blank" rel="noopener">quine relay&lt;/a>の解説をしていただけることになりました！&lt;br>
募集は&lt;a href="http://kawasakirb.doorkeeper.jp/" target="_blank" rel="noopener">Doorkeeper&lt;/a>で近日開始する予定です。&lt;br>
10/23(水)はミューザ川崎 音楽工房に集合だ！&lt;/p></description></item><item><title>Kawasaki.rb #003を開催しました #kwskrb</title><link>https://b94feae1.chezo-uno.pages.dev/post/2013-10-06-kawasaki-dot-rb-number-003wokai-cui-simasita-number-kwskrb/</link><pubDate>Sun, 06 Oct 2013 11:10:03 +0000</pubDate><guid>https://b94feae1.chezo-uno.pages.dev/post/2013-10-06-kawasaki-dot-rb-number-003wokai-cui-simasita-number-kwskrb/</guid><description>&lt;p>大分遅くなりましたが、去る8/28(水)にKawasaki.rbの第3回ミートアップを開催しました。&lt;/p>
&lt;p>この回では、新しい試みとして&lt;a href="http://gihyo.jp/book/2013/978-4-7741-5879-2?ard=1381056613" target="_blank" rel="noopener">パーフェクトRuby&lt;/a>の読書会を行いました。&lt;br>
本が販売されてから間もなかったのですが、会場いらっしゃった方の15名くらいが本を持っているというすごい状況になりました。&lt;/p>
&lt;p>また、2本のプレゼンも非常に盛り上がりました。&lt;/p>
&lt;p>&lt;a href="https://twitter.com/yumu19" target="_blank" rel="noopener">@yumu19&lt;/a>さんにまとめていただいたtogetterは&lt;a href="http://togetter.com/li/555597" target="_blank" rel="noopener">こちら&lt;/a>。&lt;/p>
&lt;h2 id="パーフェクトruby読書会">パーフェクトRuby読書会&lt;/h2>
&lt;h2>&lt;/h2>
&lt;p>まずは1章から突っ込みながら読んでいくことに。&lt;br>
途中でサンプルクラス中でputsメソッドをpustとtypoした時に、「pustメソッドを定義すれば行ける！」という展開があるなど非常にRubyらしさを満喫できました。&lt;br>
やはり前々から聞いていましたが、Rubyの全くの初心者向けというよりも、多少触っているけど色々知りたい！という人が読者層なんだなーという事を再確認しました。&lt;/p>
&lt;h2>&lt;/h2>
&lt;h2 id="gotokenさんによるnumruのお話">@gotokenさんによるNumRuのお話&lt;/h2>
&lt;p>LLで数値計算といえば、PythonのNumPyが有名ですが、それを参考に作られたNumRuというRubyのライブラリがあります。&lt;br>
これは、FORTRANを裏で扱うことでRubyでも数値計算が高速に処理できるというもの(だと理解しています)。&lt;/p>
&lt;p>NumRuが一番分かりやすく詳細に書かれているのは、&lt;a href="http://magazine.rubyist.net/?0006-RLR" target="_blank" rel="noopener">この回のるびま&lt;/a>でしょう。&lt;br>
Pythonのmatplotlibみたいに色々描画をすることもできるようです。&lt;/p>
&lt;p>ただ、NumRuという名前があまり浸透していないのは、おそらく「&lt;a href="http://www.gfd-dennou.org/arch/dcl/" target="_blank" rel="noopener">電脳クラブライブラリ&lt;/a>」の名前空間としてNumRuという名前を用いているだけというのが大きいのかなー、というのと、地球惑星シミュレーションの人たちがメインで使っているので汎用的に使えるのかがあまりわからないところと、FORTRAN系のインストールが結構骨だというところでしょうか。。。&lt;/p>
&lt;p>特に、FORTRAN周りのインストールはNumPy,SciPyあたりでも結構ハマるのですが、NumRuのHomebrewのFormulaをごとけんさんが作ろうとされたようですが、当日には間に合わず&amp;hellip;。期待しております。&lt;/p>
&lt;p>GSLとかもあるんですけど、このへんはNumPy,SciPyなどとの比較を行ったり、エコシステムが回るようになっていくと、Rubyで数値計算をするという話が増えるんじゃないかなー、と思っています。&lt;/p>
&lt;h2 id="kishimaさんによるmrubyとwebrubyのお話">@kishimaさんによるmrubyとwebrubyのお話&lt;/h2>
&lt;p>&lt;a href="https://twitter.com/kishima" target="_blank" rel="noopener">@kishima&lt;/a>さんによる、mrubyとwebrubyのお話をしていただきました。&lt;br>
お忙しい中発表していただき感謝です。&lt;/p>
&lt;p>内容は、mrubyの紹介とwebrubyの説明、TokyuRuby会議で使った抽選アプリのデモを見せていただきました。&lt;/p>
&lt;p>(2013/10/30 スライドを追加しました！)&lt;/p>
&lt;iframe src="//www.slideshare.net/slideshow/embed_code/key/5tRaZhfuS37pio" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> &lt;/iframe> &lt;div style="margin-bottom:5px"> &lt;strong> &lt;a href="//www.slideshare.net/kishima7/mruby-kishima" title="Introduction of mruby &amp;amp; Webruby script example" target="_blank">Introduction of mruby &amp;amp; Webruby script example&lt;/a> &lt;/strong> from &lt;strong>&lt;a href="//www.slideshare.net/kishima7" target="_blank">kishima7&lt;/a>&lt;/strong> &lt;/div>
&lt;p>&lt;a href="https://github.com/xxuejie/webruby" target="_blank" rel="noopener">webruby&lt;/a>の説明は、&lt;a href="http://d.hatena.ne.jp/machaut/20130624/1372089582" target="_blank" rel="noopener">kishimaさんご自身による説明&lt;/a>がわかりやすいですが、Emscriptenを使ってブラウザ上でmrubyを動かそうというものです。&lt;br>
LLVM,clangを経由してではありますが、JSとmrubyがつながるなんて胸が熱くなりますね。&lt;/p>
&lt;p>デモは、webrubyとenchant.jsを使ったものになります。Tokyuの時のデモが以下のツイートで紹介されていたのでお試しください:)&lt;/p>
&lt;p>&lt;a href="https://twitter.com/kishima/status/350969504219660288" target="_blank" rel="noopener">https://twitter.com/kishima/status/350969504219660288&lt;/a>&lt;/p></description></item><item><title>Kawasaki.rb #002 開催しました #kwskrb</title><link>https://b94feae1.chezo-uno.pages.dev/post/2013-08-03-kawasaki-dot-rb-number-002-kai-cui-simasita-number-kwskrb/</link><pubDate>Sat, 03 Aug 2013 06:08:43 +0000</pubDate><guid>https://b94feae1.chezo-uno.pages.dev/post/2013-08-03-kawasaki-dot-rb-number-002-kai-cui-simasita-number-kwskrb/</guid><description>&lt;p>ちょっと時間がたってしまいましたが、川崎地域でRuby関連の技術者が集まるKawasaki.rbの&lt;a href="https://manage.doorkeeper.jp/groups/kawasakirb/events/4895" target="_blank" rel="noopener">第2回ミートアップ&lt;/a>を、去る7/24に行いました。&lt;/p>
&lt;p>今回は偶数回なので飲み回だったのですが、&lt;a href="http://r.gnavi.co.jp/p427500/" target="_blank" rel="noopener">金網デスマッチ 焼肉SUN&lt;/a>というお店で実施しました。焼肉LTの実現！&lt;/p>
&lt;p>実は店のプロジェクターを使えるのは持ち込みDVDだけ、という罠があったのですが、なんとかプロジェクター持ち込みでスクリーンだけは使わせてもらえました。&lt;/p>
&lt;p>二人に焼肉LTをしてもらいました！焼肉LTの様子はこんなかんじでした。&lt;/p>
&lt;blockquote class="twitter-tweet">&lt;p lang="ja" dir="ltr">焼肉LTとは &lt;a href="https://twitter.com/hashtag/kwskrb?src=hash&amp;amp;ref_src=twsrc%5Etfw">#kwskrb&lt;/a> &lt;a href="http://t.co/mOJcRJhI5E">pic.twitter.com/mOJcRJhI5E&lt;/a>&lt;/p>&amp;mdash; Kentaro Goto / ごとけん (@gotoken) &lt;a href="https://twitter.com/gotoken/status/360018779784237056?ref_src=twsrc%5Etfw">July 24, 2013&lt;/a>&lt;/blockquote>
&lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8">&lt;/script>
&lt;h2 id="yumu19さんcapistrano紹介">&lt;a href="http://twitter.com/yumu19" target="_blank" rel="noopener">@yumu19&lt;/a>さん「Capistrano紹介」&lt;/h2>
&lt;p>ブログ記事も書いていただきました！ありがとう！&lt;/p>
&lt;p>&lt;a href="http://yumulog.hatenablog.com/entry/2013/08/02/204449" target="_blank" rel="noopener">kawasaki.rb #002 で Capistrano の話をしてきた #kwskrb - yumulog | 社会人博士の日記&lt;/a>&lt;/p>
&lt;p>Capistranoの基本的な部分を紹介していただきました。&lt;br>
レシピを用意すれば、後からdeployする人はあまり意識しなくていいんですよね。&lt;/p>
&lt;p>スライドはこちら&lt;/p>
&lt;iframe src="//www.slideshare.net/slideshow/embed_code/key/pDYE31FqFWqMeW" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> &lt;/iframe> &lt;div style="margin-bottom:5px"> &lt;strong> &lt;a href="//www.slideshare.net/TsubasaYumura/capistrano-at" title="Capistrano紹介 at kawasaki.rb #002 #kwskrb" target="_blank">Capistrano紹介 at kawasaki.rb #002 #kwskrb&lt;/a> &lt;/strong> from &lt;strong>&lt;a href="//www.slideshare.net/TsubasaYumura" target="_blank">Tsubasa Yumura&lt;/a>&lt;/strong> &lt;/div>
&lt;h2 id="aflc_jp-さんgroongaの紹介の話">&lt;a href="http://twitter.com/aflc_jp" target="_blank" rel="noopener">@aflc_jp&lt;/a> さんgroongaの紹介の話&lt;/h2>
&lt;p>資料は&lt;a href="http://aflc.github.io/kawasaki.rb/1-groonga/index.html#/title" target="_blank" rel="noopener">こちら&lt;/a>&lt;/p>
&lt;ul>
&lt;li>groongaとは？&lt;/li>
&lt;li>ruby bindingのrroongaの話&lt;/li>
&lt;li>ニコニコ動画のコメントを検索できるようにしてみた
個人的には、groongaが鳥山明な名前にしか見えなくなったこと、おそらくニコニコ動画最古の&amp;quot;Ruby&amp;quot;という文字列がレッツゴー陰陽師に埋まっていたという事実が驚きでした。&lt;/li>
&lt;/ul>
&lt;h2 id="今後やりたいこと">今後やりたいこと&lt;/h2>
&lt;p>毎回のtalk以外にもやりたいことを色々と募集したいと思っています。&lt;/p>
&lt;p>Ruby初心者のために&lt;a href="http://www.amazon.co.jp/%E5%88%9D%E3%82%81%E3%81%A6%E3%81%AERuby-Yugui/dp/4873113679" target="_blank" rel="noopener">初めてのRuby&lt;/a>を毎回30分ずつくらい読むのはよさそうだなーという話をしていました。&lt;br>
むしろ今なら&lt;a href="http://www.amazon.co.jp/gp/product/4774158798" target="_blank" rel="noopener">パーフェクトRuby&lt;/a>ですかねー。標準添付ライブラリの解説も付いていることだし。&lt;/p>
&lt;p>というわけで、こちらにコメント頂いてもいいんですが、良ければ&lt;a href="https://docs.google.com/forms/d/1LO7NZxf0q9dQuprTQC8rVn3olvrTFSjx1jz5QLLkcBQ/viewform" target="_blank" rel="noopener">フォーム&lt;/a>からご意見をくださいませ。&lt;/p>
&lt;h2 id="次回予告">次回予告&lt;/h2>
&lt;p>次回は、8/28でミューザ川崎 音楽工房 会議室2でお会いしましょう！&lt;br>
&lt;a href="http://twitter.com/kishima" target="_blank" rel="noopener">@kishima&lt;/a>さんによるmrubyのお話が予定されています。&lt;/p>
&lt;p>発表者も募集中です！&lt;a href="http://twitter.com/chezou" target="_blank" rel="noopener">@chezou&lt;/a>か&lt;a href="https://groups.google.com/forum/#!topic/kawasakirb/" target="_blank" rel="noopener">メーリングリスト&lt;/a>あたりにご連絡ください！&lt;/p></description></item><item><title>Kawasaki.rb #001 第1回ミートアップを開催しました #kwskrb</title><link>https://b94feae1.chezo-uno.pages.dev/post/2013-06-29-kawasaki-dot-rb-number-001-di-1hui-mitoatupuwokai-cui-simasita-number-kwskrb/</link><pubDate>Sat, 29 Jun 2013 04:06:14 +0000</pubDate><guid>https://b94feae1.chezo-uno.pages.dev/post/2013-06-29-kawasaki-dot-rb-number-001-di-1hui-mitoatupuwokai-cui-simasita-number-kwskrb/</guid><description>&lt;p>6/26にKawasaki.rbの第1回ミートアップを開催しました。&lt;/p>
&lt;h2 id="kawasakirb-001">&lt;a href="http://kawasakirb.doorkeeper.jp/events/4115" target="_blank" rel="noopener">Kawasaki.rb #001&lt;/a>&lt;/h2>
&lt;h2>&lt;/h2>
&lt;p>ありそうで以外となかった、川崎でのRubyの勉強会です。&lt;br>
初心者からコアな人までざっくばらんに話が出来ればと思って始めました。&lt;br>
Doorkeeperの参加者を見ていただくとわかるのですが、予想以上に豪華な顔ぶれでhomeなはずなのに、ドキドキが止まりませんでした。(参加者の2割近くコミッターとか！！！)&lt;/p>
&lt;p>当日、NKT77さんとたるいさん(&lt;a href="http://twitter.com/taru" target="_blank" rel="noopener">@taru&lt;/a>)にトークをしてもらいました。&lt;/p>
&lt;p>@kishimaさんによるtogetterまとめは&lt;a href="http://togetter.com/li/525981" target="_blank" rel="noopener">こちら&lt;/a>。&lt;/p>
&lt;h2 id="01-nkt77さん-hadoop-with-ruby-僕がpythonを選んだ理由">01. NKT77さん 「Hadoop with Ruby-僕がPythonを選んだ理由」&lt;/h2>
&lt;p>このタイトル自体は僕が付けた釣り仮題なのですが、内容としてはRubyをHadoop Streamingで使うときにHashが遅いという事例の紹介でした。(&lt;a href="http://b.hatena.ne.jp/entry/kawasakirb.doorkeeper.jp/events/4115" target="_blank" rel="noopener">モリスさんを釣ってしまって&lt;/a>恐縮したのはここだけの話)&lt;/p>
&lt;iframe src="//www.slideshare.net/slideshow/embed_code/key/qNf9UAatermiB5" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> &lt;/iframe> &lt;div style="margin-bottom:5px"> &lt;strong> &lt;a href="//www.slideshare.net/nkt77/20130626-kawasakirb-nkt-23692953" title="20130626 kawasaki.rb NKT77" target="_blank">20130626 kawasaki.rb NKT77&lt;/a> &lt;/strong> from &lt;strong>&lt;a href="//www.slideshare.net/nkt77" target="_blank">nkt77&lt;/a>&lt;/strong> &lt;/div>
&lt;p>(2013/07/04 資料を追加しました)&lt;/p>
&lt;p>ざっくりまとめると&lt;/p>
&lt;ul>
&lt;li>Hadoop streamingでRubyを使うときに、Stringで100万程度のkeyのHashを作ると結構遅い&lt;/li>
&lt;li>HashのLookupも非線形に速度が増えている&lt;/li>
&lt;li>Pythonにしたら10倍速くなった(AWSのEMR料金も10分の1に！)
という内容です。しかし、AWSのおかげで処理時間=お金に換算できる世界になったのが、改めてインパクトが大きいですね&amp;hellip;。&lt;/li>
&lt;/ul>
&lt;p>なお、HashがPythonと比較して遅い原因としては、&lt;/p>
&lt;ol>
&lt;li>GC&lt;/li>
&lt;li>Hash関数がsiphashなため&lt;/li>
&lt;li>rehashの際の閾値がRubyの方が保守的
といった理由が考えられるとのことでした。(間違いがあればご指摘ください)&lt;/li>
&lt;/ol>
&lt;h2 id="02-たるいさんtaru-メモリアロケーションからみた拡張ライブラリに大切なこと">02. たるいさん(@taru) 「メモリアロケーションからみた拡張ライブラリに大切なこと」&lt;/h2>
&lt;iframe src="//www.slideshare.net/slideshow/embed_code/key/1rv0A73MvVSEjR" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> &lt;/iframe> &lt;div style="margin-bottom:5px"> &lt;strong> &lt;a href="//www.slideshare.net/tarui/ss-23517958" title="メモリアロケーションからみた拡張ライブラリに大切なこと" target="_blank">メモリアロケーションからみた拡張ライブラリに大切なこと&lt;/a> &lt;/strong> from &lt;strong>&lt;a href="//www.slideshare.net/tarui" target="_blank">Masaya TARUI&lt;/a>&lt;/strong> &lt;/div>
&lt;p>資料を見ていただければ内容はわかると思います。&lt;/p>
&lt;ul>
&lt;li>初めての拡張ライブラリの作り方&lt;/li>
&lt;li>ArrayがGCされないようにRB_GC_GUARD()しましょう&lt;/li>
&lt;li>GC.stress = trueすると、GC強制的に走らせて再現しにくいバグを潰せる&lt;/li>
&lt;li>NKT77さんが報告していたGCのせいでHashが遅いのはtrunkでは改善しました！(凄い！)
最後の、Hashの速度向上については田中哲さんも確認されたようです。&lt;/li>
&lt;/ul>
&lt;blockquote class="twitter-tweet">&lt;p lang="ja" dir="ltr">kawasaki.rb #001 であった、GC のせいで Hash が遅いが trunk は問題ないというのを追試してみた。たしかにそんなそういう感じになっている。 &lt;a href="http://t.co/mrtKNViEsq">pic.twitter.com/mrtKNViEsq&lt;/a>&lt;/p>&amp;mdash; Tanaka Akira (@tanaka_akr) &lt;a href="https://twitter.com/tanaka_akr/status/350600581003485184?ref_src=twsrc%5Etfw">June 28, 2013&lt;/a>&lt;/blockquote>
&lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8">&lt;/script>
&lt;p>当日は散々、「Rubyの集まりじゃないのかよ！」とか「Pythonを宣伝する場所かよ！」とか突っ込まれていましたが、これで皆さん安心してHadoop StreamingでRubyを使ってもらえますね。&lt;/p>
&lt;p>今後は、初心者にやさしいネタも考えつつ進めて行きたいと思います。（いらないのかな？)&lt;/p>
&lt;p>次回は、7/24(水)に居酒屋LT(というか焼肉LT)をやりますので、準備ができましたら有る方はメーリングリストとDoorkeeperで告知しますので、興味があれば登録していただければと思います。&lt;/p></description></item></channel></rss>