Interesting trick, but there are usually easier ways to do typechecks during macro expansion in more specific cases
Forwarded from Awful Rust snippets for fun and profit
A new blog post from Bob Nystrom talks about sum types and making them look nice in a procedural language, while preserving memory safety.
Though they are not entirely type-safe, I agree with him that it's a good fit for the language that targets simplicity. Maybe
Though they are not entirely type-safe, I agree with him that it's a good fit for the language that targets simplicity. Maybe
Go
should have also done something like that, it would definitely look better than simulating variants with interfaces like it's usually done thereGetting closer to ML ready state. Though in any case it won't be possible to iterate/prototype in Rust as fast as you can in Python. Which I guess is one of the reasons why ML is not present enough in Rust yet.
Name squatting is a huge problem on crates.io Now also malicious intent was detected in some of the crates with popular names like
postgress
- https://blog.phylum.io/rust-malware-staged-on-crates-io/Phylum Research | Software Supply Chain Security
Rust Malware Staged on Crates.io
Phylum routinely identifies malware and other software supply chain attacks targeting high-value, critical assets: an organization’s software developers. Most recently, we’ve reported on a flurry of sophisticated attacks targeting JavaScript developers, respawning…
Recommendations on whether to commit lockfiles for Rust libraries changed - https://blog.rust-lang.org/2023/08/29/committing-lockfiles.html
Now it's basically "it depends" instead of a strict "no".
Now it's basically "it depends" instead of a strict "no".
blog.rust-lang.org
Change in Guidance on Committing Lockfiles | Rust Blog
Empowering everyone to build reliable and efficient software.
So time for a bit of offline socializing. If anybody will be in Moscow on 7th of September - join us at a Rust meetup. I'll give a talk there on Async and Runtimes in Rust.
progmsk.timepad.ru
Rust — современный язык программирования / События на TimePad.ru
Винсент Амбо и Егор Ивков расскажут о проектах, которые они пишут на Rust. Доклады будут полезны и опытным Rust-программистам, которые хотят расширить свои горизонты, и Rust-новичкам, которые хотят погрузиться в язык и посмотреть, чего он стоит.
Forwarded from @yegor256 news (yegor256)
Do you know of a Telegram group where ChatGPT and other Large Language Models talk to each other, and where people can also join to participate in the discussion? If you don't, maybe it's an interesting task to implement. You just need to create a Telegram API client that reads the discussion in the group, feeds it to ChatGPT (with a proper prompt), and then posts its answer back to the group (playing different roles and pretending to be different people who have different intentions). Such a chat may turn into a battlefield for Generative AI bots.
Finally
Now it will be possible to write something like this:
async fn
and return impl Trait
are being stabilized!Now it will be possible to write something like this:
trait Foo {
async fn foo();
fn bar() -> impl Bar;
}
GitHub
Stabilize `async fn` and return-position `impl Trait` in trait by compiler-errors · Pull Request #115822 · rust-lang/rust
Stabilization report
This report proposes the stabilization of #![feature(return_position_impl_trait_in_trait)] (RPITIT) and #![feature(async_fn_in_trait)] (AFIT). These are both long awaited featu...
This report proposes the stabilization of #![feature(return_position_impl_trait_in_trait)] (RPITIT) and #![feature(async_fn_in_trait)] (AFIT). These are both long awaited featu...
Why Static Typing Came Back
TL;DR
- Static Typing was a pain to use in 1990s and you still got type errors at runtime
- At that time the Web came to the scene and with it the need to ship and iterate faster
- The Internet speed was a lot slower back then, and so the obvious lack of runtime speed of dynamic languages didn't matter
- But everything changed in 2010s. The compilers and type checkers became a lot faster and friendlier. The statically typed languages became less verbose and "ceremonial".
- And now we are in an age of statically typed languages with even more of them in active development.
TL;DR
- Static Typing was a pain to use in 1990s and you still got type errors at runtime
- At that time the Web came to the scene and with it the need to ship and iterate faster
- The Internet speed was a lot slower back then, and so the obvious lack of runtime speed of dynamic languages didn't matter
- But everything changed in 2010s. The compilers and type checkers became a lot faster and friendlier. The statically typed languages became less verbose and "ceremonial".
- And now we are in an age of statically typed languages with even more of them in active development.
YouTube
Why Static Typing Came Back • Richard Feldman • GOTO 2022
This presentation was recorded at GOTO Copenhagen 2022. #GOTOcon #GOTOcph
https://gotocph.com
Richard Feldman - Functional Programming Language Expert & Author of “Elm in Action” @rtfeldman
RESOURCES
https://www.roc-lang.org
https://twitter.com/sw_unscripted…
https://gotocph.com
Richard Feldman - Functional Programming Language Expert & Author of “Elm in Action” @rtfeldman
RESOURCES
https://www.roc-lang.org
https://twitter.com/sw_unscripted…
Forwarded from Блог*