Blog
Hi, find out more about me
Hi, find out more about me
Go 1.18 released
func Foo[K comparable, C int32 | float32] (m map[K]C, args... any) C { //code...
-
Vim+Ctags
·
vim 下想实现code中 function/class 等 definition跳转. 比较简单的方法就是使用ctags 分析代码, 然后根据生成的tags table文件, 来做code index 的定位. 目前比较流行的 code definition/references 查询是LSP, 需要架设一个 language service backend, 与之通信. 这里先记录下使用ctags的方法.
1. Ctags
Ctags 用于根据Code 生成 index 文件( ctags table), 其中标注所有 identifer 的文件位置信息.
{tagname}\t{tagfile}\t{tagaddress}
Ctags 有其他变种, 比如 Emacs 下有 Etags (也支持 Ctags)
arch 安装Ctags tool: yay -S ctags
2....
-
Extracting Timestamps from UUID v1 for Database Sharding
·
UUID v1 embeds timestamps. Here’s how to extract them in PostgreSQL for time-based sharding.