#prog #rust #python #article
Buffers on the edge: Python and Rust
One of my least favorite kinds of bug is when two different systems are interacting and the result has bad behavior but it’s difficult to say which (if either!) system is at fault. This is one of those stories, about Python’s buffer protocol and Rust’s memory model.
Buffers on the edge: Python and Rust
One of my least favorite kinds of bug is when two different systems are interacting and the result has bad behavior but it’s difficult to say which (if either!) system is at fault. This is one of those stories, about Python’s buffer protocol and Rust’s memory model.
💩1
#prog #rust #performancetrap #article
Contention on multi-threaded regex matching
Или о подводных камнях при использование регекспов в Rust из нескольких потоков
Contention on multi-threaded regex matching
Или о подводных камнях при использование регекспов в Rust из нескольких потоков
More Stina Blog!
Contention on multi-threaded regex matching
Let’s say you need to match the same regex across a large number of strings – perhaps you’re applying a grep-like filter to data generated or received by your program. This toy ex…
💩1
#prog #rust #performancetrap #article
Читайте документацию, программисты.
Upgradable parking_lot::RwLock might not be what you expect
Собственно, статья может быть сведена к единственному абзацу из документации parking_lot (конкретно к методу
Locks this rwlock with upgradable read access, blocking the current thread until it can be acquired.
The calling thread will be blocked until there are no more writers or other upgradable reads which hold the lock. There may be other readers currently inside the lock when this method returns.
Читайте документацию, программисты.
Upgradable parking_lot::RwLock might not be what you expect
Собственно, статья может быть сведена к единственному абзацу из документации parking_lot (конкретно к методу
RwLock::upgradeable_read
):Locks this rwlock with upgradable read access, blocking the current thread until it can be acquired.
The calling thread will be blocked until there are no more writers or other upgradable reads which hold the lock. There may be other readers currently inside the lock when this method returns.
More Stina Blog!
Upgradable parking_lot::RwLock might not be what you expect
Let’s say we’re building a simple table indexed by integers starting with 0. Although the keys are contiguous, the table is loaded from key-value pairs that arrive in arbitrary order. T…
💩1
#prog #rust #rustlib #video
Snapshot Testing with Insta 0.16 in Rust
Да, это видео, но всего лишь 13 минут. И оно наглядно демонстрирует, почему вы можете захотеть использовать insta для своих тестов.
Snapshot Testing with Insta 0.16 in Rust
Да, это видео, но всего лишь 13 минут. И оно наглядно демонстрирует, почему вы можете захотеть использовать insta для своих тестов.
YouTube
Snapshot Testing with Insta 0.16 in Rust
A short introduction to snapshot testing with the insta snapshot testing library in Rust.
https://docs.rs/insta/
https://crates.io/crates/insta
https://github.com/mitsuhiko/insta
https://docs.rs/insta/
https://crates.io/crates/insta
https://github.com/mitsuhiko/insta
💩1
#prog #rust
MacroKata
Welcome to MacroKata, a set of exercises which you can use to learn how to write macros in rust. When completing each task, there are three goals:
* Get your code to compile without warnings or errors.
* Get your code to "work correctly" (i.e. produce the same output)
* Importantly, generate the same code as what the sample solution does.
You should complete the kata in order, as they increase in difficulty, and depend on previous kata.
MacroKata
Welcome to MacroKata, a set of exercises which you can use to learn how to write macros in rust. When completing each task, there are three goals:
* Get your code to compile without warnings or errors.
* Get your code to "work correctly" (i.e. produce the same output)
* Importantly, generate the same code as what the sample solution does.
You should complete the kata in order, as they increase in difficulty, and depend on previous kata.
👍9💩1
РБК Голосовалка ️
Нужно ли бороться с пропагандой ЛГБТ среди граждан всех возрастов?
М-да. А ведь в какой-то момент за последний вариант было 52% голосов
😁3💩1
Forwarded from Таксики и лытдыбр σποραδικος
Десять минут отмывала пол. Оказалось, это тень от провода падает.
А у вас как дела?))
А у вас как дела?))
😁9🤣2❤1💩1
const
constexpr
consinit
consteval
constcompute
constconstexpr
constcompiletime
constdangit
constpleaseplease
constthistimeforsure
❤10🥴3🤔2😢2🔥1💩1
#prog #rust #article
The HTTP crash course nobody asked for — очередная длинная статья от Амоса о препарировании форматов HTTP 1.1 и HTTP/2.
The HTTP crash course nobody asked for — очередная длинная статья от Амоса о препарировании форматов HTTP 1.1 и HTTP/2.
fasterthanli.me
The HTTP crash course nobody asked for
HTTP does a pretty good job staying out of everyone’s way.
If you’re reading this article, there’s a solid chance it was delivered to you over HTTP. Even if you’re reading this from an RSS reader o...
If you’re reading this article, there’s a solid chance it was delivered to you over HTTP. Even if you’re reading this from an RSS reader o...
🔥5💩1
Блог*
#prog #rust #rustreleasenotes Вышла версия Rust 1.59.0! (Об известных событиях есть короткая ремарка в начале блогопоста, но, в отличие от заметок к релизу Rust 1.44.0, почти полностью убирать пост не стали. Впрочем, не исключено, что это лишь из-за того…
Как я понял для себя из статьи Амоса, из-за того, что с версии 1.59.0 слева от оператора присваивания может быть паттерн — любой паттерн, в том числе и wildcard, для отбрасывания значения можно использовать не только идиому, которая была ещё с Rust 1.0:
let _ = unused_value;
, но и_ = unused_value;
Сначала даже подумал, что это синтаксическая ошибка, но нет, это следствие синтаксиса — пусть и несколько необычное.Telegram
Блог*
#prog #rust #article
The HTTP crash course nobody asked for — очередная длинная статья от Амоса о препарировании форматов HTTP 1.1 и HTTP/2.
The HTTP crash course nobody asked for — очередная длинная статья от Амоса о препарировании форматов HTTP 1.1 и HTTP/2.
👍7💩1
То чувство, когда припоминаешь, что уже читал некоторый текст и даже помнишь его содержимое, но при этом в упор не можешь вспомнить, был ли он на английском или же на русском
👍19❤2💩1