Forwarded from Neural Machine
Настоящий мужчина должен уметь вязать на спицах - это позволяет сохранять тепло в отношениях.
❤4🖕1
Neural Machine
Настоящий мужчина должен уметь вязать на спицах - это позволяет сохранять тепло в отношениях.
Я, конечно, ни на что не намекаю, но вязать на спицах я умею.
И пофиг, что в последний раз я этим занимался ещё в школе.
👍9🤷2🤨1🖕1
Можно бесконечно смотреть на три вещи: на горящий огонь, на текущую воду и на то, как WhatsApp шлёт уведомления о том, что текущая версия устарела
🔥13🖕1
#prog #rust
Начиная с версии Rust 1.66.0, реализация
Начиная с версии Rust 1.66.0, реализация
Debug
для PhantomData
печатает имя типа, с которым PhantomData
инстанцирован:fn main() {
println!("{:?}", std::marker::PhantomData::<Vec<i32>>);
// печатает `PhantomData<alloc::vec::Vec<i32>>`
}
Telegram
Блог*
#prog #rust #rustreleasenotes
Вышла версия Rust 1.66.0! Как всегда, вычленю только интересное мне, а остальное в детальных заметках о релизе.
▪️Очень важная фича для интеропа: теперь даже для enum с данными на вариантах можно использовать явные дискриминанты.…
Вышла версия Rust 1.66.0! Как всегда, вычленю только интересное мне, а остальное в детальных заметках о релизе.
▪️Очень важная фича для интеропа: теперь даже для enum с данными на вариантах можно использовать явные дискриминанты.…
👍6🤯2🖕1
#prog #rust #parsing #article
Resilient LL Parsing Tutorial
In this tutorial, I will explain a particular approach to parsing, which gracefully handles syntax errors and is thus suitable for language servers, which, by their nature, have to handle incomplete and invalid code. Explaining the problem and the solution requires somewhat less than a trivial worked example, and I want to share a couple of tricks not directly related to resilience, so the tutorial builds a full, self-contained parser, instead of explaining abstractly just the resilience.
The tutorial is descriptive, rather than prescriptive — it tells you what you can do, not what you should do.
* If you are looking into building a production grade language server, treat it as a library of ideas, not as a blueprint.
* If you want to get something working quickly, I think today the best answer is “just use Tree-sitter”, so you’d better read its docs rather than this tutorial.
* If you are building an IDE-grade parser from scratch, then techniques presented here might be directly applicable.
Resilient LL Parsing Tutorial
In this tutorial, I will explain a particular approach to parsing, which gracefully handles syntax errors and is thus suitable for language servers, which, by their nature, have to handle incomplete and invalid code. Explaining the problem and the solution requires somewhat less than a trivial worked example, and I want to share a couple of tricks not directly related to resilience, so the tutorial builds a full, self-contained parser, instead of explaining abstractly just the resilience.
The tutorial is descriptive, rather than prescriptive — it tells you what you can do, not what you should do.
* If you are looking into building a production grade language server, treat it as a library of ideas, not as a blueprint.
* If you want to get something working quickly, I think today the best answer is “just use Tree-sitter”, so you’d better read its docs rather than this tutorial.
* If you are building an IDE-grade parser from scratch, then techniques presented here might be directly applicable.
matklad.github.io
Resilient LL Parsing Tutorial
In this tutorial, I will explain a particular approach to parsing, which gracefully handles syntax errors and is thus suitable for language servers, which, by their nature, have to handle incomplete and invalid code.
Explaining the problem and the solution…
Explaining the problem and the solution…
🔥2🤔1🖕1