kauruus

Results 7 comments of kauruus

setting capabilities works for me: ``` shell sudo setcap cap_sys_admin+ep `which cproxy` ``` oops, sorry, i test with sudo. setting capabilities doesn't work.

my temporary workaround: 0. disable seteuid check in cproxy https://github.com/NOBLES5E/cproxy/blob/master/src/main.rs#L155-L160 1. add all capabilities (no time to figure out the exact one) to both `cproxy` and `iptables`, `setcap all+ep ...`...

instead of setuid and capabilities, maybe it's easier to run cproxy with sudo, after setting up iptables, cproxy start the program as the original user and add it to the...

i upgrade golangci-lint from 1.51.1 to 1.52.2, also see the `unused-parameter` warning from revive. in [v1.52.0](https://github.com/golangci/golangci-lint/releases/tag/v1.52.0), revive is bump from 1.2.5 to 1.3.0, which now enables `unused-parameter` by default https://github.com/mgechev/revive/pull/799....

There is [a bug in the kernel](https://lore.kernel.org/lkml/CAFqZXNt84oqHo5aQQbjuroA6fGzMyso9HuN4fz3u1mygze2Yrw@mail.gmail.com/T/) that prevents me to set `dev.tty.legacy_tiocsti`, so I make a [simple kernel module](https://github.com/kauruus/legacy_tiocsti) to re-enable `TIOCSTI`.

also find this issue, here's my attempt to compare various random value generations methods. implementations: - `RandomValue`: base line in main branch - `RandomLockLoop`: lock the entire loop once in...

翻译不太全,建议看原文 [Crimes with Go Generics](https://xeiaso.net/blog/gonads-2022-04-24). 我感觉主要是因为复杂了,在 Go 里你有更简单、更常用的做法。 - Queue[T] 其实就是 channel ,所以没必要包一层 - Option[T] 在一个满是 nil 的语言里,用处不大。作者也指出文章里的实现太简单,需要更多的泛化、由官方实现才能实用(每个库都实现一个 Option,完全没有互操作性) - Thunk[T] 就更复杂了(作者甚至写错了,然后被网友指出) 所以作者展示了泛型可以这样用,但不建议你这样滥用。