Correct link without /edit/
:
https://github.com/Nutomic/ibis/releases/0.1.2
Correct link without /edit/
:
https://github.com/Nutomic/ibis/releases/0.1.2
you’re not supposed to immediately reach for macros
correct
for small things you don’t quite like about the language.
incorrect
Excessive macro use makes it impossible for others (including your future self) to read your code
N/A. the macro above is trivial.
impossible for others to read your code and there’s often good reasons why it’s designed like it is.
fiction
There is a general mechanism in Rust that allows language users to add their own sugar. It’s called macros 😉
macro_rules! keep {
(let $id:ident = $expr:expr => $($tt:tt)+) => {
let $id = $expr;
let $id = $id$($tt)+;
}
}
fn main() {
keep!{ let path = std::env::current_dir().unwrap() => .as_path() };
println!("{path:?}");
}
You can remove let
from the macro’s fragment specifier and invocation.
mastering_rust
Maybe wait until you’re actually good at it.
Rebinding with and without mut
is a known and encouraged pattern in rust. Leaving things as mut
longer than necessary is not.
Neither.
new()
give you a fully valid and usable struct value.Maybe you should also use substructs that hold some of the info.
If you’re not into tiling, install openbox and a panel of your choosing. You will quickly find that you don’t need a DE at all.
The maintenance is too high.
acquired knowledge spotted
I will let you on a little secret.
The best “support” you can get is support from upstreams directly (I’m involved in both sides of that equation). But upstreams will often only “support” you when you 1. run the latest stable version 2. the upstream source code wasn’t patched willy-nilly by the packager (your distro).
So the best desktop linux experience comes with using rolling distro that gives you such packages, with Arch being the most prominent example.
The acquired knowledge that argues stability and tells you otherwise is a meme.
Never set foot in AU.
I was under the impression that Tasmania doesn’t get that cold.
Also, apparently some would rather describe Perth as Mediterranean-SouthAfrican, rather than Mediterranean-Californian 😉
Monthly Reminder: High or low, all Linux usage stats are fake.
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.
sublemmy
Lemmy communities. Mbin/kbin magazines.
Looks trivial and easy to automate.
I possibly would have done it if they had a test suite.
But unless I didn’t look hard enough, they have no tests at all (other than linting)!
The Rust hype at least makes sense.
In technical context, yes. I’m a Rustacean myself.
In business/marketing context, …
It’s not you who needs it.
It’s for buzzword chasers and cost cutters.
Rust (=> fast and hip)
Shared (=> outsourced)
AI generated (=> robot devs)
Get it?
ahem