[-] BB_C@programming.dev 11 points 2 weeks ago

High or low, all Linux usage stats are fake.

[-] BB_C@programming.dev 11 points 3 weeks ago

sublemmy

Lemmy communities. Mbin/kbin magazines.

[-] BB_C@programming.dev 12 points 1 month ago

The freeze-the-world "stable distro" concept is an outdated meme, especially when it comes to desktop usage.

In server usage, at least there is the idea of not breaking things by avoiding major version upgrades of used services/daemons. But even then, freezing the used services alone, while letting other system components have what may amount to thousands of fixes for some of them (and yes, a few bugs), is probably better, at least conceptually. But it's admittedly not a well supported setup, unless you're willing to basically maintain a distro yourself.

And no, the "stable" distro maintainer is not going to magically backport all the "important" changes, unless backport means applying an almost full diff from a later version of the source package.

(I actually mention this because I remember Debian doing this a long time ago with what I think was ffmpeg. lol.)

Many desktop users know this.
Upstream developers definitely know this, and occasionally write about it even.

(I was a Debian user many moons ago. That was before systemd came to existence, or PulseAudio became default in any distro. Went from stable to testing to sid. Testing was the worst, even stability wise. Sid was the best for desktop usage. Then a sid freeze came because a stable release cycle was near. Went to a rolling-release distro and never looked back.)

[-] BB_C@programming.dev 12 points 1 month ago

Welcome.

[profile.release]
opt-level = 'z'     # Optimize for size

It doesn't matter here, let's get that out of the way.

But I'm wondering if someone/someplace is wrongly recommending this!

Because lately I've been seeing this getting set in projects where their binaries wouldn't be typically running on environments where this is required or even helpful.

My concern is that some developers are setting this without really understanding what -Oz actually does.

[-] BB_C@programming.dev 14 points 1 month ago

I thought I saw this weeks ago.

May 21, 2024

yep

Anyway, neovim+rust-analyzer+ra-multiplex is all I need.

[-] BB_C@programming.dev 11 points 1 month ago
    /// # Panics
    ///
    /// - if `samples.len()` does not match the `sample_count` passed to [Self::new]
    /// - if there are `NaN`s in the sample slice

Since this is library code, why not make the function return a Result?

[-] BB_C@programming.dev 13 points 2 months ago

DNS blockers became a thing in part because /etc/hosts can't do stuff like glob subdomain blocking, no?

e.g.

*.bla.tld 127.0.0.1
[-] BB_C@programming.dev 13 points 8 months ago
  • I take slight issue with your title. Such diesel errors are not your average Rust error.
  • Looking at the first example, you should have quickly realized that lack of kind abstractions over types (lol no HKTs) since Rust v1.0 is contributing to the verbosity. Maybe in a few years, with features like GATs maturing, expanding in scope, and being used more in the ecosystem, things will get better!
[-] BB_C@programming.dev 15 points 9 months ago

Meh, everyone scaring you into thinking you don't own your own mind.

Assuming your boss is not the dangerous kind (beyond legal threats), and if the goal is to make it FOSS, then do it using an alias first. Do it differently. Use components/libs/algos from other people at first, even if they are not perfect. Make those parts easily pluggable/replaceable which would be good design anyway. The code then wouldn't be wholly yours, not even your alias self.

You can join the project later with your real identity as an interested domain expert (maybe a bit after not working for the same boss). Start contributing. Become a maintainer. And maybe take over after a while. You can start replacing non-optimal components/libs/algos with better ones piecemeal.

Oh, and if Rust wasn't the choice of implementation, use it this time.

[-] BB_C@programming.dev 12 points 9 months ago

As I discovered and mentioned here a couple of months ago, there is a new hyper-util crate that may/should bring a higher-level API interface back. It also predictably brings a hard dependency back on tokio rt. So there is that.

hyper-util was also just mentioned by Sean (hyper dev) in the discussion you linked.

[-] BB_C@programming.dev 13 points 10 months ago* (last edited 10 months ago)

Is everyone genuinely liking this!

This is, IMHO, not a good style.

Isn't something like this much clearer?

// Add `as_cstr()` to `NixPath` trait first

let some_or_null_cstr = |v| v.map(NixPath::as_cstr)
  .unwrap_or(Ok(std::ptr::null()));

// `Option::or_null_cstr()` for `OptionᐸTᐳ`
// where `T:  NixPath` would make this even better
let source_cstr = some_or_null_cstr(&source)?;
let target_cstr = target.as_cstr()?;
let fs_type_cstr = some_or_null_cstr(&fs_type)?;
let data_cstr = some_or_null_cstr(&data)?;
let res = unsafe { .. };

Edit: using alternative chars to circumvent broken Lemmy sanitization.

[-] BB_C@programming.dev 12 points 11 months ago

Maybe create a separate "Rust Drama" Lemmy community for such posts!

view more: ‹ prev next ›

BB_C

joined 1 year ago