$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
プロセスくるくる
Search
Taisuke Miyazaki
March 30, 2019
Programming
0
74
プロセスくるくる
Taisuke Miyazaki
March 30, 2019
Tweet
Share
More Decks by Taisuke Miyazaki
See All by Taisuke Miyazaki
私の推しPodcast
imishinist
0
760
Other Decks in Programming
See All in Programming
The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | droidcon Italy
prof18
0
110
Arm移行タイムアタック
qnighy
0
390
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
2.8k
チームにとって最適なスキルアップ施策とは何か/what-is-the-best-skill-up-approach-for-team
nobuoooo
0
160
React CompilerとFine Grained Reactivityと宣言的UIのこれから / The next chapter of declarative UI
ssssota
7
2.6k
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
140
Contemporary Test Cases
maaretp
0
150
@nifty天気予報のフロントエンドを 実装するまで - NIFTY Tech Talk #22
niftycorp
PRO
0
120
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
7
2.9k
cmp.Or に感動した
otakakot
3
330
.NET 9アプリをCGIとして レンタルサーバーで動かす
mayuki
0
700
みんなでプロポーザルを書いてみた
yuriko1211
0
300
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
4 Signs Your Business is Dying
shpigford
181
21k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
150
The Pragmatic Product Professional
lauravandoore
32
6.3k
A Modern Web Designer's Workflow
chriscoyier
693
190k
How GitHub (no longer) Works
holman
310
140k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
0
47
For a Future-Friendly Web
brad_frost
175
9.4k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Designing the Hi-DPI Web
ddemaree
280
34k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
760
Transcript
ϓϩηε͘Δ͘Δ
ࣗݾհ ໊લ: ٶ࡚ ହี Twitter: @imishinist ձࣾ: גࣜձࣾ LIFULL ͖ͳݴޠ:
Go, C, C++ ͖ͳϙέϞϯ: ΤʔϑΟ ߴઐ: ٱཹถߴઐ
ߴઐ࣌ʹ ෦Ͱ͏ΦϯϥΠϯδϟοδͷγεςϜΛ࡞͍ͬͯͨ ͦͷͱ͖ʹɺ@Pelkira͔Β͋Δ͓ئ͍Λ͞ΕΔ
ATCODERΈ͍ͨʹ ΠϯλϥΫςΟϒͳճͷΈ࡞Εͳ͍ʁ
৭ʑߟ͕͑ͨΛղܾͰ͖ͣஅ೦
ઌ ٱཹถߴઐͷ༏लͳޙഐ @gedorinku ͱ͍ͯͨ͠ͱ͖ ΠϯλϥΫςΟϒͳ͍ͭ͠ͱ͍͏ͰΓ্͕Δ
݁ߏ͋Ε͔Βࣝ૿͑ͨ͠ Ͱ͖ΔͷͰʁʁʁʁʁʁʁʁʁʁʁ
Γ͍ͨ͜ͱ ΠϯλϥΫςΟϒͳճͷΈΛ࡞Δ
੍ Λղ͘ଆͷϓϩάϥϜมߋͰ͖ͳ͍ Λग़͢ΔଆͷϓϩάϥϜجຊతʹมߋͰ͖ͳ͍ ҙͷϓϩάϥϜ͕࣮ߦ͞ΕΔ
۩ମతʹͲ͏ͬͨΒͰ͖ͦ͏͔ ग़ଆͷνΣοΫϓϩάϥϜʢϓϩηεAʣ ճଆͷϓϩάϥϜʢϓϩηεBʣ ϓϩηεAͷग़ྗˠϓϩηεBͷೖྗʹ ϓϩηεBͷग़ྗˠϓϩηεAͷೖྗ ϓϩηεAͷऴྃεςʔλείʔυͰɺਖ਼ղ͔அ
GOͰॻ͍ͯΈͨ ͕ɺಈ͔ͳ͍ ͦͦϓϩηε͔Βग़ྗ͢Β͞Εͳ͍
όοϑΝϦϯά Cͷඪ४ϥΠϒϥϦ(printf)ɺग़ྗΛόοϑΝϦϯά͢Δ ߴઐ࣌ಉ͡ʹɻɻɻ ϓϩάϥϜʹखΛՃ͑ΒΕͳ͍ͱ͍͏੍ʹΑΓɺϓϩάϥϜΛมߋͤͣʹ ΔͻͭΑ͏͕͋Δ
όοϑΝϦϯάͱ ؔͷ෦ͰσʔλΛͨΊ͓ͯ͘͜ͱΛόοϑΝϦϯάͱ͍͏ σʔλΛຖճಡΈॻ͖͢ΔΑΓɺ·ͱ·ͬͯಡΈॻ͖ͨ͠΄͏͕ޮ͕͍͍
όοϑΝϦϯάͷछྨ ϥΠϯόοϑΝϦϯά Ұߦ͝ͱʹόοϑΝΛϑϥογϡ͢Δ ϒϩοΫόοϑΝϦϯά ಛఆͷόΠτ͝ͱʹόοϑΝΛϑϥογϡ͢Δ(4096ͱ͔ʁ)
όοϑΝϦϯά ϓϩηεؒͷೖग़ྗΛܨ͛ΔͱɺϒϩοΫόοϑΝϦϯάʹͳΓɺҰߦ͝ͱʹॲཧ Ͱ͖ͳ͍ ͨͩ͠ɺͷೖग़ྗɺϥΠϯόοϑΝϦϯάʹͳΔ
ΓͱΓ͢Δͷ͕ͩΊͳΒ Λհͯ͠ೖग़ྗ͢Ε͍͍͡Όͳ͍
krkr ϓϩηεB ϓϩηεA pty master pty slave
༏উ
Ͱͳ͍
ग़ྗ͕͓͔͍͠
ECHO ͷೖྗɺࣗಈతʹग़ྗ͞ΕΔ ϓϩηεBͷೖྗग़ྗͱͯ͠ೝࣝ͞ΕΔ
krkr ϓϩηεB ϓϩηεA pty master pty slave ϓϩηεBͷͷೖྗ ೖग़ྗ͕ϓϩηεA͞ΕΔ
ECHO ͏·͘ɺͷϑϥάΛઃఆ͢Δ͜ͱͰɺը໘ʹग़͞ͳ͍Α͏ʹͰ͖Δ
༨ஊ stty -echo; cat - (stty ίϚϯυ) దʹೖྗͯ͠ɺEnterԡͨ͠λΠϛϯάͰग़ྗ͞ΕΔ ͜ͷลΛ͏·͘Δ͜ͱͰɺvimͱ͔emacsΈ͍ͨͳΤσΟλ࡞ΕΔ
CݴޠͰ࡞Δ͜ͱʹͨ͠
༏উ https://github.com/imishinist/krkr
·ͱΊ ແཧ͡ΌͶʁͬͯࢥ͏੍ͰؤுΕҙ֎ͱͳΜͱ͔ͳΔ Ͱ͖ͳ͔ͬͨ͜ͱ͕Ͱ͖ΔΑ͏ʹͳΔͷָ͍͠ ָ͘͠ੜ͖Α͏ɻ