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
初めてのターミナルプログラム
Search
Elvis Shi
March 09, 2018
Programming
2.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
初めてのターミナルプログラム
Elvis Shi
March 09, 2018
More Decks by Elvis Shi
See All by Elvis Shi
@Environment(\.keyPath)那么好我不允许你们不知道! / atEnvironment keyPath is so good and you should know it!
lovee
0
460
ゼロから始めるPreferenceの実装 / Let's implement Preferences from scratch
lovee
0
150
Kotlin エンジニアへ送る:Swift 案件に参加させられる日に備えて~似てるけど色々違う Swift の仕様 / from Kotlin to Swift
lovee
1
390
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
740
How did I build an Open-Source SwiftUI Toast Library
lovee
1
170
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
1.3k
SwiftUIで二重スクロール作ってみた / When I tried to make a dual-scroll-ish view in SwiftUI
lovee
1
380
Observation のあれこれ / A brief introduction about Observation
lovee
3
440
ChatGPT 時代の勉強 / Learning under ChatGPT era
lovee
27
9k
Other Decks in Programming
See All in Programming
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
610
Creating Composable Callables in Contemporary C++
rollbear
0
170
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
280
Oxlintのカスタムルールの現況
syumai
6
1.2k
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
740
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
410
Vite+ Unified Toolchain for the Web
naokihaba
0
340
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.4k
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.4k
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
210
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
260
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
140
Featured
See All Featured
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
190
Building a Scalable Design System with Sketch
lauravandoore
463
34k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
240
sira's awesome portfolio website redesign presentation
elsirapls
0
280
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Documentation Writing (for coders)
carmenintech
77
5.4k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
950
Chasing Engaging Ingredients in Design
codingconduct
0
230
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
480
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
260
Transcript
ॳΊͯͷ λʔϛφϧϓϩάϥϜ forUSZ4XJGU5PLZP"GUFSUBMLT
var employedBy = "YUMEMI Inc." var job = "iOS Developer"
var favoriteLanguage = "Swift" var twitter = "@lovee" var qiita = "lovee" var github = "el-hoshino" var additionalInfo = """ ΏΔΏΔΩϟϯϓ͘͘ձɺࢀՃऀืूத """ class Me: Developable, Talkable { }
༷ʑͳλʔϛφϧϓϩάϥϜ ▸ QJOH ▸ CSFX ▸ HJU ▸ LVSJ ▸
IBOBLP ▸ FSVUBTP 1kuri: https://github.com/bannzai/Kuri 2hanako: https://github.com/el-hoshino/hanako 3erutaso: https://github.com/sgymtic/sl
ࣗ࡞Ζ͏
·ͣੈքʹ ѫࡰ͠Α͏
9DPEF ʷ 4XJGU
None
import Foundation print("Hello, World!")
import Foundation print("Hello, World!")
import Foundation print("Hello, World!")
$ cd {path/to/project/dir} $ xcodebuild $ cp build/Release/{app_name} /usr/local/bin $
{app_name} hello, world! 今回は簡単なプログラムなので Xcode 使わずに `swiftc` で ビルドしてもいいけど まあいいや
Ͷɺ؆୯Ͱ ͠ΐʁ
$ cd {path/to/project/dir} $ xcodebuild $ cp build/Release/{app_name} /usr/local/bin $
{app_name} hello, world! コマンド引数って どうやって取るんだろ
import Foundation CommandLine.arguments: [String]
None
import Foundation let candidates = Array(CommandLine.arguments.dropFirst()) var outputs: [String] =
[] output: while let random = candidates.random { print(random) outputs.append(random) outputs.keepLast(candidates.count) if outputs == candidates { print(outputs.joined(separator: " ") .appending("!")) break output } }
import Foundation extension Array { var random: Element? { guard
self.isEmpty == false else { return nil } let randomIndex = arc4random_uniform(UInt32(self.count)) return self[Int(randomIndex)] } mutating func keepLast(_ n: Int = 1) { guard self.count > n else { return } let removingElementsCount = self.count - n self.removeFirst(removingElementsCount) } }
%&.0