GoCon 2014(5/31)発表資料
When I write codes for ik, often I find it necessary to synchronize the access to some resource from a number of goroutines. While using channels almost looks like the way to “go” , simply applying mutexes also has some clear benefits. I think it is a good time to do some comparison over the two, so here it goes: Good-old mutexes Procedures that manipulate on the shared resource are surrounded by
pt(the_platinum_searcher) を高速化するために Goroutines まわりで試したことを発表しました。 http://connpass.com/event/6370/
Go Conference 2014 spring http://connpass.com/event/6370/
(以下はgo 1.2.x時点での話です。将来的に仕様がかわるかどうかはわかりません) これを読んでいて、こういうの気にしてない人多いんだろうなーと思って、書いてみます。元のポストはdeferの挙動について語っているように見受けられるけれども、これは要は複数スレッドで実行されるコードについて、プログラム終了時に同期とか取りたくない、という話だと思ったので、このポストのdeferを正しく動かすには…というところからどういう形でgoroutine同士で同期を取る方法があるのか、一例を書き出していきます。 TL;DR; goでいくらgoroutineが気軽にかけるからと言って、複数スレッドで処理が行われているので同期はキチンとやらないとダメですよ。 deferの基本 goではLLのノリでコードを書けるのが売りの一つですが、メモリ管理はしてくれるものの、様々なリソース解放も全て自動というわけではあり
A first stop for newcomers to the Go Programming Language. This screencast describes setting up a workspace (GOPATH), writing commands and packages, using the go tool to build and install, and using the testing package to write unit tests. For more details → https://goo.gle/3voVDDt Go → https://goo.gle/3vmdMSf Subscribe to The Go Channel → https://goo.gle/go-subscribe #GoLang
SoundCloudが2年半ほどGo言語を利用したプロダクトを本番で運用した知見をGopherConで発表していた(“Go: Best Practices for Production Environments”).その中で“CodeReviewCommentsというGoogleでのGo言語のコードレビューにおいてよくあるコメントをまとめたサイトが紹介されていた. 最近Go言語を書くようになり,使えそうなのでざっと抄訳してみた.“リーダブルコード”的な視点も含まれており,Go以外の言語でも使えそう. gofmtでコードの整形をすること コメントは文章で書くこと.godocがいい感じに抜き出してくれる.対象となる関数(変数)名で初めて,ピリオドで終わること // A Request represents a request to run a command. type Request str
OBJECTIVE: To understand the various optimization techniques underlying the machine learning methods that have become so popular in real-world applications Continue readingOptimization methods in ML Let’s discuss the concept of statistical significance, and make LTV predictions using statistical methods. We’ll discuss when it’s not enough Continue readingData Science for calculating LTV
History 14/05/09: Merge2 を修正しました。http://twitter.com/jbking/status/464659353945911297 Intro Go のスライスは、いわゆる LL 系の言語が持つ可変長配列の実装と似ています。 よって LL のような手軽な扱いをすることもできますが、その内部実装を知ることでより効率の良いメモリハンドリングができ、パフォーマンスを改善や、メモリーリークの防止などに繋がる可能性があります。 この辺は SWrap というライブラリを作りながら勉強したので、今回は、この Go のスライスの内部実装を解説します。 Go の配列 スライスを知るためには、まず配列について知っておく必要があります。 Go の配列は固定長のため、以下のように長さを指定して宣言します。 var arr [4]int func main() { arr =
(This was originally a talk at GopherCon 2014. Find the slides here, and the video here.) (This article has been updated for 2016.) At SoundCloud, we structure our product as an API with many clients. That is, our main website, mobile client, and mobile apps are all first-order clients of a single main API. Behind that API is a universe of services: SoundCloud operates basically as a Service-Orien
tl;dr: 別にPerl捨ててないです。Perl大好き。俺はLLはPerlでいい。でも別ドメインの事もやってもいいよね! Rebuild.fmに限らず、公の場でYAPC/Perl以外の話をする事があるとは正直思っていなかったが、このたびRebuild.fm ep 42に置いて1時間Goについてしゃべりまくってきた。1時間ぶっつけ本番でしゃべりたい事はだいたいしゃべってきたのだけど、その後のフィードバック等もふまえてまとめておきたいと思ったのでこのエントリでまとめてみます Go事始め そもそもなんでここまでGoをガリガリ書き出したのか。 正直親父ギャグとvimで有名なあの人が「Goいいよ!」と言い出したときにはGoに対してはうさんくさい印象しかなくて特に注意すらしてなかったんだけど、そろそろ違う言語とドメインに向いてみるかーと思って探していた時に「あ、俺もうLL系の言語別にいらないな」とふ
Rebuild A Podcast by Tatsuhiko Miyagawa. Talking about Tech, Software Development and Gadgets. 0:00 miyagawa: 今日で2回目だよね、これ出てもらうの。 lestrrat: 2回目ですね。 miyagawa: lestrrat さんこと、牧さんです。 lestrrat: 牧です。よろしくお願いします。 miyagawa: 牧さんといえば、前出てもらったときも Perl の関係の YAPC とかでお馴染みだと思うんですけど。最近、GitHub とか Twitter とかの活動状況見てると、別のことをずっとやっていそうな雰囲気がすごいあってですね。それは何かというと、Go、Golang ですね。で、結構その辺の話を他のゲスト、例えば typester さんのときとかにちょこっと話したりした
Introduction to Go 1.3 The latest Go release, version 1.3, arrives six months after 1.2, and contains no language changes. It focuses primarily on implementation work, providing precise garbage collection, a major refactoring of the compiler toolchain that results in faster builds, especially for large projects, significant performance improvements across the board, and support for DragonFly BSD,
golangにはpprof用のプロファイルデータを出力できるライブラリが標準でついてくるので、それらを使うことでメモリの使用状況を調べることができる。中でも、net/http/pprofが手軽で便利だった。 net/http/pprofをプログラムに組み込むことでダイナミックなプロファイル情報をWebブラウザで表示してみることができる。使い方は、ライブラリの解説ページにあるとおりなんだけど、プロファイルを取りたいプログラムで import _ "net/http/pprof" とimportしたあと、main関数などで go func() { log.Println(http.ListenAndServe("localhost:6060", nil)) }() と書いておくと良い。 この状態でプログラムをbuildして実行する。プログラムの実行中に、http://localhost:606
We've used Go to power web sites, API sites, worker processes, services, command-line tools and mobile applications that automates the trade. These are developed out of inspiration from innovative trading bots like bitcoin code app, which promises users high returns on bitcoin trading. Learn what works, what doesn't, and how to get the most from Go's concurrency features.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く