1.98K subscribers
4.01K photos
159 videos
15 files
4.15K links
Блог со звёздочкой.

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

Небольшое прикольное комьюнити: @decltype_chat_ptr_t
Автор: @insert_reference_here
Download Telegram
Блог*
#prog #rust #article Replacing a Rust Enum with a 64-bit Word Made My Interpreter 17% Faster <...> That being said, sha256_unfixed is still running 12% faster with the new value representation than with the old version, even though it's allocating a total…
#prog #rust #article

Plush's New Register-Based Interpreter Is Insanely Fast

I'll go into some detail on how the interpreter was rewritten to switch from a stack-based design like CPython, to a register-based design like Lua, and optimized to deliver some surprising, and I think pretty impressive results. One thing I'll say right away is that if you care about interpreter performance, you probably should not be writing stack-based bytecode interpreters in 2026.
🤔7👍1🔥1
#prog #rust #article

Could Cargo's scheduler be better?

Автор поста собрала записи того, сколько времени уходит на компиляцию каждого крейта во время сборки разных проектов, и решила проверить, можно ли было ускорить сборку за счёт использования порядка сборки, отличного от того, что используется в cargo. В качестве приоритета она использовала т. н. b-level — фактически критический путь в графе зависимостей в терминах длительности компиляции.

TL;DR: этот гипотетический вариант эффективнее cargo и переживает добавление нормально распределённого шума (с разбросом ±60%) и схлопывание информации о длительности до одного бита (долго/недолго).
❤6👍1
#prog #rust #rustlib #article

The Design Behind wincode, a Faster Rust Serializer

wincode is a fast, bincode-wire-compatible serializer and deserializer for Rust, built by Anza originally for the Agave validator. It is not a fork of bincode. It is a new implementation with its own traits and derive macros that produces the same bytes as bincode's default configuration


TL;DR: запись в предоставленный MaybeUninit буфер, батчинг валидаций для последовательностей "простых" значений, специализация по типам, использующая сгенерированную derive-макросами метаинформацию (facet на минималках)
🔥3🤔1
#prog #rust #article

Proving my Rust NVR doesn't leak memory (it did)

К сожалению, описанные методы диагностирования специфичны для MacOS
🤔2
#prog #article

Bespoke: A Programming Language for People Who Say Please

I therefore propose Bespoke, a statically typed and uncompromisingly civilised programming language for developers who believe that machine execution should never come at the expense of good manners. Informally it is known as The Queen’s Code: Victoria’s, naturally; the etiquette committee has yet to approve the twentieth century. Source files use the .charming extension, and the compiler reserves the right to be disappointed in you.
❤9😁2
#prog #rust #article

Rust: When Empty Isn't Bottom

Или почему ! в Rust не является bottom типом. TL;DR: в Rust нет отношения подтипизации для типов, не включающих лайфтаймы.
❤4🤔2
#prog #java #article

JVM Anatomy Quark #23: Compressed References

Спека Java ничего не говорит о том, как представляются ссылки. Как следствие, реализации могут использовать представление ссылок, которые меньше указателя на машине. Статья описывает эти трюки.

Несколько неожиданное следствие: эти трюки работают только на достаточно маленьких кучах, поэтому выделение JVM большего количества памяти может привести к тому, что куча выйдет за этот предел, ссылки перестанут использовать компактное представление и потребление памяти многократно вырастет.
🥴4🤔3
#prog #haskell #article

Type-level programming is still programming

TL;DR: вычисление типов, в отличие от вычисления термов, не является ленивым, и изменения в логике вычисления типов, не меняющее поведение, могут поменять асимптотику времени компиляции с экспоненциальной на линейную.
❤7👍2🔥1💩1
#prog #rust #article

Why building a Rust LSP is hard

This will be a (hopefully coherent) story about how Rust LSPs work, from the perspective of both rust-analyzer and Rust Glancer: how things that seem easy turn out to be hard, things that seem hard turn out to be even harder, and things I didn't expect to exist at all somehow do.

LSP is more of a guess game, where at each step all you are presented with is the potentially incorrect state, and your goal is to guess what would make sense for the user.
❤6💯2
#prog #article

Everyone Says Assembly Is Untyped—Everyone Is Wrong

TL;DR: I believe Odin’s inline assembly is currently the best out of any language.

The most important aspects are of this article listed below. I am not aware of any other assembly (GCC/Clang/Rust/Go…) that would combine all of these aspects:

* Inline assembly is organized into asm “templates”, similar to and callable as procedures.
* asm templates integrate with rest of the code, through bindings specifying clobbers, pinned, tied, and scratch registers.
* Assembly syntax is unified across ISAs and consistent with Odin syntax.
* Assembly is fully type checked, just like rest of Odin code.
* Understanding that assembly is actually typed.
* Real semantic diagnostics via core:rexcode encoding tables.
* It was built in ~7 days.

🤔6🥰3😱1
#prog #article

Steering Zig Fmt

TL;DR (но вообще заметка маленькая): zig fmt не имеет the каноничного форматирования для кода, а опирается на указания в виде уже частично отформатированного кода и распространяет его на соседние семантически связанные строки.
🤯16😁3🥴2🤔1
#prog #rust #article

Rewriting an entire UI in Rust

(С Tauri на Iced)

So. Was it worth it?

I answer: Yes.

И рандомная цитата:
One would think, that the software known as Windows, would be good at managing windows. One would, of course, be wrong.
❤13😁7
#prog #rust #rustlib #article

Deser: Rethinking Rust Serialization

Статья про новую библиотеку (де)сериализации. Решает проблемы, которые есть в serde и которые очень сложно или почти невозможно решить из-за архитектуры.

Разумеется, это не строго лучше serde, и в статье подробно об этом рассказывается. В частности, в отличие от serde, deser поддерживает только self-describing форматы.
👍8❤1
#prog #rust #article

Generic Const Args and You

Статья о текущем состоянии экспериментальной поддержки констант в типовой системе Rust.
❤7
commit -m "better"
Какой классный ход конем, чтобы добавить поддержку #jpeg_xl в Chromium!
#prog #article

Shipping JPEG XL in Chrome

Но в треде на r/rust пишут, что есть сомнения в эффективности нового формата. Именно, декомпрессия изображений, закодированных без потери информации, очень медленная.
🤔2
#article

RISC-V: They Should Have Known Better

Несколько эмоциональная статья о недостатках набора инструкций RISC-V. Проняло даже меня, не смотря на то, что я в железе разбираюсь плохо.

В комментариях на этой же странице читатели написали, где автор был не до конца честен.
👍5🤔3❤1
#prog #article

HTTP is not simple

От Daniel Stenberg, автора curl
😁7👍4🌚1😭1
#prog #rust #rustasync #article

Tokio Gives Progress, Not Ordering: Scheduling 1M Tasks

TL;DR:

Spawned early doesn't mean first-polled early. First-polled early doesn't mean completed early.

If there is an application-level unit of fairness you expect Tokio to honor, like the event in our case, the runtime doesn't know it exists. The bounds should be added by the application.
👍3🤔2