Size: a a a

2021 May 29

П

Пух in rust_offtopic
У меня хотяб "лучше" не было
источник

G

George in rust_offtopic
Пока приоритет не умереть с голоду :D ( :( )
Я обычно пет-проектами занимаюсь по ночам, но сессия+работа так сейчас ябут, что спать таки хочется.
источник

goldstein опять in rust_offtopic
https://github.com/TaKO8Ki/awesome-alternatives-in-rust
Глядите, кто-то сделал таблицу RIIR
источник

goldstein опять in rust_offtopic
Срочно все cargo install!
источник

G

George in rust_offtopic
Там реально хороших альтернатив таки немного, из того что я пробовал. зашёл fd, намного быстрее find, это да.
источник

H

Hirrolot in rust_offtopic
жалко нельзя поставить диз
источник

goldstein опять in rust_offtopic
У меня:
cat -> bat
grep -> ripgrep
find -> fd
make -> иногда just
* -> tokei
на одном из ноутов
ls -> exa
источник

AN

Alex Noname in rust_offtopic
exa, bat норм ещё
источник

goldstein опять in rust_offtopic
Какой-то фрик пробовал coreutils -> uutils
источник

goldstein опять in rust_offtopic
Вроде как, у него даже получилась относительно рабочая инсталляция Debian
источник

p

polunin.ai in rust_offtopic
Я уже озвучивал. Делаем вместо завтипов пруфы. Что-то типо такого:

{- declare the function that expected that first argument applies the rule x > 15 -}
foo: (x: Int) -> Int where x > 15

{- declare proof that if
f x y and f y z then f x z. Proof is a special type that creates new proof in the scope of proofs -}
Transitive: (x: a) -> (y: a) -> (z: a) -> (f: a -> a -> bool) -> Proof (f x z) where f x y && f y z

{- there are no way to proof this by the compiler. Programmer must proof this by himself. If function does not satisfied the theorem, program may have undefined behaviour. -}
proof (>) is Transitive

bar: IO ()
bar = do
 x <- readLine
 {- check that rule x > 20 applies. Into first branch of if clause will be put proof x > 20 -}
 if x > 20 then do
   {- compiler cannot proof that if x > 20 then x > 15, but we can do this by applying transitive rule. We already checks that x > 20, compiler can check that 20 > 15 by evaluating this expression, so we can apply transitive rule and put proof that x > 15 into the scope. -}
   apply Transitive x 20 15 (>)
   {- compiler checks that in the scope available proof that x > 15 -}
   foo x
источник

goldstein опять in rust_offtopic
А в чём смысл, если всё сводится к, типа, «unsafe impl Transitive for Gt»?
источник

p

polunin.ai in rust_offtopic
В том что ты получаешь всю силу тайплевел пруфов без необходимости коренным образом менять свой обычный стиль программирования и без необходимости пруфать машине каждое действие, что очень трудоемко
источник

p

polunin.ai in rust_offtopic
Как избавить от UB я пока не придумал
источник

H

Hirrolot in rust_offtopic
просто trust_me() что ли?
источник

p

polunin.ai in rust_offtopic
Да
источник

p

polunin.ai in rust_offtopic
)
источник

H

Hirrolot in rust_offtopic
какая революционная идея
источник

p

polunin.ai in rust_offtopic
Гениальность в простоте
источник

goldstein опять in rust_offtopic
Но это фигня же.
источник