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
わいわいOperator
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
giginet
PRO
September 12, 2018
Programming
240
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
わいわいOperator
https://iosdiscord.connpass.com/event/97606/
giginet
PRO
September 12, 2018
More Decks by giginet
See All by giginet
🀄️ on swiftc
giginet
PRO
0
560
15年メンテしてきたdotfilesから開発トレンドを振り返る 2011 - 2026
giginet
PRO
2
430
Claude Codeログ基盤の構築
giginet
PRO
7
4.5k
Inside of Swift Export
giginet
PRO
1
3.2k
Swiftビルド弾丸ツアー - Swift Buildが作る新しいエコシステム
giginet
PRO
0
2.9k
SwiftでMCPサーバーを作ろう!
giginet
PRO
3
470
Creating Intuitive Developer Tool in Swift
giginet
PRO
0
1.6k
Mergeable Libraryで 高速なアプリ起動を実現しよう!
giginet
PRO
2
8.3k
5分でわかるExplicitly Built Modules
giginet
PRO
2
1.9k
Other Decks in Programming
See All in Programming
源内ハンズオン概要編
hideg
0
210
Cloudflare is Agents
chimame
0
180
Flow は今どうなっているか
mizdra
PRO
0
670
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
280
初めての模倣学習とVLA
natsutan
0
160
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
260
Hono + Inertia + React で LP を構築した話
oukayuka
2
130
【デモ】Kiroで体験する仕様駆動開発|設計からコーディングまでAIと進める開発フロー
cmkudo
0
320
AI Engineeringは、AIプロダクトだけのものか? 〜AIがソフトウェアを作る時代の新しい当たり前〜 / No AI in your product. AI Engineering in your development.
rkaga
5
500
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
250
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
340
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
560
Featured
See All Featured
HDC tutorial
michielstock
2
810
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
RailsConf 2023
tenderlove
30
1.5k
Between Models and Reality
mayunak
4
400
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
500
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.8k
It's Worth the Effort
3n
188
29k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Transcript
Θ͍Θ͍Operator Θ͍Θ͍swiftc #5 @giginet
iOSDCͷLT !
• Protocol Extension͔ΒᤈࢠΛੜ͢Έ͍ͨͳωλΛͬͨ
͜Εpostfix operatorͰͰ͖ͳ͍ͷʁ !
import Foundation import Peafowl postfix operator ᤈ extension Int {
postfix static func ᤈ(lhs: Int) -> Tile { return Tile(.character(lhs))! } } 1ᤈ
None
ແཧͦ͏
ύʔαʔΛಡΉ • https://github.com/apple/swift/blob/master/include/swift/AST/ Identifier.h#L94
/// isOperatorStartCodePoint - Return true if the specified code point
is a /// valid start of an operator. static bool isOperatorStartCodePoint(uint32_t C) { // ASCII operator chars. static const char OpChars[] = "/=-+*%<>!&|^~.?"; if (C < 0x80) return memchr(OpChars, C, sizeof(OpChars) - 1) != 0; // Unicode math, symbol, arrow, dingbat, and line/box drawing chars. return (C >= 0x00A1 && C <= 0x00A7) || C == 0x00A9 || C == 0x00AB || C == 0x00AC || C == 0x00AE || C == 0x00B0 || C == 0x00B1 || C == 0x00B6 || C == 0x00BB || C == 0x00BF || C == 0x00D7 || C == 0x00F7 || C == 0x2016 || C == 0x2017 || (C >= 0x2020 && C <= 0x2027) || (C >= 0x2030 && C <= 0x203E) || (C >= 0x2041 && C <= 0x2053) || (C >= 0x2055 && C <= 0x205E) || (C >= 0x2190 && C <= 0x23FF) || (C >= 0x2500 && C <= 0x2775) || (C >= 0x2794 && C <= 0x2BFF) || (C >= 0x2E00 && C <= 0x2E7F) || (C >= 0x3001 && C <= 0x3003) || (C >= 0x3008 && C <= 0x3030); }
None
·ͱΊ • operatorͰ͑Δจࣈίʔυܾ·ͬͯΔ • ϙϯυoperatorʹͰ͖Δ͕ɺϢʔϩoperatorʹͰ͖ͳ͍ • ଞʹ͋Δ͔
ΦϚέ • ࣮ṛશͯUnicodeʹׂΓͯΒΕ͍ͯΔ • ͜ΕΦϖϨʔλʔʹͰ͖ͳ͍ʁ
ແཧͩͬͨ
ΦϚέ2 • ṛΛఆ͢ΔCharacterSetͰ͢ import Foundation public let MahjongTileCharacterSet = {
() -> CharacterSet in let start = Character("").unicodeScalars.first! let end = Character("").unicodeScalars.first! let range: ClosedRange<Unicode.Scalar> = start...end return CharacterSet(charactersIn: range) }()