Closed budougumi0617 closed 1 year ago
(Goなのに)Javaみたいに書かないで!って言いたいときはJavaesque codeって使うらしい。
Don't write Java-esque code in #golang. I think I might add this tweet to https://t.co/8H3p6Ylh56 https://t.co/kSYTnOeuId
— Damian Gryski (@ dgryski) September 30, 2021
Introducing an interface type for every type.
— Jaana Dogan ヤナ ドガン (@ rakyll) September 30, 2021
Lack of understanding in data vs behavior driven typing.
Long chain of factories and builders rather than Go style constructors.
Excessive use of empty interface types as interfaces.
interface切り過ぎとかファクトリーとかビルダーパターン使うとか。
Kubernetes is a great example of Java-esque code in #golang
— Fatih Arslan (@ fatih) September 30, 2021
「k8sは偉大な参考例だよね(皮肉)」ってfatihさんも言ってる
無駄にメンション飛ばしてしまった気がする()
スケジュール公開ー!
2021/11/13 開催の Go Conference 2021 Autumn のトークスケジュールと発表者情報を公開しました! https://t.co/ueXr0ShydS #gocon
— Go Conference (@goconjp) October 2, 2021
888888
トリなのか!(ドキッ
Grafanaの人が最近やってるサーバーの宣言方法
https://mobile.twitter.com/matryer/status/1445013230858952705
Go Modulesの読み方 https://zenn.dev/ryo_yamaoka/articles/595cf9e69229f9
retract
とか知らなかった
tipでbytes pkgとstrings pkgにCutが入った。 https://github.com/golang/go/commit/8e36ab055162efa6f67f3b9ee62f625ac8874901 https://zenn.dev/mattn/articles/01f258a5127ef8
Go 1.17.2 and 1.16.9 are released! https://twitter.com/golang/status/1446247743148670989
Go版Java Puzzlers とりあえず買ってまだ未読だけど雰囲気tenntennさんたちのGo quizのほうがエグい気がする https://www.pragprog.com/titles/d-gobrain/go-brain-teasers/
今週のWeeklyはワタシ的に面白い記事多かった。 https://golangweekly.com/issues/382
https://twitter.com/__syumai/status/1446823274835374088?s=20 https://www.apollographql.com/blog/graphql/golang/using-graphql-with-golang/
Apollo Blogでgqlgenの使い方が紹介されてる(しかも結構詳細に書いてある)
— syumai (@__syumai) October 9, 2021
Using GraphQL with Golang https://t.co/wrVUJWiz2b
GoのGenerics関連のAcceptされたProposalを全部紹介する会 2021/10/26(火) 19:30 〜 21:00 https://syumai.connpass.com/event/227501/
pike先生...!!
https://github.com/golang/go/issues/48918
Instead, I propose we still design, build, test, and use new libraries for slices, maps, channels, and so on, but start by putting them in the golang/x/exp repository.
pike先生が「1.18は変更でかすぎるからstd pkgの変更はx pkgでまずはやってみようや」みたいなことを提案している。
これは結構面白い提案(Genericsとは関係ないやつ)
— syumai (@__syumai) August 23, 2021
1 methodしか持たないinterfaceに対して、そのmethodと一致するシグニチャの関数を渡すことでinterfaceの実装を完了出来る => 関数一個さえあればinterfaceを実装する型を別途宣言する必要が無くなる。と言うやつhttps://t.co/wNckVHcq5M
https://github.com/golang/go/issues/47487
func main() {
var N int64
cw := io.Writer(func(p []byte) (n int, err error) {
n, err = os.Stdout.Write(p)
N += int64(n)
return n, err
})
// write things to cw
fmt.Println(N, "bytes written")
}
いわゆるダックタイピングがいいとこなのに明示的に書いちゃうのはちょっと抵抗感あるにはあるな
https://www.pragprog.com/titles/d-gobrain/go-brain-teasers/
1,000円くらいだからとりあえず買ってみるとよさそうでした。 https://eowf.alc.co.jp/search?q=Brain+Teasers
brain | 【名】1.脳、大脳・The right hand is controlled b・・・
-- | --
| 【他動】〔~の〕頭を殴る[たたき割る]、〔~の〕頭を打ち砕いて殺す
teaser | 【名】1.いじめる人、悩ます人◆【動】tease/2.〔人を悩ます〕難問/3.〈俗
-- | --
Go1.17.2 とかのセキュリティアップデートの内容 https://go-review.googlesource.com/c/go/+/354592/ wasmやってるときにでかすぎる引数渡すとメモリ空間を破壊できたらしい。
[release-branch.go1.17] misc/wasm, cmd/link: do not let command line args overwrite global data
1行でまとめてくれてたわ。
Gocon Autumn https://gocon.jp/2021autumn/sessions/workshop_a/ TinyGoのハンズオンは実際にIoT機材をくばってやるらしい。
Wio Terminal ボード
Gocon Autumn goでswitchのゲーム作るってこれのことか https://gocon.jp/2021autumn/sessions/go-nintendo-switch/ https://twitter.com/hajimehoshi/status/1401178737949872135?s=20
replicaだめだったらmasterみるみたいな構造。sq/driver層でやるといいかも。。。? ↑
GoCon Autum、Mobility Technologiesの人とRettyの人がおおい雰囲気 複数人が出てるとおやってなるわね。
そういえばモックを使わないほうがいいよねっていう話があった。 https://blog.8-p.info/ja/2021/10/12/mock/
invokeOperation
ってやつでAWS APIを叩いているんだけど、API叩く時の各ステップの処理はConfigのAPIOptionで上書きできる。なのでここでいい感じに処理をすげ替えるとAPI叩かなくてもテストできる!
func (c *Client) PutRecord(ctx context.Context, params *PutRecordInput, optFns ...func(*Options)) (*PutRecordOutput, error) {
if params == nil {
params = &PutRecordInput{}
}
result, metadata, err := c.invokeOperation(ctx, "PutRecord", params, optFns, c.addOperationPutRecordMiddlewares)
if err != nil {
return nil, err
}
out := result.(*PutRecordOutput)
out.ResultMetadata = metadata
return out, nil
}
// Stack provides protocol and transport agnostic set of middleware split into
// distinct steps. Steps have specific transitions between them, that is
// managed by the individual step.
//
// Steps are composed as middleware around the underlying handler in the
// following order:
//
// Initialize -> Serialize -> Build -> Finalize -> Deserialize -> Handler
//
// Any middleware within the chain may chose to stop and return an error or
// response. Since the middleware decorate the handler like a call stack, each
// middleware will receive the result of the next middleware in the chain.
// Middleware that does not need to react to an input, or result must forward
// along the input down the chain, or return the result back up the chain.
//
// Initialize <- Serialize -> Build -> Finalize <- Deserialize <- Handler
GCPのAPIはgrpcなのでinterceptorを実装すると中身すげかえられる。
https://twitter.com/rakyll/status/1443609733093486602
Lack of understanding in data vs behavior driven typing.
Goはデータ駆動なのか振る舞い駆動なのか
pike先生がデータ駆動っていってなかったっけ?
ルール5: データはすべてを決定づける。もし、正しいデータ構造を選び、ものごとをうまく構成すれば、アルゴリズムはほとんどいつも自明のものになるだろう。プログラミングの中心は、アルゴリズムではなくデータ構造にある。Rule 5. Data dominates. If you've chosen the right data structures and organized things well, the algorithms will almost always be selfevident. Data structures, not algorithms, are central to programming.
データ駆動でやるほうがいいのがわかってけれど設計中のプロセスがどうかわっていくのかちゃんと説明できないな。
[memo] goのfirebase-admin-sdkとfirebaseのemulatorのAuthenticationに関する統合ステータスが「実装予定」になっているが、実際は既にAuthenticationに関してemulatorを利用可能(ローカルで確認済み) https://firebase.google.com/docs/emulator-suite/install_and_configure?hl=ja
https://github.com/firebase/firebase-admin-go/pull/446 がマージされてようやく実用レベルに
@ Zoom, BASE BANK, Inc.
参加者
お題
ネタ
ネタがなかったら proposal: review meeting minutes をみてみよう!
https://github.com/golang/go/issues/33502