Блог*
Photo
#prog #go #article
Go fuzzing was missing half the toolkit. We forked the toolchain to fix it.
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
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 выделяют память под значения в виде связного списка из массивов фиксированного размера, из-за чего они почти всегда используют больше памяти, чем необходимо для указанной при создании ёмкости. При наличии большого количества каналов небольшой ёмкости это может привести к высокому и при этом не эффективному потреблению памяти.
The hidden cost of mpsc channels
TL;DR: mpsc-каналы в tokio выделяют память под значения в виде связного списка из массивов фиксированного размера, из-за чего они почти всегда используют больше памяти, чем необходимо для указанной при создании ёмкости. При наличии большого количества каналов небольшой ёмкости это может привести к высокому и при этом не эффективному потреблению памяти.
howardjohn's blog
The hidden cost of `mpsc`
Recently I have been spending a lot of time analyzing and optimizing memory usage in our Rust reverse-proxy, agentgateway. One thing that repeatedly came up was a surprisingly large amount of memory allocated to innocent-looking Tokio mpsc channels.
In my…
In my…
🤔3
#prog #abnormalprogramming #article
Jira is Turing-Complete
Конструктивное доказательство через построение регистровой машины Минского — построения с двумя регистрами и двумя типами инструкций.
Jira is Turing-Complete
Конструктивное доказательство через построение регистровой машины Минского — построения с двумя регистрами и двумя типами инструкций.
😁8👌1
Блог*
#prog #article Who killed the network switch? A Hubris Bug Story We found a neat bug in Hubris this week. Like many bugs, it wasn’t a bug when it was originally written — correct code became a bug as other things changed around it. <...> It’s very rare…
#prog #article
Crash recovery in 256 bytes
Конкретно в Hubris. Как ни странно, супервизор является рядовой таской в Hubris, у которой обычно наиболее высокий приоритет.
Crash recovery in 256 bytes
Конкретно в Hubris. Как ни странно, супервизор является рядовой таской в Hubris, у которой обычно наиболее высокий приоритет.
Cliffle
Crash recovery in 256 bytes
The `exhubris` supervisor.
🤔1
#prog #rust #rustlib #article
A faster bump allocator for rust
Новый bump-аллокатор, который на множестве бенчмарков быстрее альтернатив (blink-alloc и bumpalo), часто в 2-3 раза, а в остальных не уступает им. Поддерживает регионы (считай, суб-арены, которые автоматически очищаются на выходе из функции), которые могут быть вложенными.
Из недостатков, которые я заметил: в API есть функции, которые выделяют память под значение, возвращаемое переданной функцией, и они не очищают выделенную память, если функция паникует.
A faster bump allocator for rust
Новый bump-аллокатор, который на множестве бенчмарков быстрее альтернатив (blink-alloc и bumpalo), часто в 2-3 раза, а в остальных не уступает им. Поддерживает регионы (считай, суб-арены, которые автоматически очищаются на выходе из функции), которые могут быть вложенными.
Из недостатков, которые я заметил: в API есть функции, которые выделяют память под значение, возвращаемое переданной функцией, и они не очищают выделенную память, если функция паникует.
owen.cafe
A faster bump allocator for rust
Announcing stumpalo, an extremely fast bump allocator for rust, with chunk reuse and safe scoped stack support.
👍5
#prog #article
Exploiting Undefined Behavior in C/C++ Programs for Optimization: A Study on the Performance Impact
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
🔥4🤔3💩1
#ml #article
AI Self-preferencing in Algorithmic Hiring: Empirical Evidence and Insights (PDF)
Из интересного: предпочтение собственной генерации коррелирует со способностями LLM к распознанию собственного вывода, которая, в свою очередь, коррелирует с количеством весов. Описанные авторами "simple interventions" включают в себя два способа. Первый — явное включение в промпт указание на игнорирование авторства текста. Второй — использование ансамбля LLM, включающих в себя модели с более слабыми способностями к самораспознаванию.
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, включающих в себя модели с более слабыми способностями к самораспознаванию.
arXiv.org
AI Self-preferencing in Algorithmic Hiring: Empirical Evidence and Insights
As artificial intelligence (AI) tools become widely adopted, large language models (LLMs) are increasingly involved on both sides of decision-making processes, ranging from hiring to content...
🤔4🌚2
#prog #article
Stop Using Conventional Commits (перевод)
TL;DR: автор считает, что разбиение коммитов по категориям на практике мало полезно и для всех практических целей лучше указывать разделы софта, затронутые изменением — поле, которое в формате conventional commits является опциональным.
Также автор разбирает каждый пункт списка доводов в пользу conventional commits и опровергает их.
Stop Using Conventional Commits (перевод)
TL;DR: автор считает, что разбиение коммитов по категориям на практике мало полезно и для всех практических целей лучше указывать разделы софта, затронутые изменением — поле, которое в формате conventional commits является опциональным.
Также автор разбирает каждый пункт списка доводов в пользу conventional commits и опровергает их.
Sumner Evans
Stop Using Conventional Commits
You’ve almost certainly encountered Conventional Commits before. It may have reared its ugly head in the changelog of an open source project you’ve used. It may have been the enforced commit format for an open source project you contributed to. A lot of people…
💯7
#prog #rust #article
Only Bounds
Статья о грядущих изменениях в Rust, которые позволят добавить новые иерархии трейтов по умолчанию (помимо существующего сейчас
Only Bounds
Статья о грядущих изменениях в Rust, которые позволят добавить новые иерархии трейтов по умолчанию (помимо существующего сейчас
Sized). Работа ведётся главным образом ради поддержки Scalable Vector/Matrix Extensions — набора инструкций для процессоров ARM, который позволяет писать SIMD-код, не завязанный на конкретную ширину SIMD-регистров и потому переносимый между разными процессорами без перекомпиляции. Помимо этого, Нико показывает, что only bounds также открывают путь другим, более абмициозным дополнениям в язык. В частности, это в теории позволит писать код, который опирается на гарантированные вызовы деструкторов (без этого сейчас невозможно написать безопасный scoped async).🔥14