huizhou92's Newsletter-2024-22

 

Hello everyone, I am huizhou92.
So glad we meet again.
I will share here the best articles, snippets and anything else I read in the past week, basically computer technology-related. I hope you enjoy it.
If nothing unexpected happens, it will come as scheduled every Sunday.


Articles

Dragonfly’s New Sorted Set Implementation

Redis uses a very clear data structure skipList to implement the sorting function (zset). When I first learned about this data structure, I was amazed by its ingenious design. This data structure has been replicated in various systems.

Dragonfly developed a new sorted set implementation based on a B+ tree, improving memory efficiency and performance. This innovation reduces memory overhead significantly compared to Redis’s skiplist implementation. Benchmark results show Dragonfly’s sorted sets scale efficiently and offer up to a 40% reduction in memory usage.

Open source is neither a community nor a democracy

Open source software users do not automatically have a say in project decisions. Projects are typically led by a small group of dedicated contributors. Open source operates on productive effort, not democratic voting, with elitism playing a positive role in project advancement.

Golang 1.23: Changes to I/go: linkname and What It Means for Developers

This is my own article., Go 1.23 restricts //go:linkname usage to prevent issues and improve code safety. In the long run, this decision may have a significant and lasting impact.

Tools

Icônes

今天我们分享一个 前端图标库Icônes
应该是世界上最全的图标库了: 集合了现在市面上所有的图标 packs,118种图标库 非常强大的搜索功能 可以直接以多种格式使用:甚至可以直接下载 React 或者 Vue 组件 或者是和 UnoCSS 一起使用,太棒了。

Today we are sharing a front-end icon library Icônes

It should be the most comprehensive icon library in the world: it includes all the icon packs available on the market, 118 different libraries. It has a very powerful search function and can be used directly in multiple formats. You can even download React or Vue components directly or use them together with UnoCSS. It’s amazing.

Thinks

Can two Linux programs share the same port? The answer is yes. Isn’t it amazing? This contradicts our basic knowledge, but at least it is true in Python.
You can take a look at the source code of Python:
https://github.com/python/cpython/blob/3.12/Lib/socketserver.py#L469
In Linux, SO_REUSEADDR and SO_REUSEPORT are used to allow multiple processes to provide services on a single port.
For more information, you can refer to this post: https://stackoverflow.com/questions/51090637/running-a-python-web-server-twice-on-the-same-port-on-windows-no-port-already

两个linux 程序可以共用一个端口嘛? 答案是可以的。 是不是很神奇?这跟我们的基础知识相悖,但是它至少再Python 上是成立的
您可以看看Python的源码
https://github.com/python/cpython/blob/3.12/Lib/socketserver.py#L469

也就是在Linux下使用了 SO_REUSEADDRSO_REUSEPORT ,来实现一个端口多个进程提供服务。
更多信息您可以参考这个帖子 https://stackoverflow.com/questions/51090637/running-a-python-web-server-twice-on-the-same-port-on-windows-no-port-already

这是我第一次尝试写 NewLetter,很多东西还不会,请大家理解与包容,如果能给我鼓掌,那就是对我最大的鼓励了

Built with Hugo
Theme Stack designed by Jimmy