en
Feedback
Блог*

Блог*

Open in Telegram

Блог со звёздочкой. Много репостов, немножко программирования. Небольшое прикольное комьюнити: @decltype_chat_ptr_t Автор: @insert_reference_here

Show more
1 925
Subscribers
+124 hours
+67 days
-630 days
Posts Archive
#prog #article YAGNI exceptions (перевод) I'm essentially a believer in You Aren't Gonna Need It — the principle that you should add features to your software — including generality and abstraction — when it becomes clear that you need them, and not before. However, there are some things which really are easier to do earlier than later, and where natural tendencies or a ruthless application of YAGNI might neglect them. This is my collection so far...

Если коротко, то проблема ошибок работы с памятью в том, что они добавляют в программу новые пути исполнения, которых нет в исходнике

Repost from N/a
photo content

#meme

ChatGPT — это студент на экзамене?

photo content

photo content

#meme

#meme Увы, правда

Repost from N/a
Слушаю сегодня польку для наковальни с оркестром (люблю Рьё нежною любовью вообще)

#music Это прекрасно

#prog #article What if two programs did this? Или о принципе, который позволяет отвергнуть добавление определённых фич в программную систему.

No content is NSFW if you W from home

#music Немного классики youtube.com/watch?v=JirXTmnItd4

#prog #rust #rustlib syntactic-for — a syntactic "for" loop Rust macro. Take the sum of the bit-length of four integer types:
let sum = syntactic_for!{ ty in [ u8, u16, u32, u64 ] {
    [$( <$ty>::BITS ),*].into_iter().sum::<u32>()
}};
assert_eq!(sum, 120);

Implement a trait for a set of types:
syntactic_for!{ ty in [ u8, u16, u32, u64, u128 ] {$(
    impl MyTrait for $ty {
        // snip.
    }
)*}}

В README есть больше примеров, где такой макрос может пригодиться.

#prog #typescript