![](/static/253f0d9/assets/icons/icon-96x96.png)
![](https://programming.dev/pictrs/image/1f7e5534-88d3-4d6f-bc57-7cda9553890f.webp)
Is this crazy?
A general repeat macro that works on stable Rust would work too of course.
Is this crazy?
A general repeat macro that works on stable Rust would work too of course.
BTW, the snippet I pointed to, and the whole match block, is not incoherent. It’s useless.
First of all, unsafe
famously doesn’t disable the borrow checker, which is something any Rustacean would know, so your intro is a bit weird in that regard.
And if you neither like the borrow checker, nor like unsafe rust as is, then why are you forcing yourself to use Rust at all. If you’re bored with C++, there are other of languages out there, a couple of which are even primarily developed by game developers, for game developers.
The fact that you found a pattern that can be alternatively titled “A Generic Method For Introducing Heisenbugs In Rust”, and you are somehow excited about it, indicates that you probably should stop this endeavor.
Generally speaking, I think the Rust community would benefit from making an announcement a long the lines of “If you’re a game developer, then we strongly advise you to become a Rustacean outside the field of game development first, before considering doing game development in Rust”.
Alright. Explain this snippet and what you think it achieves:
tokio::task::spawn_blocking(move || -> Result { Ok(walkdir) })
Post the original code to [email protected] and point to where you got stock, because that AI output is nonsensical to the point where I’m not sure what excited you about it. A self-contained example would be ideal, otherwise, include the crates you’re using (or the use
statements).
Federation is irrelevant. Matrix is federated, yet most communities and users would lose communication if matrix.org got offline.
With, transport-only distributablity, which i think is what radicale offers, availability would depend on the peers. That means probably less availability than a big service host.
Distributed transport and storage would fix this. a la something like Tahoe-LAFS or (old) Freenet/Hyphanet. And no, IPFS is not an option because it’s generally a meme, and is pull-based, and have availability/longevity problems with metadata alone. iroh claims to be less of a meme, but I don’t know if they fixed any of the big design (or rather lack of design) problems.
At the end of the day, people can live with GitHub/GitLab/… going down for a few minutes every other week, or 1-2 hours every other month, as the benefits outweigh the occasional inconvenience by a big margin.
And git itself is distributed anyway. So it’s not like anyone was cut from committing work locally or pushing commits to a mirror.
I guess waiting on CI runs would be the most relevant inconvenience. But that’s not a distributable part of any service/implementation that exists, or can exist without being quickly gravely abused.
for a build of your crate only: single core perf.
Until the parallel compiler feature (-Z threads=<n>
) stabilizes and becomes more complete.
It’s also always worth mentioning that the choice of linker is important. Using mold or lld can significantly speed things up in some use-cases.
Beyond that, codegen-units
and lto
profile options are also important.
And finally, for development purposes, the code generator is important, as cranelift
provides much faster compile times, but resulting binaries are not as optimized as LLVM-generated ones.
Definitely don’t use axum, which provides a simple interface for routes by using derived traits. Their release cycle is way shorter, which makes them more dangerous, and they’re part of the same github user as tokio, which means they’re shilling their own product.
this but (semi)-unironucally
Your answer wanders a bit unnecessarily IMHO.
Good.
Can you formulate your question better, with a minimal example and properly formatted code?
If you’re using an LLM to “learn”, stop. Otherwise, I don’t understand what lazy_static
has to do with anything.
It’s hard to tell what you’re asking. But maybe you’re confused because println!
(it’s a macro btw) expands to code that involves format_args!
which is a compiler built-in that doesn’t take ownership of the token expressions that get passed to it. Notice how the bottom of the format_args!
page has this to say:
Lifetime limitation
Except when no formatting arguments are used, the produced
fmt::Arguments
value borrows temporary values, which means it can only be used within the same expression and cannot be stored for later use. This is a known limitation, see #92698.
So, it’s kind of a feature and a limitation at the same time.
Ask yourself:
The fact of the matter is, none of these stats actually measure the number of users. Most of them are just totally flawed guestimates based on what is often limited web analytics data collected by them.
In fact, not even the developers of a single distribution can guess the number of people/devices using/running that specific distribution. A distribution like Debian for example has mirrors, and mirrors to some mirrors, and maybe even mirrors to some mirrors to some mirrors. So if Debian developers can’t possibly know the number of Debian users, do you think OP’s site knows the total number of Desktop Linux users?
And let’s not get into the fact that the limited data they collect itself is not even reliable. View desktop site on your Android phone’s browser. Congratulations! Now you’re a desktop Linux user. No special user-agent spoofing add-on needed. You’re even running X11. Good choice not following the Wayland fad too soon.
High or low, all Linux usage stats are fake.
Keep (Neo)Vim out of this.
sublemmy
Lemmy communities. Mbin/kbin magazines.
That’s fine. I didn’t look at the code, but from what I gather, Jiff
serializes the timezone name (not detailed tz info). chrono
users would communicate the same thing, but it’s not built-in functionality in the dt type itself.
The example I referred to however may imply that chrono
users would be inclined do the wrong thing, and get the wrong result as a sequence.
(humble personal opinion bit) It feels like it’s a case where the example was pushed a bit extra to fit into the “jump into the pit of success/despair” reference. A reference many, young and old, wouldn’t recognize, or otherwise wouldn’t care for anyway.
Yesterday I was browsing /r/programming
:tabclose
From COMPARE.md
:
Conversely, in Jiff, all time zone lookups by name are cached.
Is the cache invalidated if system tzdata is updated?
And what effect does the answer have on the example from “Jiff supports detecting time zone offset conflicts” if both zoned datetimes used the system timezone which got updated between 1. opening 2. parsing the two zoned datetimes.
Jiff losslessly roundtrips time zone aware datetimes
In this section, wouldn’t be more realistic for chrono
users to use timezone info around the wire instead of on the wire, rather than using Local
+FixedOffset
?
Alpine uses GCC at least.
You scared me for a moment there. I don’t know why you thought that.
Needless to say, even with the first example, metavar expressions are not strictly needed here, as using a second pattern and recursing expansions would work.
But I wanted to showcase the power of
${ignore}
, as it can be cleaner and/or more powerful in some cases where extra patterns and recursing expansions can get messy and hard to track.