1.93K subscribers
3.83K photos
147 videos
15 files
4.01K links
Блог со звёздочкой.

Много репостов, немножко программирования.

Небольшое прикольное комьюнити: @decltype_chat_ptr_t
Автор: @insert_reference_here
Download Telegram
#prog #rust #article

Rust Debugging Progress Report May 2026

О том, как (постепенно) улучшается ситуация с использованием LLDB для Rust
👍51
#prog #rust #rustasync #article

Async Rust never left the MVP state

Заголовок кликбейтный, да. Рассказывается о недостатках текущей кодогенерации машин состояний для async-функций и async-блоков, причём недостатках вполне устранимых
👍5
#лингво #article (не слишком серьёзная)

cow-orker
😁2🍌1
#prog #article

Статья от папищека, между прочим!

3a: Формат и тулинг для создания ASCII-анимаций
2👍2
Блог*
Photo
#prog #go #article

Go fuzzing was missing half the toolkit. We forked the toolchain to fix it.

With gosentry, go test -fuzz uses LibAFL by default. It can fuzz structs natively, run grammar-based fuzzing with Nautilus, detect bug classes that it couldn’t detect before, and create a fuzzing campaign coverage report in one command.
🔥6
#prog #rust #article

Why I built wrkflw

If you have spent enough time around CI, you probably know the loop. Change one line in a workflow. Push. Wait for the runner. Watch the job fail for a reason that has nothing to do with the line you changed. Push again. A few rounds later, the real feature is tiny and your git history is mostly you arguing with YAML in public. wrkflw started because I wanted that whole loop to happen on my laptop instead of on GitHub's servers, and preferably without leaving a trail of embarrassing commits behind.

Two years and more edge cases than I expected later, it has turned into a Cargo workspace with sixteen crates. It validates and runs GitHub Actions workflows locally, has a TUI, a proper expression evaluator, four runtime modes, watch mode, secrets, artifacts, cache, reusable workflows, and even a GitLab pipeline parser because apparently I don't know how to leave a side project alone. This post is mostly my attempt to answer the questions people keep asking me: why not just use act, why Rust, and what part was actually hard?
18😁1🤔1
#prog #rust #article

The hidden cost of mpsc channels

TL;DR: mpsc-каналы в tokio выделяют память под значения в виде связного списка из массивов фиксированного размера, из-за чего они почти всегда используют больше памяти, чем необходимо для указанной при создании ёмкости. При наличии большого количества каналов небольшой ёмкости это может привести к высокому и при этом не эффективному потреблению памяти.
🤔3
#prog #abnormalprogramming #article

Jira is Turing-Complete

Конструктивное доказательство через построение регистровой машины Минского — построения с двумя регистрами и двумя типами инструкций.
😁8👌1
#prog #rust #rustlib #article

A faster bump allocator for rust

Новый bump-аллокатор, который на множестве бенчмарков быстрее альтернатив (blink-alloc и bumpalo), часто в 2-3 раза, а в остальных не уступает им. Поддерживает регионы (считай, суб-арены, которые автоматически очищаются на выходе из функции), которые могут быть вложенными.

Из недостатков, которые я заметил: в API есть функции, которые выделяют память под значение, возвращаемое переданной функцией, и они не очищают выделенную память, если функция паникует.
👍6
#prog #article

Exploiting Undefined Behavior in C/C++ Programs for Optimization: A Study on the Performance Impact

We presented the first comprehensive study on the performance impact of exploiting undefined behavior (UB) in C and C++ programs. First, we cataloged 18 individual UB aspects exploited by LLVM, a compiler that is widely known for its extensive use of UB. We then implemented flags in the compiler that disable exploitation of each UB aspect by strengthening the semantics (e.g., define division by zero as a well-defined trap instead of UB).
The results show that, in the cases we evaluated, the performance gains from exploiting UB are minimal [выделение моё]. Furthermore, in the cases where performance regresses, it can often be recovered by either small to moderate changes to the compiler or by using link-time optimizations
🔥5🤔3💩1
#ml #article

AI Self-preferencing in Algorithmic Hiring: Empirical Evidence and Insights (PDF)

Using a large-scale controlled resume correspondence experiment, we find that LLMs consistently prefer resumes generated by themselves over those written by humans or produced by alternative models, even when content quality is controlled. The bias against human-written resumes is particularly substantial, with self-preference bias ranging from 67% to 82% across major commercial and open-source models. To assess labor market impact, we simulate realistic hiring pipelines across 24 occupations. These simulations show that candidates using the same LLM as the evaluator are 23% to 60% more likely to be shortlisted than equally qualified applicants submitting human-written resumes, with the largest disadvantages observed in business-related fields such as sales and accounting. We further demonstrate that this bias can be reduced by more than 50% through simple interventions targeting LLMs' self-recognition capabilities.


