「离开世界之前 一切都是过程」

Serialize and Deserialize an N-ary Tree

多叉树的序列化与反序列化

今天面试,碰到了比较开放性的两个问题,如果当时有纸有笔可以写写画画的话,可能就碰巧碰出火花了,人脑缓存不够,深表遗憾 Serialize and Deserialize an N-ary Tree 本来的题目是N 没有限制,但是在具体实现上child 用array 存储的话,没差别 具体参考: Serialize and Deserialize an N-ary Tree b...

hollywood(actors for Golang) source code reading Part2

hollywood(actors for Golang) 源码阅读 Part2

上篇看了基本概念,今天来尝试了解一下Actor的调度问题,看下ULTRA fast actor engine 到底是如何实现的 首先从收到消息开始, Actor 是如何Recv 消息的 Loacl 如果是发送给Engine本地的Actor e.Registry.get(pid), 获取Processer 如果没有Processer,发送给DeadLetter proc...

hollywood(actors for Golang) source code reading Part1

hollywood(actors for Golang) 源码阅读 Part1

workflows-as-actors-is-it-really-possible 最近看到 hollywood项目, 刚好之前了解过temporal, 发现 temporal跟 actor model真的好像呀。 所以有时间看看hollywood代码 actor model The Actor Model is a computational mode...

Ollama Pitfull Notes

Ollama踩坑记录

1. Open-WebUI could not connect to Ollama If Ollama is on your computer, use this command: 1 docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data...

WaitGroup In Rust

Golang的WaitGroup非常直观好用, 那么Rust中有类似的Crates吗?当然, 最近在社区就看到了 wg 支持同步, 异步(不依赖特定运行时), no_std环境的的使用方法像Golang一样的WaitGroup 1 2 3 4 5 6 7 8 9 10 11 12 #[tokio::main] async fn main() { let wg = AsyncWai...

Android 7.0+ packet

安卓7.0+ 抓包

HttpCanary refer 1. 导出证书 FiddlerRoot.cer HttpCanary.pem 2. 转换证书 需要的是 pem格式 1 2 3 4 5 6 7 8 // 转换 openssl x509 -inform der -in cert.cer -out cert.pem // 查看证书md5 openssl x509 -inform ...

bridging async and sync rust

连接 Rust 异步和同步代码

refer: [Bridging Async and Sync Rust Code - A lesson learned while working with Tokio Greptime](https://greptime.com/blogs/2023-03-09-bridging-async-and-sync-rust) ...

Generics in Go

Go 泛型

gotip playground generics-proposal https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md https://github.com/golang/go/issues/45458 https://colobu.com/2021/08/3...