1.92K subscribers
3.78K photos
144 videos
15 files
3.97K links
Блог со звёздочкой.

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

Небольшое прикольное комьюнити: @decltype_chat_ptr_t
Автор: @insert_reference_here
Download Telegram
Блог*
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 есть функции, которые выделяют память под значение, возвращаемое переданной функцией, и они не очищают выделенную память, если функция паникует.
👍5
#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
🔥4🤔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 и опровергает их.
💯7
#prog #rust #article

Only Bounds

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