Из интересного: предпочтение собственной генерации коррелирует со способностями LLM к распознанию собственного вывода, которая, в свою очередь, коррелирует с количеством весов. Описанные авторами "simple interventions" включают в себя два способа. Первый — явное включение в промпт указание на игнорирование авторства текста. Второй — использование ансамбля LLM, включающих в себя модели с более слабыми способностями к самораспознаванию.
🤔4🌚2
#prog #article

Stop Using Conventional Commits (перевод)

TL;DR: автор считает, что разбиение коммитов по категориям на практике мало полезно и для всех практических целей лучше указывать разделы софта, затронутые изменением — поле, которое в формате conventional commits является опциональным.
Также автор разбирает каждый пункт списка доводов в пользу conventional commits и опровергает их.
💯9
#prog #rust #article

Only Bounds

Статья о грядущих изменениях в Rust, которые позволят добавить новые иерархии трейтов по умолчанию (помимо существующего сейчас Sized). Работа ведётся главным образом ради поддержки Scalable Vector/Matrix Extensions — набора инструкций для процессоров ARM, который позволяет писать SIMD-код, не завязанный на конкретную ширину SIMD-регистров и потому переносимый между разными процессорами без перекомпиляции. Помимо этого, Нико показывает, что only bounds также открывают путь другим, более абмициозным дополнениям в язык. В частности, это в теории позволит писать код, который опирается на гарантированные вызовы деструкторов (без этого сейчас невозможно написать безопасный scoped async).
🔥161
#prog #article

zlib-rs in Firefox

Как ни странно, одним из препятствий на пути к внедрению был... Баг процессора, который проявлялся в том, что одна редкоиспользуемая инструкция могла исполняться некорректно. Ловили долго.
🤔2
#prog #rust #article

Building software for places where the internet barely exists

Статья о программе для синхронизации данных в условиях, когда соединение медленное и крайне ненадёжное. Нацелено на решение крайне практической задачи: связи между поликлинниками в Бутане. Технически связь есть, но 2G, и в силу множества причин связь часто обрывается, порой на несколько дней. Починка инфраструктуры — дело сложное из-за горного ландшафта, где ещё и дороги регулярно размывает дождями. Написанный автором ZamSync позволяет надёжно реплицировать данные даже в таких условиях. В статье также есть сравнения с уже существующими решениями.
👍18❤‍🔥1
#prog #article

How to miscompile programs with “benign” data races

Или как "безвредные" гонки данных могут быть вредить программе в контексте легальных оптимизаций компиляторов.

И вдогонку

Benign Data Races: What Could Possibly Go Wrong?

Тоже с конкретными примерами.
🤔21🤬1
#prog #rust #article

How we found a bug in the hyper HTTP library

None of the tools at the application level surfaced any errors, crashes, or log entries that provided useful clues. Application-level observability can have a blind spot for bugs that live below its awareness.

The failure occurred intermittently, scaled with response size, couldn’t be reproduced with simple tools like curl, and disappeared when we observed the system more closely. These signals pointed to a timing-dependent bug in the connection layer, not in the application logic.

Our breakthrough came from using kernel-level tooling with strace, the one layer that records what actually happened on the socket. The underlying bug lived in the few milliseconds between a partial flush and a premature shutdown — a window that opened only after we made the system faster.


Баг присутствовал в нескольких мажорных версиях hyper и, что иронично, проявился в Cloudflare из-за, в конечном счёте, оптимизаций архитектуры. А ещё это хорошее напоминание, что Rust защищает от гонок данных, но не от состояния гонок в целом.
👍7
#prog #rust #article #successstory

Rust PNG crate gets even faster, used by GNOME and Chromium

Rust png crate, also known as image-png, implements PNG encoding and decoding in safe Rust. It is compliant with the third edition of the PNG specification, including APNG support.
A year ago it was already the fastest PNG decoder in the world. Since then it has gotten even faster.

<...>

image-png is used as the default PNG implementation in Chromium since M139 (August 2025) across all platforms [выделение моё], both on desktop and on mobile.

This required meeting a remarkably high bar in terms of features, performance, correctness, compatibility and security. It would only ship if there were no regressions in any of those categories!
🔥7
#prog #rust #article

It's not me, it's the compiler!

TL;DR: чел писал парсер и обнаружил, что rustc неправильно компилирует код, в котором есть прямой каст из bool в u32 (а если семантически эквивалентный if, то нормально). Баг подтвердили, причиной была некорректная оптимизация на уровне MIR.
18😱1