Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
factor #RC
Search
Livesense Inc.
PRO
August 08, 2012
Technology
75
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
factor #RC
Livesense Inc.
PRO
August 08, 2012
More Decks by Livesense Inc.
See All by Livesense Inc.
Rubyはただの⾔語に⾮ず
livesense
PRO
0
520
28新卒_Webエンジニア職採用_会社説明資料
livesense
PRO
0
120
27新卒_総合職採用_会社説明資料
livesense
PRO
0
7.1k
27新卒_Webエンジニア職採用_会社説明資料
livesense
PRO
0
12k
株式会社リブセンス・転職会議 採用候補者様向け資料
livesense
PRO
0
540
株式会社リブセンス 会社説明資料(報道関係者様向け)
livesense
PRO
1
1.8k
データ基盤の負債解消のためのリプレイス
livesense
PRO
0
680
26新卒_総合職採用_会社説明資料
livesense
PRO
0
13k
株式会社リブセンス会社紹介資料 / Invent the next common.
livesense
PRO
2
74k
Other Decks in Technology
See All in Technology
Gitは怖い?共有ワークスペースから始めるSnowflakeチーム開発
coco_se
0
190
GoにおけるFFIのこれまでとこれから
goccy
5
2.6k
コーディングエージェントでM5Stack系の開発を少し試した時の話 / M5 Japan Tour 2026 Autumn 東京
you
PRO
0
190
ペアプロの価値はコードを書くことだけじゃない
codmoninc
PRO
0
220
家のリアーキテクト・リファクタリング
suguruooki
0
140
Multica × 長期記憶:40個のミニプロジェクト管理
eiei114
1
270
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
1
240
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
3
320
[2026-09-11]SREは誰のもの?運用エンジニアが始める 「SRE領域への越境」とチームの進化の軌跡 〜Road to NEXT CRE
tosite
0
180
2026_devsumi_ozono.pdf
o3
3
450
安心して変更できるWebフロントエンドの作り方
pirosikick
4
2k
株式会社シーエーシー エンジニア向け会社紹介資料
cac
0
57k
Featured
See All Featured
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
880
Building Applications with DynamoDB
mza
96
7.2k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
2
3.8k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
300
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
GraphQLとの向き合い方2022年版
quramy
50
15k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Exploring anti-patterns in Rails
aemeredith
3
500
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
320
Crafting Experiences
bethany
1
330
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
次回のテーマ