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
The reason for using reason
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
mzp
July 22, 2017
Technology
3k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
The reason for using reason
https://ml-lang.connpass.com/event/58151/
mzp
July 22, 2017
More Decks by mzp
See All by mzp
アイドルとして勤務する -理論と実践- / Work as cute idol. - theory & practice - #imas_hack
mzp
2
18k
日本語入力の落とし穴
mzp
4
14k
アイマスハッカソン 2017-ライブの感動を再現する
mzp
1
2.5k
ぺろぺろ - Github pull request bot framework -
mzp
2
3.4k
Love💕LivePhotos
mzp
0
1.6k
日本語入力とLisp
mzp
1
3.6k
Amazon EC2 スポットインスタンスを開発環境にする話
mzp
0
1.6k
クラウドサービスを活用した開発環境
mzp
1
3.4k
Rubyistのための型入門
mzp
19
6.2k
Other Decks in Technology
See All in Technology
FinOps Agentが生んだ技術負債:コスト自動調査の落とし穴と解消までの道のり
oasis1994liveforever
3
250
企画を Software Factory-ready にする——開発が高速になったとき、PdMの仕事はどう変わったか
yachibit
1
140
AI駆動で「他アプリの音を加工できる」アプリを作った
satomasahiro2005
0
190
AI時代のGraphQL
joere
3
350
アカウント統制の健康診断
kenichinakamura
1
120
macOS Golden Gate 時代のMac管理
tategami
0
130
[EMNLP26] RIGEL: Self-Distilled Score Adaptation for Image and Video Captioning Evaluation
keio_smilab
PRO
0
120
DBについての基礎説明(MySQL編) - コロプラ 2026年度 新卒研修
colopl
0
160
AI駆動開発における開発環境のセキュリティの考え方
yamahiro
1
360
AIにシークレットを見せない、WSL2で安全な開発環境
yazm
0
340
What Is JetBrains Air
x5gtrn
PRO
0
140
Metadata - Section 2: Simple Metadata & Meta Tags
mohab1
0
120
Featured
See All Featured
ラッコキーワード サービス紹介資料
rakko
3
5.4M
Art, The Web, and Tiny UX
lynnandtonic
304
22k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
860
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
Utilizing Notion as your number one productivity tool
mfonobong
4
620
4 Signs Your Business is Dying
shpigford
187
23k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
530
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
500
Transcript
5IFSFBTPOGPSVTJOHSFBTPO N[Q .-ษڧձ
ཁ .PEFSO+BWB4DSJQU❤.-GFBUVSFT Ͱಋೖେม 0$BNMΛ+BWB4DSJQUͬΆ͘͠Α͏
None
Ҿ༻ݩ3*05"3FBDUMJLFVTFSJOUFSGBDFNJDSPMJCSBSZ IUUQNJLFXBSEOFUUBMLSJPUKT
None
class Greeting extends React.Component { render() { return <h1>Hello</h1>; }
} 3FBDUWJFXͷߏங
3FEVYঢ়ଶཧ ભҠؔΛఆٛ͠ঢ়ଶΛཧ͢Δ ͜ͷؔΛSFEVDFSΛݺͿ state -> action -> state
function counter(state = 0, action) { switch (action.type) { case
'INCREMENT': return state + 1 case 'DECREMENT': return state - 1 default: return state } } ྫDPVOUFSSFEVDFS { type: "INCREMENTAL" }
function todo(state, action) { switch (action.type) { case 'TOGGLE': if(state.id
== action.id) { return {...state , completed: !state.completed } } else { return state } default: return state } } ྫUPEPSFEVDFS { type: 'TOGGLE', id: 42 } { id: 42, name: "create slide", completed: false, ... }
SFEVDFSJEJPN UZQF͕Yͷͱ͖ɺZͱ͍͏߲Λ࣋ͭ ঢ়ଶΛίϐʔ͠ɺҰ෦͚ͩߋ৽͢Δ ˠόϦΞϯτܕͬΆ͍ ˠϨίʔυܕͬΆ͍
.-༝དྷͷػೳͷಋೖ ύλʔϯϚον .BZCFϞφυ ඇಉظϞφυ ੩తܕݕࠪ
+ 2016 Ҿ༻ݩ5IF%BXOPG3FBTPO IUUQTTBOEFSTQJFTHJUIVCJPTMJEFTEBXOPGSFBTPOQEG
✨ཧͷݴޠ✨ όϦΞϯτϨίʔυܕ͕͋Δ ύλʔϯϚον͕͋Δ ੩తܕݕ͕ࠪ͋Δ +BWB4DSJQU͕ੜͰ͖Δ
JS developer trying to grasp OCaml syntax Ҿ༻ݩ5IF%BXOPG3FBTPO IUUQTTBOEFSTQJFTHJUIVCJPTMJEFTEBXOPGSFBTPOQEG
JavaScript OCaml Flow Reason Adopting features of ML Becoming familiar
to JS developers Syntax + tooling A lot of work Ҿ༻ݩ5IF%BXOPG3FBTPO IUUQTTBOEFSTQJFTHJUIVCJPTMJEFTEBXOPGSFBTPOQEG
3FBTPO͕ͬͯΔ͜ͱ
#VDLMF4DSJQUͱͷ࿈ܞ 0$BNM͔Β+BWB4DSJQUΛੜ͢ΔίϯύΠϥ IUUQHJUIVCDPNCMPPNCFSHCVDLMFTDSJQU function fact(n) { if (n !== 0)
{ return imul(n, fact(n - 1 | 0)); } else { return 1; } } let rec fact = function | 0 -> 1 | n -> n * fact (n - 1) 0$BNM +BWB4DSJQU
'use strict'; var Pervasives = require("bs-platform/lib/js/pervasives"); var Http = require("http");
var hostname = "127.0.0.1"; function create_server(http) { var server = http.createServer(function (_, resp) { resp.statusCode = 200; resp.setHeader("Content-Type", "text/plain"); return resp.end("Hello world\n"); }); return server.listen(3000, hostname, function () { console.log("Server running at http://" + (hostname + (":" + (Pervasives.string_of_int(3000) + "/")))); return /* () */0; }); } create_server(Http); IVNBOSFBEBCMFDPEF
Ҿ༻ݩ0$BNM+BWBTDSJQU IUUQTHJUIVCDPN#VDLMF4DSJQUCVDLMFTDSJQUCMPCNBTUFSEPDTTMJEFT#VDLMF@NFFUVQNE
let greeting = "hello!"; let name = "mzp"; ..... จ๏มଋറ
if (showMenu) { displayMenu (); }; จ๏݅ذ
switch data { | GoodResult theMessage => "Success! " ^
theMessage | BadResult errorCode => "Something's wrong. The error code is: " ^ (string_of_int errorCode) }; จ๏ύλʔϯϚον
ύοέʔδϚωʔδϟʔ OQNΛར༻͢Δ PQBNΘͳ͍ OQNJOTUBMMCTQMBUGPSNͰ0$BNMͷϏ ϧυ͕࢝·Δ
ίʔυิNFSMJO
ΤσΟλ֦ு
#FUUFS&SSPST Ҿ༻ݩIUUQTHJUIVCDPNSFBTPONM#FUUFS&SSPST
SFE Ҿ༻ݩIUUQTHJUIVCDPNSFBTPONMSFE
༨ஊ3FBTPOͱ͍͏໊લ ؔ࿈ϓϩμΫτ͕શ෦Ұൠ໊ࢺ qPX JOGFS SFBTPO FYBNQMFʹSFBTPOPGMJGF͕͋Δ
3FBTPOͷར༻ྫ
IUUQTUXJUUFSDPNMPZPMOZTUBUVT 'BDFCPPL.FTTBOHFSͷ 3FBTPOʹஔ͖͑ΒΕͯΔ
Meanwhile at… Concurrent React Prototype in OCaml @jordwalke Ҿ༻ݩ5IF%BXOPG3FBTPO IUUQTTBOEFSTQJFTHJUIVCJPTMJEFTEBXOPGSFBTPOQEG
None
3FBTPOͷΑ͍໘
let redux state = function | `Toggle id -> if
state.id = id then { state with complete=not state.complete } else state | _ -> state ύλʔϯϚον࠷ߴ
Ϗϧυ
let maybeSay (s: string Js.null) = Js.Null.iter s (fun message
-> Js.log message) let maybeSay (s: string Js.undefined) = Js.Undefined.iter s (fun message -> Js.log message) OVMMVOEFpOFE
take_if context ~f:(function `DelayedInc -> Some () | _ ->
None) >>= (fun () -> call (delay 1000)) >>= (fun () -> put context `Inc) DBMMCBDLIFMM
3FBTPOͷͭΒ͍໘
Πϯετʔϧ࣌ؒͷ૿Ճ
external request : config -> response Js.Promise.t = "get" [@@bs.module
"axios"]; external get : string -> config Js.null -> response Js.Promise.t = "get" [@@bs.module "axios"]; external delete: string -> config Js.null -> response Js.Promise.t = "delete" [@@bs.module "axios"]; external head: string -> config Js.null -> response Js.Promise.t = "head" [@@bs.module "axios"]; external post: string -> 'a Js.null -> config Js.null -> response Js.Promise.t = "post" [@@bs.module "axios"]; external put: string -> config Js.null -> response Js.Promise.t = "put" [@@bs.module "axios"]; external patch: string -> config Js.null -> response Js.Promise.t = "patch" [@@bs.module "axios"]; ܕఆ͕ٛେม
let expect_array json = switch (Js.Json.reifyType json) { | Js.Json.Array,
data -> swtich (Js.Json.reifyType data) { ... } | _ -> failwith "unexpected response type" } +40/͔ΒͷσʔλऔΓग़͠
type tree = | Leaf | Node of int *
tree * tree (* Leaf --> 0 *) (* Node(a,b,c) --> [a,b,c]*) όϦΞϯτͷϥϯλΠϜදݱ
Α͘Θ͔ͬͯͳ͍෦
WJNͷϋΠϥΠτ ΩʔϫʔυͷϋΠϥΠτ͕ෆશ ????
+4$BNM Ҿ༻ݩIUUQTHJUIVCDPNGBDFCPPLFYQFSJNFOUBM+4$BNM
FTZ ZBSOͷGPSL μϯϩʔυͱϏϧυ͕۠ผ͞Ε͍ͯΔ
PQBNϒϦοδ
ࢀߟจݙ BXFTPNFSFBTPO IUUQTHJUIVCDPNWSBNBOBBXFTPNFSFBTPONMCMPCNBTUFS3&"%.&NE %BXOPG3FBTPO IUUQTTBOEFSTQJFTHJUIVCJPTMJEFTEBXOPGSFBTPOQEG 3FBTPOHVJEF IUUQTSFBTPONMHJUIVCJPHVJEF
#VDLMF4DSJQUNBOVBM IUUQCVDLMFTDSJQUHJUIVCJPCVDLMFTDSJQU.BOVBMIUNM
·ͱΊ +BWB4DSJQUʹ.-ͷػೳ͕ඞཁ ಋೖେมͩ͠ɺ0$BNMͬͨ΄͏͕ ͍͍ ͦͷ··ͭΒ͍ͷͰ͍ͨ͘͢͠ͷ ͕3FBTPO
None