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
i_and_go
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
poccariswet
September 28, 2018
81
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
i_and_go
student_go 2018.09.23 の資料
poccariswet
September 28, 2018
More Decks by poccariswet
See All by poccariswet
rust for web app
poccariswet
2
400
APNG maker on wasm
poccariswet
1
220
past and future
poccariswet
0
100
ncursesを学ぼう
poccariswet
0
88
shorterql
poccariswet
0
110
editor
poccariswet
0
120
さぁ、深夜ラジオを聴こう!
poccariswet
1
140
Aizu-Go
poccariswet
1
180
Featured
See All Featured
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
850
Abbi's Birthday
coloredviolet
4
10k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Discover your Explorer Soul
emna__ayadi
2
1.3k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
520
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
330
How to train your dragon (web standard)
notwaldorf
97
6.8k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
690
Between Models and Reality
mayunak
4
460
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Unsuck your backbone
ammeep
672
58k
Transcript
I and Go! 2018/9/23
- soeyu - 会津大学 学部3年 - 生体情報学 - 9/23 インターン中
- 趣味: 深夜ラジオ ( 短い睡眠で快眠を得たい) github 2 自己紹介
今日話すこと 3 1. Goとの出会い... 2. Goで作ってきたものたち ... 3. Goの何が良いのか... 4.
Goを使ってみて... 5. Goと僕のこれから...
“ phase1. goとの出会い 4
“ 今から約2年前... 5
“ 2016年11月 6
7 先輩、僕強くなりたいっすけどプロ グラミングの勉強って言っても、何 から始めたら良いかわからないで す... なに、まだやってないの? 今だとgo言語ってのがオススメだよ 一回やってみな! (多分こんなこと言ってたような ...)
Y先輩
8
▹ dotinstall golang (1000yen) ▹ A tour go ▹ Go
Web プログラミング などで文法を覚える ... 9
10 それから... 12月 ちょこちょこgoの勉強 1月 英語の勉強に走る ... 2月 英語 : Golang =
8:2 3月 NZ留学 (周りの人めっちゃ勉強してる ...) 4月 帰国後... goを教えてくれた先輩と話すことに
11 は...はい!!!!! ところで最近どう? コード書いてるの? 何か作った? え?やってない?何してんの?やらないと! 今からやろう Y先輩
12 それから先輩に付きっきりで色々と教わり、初めて goで成果物を作成
“ phase2. goで作っってきたものたち 13
- お天気BOT - LINE BOT SDK を用いて作成した CHAT BOT -
github.com/line/line-bot-sdk-go - 概要 - lineの機能にあるマップを開いて、場所を指定する - その場所の天気、気温などの情報が返る 14 初めての成果物
15
16 あれ、めっちゃ楽しいな...
17 ここから僕のgo人生が始まったような...
制作物紹介 18 7. url shortener 8. bot generator <now doing>
1. 天気 bot 2. twicli 3. raspi-go 4. radio-cli 5. stun server 6. editor
制作物紹介 19 7. url shortener 8. bot generator <now doing>
1. 天気 bot 2. twicli 3. raspi-go 4. radio-cli 5. stun server 6. editor
“ 2017年5月 20
2. twicli cui上でtwitterの機能を扱えるようにしたもの - https://github.com/soeyusuke/twicli - urfave/cli - fzf (画像を添付するとき用に)
- gizak/termui (いい感じのui) 21
22 2. twicli $ twicli search “バナナマン”
23 2. twicli $ twicli pic “bananaman”
24 2. twicli $ twicli user “tenntenn”
2. twicli - 初学者にとってcli toolは、作成が楽 - cliを作成しやすいlibrary結構ある - そのcli を強化してくれるlibraryもいっぱい
25
制作物紹介 26 7. url shortener 8. bot generator <now doing>
1. 天気 bot 2. twicli 3. raspi-go 4. radio-cli 5. stun server 6. editor
制作物紹介 27 7. url shortener 8. bot generator <now doing>
1. 天気 bot 2. twicli 3. raspi-go 4. radio-cli 5. stun server 6. editor
“ 2017年6月 28
3. raspi-go Rasberry piでgoを使ってみた - 大学側のバイトで動画再生システムをraspi で作成したい - gobot -
実際やることは単純でgobotの方で 制御してくれている 29
制作物紹介 30 7. url shortener 8. bot generator <now doing>
1. 天気 bot 2. twicli 3. raspi-go 4. radio-cli 5. stun server 6. editor
制作物紹介 31 7. url shortener 8. bot generator <now doing>
1. 天気 bot 2. twicli 3. raspi-go 4. radio-cli 5. stun server 6. editor
“ 2017年11月 32
深夜ラジオが好きな僕は、自分の趣味をもっと良くしたい - コマンドでradikoのタイムフリー機能から 自分の好きなラジオを選択すると落とせる... - grafov/m3u8 (m3u8ファイルのデコードして、 プレイリストを作成) - github.com/soeyusuke/bananaman
4. radio-cli 33
4. radio-cli 1. ログインしてCookieの取得 2. Tokenの取得 3. Tokenの認証 4. HTTPヘッダーにAuthTokenをセットし、m3u8ファイル
を取得 5. M3u8ファイルから音声ファイルを取得 6. ffmpegで取得音声ファイルをconcat 34
$ bananamoon -id=LFR -s=20180920010000 -file=sample 35
制作物紹介 36 7. url shortener 8. bot generator <now doing>
1. 天気 bot 2. twicli 3. raspi-go 4. radio-cli 5. stun server 6. editor
制作物紹介 37 7. url shortener 8. bot generator <now doing>
1. 天気 bot 2. twicli 3. raspi-go 4. radio-cli 5. stun server 6. editor
“ 2018年2.3月 38
ふとNetworkの勉強をしたい!って思う またその時ビデオチャットの仕組みが気になりwebrtcを勉強 - stun server (STUNサーバは外部から見た自PCのIPアドレス取得する) - WebRTCで実際に使われる STUNサーバーは Binding-Request
- github.com/soeyusuke/gostun - 標準パッケージで頑張る! 5. gostun 39
1. rfc文書の読解(https://tools.ietf.org/html/rfc5389) 5. gostun 40
2. 実装 (cli tool 化してわかりやすく...たぶん ) - シフト演算、論理演算が多かった... 3. 運用(まだしてない
) 5. gostun 41
42 実装が1番辛いと感じたdecodeの1部分
制作物紹介 43 7. url shortener 8. bot generator <now doing>
1. 天気 bot 2. twicli 3. raspi-go 4. radio-cli 5. stun server 6. editor
制作物紹介 44 7. url shortener 8. bot generator <now doing>
1. 天気 bot 2. twicli 3. raspi-go 4. radio-cli 5. stun server 6. editor
“ 2018年 6,7月 45
6. gse 先輩とバイナリエディタを作ることに...事前にエディタの ロジックを理解するために作成 - rthornton128/goncurses (ncurses api のラッパー) -
Raw mode の実装が楽 - github.com/soeyusuke/gse 46
6. gse 47 1. 機能 1.1. モードをもつ 1.2. Cui上で 1.3.
キーバインドをもつ (vimを真似しました ) 2. 動作 2.1. raw mode で1文字入力待ち 2.2. 入力に対応する関数等の実行 2.3. windowに反映
48
“ ほぼvim... 49
制作物紹介 50 7. url shortener 8. bot generator <now doing>
1. 天気 bot 2. twicli 3. raspi-go 4. radio-cli 5. stun server 6. editor
制作物紹介 51 7. url shortener 8. bot generator <now doing>
1. 天気 bot 2. twicli 3. raspi-go 4. radio-cli 5. stun server 6. editor
“ 2018年 9月 52
7. url shortener 8月のインターン先で、短縮urlの実装をしようとしていた - labstack/echo (validation go-playground validator) -
graceful shutdown - github.com/soeyusuke/url_shortener 53
7. url shortener 3つのhandler - UrlShortenerHandler - post - UrlShortenerStatusHandler
- get - RedirectHandler - get 54
7. url shortener - base62 encode, decode - 62種類の文字 A‐Z、a‐z、0‐9
- redirect - 1. パラメータを受け取る - 2. decode - 3. url に redirect 55
56 Base62 encode 部分
“ 現在... 57
8. bot generator 現在開発中 - linebot, messanger bot - 一部機能のpackage
分け - linebot sdk go が変わるごとに修正...辛い 58
“ このように なんでもできてしまう 59
“ phase 3.4. goの何がいいのか... goを使ってみて... 60
61 個人的な goの良さ - 初学者向けの教材?サイト?イベント?が周りに多い - 標準パッケージ、標準 go tool, godocが豊富
- testが良き 、cached... 61
- 並行 - ロジックを組むのが楽? - 同期、非同期 - goroutineのようなスレッドモデル 62 個人的な
goの良さ 62
“ phase 5. goと僕のこれから 63
64 - やっぱり、書いていて楽しい - go2 の draftを読んで楽しみ - test masterへ
64 これから 64
“ ご静聴ありがとうございま した。 65