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
Generative Programming in Swift
Search
Shintaro Kaneko
August 20, 2016
Programming
1
4.3k
Generative Programming in Swift
JSON Schema + APIKit Generator
https://github.com/kaneshin/genkit
Shintaro Kaneko
August 20, 2016
Tweet
Share
More Decks by Shintaro Kaneko
See All by Shintaro Kaneko
How to keep growing SRE team at Eureka
kaneshin
3
8.9k
Go - CLI Tools Design
kaneshin
0
6.7k
Summer Internship 2018 - The principle of the eureka summer internship 2018
kaneshin
2
89
Summer Internship 2018 - The eureka summer internship 2018
kaneshin
0
85
Summer Internship 2018 - How to develop a product
kaneshin
0
67
How to write Go code
kaneshin
8
8k
Go Package Guidelines
kaneshin
1
1.1k
net/http package ~GoConference 2017 Spring~
kaneshin
1
2.7k
Essentials of Golang
kaneshin
5
13k
Other Decks in Programming
See All in Programming
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
140
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
570
C#/.NETのこれまでのふりかえり
tomokusaba
1
160
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
180
Dev ContainersとGitHub Codespacesの素敵な関係
ymd65536
1
130
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
4
1.3k
Hotwire or React? ~Reactの録画機能をHotwireに置き換えて得られた知見~ / hotwire_or_react
harunatsujita
9
4.1k
推し活の ハイトラフィックに立ち向かう Railsとアーキテクチャ - Kaigi on Rails 2024
falcon8823
6
2.3k
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
440
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
220
Vue.js学習の振り返り
hiro_xre
2
130
Vaporモードを大規模サービスに最速導入して学びを共有する
kazukishimamoto
4
4.4k
Featured
See All Featured
Happy Clients
brianwarren
97
6.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
GraphQLとの向き合い方2022年版
quramy
43
13k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
Six Lessons from altMBA
skipperchong
26
3.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
Ruby is Unlike a Banana
tanoku
96
11k
Art, The Web, and Tiny UX
lynnandtonic
296
20k
Transcript
Generative Programming in Swift Presented by @kaneshin 08/20/2016 iOSDC
@kaneshin (Shintaro Kaneko) - Principal Engineer / Manager - Gopher,
Vimmer, Photographer, Mathematician
None
Unleashing the real power of Core Data with the elegance
and safety of Swift
ੜతϓϩάϥϛϯά Generative Programming
࣮ફ͍ͯ͠Δਓ
Generative Programming - Generics struct Something<T> { let with: T
}
Generative Programming - Generics struct Something<T> { let with: T
}
࣮ફ͍ͯ͠Δਓ
ੜతϓϩάϥϛϯά ͱʁ
ੜతϓϩάϥϛϯά: Generative programming δΣωϦοΫͳΫϥεɺϓϩτλΠϓϕʔεɺςϯϓϨʔτɺΞε ϖΫτɺίʔυੜͳͲͷٕ๏Λͬͯιʔείʔυ࡞ΛࣗಈԽ ͠ɺϓϩάϥϚͷੜ࢈ੑΛ্ͤ͞ΔϓϩάϥϛϯάͷελΠϧͰ ͋Δɻ ιϑτΣΞίϯϙʔωϯτͳͲͷίʔυ࠶ར༻ͷٕ๏ͱ࿈ܞ͠ ͯ༻͞ΕΔɻ
ੜతϓϩάϥϛϯά: Generative programming δΣωϦοΫͳΫϥεɺϓϩτλΠϓϕʔεɺςϯϓϨʔτɺΞε ϖΫτɺίʔυੜͳͲͷٕ๏Λͬͯιʔείʔυ࡞ΛࣗಈԽ ͠ɺϓϩάϥϚͷੜ࢈ੑΛ্ͤ͞ΔϓϩάϥϛϯάͷελΠϧͰ ͋Δɻ ιϑτΣΞίϯϙʔωϯτͳͲͷίʔυ࠶ར༻ͷٕ๏ͱ࿈ܞ͠ ͯ༻͞ΕΔɻ δΣωϦΫεϓϩάϥϛϯά
ੜతϓϩάϥϛϯάͷҰछ
Generics Programming
"Dynamic, highly parameterized software is harder to understand and build
than more static software." (Gang of Four 1995:21)
Generics are a trade off between programmer time, compilation time,
and execution time. See https://github.com/golang/proposal/blob/master/design/15292-generics.md
ੜతϓϩάϥϛϯά: Generative programming δΣωϦοΫͳΫϥεɺϓϩτλΠϓϕʔεɺςϯϓϨʔτɺΞε ϖΫτɺίʔυੜͳͲͷٕ๏Λͬͯιʔείʔυ࡞ΛࣗಈԽ ͠ɺϓϩάϥϚͷੜ࢈ੑΛ্ͤ͞ΔϓϩάϥϛϯάͷελΠϧͰ ͋Δɻ ιϑτΣΞίϯϙʔωϯτͳͲͷίʔυ࠶ར༻ͷٕ๏ͱ࿈ܞ͠ ͯ༻͞ΕΔɻ
Code Generation
JSON Hyper Schema + HTTP Request
JSON Hyper Schema Swagger prmd
HTTP Request Alamofire APIKit
Code Generation • Demo (If enough time to introduce) •
https://github.com/kaneshin/genkit (golang, ver. 0.0.1) • JSON Hyper Schema - prmd • HTTP Request - APIKit
Thank you Credit: NASA Earth Observatory/NOAA NGDC