Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Goを知る

1,365 views

Published on

Goの面白いとこなどなど。

Published in: Software
  • If you want to download or read this book, copy link or url below in the New tab ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Goを知る

  1. 1. Goを知る Let it Go
  2. 2. Goって Google App Engine でしか 動かないんだよね?
  3. 3. Google App Engine 専用の 言語じゃないぞ
  4. 4. Goって マイナーだから 使う人に ランタイム いれてもらうの 大変では。。。?
  5. 5. Goは実行可能バイナリを作る $ go build main.go $ ./main Hello Go world! $
  6. 6. Goに対する 誤った認識を 取り除いたとこで。。
  7. 7. Goの 「ヤバい」 と思うポイントを 紹介してみます(※) ※ fkm個人の感想です
  8. 8. 問題なければスタックを使う Moke型のオブジェクトを生成し返す関数 func NewMoke() Moke { // Mokeを生成しreturn }
  9. 9. 問題なければスタックを使う 一見、ヒープにオブジェクトを生成してから 返しているように見えるが。。。 func NewMoke() Moke { o := &Moke{} return *o }
  10. 10. 問題なければスタックを使う ポインタとして使ってないので、 関数内で生成するオブジェクトは スタックに置かれる →GC不要なオブジェクトに! $ go build --gcflags -m main.go 中略 ./main.go:16: NewMoke &Moke literal does not escape
  11. 11. Goroutine 非同期処理簡単 func moke() { go func() { // 非同期でやりたい処理 }() }
  12. 12. Goroutineはスレッドじゃない ● スレッド ○ タイマーで切り替わる ○ 切り換え時にレジスタの内容などを退避 ■ レジスタの本数って。。。 ● Goroutine ○ スケジュールで切り替わる ○ 退避する内容がかなり少ない ■ PC/スタックポインタ/DXの3つ
  13. 13. レジスタが空くタイミングは 分かる Goソース func main() { // 処理1 // 処理2 // 処理3 } アセンブリ // 処理1-1 // 処理1-2 // 処理2-1 // 処理2-2 (この時点でレジスタは 空くぞ。。。!) // 処理3-1 ...
  14. 14. コンパイル周りが 割と ガチなのです
  15. 15. 参考資料 http://najeira.blogspot.jp/2013/10/go. html http://blog.nindalf.com/how- goroutines-work/ Gopherイラスト https://github.com/tenntenn/gopher- stickers

×