You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
相変わらずいきなり仕事が忙しくなっているので、また関数言語の話。 「関数言語は副作用が無いから並行処理に向いている」とよく言われます。ですが、そもそも副作用ってなんなんだ?という本質的なところで理解できないことが多いんじゃないかなーと。そもそも私もその辺分かっているのか疑問なので、ちょっと考察してみる試みを。 副作用とは プログラミングにおける副作用(ふくさよう)とは、ある機能がコンピュータの(論理的な)状態を変化させ、それ以降で得られる結果に影響を与えることをいう。(Wikipediaより) これは多分逆に考えたほうが分かりやすい。「副作用が無い」というのは、同じ仕事をさせたら、いつも同じ成果を出すクールなやつということ。私のようにそのときの気分でやることが変わるのでは駄目なのです。 厳密には、以下の二つの条件、 「同じ条件を与えれば必ず同じ結果が得られる」 「他のいかなる機能の結果にも
1 OS系低レイヤな人のための Transputerとか CSP ⇒ Occam ⇒ Erlang 2011/MAY/22 (訂正版2) たけおか 2 前置き 本筋とまったく関係ない 3 代表的な排他制御/同期のプリミティブ • セマフォ (semaphore) – セマフォが得られれば、資源の使用権を得られたと考える – オランダ人のDijkstra(ダイクストラ)の発案 – P/V (Wait/Signal)命令が基本 • Waitでセマフォを得る/Signalでセマフォを返す • 腕木信号の用語。しかもオランダ語 – 1bitのバイナリ・セマフォ – カウンティング・セマフォ (カウンタが0でなければ資源を使用可能) – mutexはセマフォの一種 • モニタ (monitor) – きわどい領域を一つの手続きにし、そこに一人(または許された数)しか入れ ないように、システムが制御
Statistics Favorites 0 Downloads 2 Comments 0 Embed Views 0 Views on SlideShare 89 Total Views 89 Why Erlang? GDC Online 2012 — Presentation Transcript Why … Erlang?Henning DiedrichCEO Eonblast Your Host Henning Diedrich • Founder, CEO Eonblast • CTO Freshworks • CTO, Producer at Newtracks • Team Lead, Producer at Bigpoint • OS Maintainer Emysql, Erlvolt2 Acknowledgements Thank You! Joe Armstrong
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く