#prog #rust #article
A Little Rust Trait Limitation
I stumbled across a … bug(?) … a limitation(?) … an issue(!) with the Rust compiler. Fortunately, I was able to find out what was going on in the Rust programming language forum. I thought this issue was interesting enough and subtle enough to try to explain to my blog audience.
<...>
This isn’t an explanation of why this limitation is necessary or fundamental, because it isn’t – it’s a limitation that could, and maybe at some point will be, fixed.
A Little Rust Trait Limitation
I stumbled across a … bug(?) … a limitation(?) … an issue(!) with the Rust compiler. Fortunately, I was able to find out what was going on in the Rust programming language forum. I thought this issue was interesting enough and subtle enough to try to explain to my blog audience.
<...>
This isn’t an explanation of why this limitation is necessary or fundamental, because it isn’t – it’s a limitation that could, and maybe at some point will be, fixed.
😢14
#prog #article
Beating the L1 cache with value speculation
Редкий пример того, как использование кеша процессора вкупе с предсказателем переходов может замедлить программу.
Beating the L1 cache with value speculation
Редкий пример того, как использование кеша процессора вкупе с предсказателем переходов может замедлить программу.
mazzo.li
Beating the L1 cache with value speculation
😢16🔥5🤔2
#prog #c #rust #article
"Just Use Rust": A Best-Case Historical Study of Open Source Vulnerabilities in C (PDF)
"Just Use Rust": A Best-Case Historical Study of Open Source Vulnerabilities in C (PDF)
We identified 68 prominent open source projects with C code, collected their vulnerability history data, and used their CWE designations to explore a best-case speculation on how many vulnerabilities might have been prevented with Rust. We estimate that 58.2% of historical vulnerabilities in our selection of open source C projects would have been virtually impossible in Rust.
😢17😁13🤡7👍5🔥1🤔1
#prog #article
Syntax highlighting is a waste of an information channel
Syntax highlighting is a waste of an information channel
Color carries a huge amount of information. Color draws our attention. Color distinguishes things. And we just use it to distinguish syntax.
Nothing wrong with distinguishing syntax. It's the "just" that bothers me.
<...>
I've listed some examples of what we could do with this. If this is something that already exists I included a link.
We can use different colors to mark how nested a set of parenthesis are.
<...>
Highlight different levels of nesting.
<...>
Highlight identifiers imported from a different file.
<...>
Highlight functions that raise errors not caught in their body.
<...>
Highlight functions that were directly called in the bodies of tests that failed in the last test run.
😢20👍11🤔2
#prog #article
Why SSA?
Содержит кусочки теории графов.
Why SSA?
If you’ve read anything about compilers in the last two decades or so, you have almost certainly heard of SSA compilers, a popular architecture featured in many optimizing compilers<...>
SSA is actually very simple once you forget everything you think your programs are actually doing. We will develop the concept of SSA form, a simple SSA IR, prove facts about it, and design some optimizations on it.
Содержит кусочки теории графов.
😢19👍4
#game #article
Несправедливо забыли Райдена из Metal gear rising: revengeance.
dtf.ru/games/4106323-top-10-samyh-muzhestvennyh-yagodic-v-igrah
Несправедливо забыли Райдена из Metal gear rising: revengeance.
dtf.ru/games/4106323-top-10-samyh-muzhestvennyh-yagodic-v-igrah
DTF
Топ-10 самых мужественных, брутальных и упругих ягодиц в играх — лонг, написанный человеком — Игры на DTF
Топ самых мужественных ягодиц в играх, Питер Паркер, Солид Снейк, Веном, Крис Редфилд, Данте, Зангиев, Найтвинг и другие персонажи
😢15❤2🔥1💯1
#prog #js #typescript #article
The Code Review That Changed Everything
TL;DR: в отличие от прочих абстракций,
(thanks @al_tch)
The Code Review That Changed Everything
TL;DR: в отличие от прочих абстракций,
enum в Typescript приводит к генерации нетрививального рантайм-кода, который не вычищается tree shaker-ами, а в случае численных enum ещё и не даёт type safety.(thanks @al_tch)
DEV Community
The Code Review That Changed Everything
Three months ago, I submitted what I thought was a perfectly reasonable pull request. I had created a...
😢16🤣2🤔1
#prog #csharp #article
Performance Improvements in .NET 10
Сентябрьская статья об оптимизациях в .NET. Как пишет автор, ускорение кода, как правило, достигается не за счёт одного большого изменения, а за счёт множества маленьких — и весь текст статьи это прекрасно иллюстрирует.
В статье множество примеров того, как одно изменение в JIT позволяет применить другие, уже имеющиеся оптимизации, чтобы достичь улучшения, недоступного при применении оптимизаций по отдельности.
Вместе с тем статья несколько расстраивает тем, что ясно показывает, какие усилия приходится тратить разработчикам JIT, чтобы ускорить C#. Многие эти оптимизации были бы избыточны, если бы язык был бы более выразительным или если бы использовались более высокоуровневые (и удобные!) API. Думаю, напишу как-то об этом.
Performance Improvements in .NET 10
Сентябрьская статья об оптимизациях в .NET. Как пишет автор, ускорение кода, как правило, достигается не за счёт одного большого изменения, а за счёт множества маленьких — и весь текст статьи это прекрасно иллюстрирует.
В статье множество примеров того, как одно изменение в JIT позволяет применить другие, уже имеющиеся оптимизации, чтобы достичь улучшения, недоступного при применении оптимизаций по отдельности.
Вместе с тем статья несколько расстраивает тем, что ясно показывает, какие усилия приходится тратить разработчикам JIT, чтобы ускорить C#. Многие эти оптимизации были бы избыточны, если бы язык был бы более выразительным или если бы использовались более высокоуровневые (и удобные!) API. Думаю, напишу как-то об этом.
Microsoft News
Performance Improvements in .NET 10
Take a tour through hundreds of performance improvements in .NET 10.
😢17👍3😁1🤔1
#prog #article (и #rust, но многое в статье от Rust не зависит)
SocketAddrV6 is not roundtrip serializable
SocketAddrV6 is not roundtrip serializable
😱5💩1
#prog #rust #article
Rust in Android: move fast and fix things
Rust in Android: move fast and fix things
The 2025 data continues to validate the approach, with memory safety vulnerabilities falling below 20% of total vulnerabilities for the first time.
We adopted Rust for its security and are seeing a 1000x reduction in memory safety vulnerability density compared to Android’s C and C++ code. But the biggest surprise was Rust's impact on software delivery. With Rust changes having a 4x lower rollback rate and spending 25% less time in code review, the safer path is now also the faster one.
We'll analyze a near-miss memory safety bug in unsafe Rust: how it happened, how it was mitigated, and steps we're taking to prevent recurrence. It’s also a good chance to answer the question “if Rust can have memory safety issues, why bother at all?”
👍5