Блог*
#prog #article Falsehoods programmers believe about undefined behavior
#prog #article
Undefined behavior can result in time travel (among other things, but time travel is the funkiest)
Undefined behavior can result in time travel (among other things, but time travel is the funkiest)
Microsoft News
Undefined behavior can result in time travel (among other things, but time travel is the funkiest)
The C and C++ languages are notorious for the very large section of the map labeled here be dragons, or more formally, undefined behavior. When undefined behavior is invoked, anything is possible. For example, a variable can be both true and false.
❤1👍1
В итоге я сегодня на RustCon буду, но без доклада, в отличие от прошлого раза.
Telegram
Блог*
Ребята, всем привет!
В эти непростые времена мы решили поддержать сообщество rust-разработчиков и выложить видеозаписи всех докладов с RustCon 2021 раньше, чем обещали. Смотрите их тут, делитесь с друзьями.
Любим вас, до встречи на наших конференциях ❤️
В эти непростые времена мы решили поддержать сообщество rust-разработчиков и выложить видеозаписи всех докладов с RustCon 2021 раньше, чем обещали. Смотрите их тут, делитесь с друзьями.
Любим вас, до встречи на наших конференциях ❤️
🌚6👍1
Блог*
#prog #rust #rustasync #rustlib #article Как известно, в настоящий момент трейты в Rust не могут иметь асинхронные методы. Причины для этого описаны в статье Никитоса Niko Matsakis why async fn in traits are hard, и если коротко, они связаны с кучей нерешённых…
@goldsteinq про name-it рассказывает. Интересно. Говорит, miri ругается на UB в крейте futures
😱2
Блог*
@goldsteinq про name-it рассказывает. Интересно. Говорит, miri ругается на UB в крейте futures
#prog #rust #rustlib
Узнал про elain.
The type Align<N> is a zero-sized-type with alignment equal to N:
Valid alignments are powers of two less-than-or-equal to 2^28. Supplying an invalid alignment to Align is a type error:
Узнал про elain.
The type Align<N> is a zero-sized-type with alignment equal to N:
use elain::Align;
use core::mem::{align_of, align_of_val};
assert_eq!(align_of::<Align<1>>(), 1);
assert_eq!(align_of::<Align<2>>(), 2);
assert_eq!(align_of::<Align<4>>(), 4);
const FOO_ALIGN: usize = 8;
#[repr(C)]
struct Foo {
_align: Align<FOO_ALIGN>,
}
let foo: Foo = Foo { _align: Align::NEW };
assert_eq!(align_of_val(&foo), 8);Valid alignments are powers of two less-than-or-equal to 2^28. Supplying an invalid alignment to Align is a type error:
use elain::Align;
struct Foo(Align<3>); // Compile Errordocs.rs
elain - Rust
Set the minimum alignments of types using const generics, rather than `#[repr(align(N))]`.
👍7🤔2
Forwarded from Backtracking (Дима Веснин)
пропустил в прошлом году и только сейчас узнал, что в MTG есть земли, целиком состоящие из текста, and i think that's beautiful
👍2🤔2❤1
Forwarded from ozkriff.games 🦀 (ozkriff🇺🇦)
# Google: Memory Safe Languages in Android 13
https://security.googleblog.com/2022/12/memory-safe-languages-in-android-13.html
> There are approximately 1.5 million total lines of Rust code in AOSP ... To date, there have been zero memory safety vulnerabilities discovered in Android’s Rust code.
> ...
> In general, use of unsafe in Android’s Rust appears to be working as intended. It’s used rarely, and when it is used, it’s encapsulating behavior that’s easier to reason about and review for safety.
> ...
> As the amount of new memory-unsafe code entering Android has decreased, so too has the number of memory safety vulnerabilities. From 2019 to 2022 it has dropped from 76% down to 35% of Android’s total vulnerabilities. 2022 is the first year where memory safety vulnerabilities do not represent a majority of Android’s vulnerabilities.
/r/rust discussion
https://security.googleblog.com/2022/12/memory-safe-languages-in-android-13.html
> There are approximately 1.5 million total lines of Rust code in AOSP ... To date, there have been zero memory safety vulnerabilities discovered in Android’s Rust code.
> ...
> In general, use of unsafe in Android’s Rust appears to be working as intended. It’s used rarely, and when it is used, it’s encapsulating behavior that’s easier to reason about and review for safety.
> ...
> As the amount of new memory-unsafe code entering Android has decreased, so too has the number of memory safety vulnerabilities. From 2019 to 2022 it has dropped from 76% down to 35% of Android’s total vulnerabilities. 2022 is the first year where memory safety vulnerabilities do not represent a majority of Android’s vulnerabilities.
/r/rust discussion
👍11
Forwarded from Backtracking (Дима Веснин)
Кайл Кукштел поднимает вопрос о мимезисе игровых механик и по-фишеровски проходится по ремейку The Last of Us и будущему, которое обещают игры на блокчейне
осторожно: много оценочных суждений
https://blog.kylekukshtel.com/game-design-mimetics
осторожно: много оценочных суждений
https://blog.kylekukshtel.com/game-design-mimetics
Kylekukshtel
Game Design Mimetics (Or, What Happened To Game Design?) - k-hole
Exploring recent trends in game design to try and figure out why everything is Fine and why that's terrible.
Афтепати RustCon.
Ожидание:
типы-трейты-полиморфизм-GAT
Реальность:
четверо мужиков показывают другу мемчики со своих телефонов
Ожидание:
типы-трейты-полиморфизм-GAT
Реальность:
четверо мужиков показывают другу мемчики со своих телефонов
😁20👍3🥰1😢1
Блог*
Афтепати RustCon. Ожидание: типы-трейты-полиморфизм-GAT Реальность: четверо мужиков показывают другу мемчики со своих телефонов
Причём у троих телефоны на зарядке
🥰8
Forwarded from Гепардово гнездо
Что проще?
Anonymous Poll
40%
Коммитить в прод на Rust, не привлекая внимание санитаров
20%
Коммитить в прод на C++, не привлекая внимание санитайзеров
41%
🐳
🔥3🤔3👎1🤯1
Forwarded from Life of Tau
только что узнала что на иврите картошка (תפוח אדמה) это земляное яблоко
первое слово (תפוח, произносится примерно как тапуакх) означает яблоко, а второе (אדמה) - землю
произносится אדמה как "адама(х)"
то есть получается что бог יהוה создал человека из земли и назвал его земляным (אדם, "адам")
первое слово (תפוח, произносится примерно как тапуакх) означает яблоко, а второе (אדמה) - землю
произносится אדמה как "адама(х)"
то есть получается что бог יהוה создал человека из земли и назвал его земляным (אדם, "адам")
🤔3