Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Streem
Search
Yukihiro Matsumoto
May 28, 2016
Programming
8
3.6k
Streem
東京Ruby会議11 招待講演
Yukihiro Matsumoto
May 28, 2016
Tweet
Share
More Decks by Yukihiro Matsumoto
See All by Yukihiro Matsumoto
30 Years of Ruby
matz
0
320
mruby VM
matz
0
62
Contribute to Ruby (RubyKaigi 2022)
matz
0
190
Ruby_through_Reserved_Words.pdf
matz
0
120
Ruby after 25 years
matz
1
1k
What is software made of?
matz
0
590
world-of-languages.pdf
matz
8
1.3k
Ruby Everywhere
matz
11
120k
Other Decks in Programming
See All in Programming
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
510
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
7
1.3k
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
220
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
testcontainers のススメ
sgash708
1
120
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
270
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
940
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
290
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
190
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
140
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Designing for humans not robots
tammielis
250
25k
Docker and Python
trallard
42
3.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Building Adaptive Systems
keathley
38
2.3k
Writing Fast Ruby
sferik
628
61k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
The Pragmatic Product Professional
lauravandoore
32
6.3k
What's in a price? How to price your products and services
michaelherold
243
12k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Transcript
Powered by Rabbit 2.1.8 Streem 日経Linuxライター @yukihiro_matz まつもと ゆきひろ Yukihiro
"Matz" Matsumoto
Powered by Rabbit 2.1.8 まつもとゆきひろ
Powered by Rabbit 2.1.8 Ruby
Powered by Rabbit 2.1.8 プログラマ
Powered by Rabbit 2.1.8 言語デザイナー
Powered by Rabbit 2.1.8 日経Linuxライター
Powered by Rabbit 2.1.8 作りながら学ぶプログラミング言語
Powered by Rabbit 2.1.8 言語デザイン
Powered by Rabbit 2.1.8 言語実装
Powered by Rabbit 2.1.8 プロ(?)デザイナーの技
Powered by Rabbit 2.1.8 書ける人が他にいない
Powered by Rabbit 2.1.8 Streem
Powered by Rabbit 2.1.8 教材・例題
Powered by Rabbit 2.1.8 言語デザイン
Powered by Rabbit 2.1.8 言語実装
Powered by Rabbit 2.1.8 どんな言語?
Powered by Rabbit 2.1.8 ポジション
Powered by Rabbit 2.1.8 汎用言語を目指さない
Powered by Rabbit 2.1.8 まつもと=Rubyのひと
Powered by Rabbit 2.1.8 「まつもとがRubyをあきらめた」
Powered by Rabbit 2.1.8 Rubyの発展の邪魔になりたくない
Powered by Rabbit 2.1.8 実験
Powered by Rabbit 2.1.8 教材
Powered by Rabbit 2.1.8 特定目的言語
Powered by Rabbit 2.1.8 可能であればRubyと変える
Powered by Rabbit 2.1.8 異なる設計判断
Powered by Rabbit 2.1.8 妥協できない点の明確化
Powered by Rabbit 2.1.8 20年の経験の反映
Powered by Rabbit 2.1.8 関数型(的)プログラミング
Powered by Rabbit 2.1.8 イミュータブルデータ
Powered by Rabbit 2.1.8 コンカレンシー
Powered by Rabbit 2.1.8 プログラミングモデル
Powered by Rabbit 2.1.8 ストリーミングプログラミング
Powered by Rabbit 2.1.8 ループがない
Powered by Rabbit 2.1.8 endがない
Powered by Rabbit 2.1.8 ピタゴラスイッチ・プログラミング Rube Goldberg Programming
Powered by Rabbit 2.1.8 実例
Powered by Rabbit 2.1.8 Cat
Powered by Rabbit 2.1.8 stdin | stdout cat pipeline
Powered by Rabbit 2.1.8 stdin = read I/O
Powered by Rabbit 2.1.8 stdout = write I/O
Powered by Rabbit 2.1.8 read I/O | write I/O
Powered by Rabbit 2.1.8 task(read I/O) | task(write I/O)
Powered by Rabbit 2.1.8 task(read I/O) producer epoll(2) read(2)
queue push
Powered by Rabbit 2.1.8 task(write I/O) consumer queue pop
write(2)
Powered by Rabbit 2.1.8 Hello World
Powered by Rabbit 2.1.8 ["Hello World"] | stdout hello
world
Powered by Rabbit 2.1.8 配列はproducerになる
Powered by Rabbit 2.1.8 Socket connection
Powered by Rabbit 2.1.8 # simple echo server on
port 8007 tcp_server(8007) | each{|sock| sock | sock } simple echo server
Powered by Rabbit 2.1.8 tcp_server = tcp_server task
Powered by Rabbit 2.1.8 each task
Powered by Rabbit 2.1.8 sock I/O | sock I/O
Powered by Rabbit 2.1.8 tcp_server task producer accept(2) create
socket I/O queue push
Powered by Rabbit 2.1.8 each task filter (consumer) queue
pop call function
Powered by Rabbit 2.1.8 # simple netcat on port
8007 sock = tcp_socket("localhost", 8007) stdin | sock sock | stdout simple netcat client
Powered by Rabbit 2.1.8 FizzBuzz
Powered by Rabbit 2.1.8 # seq(100) returns a stream
of numbers from 1 to 100. # stdout is an output destination. seq(100) | map{|x| if (x % 15 == 0) "FizzBuzz" else if (x % 3 == 0) "Fizz" else if (x % 5 == 0) "Buzz" else x } | stdout
Powered by Rabbit 2.1.8 スケジューラー
Powered by Rabbit 2.1.8 コア数のスレッド
Powered by Rabbit 2.1.8 スレッドループ ループ タスクキューから取り出し 実行 全ストリーム終了まで
Powered by Rabbit 2.1.8 FizzBuzz
Powered by Rabbit 2.1.8 # simple netcat on port
8007 sock = tcp_socket("localhost", 8007) stdin | sock sock | stdout simple netcat client
Powered by Rabbit 2.1.8 オブジェクト指向
Powered by Rabbit 2.1.8 foo.bar => bar(foo)
Powered by Rabbit 2.1.8 namespace
Powered by Rabbit 2.1.8 namespace { ... }
Powered by Rabbit 2.1.8 new namespace(args)
Powered by Rabbit 2.1.8 bar(foo)
Powered by Rabbit 2.1.8 bar(foo) fooのnamespaceにbarがあれば なければ変数barを実行
Powered by Rabbit 2.1.8 bar(foo) barが無名関数なら実行 barがC関数なら実行 barが配列ならx(0)で先頭要素
Powered by Rabbit 2.1.8 Lisp1.5
Powered by Rabbit 2.1.8 総称関数を導入したい
Powered by Rabbit 2.1.8 Lisp1
Powered by Rabbit 2.1.8 ライブラリ
Powered by Rabbit 2.1.8 少しずつ充実させてる
Powered by Rabbit 2.1.8 seq/repeat/rand map/each time csv stat/math/sort
Powered by Rabbit 2.1.8 seq/repeat/rand
Powered by Rabbit 2.1.8 Producers seq(10) rand(10) repeat(v, 10)
cycle([v1,v2], 10)
Powered by Rabbit 2.1.8 Producers zip(strm1,strm2) concat(strm1,strm2)
Powered by Rabbit 2.1.8 map/each
Powered by Rabbit 2.1.8 Filters map{|x| x*2} flatmap{|x| x*2}
filter{|x| x%2 == 0} each{|x| print(x)}
Powered by Rabbit 2.1.8 map=each+emit
Powered by Rabbit 2.1.8 def map(func) { each{|x| emit
func(x)} }
Powered by Rabbit 2.1.8 Filters reduce{|x,y| x*y} reduce_by_key{|x,y| x*y}
count min/max
Powered by Rabbit 2.1.8 time
Powered by Rabbit 2.1.8 now() time("2016-05-28T10:30 +0830") time(2016,5,28,10,30)
Powered by Rabbit 2.1.8 任意のタイムゾーンで生成・表示
Powered by Rabbit 2.1.8 csv
Powered by Rabbit 2.1.8 csv()
Powered by Rabbit 2.1.8 stat/math/sort
Powered by Rabbit 2.1.8 sum() average() stdev() variance() correl()
sample()
Powered by Rabbit 2.1.8 sort sort{|x,y| x.cmp(y)} sort_by{|x| x(2)}
median median{|x| x(2)}
Powered by Rabbit 2.1.8 今後の展開
Powered by Rabbit 2.1.8 総称関数
Powered by Rabbit 2.1.8 パターンマッチング
Powered by Rabbit 2.1.8 キーワード引数
Powered by Rabbit 2.1.8 なにができるの?
Powered by Rabbit 2.1.8 CSV処理
Powered by Rabbit 2.1.8 統計(っぽい)処理
Powered by Rabbit 2.1.8 シェルスクリプト(っぽい)処理
Powered by Rabbit 2.1.8 データ変換
Powered by Rabbit 2.1.8 おもちゃレベルのEmbulk
Powered by Rabbit 2.1.8 Web? Maybe
Powered by Rabbit 2.1.8 Game? Maybe
Powered by Rabbit 2.1.8 ワークフローエンジン?
Powered by Rabbit 2.1.8 今後も成長
Powered by Rabbit 2.1.8 楽しい!
Powered by Rabbit 2.1.8 自作言語の世界
Powered by Rabbit 2.1.8 Thank you