for(i 0..y)for(j 0..x-1) //选中<x的列
if(aij==ai j+1)aij*=2 //横向左移
for(l=j+1, al=0; l<x-1)ail=ai l+1
ai x-1=0
//或for(l j+2..x)ai l-1=ail
https://t.me/RachelBlahblah/5439 #game
if(aij==ai j+1)aij*=2 //横向左移
for(l=j+1, al=0; l<x-1)ail=ai l+1
ai x-1=0
//或for(l j+2..x)ai l-1=ail
https://t.me/RachelBlahblah/5439 #game
Telegram
Rachel 碎碎念
我:2048 这玩意儿咋写啊…我已经重写两遍打了三遍草稿不是这种情况 bug 就是那种情况 bug
室友:你可以整 16 个变量,移动时候每行/每列存入另外的 4 个变量然后这 4 个一个一个 if
我:???那我遍历的时候怎么知道我要的是哪四个变量
室友:遍历个啥?复制粘贴四遍不就得了
震撼我妈一整年— Rachel 呱 (@Rachel030219) April 29, 2021
室友:你可以整 16 个变量,移动时候每行/每列存入另外的 4 个变量然后这 4 个一个一个 if
我:???那我遍历的时候怎么知道我要的是哪四个变量
室友:遍历个啥?复制粘贴四遍不就得了
震撼我妈一整年— Rachel 呱 (@Rachel030219) April 29, 2021
#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...
用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...
Forwarded from 依云的技术资源分享
https://utcc.utoronto.ca/~cks/space/blog/programming/ConfigurationIsNotGeneric #configuration #programming
Chris's Wiki :: Configuration (and configuration files) is not and cannot be generic
Chris's Wiki :: Configuration (and configuration files) is not and cannot be generic
#py #code
attrs是一种定义dataclass,/社区库的方法,它和库D都支持 validate和convert ,为啥说D不好呢? 首先,attrs生成的构造器和手写的一样,也没有 json: 这样不必要的预占位
" 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支持的显然是实用外的东西,比如
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
这个博主的风格我很喜欢,是好的科普博主🌝 #dalao #blog
在二进制/posix段 可能是我见过最厉害的对话文了 #recommend
"$s" 这个我深有感触,这种默认语义错位绝对是shell 最大的败笔;但是命令行有 参数替换、&&和管道、for-loop,历史补齐就够了,而且这年头有人会用cli吗😂
shell的错误在于用那一点字,想支持的太多了,以至于人类无法利用。许多资深运维区分嵌套的 '"$x"wtf' 已经是极限,让人搞不懂为啥要整这些幺蛾子;但我还是支持 $(basename .) 替换和局部 alias 这样写的,man bash 也好看一点了-但一点也不方便
shell的错误在于用那一点字,想支持的太多了,以至于人类无法利用。许多资深运维区分嵌套的 '"$x"wtf' 已经是极限,让人搞不懂为啥要整这些幺蛾子;但我还是支持 $(basename .) 替换和局部 alias 这样写的,man bash 也好看一点了-但一点也不方便
Forwarded from 依云的技术资源分享
www.arp242.net
s/bash/zsh/g
既不考虑disk,也不考虑net dl的caching ,不支持任何现有包管理依赖、文件树,只有优美的「沙箱」隔离空间🌚