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
— А ты где работаешь?
— В Яндексе.
— А, в Яндекс.Еде)
— Да, я занимаюсь continuous delivery.
— Да мы поняли, что ты еду постоянно доставляешь.
— В Яндексе.
— А, в Яндекс.Еде)
— Да, я занимаюсь continuous delivery.
— Да мы поняли, что ты еду постоянно доставляешь.
😁28💩5👍3❤2
Forwarded from ozkriff.games 🦀 (ozkriff🇺🇦)
# /r/rust: "Is Crypto No Longer Leading Industry for Rust?
tldr: kinda yes and it's great
https://reddit.com/r/rust/comments/zb0bw7/crypto_no_longer_the_leading_industry_for_rust
Not sure about the "leading industry" phrasing but cryptocurrency/bc-related jobs used to totally dominate the rusty job offerings and it was a common source of complaints. Glad to see that the trend is changing.
tldr: kinda yes and it's great
https://reddit.com/r/rust/comments/zb0bw7/crypto_no_longer_the_leading_industry_for_rust
Not sure about the "leading industry" phrasing but cryptocurrency/bc-related jobs used to totally dominate the rusty job offerings and it was a common source of complaints. Glad to see that the trend is changing.
Reddit
From the rust community on Reddit
Explore this post and more from the rust community
👍6🎉3😁1🌚1
#prog #rust #c
В C принято для функций-компараторов в сортировке возвращать целое число, где отрицательное значение означает, что первый элемент меньше второго, положительное — что первый элемент больше второго, а ноль — что элементы равны. В Rust же для этих целей используют отдельный тип Ordering. Между ними очень просто конвертироваться.
Из C в Rust:
В C принято для функций-компараторов в сортировке возвращать целое число, где отрицательное значение означает, что первый элемент меньше второго, положительное — что первый элемент больше второго, а ноль — что элементы равны. В Rust же для этих целей используют отдельный тип Ordering. Между ними очень просто конвертироваться.
Из C в Rust:
fn c_order_to_rust_order(o: c_int) -> Ordering {
o.cmp(&0)
}
Из Rust в C:fn rust_order_to_c_order(o: Ordering) -> c_int {
o as c_int
}
Второе работает за счёт дискриминантов на вариантах Ordering, расставленных ещё до релиза Rust 1.0. Определение Ordering, если опустить аннотации, выглядит так:#[repr(i8)]
pub enum Ordering {
Less = -1,
Equal = 0,
Greater = 1,
}
Неудивительно, что rust_order_to_c_order компилируется в единственный mov (возможно, с sign extension, в зависимости от того, в какой конкретно тип кастовать).doc.rust-lang.org
Ordering in std::cmp - Rust
An `Ordering` is the result of a comparison between two values.
👍11❤2🤨1