Parodia
  • Communities
  • Multi-communities
  • Support Lemmy
  • Search
  • Login
  • Sign Up
  • Gobbel2000@programming.dev

Same person as @Gobbel2000@feddit.de, different instance.

  • 1 post
  • 4 comments
Joined 2 years ago
Cake day: April 3rd, 2024
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
  • Rust@programming.dev•Feasibility of Sorted IteratorsbyGobbel2000@programming.dev
    1 day

    You would have to either mutate the original vector or clone it, yes. If you really want to iterate through an immutable Vec with only constant memory usage, then you probably can’t get around O(n^2) runtime, but maybe there is some time-memory-tradeoff where a small memory usage can get some time reduction.

    • Rust@programming.dev•Feasibility of Sorted IteratorsbyGobbel2000@programming.dev
      2 days

      Maybe a heap data structure is what you’re looking for. Depending on the usecase you might have to first turn an unsorted Vec into a heap (runtime in O(n), which is still faster than fully sorting it), at that point you can both insert new elements and remove the minimum element within a time in O(log n).

      Rust@programming.devbyGobbel2000@programming.dev
      4 days

      Supply chain attack on arrayref

      blog.rust-lang.org English

      If you recently used Cargo, make sure your system didn’t get infected. Here is another article with a little more info: https://www.stepsecurity.io/blog/arrayref-rust-crate-supply-chain-attack

      22
        • memes@lemmy.world•Number on or number off which one do you prefer??byGobbel2000@programming.dev
          14 days

          Number only, get out of here with superfluous symbols. I don’t need The Status Bar: Illustrated Edition.

          • Rust@programming.dev•Error Handling in Rust vs. Exceptions in other languagesbyGobbel2000@programming.dev
            2 months

            There is the map_err method on Result which simplifies this case. But yes, anyhow is still easier if you don’t care that much about the error contents.

            • BE: 1.0.0-beta.1
            • Modlog
            • Legal
            • Instances
            • Docs
            • Code
            • join-lemmy.org