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
factor #RC
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Livesense Inc.
PRO
August 08, 2012
Technology
0
67
factor #RC
Livesense Inc.
PRO
August 08, 2012
Tweet
Share
More Decks by Livesense Inc.
See All by Livesense Inc.
27新卒_総合職採用_会社説明資料
livesense
PRO
0
2.4k
27新卒_Webエンジニア職採用_会社説明資料
livesense
PRO
0
6.4k
株式会社リブセンス・転職会議 採用候補者様向け資料
livesense
PRO
0
160
株式会社リブセンス 会社説明資料(報道関係者様向け)
livesense
PRO
0
1.6k
データ基盤の負債解消のためのリプレイス
livesense
PRO
0
550
26新卒_総合職採用_会社説明資料
livesense
PRO
0
12k
株式会社リブセンス会社紹介資料 / Invent the next common.
livesense
PRO
2
51k
26新卒_Webエンジニア職採用_会社説明資料
livesense
PRO
1
13k
中途セールス職_会社説明資料
livesense
PRO
0
290
Other Decks in Technology
See All in Technology
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
5
2.6k
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
250
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
210
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
540
AIと新時代を切り拓く。これからのSREとメルカリIBISの挑戦
0gm
0
700
ZOZOにおけるAI活用の現在 ~開発組織全体での取り組みと試行錯誤~
zozotech
PRO
5
4.8k
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
320
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
190
GitLab Duo Agent Platform × AGENTS.md で実現するSpec-Driven Development / GitLab Duo Agent Platform × AGENTS.md
n11sh1
0
120
Oracle Cloud Observability and Management Platform - OCI 運用監視サービス概要 -
oracle4engineer
PRO
2
14k
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
390
30万人の同時アクセスに耐えたい!新サービスの盤石なリリースを支える負荷試験 / SRE Kaigi 2026
genda
1
260
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Thoughts on Productivity
jonyablonski
74
5k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
170
Exploring anti-patterns in Rails
aemeredith
2
250
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
410
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
110
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
Claude Code のすすめ
schroneko
67
210k
The Invisible Side of Design
smashingmag
302
51k
Facilitating Awesome Meetings
lara
57
6.7k
Transcript
Takuya Shiotari
Factorとは • Slava Pestovが設計と実装 • 連鎖性言語 • 強い動的型付けのスタック指向 • Joy、Forth、LISP、Selfに影響を受けた
• 優れたパフォーマンス • 充実したライブラリ
連鎖性言語と適用型言語 • 引数を関数に適用することに よって評価が行われる • C、Ruby、PHP、Javascript、 Haskell、Java • 1つのデータのかたまりを操作 する関数を複数作成し、この
データのかたまりが関数から関 数へと渡されることで評価が行 われる • 関数の合成は、複数のプログラ ムを連鎖させることによって記 述する • Forth、Joy、PostScript、Cat、 Factor 適用型 連鎖性
• スタック型言語と連鎖性言語は厳密には同じで はないが、ほとんど同じ(おそらく、連鎖性言語 の実装がスタック型言語) • 再帰関数用のコールスタックの他に関数間で値 をやり取りするためのデータスタックを持ってい る • スタック型言語のプログラマが指す「スタック」は
データスタックのこと スタック型言語
Factorのパーサー • ホワイトスペースでトークンに分解される • 大文字・小文字は区別される 2X+ 2 X + 2
x +
基本構文 プログラムはワードとリテラルから構成される ワード 名前付き関数 クォーテーション 無名関数 コンビネータ 高階関数 ボキャブラリー モジュール
10 sq 5 - ! 10 5 はリテラル、sq -はワー ド
ワード定義 : sq ( x -- ) dup * ;
① ② ③ ④ ⑤ ① 必ず「:」から始まる ② 新しいワードの名前 ③ スタック効果宣言(これが引数みたいなもん) ④ ワードの定義 ⑤ 「;」で終了
制御フロー クォーテーションとは評価可能なコードを含むオブジェクトのこと 2 2 + ! 4がスタックに積まれる [ 2 2
+ ] ! クォーテーションがスタックに積まれる : sign-test ( n -- ) dup 0 < [ drop "negative" ] [ zero? [ "zero" ] [ "positive" ] if ] if print ; 制御フローにクォーテーションが使われる
Factorの特徴 var customer = ...; var price = customer.orders[0].price; orders>>
first price>>
Factorの特徴 var customer = ...; var orders = (customer ==
null ? null : customer.orders); var order = (orders == null ? null : orders[0]); var price = (order == null ? null : price); dup [ orders>> ] when dup [ first ] when dup [ price>> ] when
Factorの特徴 MACRO: maybe ( quots -- ) [ '[ dup
_ when ] ] map [ ] join ; { [ orders>> ] [ first ] [ price>> ] } maybe
次回のテーマ