- Aug 2022
-
-
如何优雅的关闭 Go 应用程序
-
- Jul 2022
-
abhishek1987.medium.com abhishek1987.medium.com
- May 2022
-
blog.gopheracademy.com blog.gopheracademy.com
-
kpat.io kpat.io
Tags
Annotators
URL
-
- Apr 2022
-
bun.uptrace.dev bun.uptrace.dev
Tags
Annotators
URL
-
-
craig-childs.medium.com craig-childs.medium.com
-
christine.website christine.website
-
wyagd001.github.io wyagd001.github.io
-
如果直接使用 DllCall 会报错,那么使用 DllLoad 先将 dll 文件加载有时就可以解决问题
猜测难道是 golang 编译的 dll 文件太大(2-3Mb)导致DllCall 会直接导致 ahk 程序退出?
-
-
go.googlesource.com go.googlesource.com
- Mar 2022
-
dave.cheney.net dave.cheney.net
- Nov 2021
-
segmentfault.com segmentfault.com
-
slice深拷贝和浅拷贝
可以参考这篇文章理解。
Tags
Annotators
URL
-
- Oct 2021
-
-
It’s important to understand that even though a slice contains a pointer, it is itself a value. Under the covers, it is a struct value holding a pointer and a length. It is not a pointer to a struct.
slice 是一个包含指针的结构体,他是一个具体值而不是指针
-
-
blog.betacat.io blog.betacat.io
-
那为什么在上面的场景中,atomic会比mutex性能好很多呢?作者 Dmitry Vyukov 总结了这两者的一个区别: Mutexes do no scale. Atomic loads do. Mutex由操作系统实现,而atomic包中的原子操作则由底层硬件直接提供支持。在 CPU 实现的指令集里,有一些指令被封装进了atomic包,这些指令在执行的过程中是不允许中断(interrupt)的,因此原子操作可以在lock-free的情况下保证并发安全,并且它的性能也能做到随 CPU 个数的增多而线性扩展。
多核场景中,
atomic
性能优于mutex
的原因
-
- Sep 2021
- Apr 2021
-
studygolang.com studygolang.com
-
垃圾golang
-
-
github.com github.com
-
Style definitions for nice terminal layouts. Built with TUIs in mind.
Tags
Annotators
URL
-
- Jan 2021
-
internals.rust-lang.org internals.rust-lang.org
- Dec 2020
-
github.com github.com
Tags
Annotators
URL
-
-
github.com github.com
Tags
Annotators
URL
-
- Oct 2020
-
blog.filippo.io blog.filippo.io
-
- Jun 2020
-
blog.gopheracademy.com blog.gopheracademy.com
- May 2020
-
peter.bourgon.org peter.bourgon.org
-
we should never blindly apply dogmatic advice, and that we should use our judgment each and every time.
menjadi manusia berkesedaran, memiliki pemikiran sendiri, jangan menelan mentah-mentah apa yang dibaca
-
- Apr 2020
-
www.ardanlabs.com www.ardanlabs.com
-
If the word “share” doesn’t come out of your mouth, you don’t need to use a pointer
key point
-
The benefit of passing data “by value” is readability. The value you see in the function call is what is copied and received on the other side
no hidden cost, eg., memory growth on the heap or pauses during garbage collection. but there is a cost in stack memory usage and "scoping" among multiple stack frames, CPU caching, etc.
-
Functions execute within the scope of frame boundaries that provide an individual memory space for each respective function. Each frame allows a function to operate within their own context and also provides flow control. A function has direct access to the memory inside its frame, through the frame pointer, but access to memory outside its frame requires indirect access. For a function to access memory outside of its frame, that memory must be shared with the function.
eg., shared via the "pointer" to an address in heap memory
-
- Oct 2019
-
engineering.linkedin.com engineering.linkedin.com
-
The log will become something of a commoditized interface, with many algorithms and implementations competing to provide the best guarantees and optimal performance.
Are golang channels an implementation of log?
-
- Aug 2019
- May 2019
-
www.gowitek.com www.gowitek.com
-
Go Programming Language publicly in 2009 they were also looking to solve certain challenges of the existing Computer languages. Of the many features that it demonstrated (we will get to those soon enough) it was also helpful in addressing the strange dilemma of hardware and software that was emerging.
Golang is a modern computing language, designed especially for modern computing needs.
-
- Mar 2019
-
coreos.com coreos.comCoreOS1
- Jan 2018
-
codereview.stackexchange.com codereview.stackexchange.com
- Sep 2017
- Jul 2017
-
blog.golang.org blog.golang.org
-
(It's usually a mistake to pass back the concrete type of an error rather than error, for reasons discussed in the Go FAQ, but it's the right thing to do here because ServeHTTP is the only place that sees the value and uses its contents.)
Good clarifying comment on when to pass back the concrete type of an error.
Tags
Annotators
URL
-
- Jan 2017
-
- Jul 2016
-
-
There are two reasons for having no warnings. First, if it's worth complaining about, it's worth fixing in the code.
-
- Aug 2015
-
www.socketloop.com www.socketloop.com
-
[]byte
This is unnecessary.
-