第1回go勉強会 - go紹介
TRANSCRIPT
![Page 1: 第1回Go勉強会 - Go紹介](https://reader033.vdocuments.net/reader033/viewer/2022052321/5565ac02d8b42a4c6f8b4974/html5/thumbnails/1.jpg)
第1回大阪Go勉強会Go紹介
金谷 敦志 (@todogzm)
13年9月19日木曜日
![Page 2: 第1回Go勉強会 - Go紹介](https://reader033.vdocuments.net/reader033/viewer/2022052321/5565ac02d8b42a4c6f8b4974/html5/thumbnails/2.jpg)
自己紹介
金谷 敦志
株式会社ラクス北米市場向けWebサービスRigniteの開発に従事
Twitter: @todogzmGitHub: https://github.com/todoa2c
13年9月19日木曜日
![Page 3: 第1回Go勉強会 - Go紹介](https://reader033.vdocuments.net/reader033/viewer/2022052321/5565ac02d8b42a4c6f8b4974/html5/thumbnails/3.jpg)
自己紹介プロジェクトで下記を使っています
Java
Node.js
Python
awk
Goはプロトタイプ作成に少々…
13年9月19日木曜日
![Page 4: 第1回Go勉強会 - Go紹介](https://reader033.vdocuments.net/reader033/viewer/2022052321/5565ac02d8b42a4c6f8b4974/html5/thumbnails/4.jpg)
Goとの出会い
ymotomgpooさんのこれがきっかけ
Go 1.0も出たことだし触ってみるか(安定志向)
13年9月19日木曜日
![Page 5: 第1回Go勉強会 - Go紹介](https://reader033.vdocuments.net/reader033/viewer/2022052321/5565ac02d8b42a4c6f8b4974/html5/thumbnails/5.jpg)
触ってみた感想
文法が超簡単で読み書きしやすい!
標準ライブラリ豊富すぎ!
オブジェクト指向をとりあえず置いといて書けるの楽!
Gopherくんが可愛い
! Goにハマる13年9月19日木曜日
![Page 6: 第1回Go勉強会 - Go紹介](https://reader033.vdocuments.net/reader033/viewer/2022052321/5565ac02d8b42a4c6f8b4974/html5/thumbnails/6.jpg)
大阪Go勉強会Goは楽しいからもっと皆に使って欲しい!
ついでに自分も色々知識を吸収したい!
というわけで、とりあえず勉強会やろうぜ!という軽いノリで今回開催しました(・ω<)
13年9月19日木曜日
![Page 7: 第1回Go勉強会 - Go紹介](https://reader033.vdocuments.net/reader033/viewer/2022052321/5565ac02d8b42a4c6f8b4974/html5/thumbnails/7.jpg)
Goのいいところ4点
読みやすく書きやすい構文
豊富なライブラリと外部ライブラリ管理
言語レベルでサポートされた並行処理
高速なコンパイル&実行
13年9月19日木曜日
![Page 8: 第1回Go勉強会 - Go紹介](https://reader033.vdocuments.net/reader033/viewer/2022052321/5565ac02d8b42a4c6f8b4974/html5/thumbnails/8.jpg)
読みやすく書きやすい構文シンプルで少なめな構文
型推論
gofmtで統一されるフォーマット
オブジェクト再優先で考えなくて良い
package main
import "fmt"
func main() {fmt.Println("Hello, world.")
}
13年9月19日木曜日
![Page 9: 第1回Go勉強会 - Go紹介](https://reader033.vdocuments.net/reader033/viewer/2022052321/5565ac02d8b42a4c6f8b4974/html5/thumbnails/9.jpg)
豊富なライブラリと外部ライブラリ管理
豊富なライブラリ http://golang.org/pkg/
標準パッケージ数は141コ
GitHub等と連携したライブラリ読み込み
取得はコマンドラインから下記を実行go get https://github.com/USER/LIB
インポートはソースに以下を記載import "github.com/USER/LIB"
13年9月19日木曜日
![Page 10: 第1回Go勉強会 - Go紹介](https://reader033.vdocuments.net/reader033/viewer/2022052321/5565ac02d8b42a4c6f8b4974/html5/thumbnails/10.jpg)
言語レベルでサポートされた並行処理
goroutine(軽量スレッド)
channel(メッセージキュー)
select(複数channelからの受信を待つ)
package main
import ("fmt""time"
)
func main() {c := make(chan string)go func() {
//別goroutineで実行time.Sleep(5 * time.Second)c <- "時は動き出す"
}()
fmt.Println("ザ・ワールド!!")// cにメッセージが来るまでブロックfmt.Println(<-c)
}13年9月19日木曜日
![Page 11: 第1回Go勉強会 - Go紹介](https://reader033.vdocuments.net/reader033/viewer/2022052321/5565ac02d8b42a4c6f8b4974/html5/thumbnails/11.jpg)
高速なコンパイル&実行「高速なコンパイル」はGoの設計方針のひとつ
コンパイル速度に影響のある機能は入らない
実行速度はこんな感じ
http://benchmarksgame.alioth.debian.org/u32/which-programs-are-fastest.php13年9月19日木曜日
![Page 12: 第1回Go勉強会 - Go紹介](https://reader033.vdocuments.net/reader033/viewer/2022052321/5565ac02d8b42a4c6f8b4974/html5/thumbnails/12.jpg)
導入事例Goのサイト (AppEngine/Go)
仮想環境実行支援
Docker http://www.docker.io/
Packer http://www.packer.io/
実行形式として配布するツール
その他続々導入事例報告あり!
13年9月19日木曜日
![Page 13: 第1回Go勉強会 - Go紹介](https://reader033.vdocuments.net/reader033/viewer/2022052321/5565ac02d8b42a4c6f8b4974/html5/thumbnails/13.jpg)
やってみよう!
Goを実際に書いてみよう!
簡単なハンズオンですが、Goの魅力が伝われば嬉しい限りです
13年9月19日木曜日