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
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
OpenClawでAzure DevOpsのWiki更新を自動化する - クラウドAIだけでは届かない場所へ
yutakaosada
0
140
Argo CDとAtlantisで実現するインフラ管理のセルフサービス化──小規模SREチームで支えるプラットフォーム
cassius7
0
270
MCPゲートウェイを作って運用してわかったこと — Agent時代の権限管理の現在地
mtpooh
10
2.7k
データ品質を壊しながらSnowflakeのAIに分析させてみた
kawanago
0
370
覗いてみよう 関数型ビジュアル言語×2Dグラフィックスの世界
yohyamasaki
0
160
【ゲームメーカーズスクランブル2026】『Shadowverse: Worlds Beyond』UIとアニメーションで実現する最高のユーザー体験を叶えるプロトタイピング
cygames
PRO
1
710
ビジネスを止めない技術的負債の返済のための戦略とその手法 - 技術的負債と向き合う / Complexity and Simplicity
soudai
PRO
2
390
spanner-autoscalerに学ぶ CRD設計パターン 〜自動化と緊急時対応を両立する Kubernetesコントローラーの作り方〜
tkuchiki
0
220
OSC2026on_the-world-is-waiting-for-your-voice.pdf
naruoga
0
220
いちAWSエンジニアのAI活用を振り返る #devio2026 / devio osaka 2026 kawahara
masahirokawahara
2
310
AI Made Us Faster at Solving the Wrong Problems
marceloancelmo
0
130
組み立てて楽しむ AWS Blocks 入門
kmiya84377
0
110
Featured
See All Featured
The Cult of Friendly URLs
andyhume
79
7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Google's AI Overviews - The New Search
badams
0
1.6k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
36k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
440
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
380
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
We Are The Robots
honzajavorek
0
380
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
710
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
900
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