#prog #regex #rust
Rustexp — A Rust regular expression editor & tester
В силу того, что используется скомпилированная в WASM библиотека regex (конкретно версии 1.3.9), поведение гарантированно то же, что и в ваших проектах.
Rustexp — A Rust regular expression editor & tester
В силу того, что используется скомпилированная в WASM библиотека regex (конкретно версии 1.3.9), поведение гарантированно то же, что и в ваших проектах.
rustexp.lpil.uk
A Rust regular expression editor & tester.
🔥6
#prog #rust прелесть какая
Suggest use .. to fill in the rest of the fields of Struct
Suggest use .. to fill in the rest of the fields of Struct
error: expected `..`, found `...`
--> $DIR/issue-102806.rs:11:26
|
LL | let _ = V3 { z: 0.0, ...v};
| ^^^
|
help: use `..` to fill in the rest of the fields
|
LL | let _ = V3 { z: 0.0, ..v};
| ~~
Интересно, что дифф для такого функционала совсем маленькийGitHub
Suggest use .. to fill in the rest of the fields of Struct by chenyukang · Pull Request #103012 · rust-lang/rust
Fixes #102806
👍2😁1
#prog #rust #amazingopensource
Cloning the Linux kernel in under a minute — именно такие результаты показывает gitoxide, клон git, написанный на Rust. Быстрее оригинального git, причём разрыв в скорости сохраняется и при сравнении работы на одном потоке.
Cloning the Linux kernel in under a minute — именно такие результаты показывает gitoxide, клон git, написанный на Rust. Быстрее оригинального git, причём разрыв в скорости сохраняется и при сравнении работы на одном потоке.
GitHub
Cloning the Linux kernel in under a minute · GitoxideLabs gitoxide · Discussion #579
Cloning the Linux kernel in under a minute TLDR Using gitoxide with default settings, we can now clone the linux kernel repository (receiving a pack, resolving it and a checkout of the working tree...
👍8❤4
#prog #rust #article
what if pointer properties were in the rust type system
...it's a type-system graph that allows you to at compile time prove that you can take a mutable pointer and dynamically degrade it to a const pointer and later re-upgrade it to mutable while completely disallowing upgrading const-only pointers to mutable
what if pointer properties were in the rust type system
...it's a type-system graph that allows you to at compile time prove that you can take a mutable pointer and dynamically degrade it to a const pointer and later re-upgrade it to mutable while completely disallowing upgrading const-only pointers to mutable
alex on cohost
what if pointer properties were in the rust type system
would that be fucked up or what
so as you may or mayn't know, i am the author of the funty [//crates.io/crates/funty] crate, which re-unifies all the primitives under a trait hierarchy so you can be generic over them, and i also experimentally am working…
so as you may or mayn't know, i am the author of the funty [//crates.io/crates/funty] crate, which re-unifies all the primitives under a trait hierarchy so you can be generic over them, and i also experimentally am working…
Forwarded from Врен о Японии для туриста
Вы не поверите, но это японский «Том и Джерри». Новую версию мультсериала нарисовали для локальной японской аудитории японцы же, добавили кавая, научили героев превращаться в конфетки и сладости…
Такое вот чудо дебютировало сегодня на японском Cartoon Network.
Такое вот чудо дебютировало сегодня на японском Cartoon Network.
🔥4🥰4👍2🤯2❤1
#rust
Если вы надумывали купить билет на Rustcon 2022 — сейчас самое время.
https://t.iss.one/rustcon_russia/1394
Если вы надумывали купить билет на Rustcon 2022 — сейчас самое время.
https://t.iss.one/rustcon_russia/1394
Telegram
RustCon - конференция по языку программирования Rust
С пятницей, друзья! Наступлению пятницы принято радоваться, ведь впереди выходные. Но сегодня у нас есть повод для веселья посолиднее.
11.11 стартует ЧЕРНАЯ ПЯТНИЦА! Теперь вы можете купить билеты на RustCon со скидкой 20% — как на офлайн, так и на онлайн…
11.11 стартует ЧЕРНАЯ ПЯТНИЦА! Теперь вы можете купить билеты на RustCon со скидкой 20% — как на офлайн, так и на онлайн…
😍1
Forwarded from Технологический Болт Генона
This media is not supported in your browser
VIEW IN TELEGRAM
Красивое
Tunneling Internet traffic over Whatsapp
https://github.com/aleixrodriala/wa-tunnel
Why?
While travelling through South America network data on carriers is usually restricted to not many GBs but WhatsApp is usually unlimited, I tried to create this library since I didn't find any usable at the date.
Tunneling Internet traffic over Whatsapp
https://github.com/aleixrodriala/wa-tunnel
👍5😁3❤2
Forwarded from /17 --verbose --public --35
Мало кто знает, но девушки которые в приложениях знакомств спрашивают у парней их рост, просто боятся случайно прийти на свидание к Путину или Медведеву
❤8😁6👍2👎1
#prog #rust
Search-based code navigation for Rust projects
Github code navigation теперь и для Rust! Правда, переходов к определению для типов пока нету.
Search-based code navigation for Rust projects
Github code navigation теперь и для Rust! Правда, переходов к определению для типов пока нету.
🔥6🎉2
#prog
What is the ideal growth rate for a dynamically allocated array?
Все ответы заслуживают внимания, но в особенности этот.
What is the ideal growth rate for a dynamically allocated array?
Все ответы заслуживают внимания, но в особенности этот.
Stack Overflow
What is the ideal growth rate for a dynamically allocated array?
C++ has std::vector and Java has ArrayList, and many other languages have their own form of dynamically allocated array. When a dynamic array runs out of space, it gets reallocated into a larger ar...
#prog #rust #rustlib
enum_delegate — библиотека для реализации трейта для enum в терминах реализаций трейта для его вариантов. Позволяет легко свести динамический полиморфизм к статическому, когда набор типов, реализующих трейт, ограничен и известен наперёд.
Comparison with enum_dispatch
🟡 Performance: the same. This is expected, since they generate very similar code. (See
✅ Works across crates. Due to technical limitations of how
✅ Better errors. Again due to technical limitations, in some cases
✅ Associated types.
enum_delegate — библиотека для реализации трейта для enum в терминах реализаций трейта для его вариантов. Позволяет легко свести динамический полиморфизм к статическому, когда набор типов, реализующих трейт, ограничен и известен наперёд.
#[enum_delegate::register]
trait SayHello {
fn say_hello(&self, name: &str) -> String;
}
struct Arthur;
impl SayHello for Arthur {...}
struct Pablo;
impl SayHello for Pablo {...}
#[enum_delegate::implement(SayHello)]
enum People {
Arthur(Arthur),
Pablo(Pablo),
}
/* разворачивается во что-то вроде:
impl SayHello for People {
fn say_hello(&self, name: &str) {
match self {
Self::Arthur(x) => x.say_hello(name),
Self::Pablo(x) => x.say_hello(name),
}
}
}
а также
impl From<Arthur> for People { ... }
impl TryFrom<People> for Arthur { ... }
*/
Вы, вероятно, спросите, а зачем это, когда есть enum_dispatch. Как пишет автор:Comparison with enum_dispatch
🟡 Performance: the same. This is expected, since they generate very similar code. (See
benchmarks
in the repo.)✅ Works across crates. Due to technical limitations of how
enum_dispatch
is implemented, it can only be used if both the trait and enum are in the same crate. enum_delegate
, however, allows you to put them in separate crates. (See cross_crate_example
in the repo.)✅ Better errors. Again due to technical limitations, in some cases
enum_dispatch
will quietly fail. With enum_delegate
, your code will either succeed, or fail to compile. Admittedly, some of the error messages are not perfect, but at least you'll know something's up. (See tests_error
in the repo.)✅ Associated types.
enum_delegate
has some support for associated types, but enum_dispatch
doesn't. (See examples
in the repo.)❤7👍1
#prog #rust #rustlib #article #amazingopensource
From Fuzzing to Proof: Using Kani with the Bolero Property-Testing Framework
bolero — fuzz and property testing front-end for Rust. Поддерживает несколько движков для прогона тестов: rand (да, это можно считать слабой формой фаззинга), hongfuzz, libfuzzer, AFL и kani (для символьного исполнения) — всё с унифицированным интерфейсом.
From Fuzzing to Proof: Using Kani with the Bolero Property-Testing Framework
bolero — fuzz and property testing front-end for Rust. Поддерживает несколько движков для прогона тестов: rand (да, это можно считать слабой формой фаззинга), hongfuzz, libfuzzer, AFL и kani (для символьного исполнения) — всё с унифицированным интерфейсом.
Kani Rust Verifier Blog
From Fuzzing to Proof: Using Kani with the Bolero Property-Testing Framework
Today we’re going to talk about how you can use fuzzing and verification in a unified framework, which is enabled by the integration of the Kani Rust Verifier in Bolero. Bolero is a property-testing framework that makes it easy for users to test a piece of…
❤3👍1🤔1