duangsuse::Echo
711 subscribers
4.24K photos
127 videos
583 files
6.44K links
import this:
美而不丑、明而不暗、短而不凡、长而不乱,扁平不宽,读而后码,行之天下,勿托地上天国。
异常勿吞,难过勿过,叹一真理。效率是很重要,盲目最是低效。
简明是可靠的先验,不是可靠的祭品。
知其变,守其恒,为天下式;穷其变,知不穷,得地上势。知变守恒却穷变知新,我认真理,我不认真。

技术相干订阅~
另外有 throws 闲杂频道 @dsuset
转载频道 @dsusep
极小可能会有批评zf的消息 如有不适可退出
suse小站(面向运气编程): https://WOJS.org/#/
Download Telegram
Forwarded from Al Pt
写得可读性再差也不会提升什么执行效率的(笑
# 噪声消除 # 监听麦克风 # 分别控制不同程序的输出 # (同一程序)输出到多个设备 # 蓝牙 #dalao #linux pipewire-pulse 兼容和gui处理图工具 patchbay
strace -n ls
#reveng 👆
用Lua这种语言的沙箱不就行了.. yaml怎么了?怕是不懂schema ,要知道+* 表达式的解析是没有易写统一的方法的,根本就是伪命题,这样无疑是要所有软件配置不可统一编辑!
" conditional logic or description of transformations or something else. Both the logic of what can be expressed and done and the terms and elements of the domain are specific and custom to the program. This is what you see in firewall rules, whether OpenBSD PF...
https://utcc.utoronto.ca/~cks/space/blog/programming/ConfigurationIsNotGeneric #configuration #programming
Chris's Wiki :: Configuration (and configuration files) is not and cannot be generic
#py #code
attrs是一种定义dataclass,/社区库的方法,它和库D都支持 validate和convert ,为啥说D不好呢? 首先,attrs生成的构造器和手写的一样,也没有 json: 这样不必要的预占位

from attrs import define
from pydantic import BaseModel
#json.dumps(cattr.preconf.json conv unstruct()) / as_dict(aobj)

@define
class AttrsDatetime:
a: datetime = field(validator=instance_of(datetime))

class T(BaseModel):
a:pendulum.DateTime
T('2021-..').a#wrong type!


" it allows automatic de/serialization to formats that don't support datetimes natively
I disagree with this. Un/structuring should be handled independently of the model...

D的序列化不可能同时允许两种格式,如 ISO/UNIX 时间
timeit约慢3倍
from cattr import Converter
D里需要 override the json_encoder field in the model config. 且只支持了json (so no msgpack, bson, yaml, toml...), 甚至没 ujson 外的库

D支持的显然是实用外的东西,比如
PydanticOuter(a={"a": 1}) PydanticOuter(a=PydanticInner(a=1)) 和悲观错误检查
从 ls --color=atwhat 谈到 rust, ioctl/TTY? 与syscall

这个博主的风格我很喜欢,是好的科普博主🌝 #dalao #blog
在二进制/posix段 可能是我见过最厉害的对话文了 #recommend
"$s" 这个我深有感触,这种默认语义错位绝对是shell 最大的败笔;但是命令行有 参数替换、&&和管道、for-loop,历史补齐就够了,而且这年头有人会用cli吗😂

shell的错误在于用那一点字,想支持的太多了,以至于人类无法利用。许多资深运维区分嵌套的 '"$x"wtf' 已经是极限,让人搞不懂为啥要整这些幺蛾子;但我还是支持 $(basename .) 替换和局部 alias 这样写的,man bash 也好看一点了-但一点也不方便
既不考虑disk,也不考虑net dl的caching ,不支持任何现有包管理依赖、文件树,只有优美的「沙箱」隔离空间🌚
duangsuse::Echo
#net #sysadmin 🧐原版socks吗
#up #linux 爱好者 pulse font py stdio zsh appimage
马上2022了😂 一些乱象仍然,粪土当年万户侯..万家宴 但总体只是层层设卡 #china
梦开始的时刻。
#那年今日