先日、庭で子供のプールを汗だくになりながら膨らませ、子供に本気で水をかけられずぶ濡れ状態だった中、ちょっと大きめの郵便が届いた。 送り元はGoogle Inc なんとなく中身は予想できていた。 Gopher... Go Developer Teamからの贈り物でした。 Goのサイトにあるやつとおんなじですね! 夜中に見ると、ちょっと怖いです。 ちなみにこれを送ってくれたGoogleのAndrew、これとおんなじやつを1000個持ってるらしいです。 ぜんぜん羨ましくないwww
下記質問にそれぞれ50文字以内を目安に簡単に説明すること。 パッケージ内に定義した関数を外部に公開するにはどうすれば良いか? 非同期に処理を行う為の命令は? 関数を抜けた際に処理を実行するにはどうするか? goroutineの同時実行数を変更するにはどうするか? コンパイラやリンカが8g/6g/5g、8l/6l/5lという名前になっている理由は? Goのガベージコレクションの実装は一般的に何と呼ばれている類か? レシーバがnilの場合にメソッドを呼び出すと何が起きるか? 可変個引数はどの様に定義するか? 関数内で定義されるローカル変数のアドレスを戻り値として外部から参照するとどうなるか? interfaceとstructの違いは何か? panicを補足して強制終了させない為にはどうするか? 答え パッケージ内に定義した関数を外部に公開するにはどうすれば良いか? 関数名の先頭を大文字にします
先日、golangに3件不具合修正を行った。 その際、golangにはpatchを提供する際に、コードレビューをしてもらうのだけど、それに使用しているrietveldが素晴らしく良かった。 rietveldはGoogle App Engineのサーバ上で動作し、クライアントから使うにはmercurialが必須となる。hgrcファイルに以下の修正を追加する。 [extensions] codereview = YOUR_GO_ROOT/lib/codereview/codereview.py 次にcodereview.appspot.comへログインする。 # hg code-login Email (login for uploading to codereview.appspot.com): rsc@golang.org Password for rsc@golang.org: Savi
Goで並列処理を書くときの注意点。 Goで並列処理を書こう! マルチコアプロセッサマシンで処理効率アップだ! とか思ってGoで並列処理書いても、今まで分散してくれずやたらと重かったんですよね。 つまり、コアごとに処理を分散してくれなくて、 ひとつのコアで処理されていたので、タスクスイッチ分遅くなってたんだ。 ・・・と、思ってたんですよね。 ところがぁ Effective Goをちゃんと読んでみると、 http://golang.org/doc/effective_go.html#parallel これの最後の方、 >> import the runtime package and call runtime.GOMAXPROCS(NCPU). つまり、runtimeパッケージをインポートして、GOMAXPROCSにCPUコア数を入れとけよ、じゃないと1コアでしか演算しねぇからな? って話らし
Goは型宣言無しに値が代入出来てしまうので、カーソル上の変数から型推測する必要がある補完は難しいんじゃないかなーと思ってたら、なんと作った人がいました。 すげー。 nsf's gocode at master - GitHub Autocompletion/refactoring daemon for Go language.Work in progress..Currently available things: - .a... http://github.com/nsf/gocode 仕組みはvimスクリプト内でデーモン起こしてコードとキーワードと共にサーバ側でコンパイルし、解析して返すというもの。通信にはRPCが使われている。 補完はomniなので<c-x><c-o>で開始。ちゃんと インスタンスメソッド一覧 構造体のメンバ パッケージ内の定数や型、関数 もろもろ補完してくれる。私が
gmane.org は、あなたがお探しの情報の全ての最新かつ最適なソースです。一般トピックからここから検索できる内容は、gmane.orgが全てとなります。あなたがお探しの内容が見つかることを願っています!
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く