#prog #rust хайлайты
Пару недель назад из лексера убрали зависимость от парсера. Почему эта зависимость была? Один из методов для восстановления от незакрытого разделителя полагался на создание временного парсера для того, чтобы давать диагностику получше. Как следствие, после этого изменения для парочки крайних случаев качество диагностик несколько снизилось.
Пару недель назад из лексера убрали зависимость от парсера. Почему эта зависимость была? Один из методов для восстановления от незакрытого разделителя полагался на создание временного парсера для того, чтобы давать диагностику получше. Как следствие, после этого изменения для парочки крайних случаев качество диагностик несколько снизилось.
GitHub
Remove `Lexer`'s dependency on `Parser`. by nnethercote · Pull Request #134192 · rust-lang/rust
Lexing precedes parsing, as you'd expect: Lexer creates a TokenStream and Parser then parses that TokenStream.
But, in a horrendous violation of layering abstractions and common sense, Lexe...
But, in a horrendous violation of layering abstractions and common sense, Lexe...
🤔10👍2🤡1🥴1🌚1
#prog #article
Storing currency values: data types, caveats, best practices
This article is not the final source of the truth, but it contains useful information that you should take into consideration when designing software.
(thanks @badassorange)
Storing currency values: data types, caveats, best practices
This article is not the final source of the truth, but it contains useful information that you should take into consideration when designing software.
(thanks @badassorange)
cardinalby.github.io
Storing currency values: data types, caveats, best practices
Intro
Repeatedly facing questions, debates, and mistakes related to storing and representing currency amounts, I decided to collect all facts and advice regarding this topic in one place. This article is not the final source of the truth, but it contains…
Repeatedly facing questions, debates, and mistakes related to storing and representing currency amounts, I decided to collect all facts and advice regarding this topic in one place. This article is not the final source of the truth, but it contains…
👍2❤1
#prog #rust #article
Thoughts on Rust hashing
Или о том, как дизайн API для хеширования в Rust напрямую ведёт к неэффективностям.
Thoughts on Rust hashing
Или о том, как дизайн API для хеширования в Rust напрямую ведёт к неэффективностям.
purplesyringa's blog
Thoughts on Rust hashing
In languages like Python, Java, or C++, values are hashed by calling a “hash me” method on them, implemented by the type author. This fixed-hash size is then immediately used by the hash table or what have you. This design suffers from some obvious problems…
👍9
Forwarded from Таксики и лытдыбр σποραδικος
Короче.
У нас по соседству с кладбищем находится цирк.
И если это не объясняет всю нашу жизнь, то что тогда.
У нас по соседству с кладбищем находится цирк.
И если это не объясняет всю нашу жизнь, то что тогда.
😁13🤡8😢1
#prog #rust #article
Four limitations of Rust's borrow checker
In this post, I’ll cover four surprising limitations of the borrow checker that I ran into in the course of my work.
Also note that when I say something can’t be done, I mean that it can’t be done in a way that leverages Rust’s type system, i.e. with static type checking. <...>. It’s never the case that you literally can’t solve a problem at all, since there are always those escape hatches (and I’ll even show examples of an escape hatch I used below), but it is impossible to solve the problem in a way that makes Rust Rust.
Four limitations of Rust's borrow checker
In this post, I’ll cover four surprising limitations of the borrow checker that I ran into in the course of my work.
Also note that when I say something can’t be done, I mean that it can’t be done in a way that leverages Rust’s type system, i.e. with static type checking. <...>. It’s never the case that you literally can’t solve a problem at all, since there are always those escape hatches (and I’ll even show examples of an escape hatch I used below), but it is impossible to solve the problem in a way that makes Rust Rust.
Considerations on Codecrafting
Four limitations of Rust’s borrow checker
I’ve been using Rust for hobby projects since 2016 and have been working professionally in Rust since 2021, so I tend to consider myself pretty knowledgeable about Rust. I’m already familiar with all the common limitations of Rust’s type system and how to…
🤔3
Куплю на Новый год много шоколадных яиц
Съем их все
И буду говорить, что полон сюрпризов
Съем их все
И буду говорить, что полон сюрпризов
😁17🤡13❤9🤯1🌚1
Блог*
Юрист (муж. р., ед. число) — поклонник жанра юри
Тотализатор (муж. р., ед. ч.) — человек, устанавливающий тоталитаризм
🤡15💯6🌚3😁2🤮1