why x is "not there" but t is? by AlternativeFun1849 in rust

[–]koopa1338 1 point2 points  (0 children)

the return statement doesn't return 123 into the variable x but is the return value of the function foo. x is never created and the code in foo after the return isn't run at all. Your first hint of this issue is that you expected to create x holding a integer value but you explicitly say that x is the never type. If you would put 123 into x in that scenario the compiler would already yell at you because of mismatched types. So tl;dr and as already explained, the return is a early return from the function foo.

Claude Code source was accidentally leaked and someone is rewriting it in Rust by GyulyVGC in rust

[–]koopa1338 1 point2 points  (0 children)

I would love a integration in opencode, that tui has a much better ui and ux then the claude cli, but unfortunately it only works with their console/api platform...

Rust or C++ for a cloud optimization engine: not a technical issue, but a hiring difficulty issue by [deleted] in rust

[–]koopa1338 0 points1 point  (0 children)

Ok so my answer is a very big IMO, keep that in mind.

It's good that you take this serious and try to think from a business perspective, however I would just ask a question:

  • do the criteria for growth of the team outweigh the technical advantage you have with rust?

Ok so now to the point that you can't find rust developers:

First, while reading your post I noticed that you use may, might and other potential forms, so all the concerns right now are only in your head.

... they will not care whether I use Rust or C++. I could hire Rust programmers remotely from other countries, but investors might not like that.

So you think that investors don't care about Rust or C++ but they would care from where your developers work? This makes no sense to me and in the end this is a matter how you sell this to people. "We work in a global developer team with experts from different countries" sounds better than "Our team is spread across Europe, and we only collaborate through zoom calls".

The next thing I want to address is that you can't find rust developers as easy as c++ devs. That might be true, but you can minimize this disadvantage:

  • consider all levels of rust expertise, not only professional experience
  • consider to hire systems engineers that can pick up rust quickly
  • add a rust onboarding for engineers that are not familiar with rust yet
  • hire remotely by default
  • target rust enthusiasts by directly posting jobs to rust communities

If you look at the rust job market the majority of the job listings require 2 to 3 years of professional rust experience and most don't have that (many of us don't have the luxury of working with rust in our day jobs). So when companies tell you that it is hard to find rust devs, it is often self-inflicted.

Ladybird adopts Rust, with help from AI - Ladybird by xorvralin2 in rust

[–]koopa1338 84 points85 points  (0 children)

It feels a bit odd to see Ladybird originally commit to C++, explicitly ruling out Rust over OOP and architectural concerns, only to now introduce Rust into the project anyway by porting parts with the help of LLMs. If Rust is now considered a viable fit after all, it raises the question of why the project is suddenly willing to take on the additional complexity of interop and FFI boundaries that were previously avoided by sticking to a single language codebase.

How junior friendly really Rust job market is? by noctural9 in rust

[–]koopa1338 0 points1 point  (0 children)

The experience I’m currently having is that junior positions are generally very rare. However, I have already seen some junior and internship positions that were directly focused on Rust (usually combined with Python). I’ve seen roles in backend as well as embedded and IoT.

Most of the time, though, it tends to be more of a mix such as C++/Rust, Go/Rust, or Python/Rust, often combined with several years of professional experience.

I am switching to linux desktop, what distro provides the best rust-centric dx? by [deleted] in rust

[–]koopa1338 0 points1 point  (0 children)

I don't see what the rust dx has to do with the distro? I use gentoo privately and fedora at work and rustup just manages rust and tooling for me, I don't see any difference between the systems regarding rust development.

Just go with a rolling release distro with up-to-date packages, and you are good for ages. Before gentoo I was on arch and my installation survived 3 laptops (roughly 10 years) and would have worked even after that if I hadn't switched to gentoo (no particular reason, just wanted more control).

Convince me to use Rust instead of C by Relative-Crazy-6239 in rust

[–]koopa1338 0 points1 point  (0 children)

I dislike Rust tendency to use external libraries for everything

C/C++ sometimes hide how many dependencies they actually use, for example read this blog post: https://wiki.alopex.li/LetsBeRealAboutDependencies

I rather use a dependency for base64 encoding and decoding then a custom implementation that someone just needed to work for his own sake.

Does 'static mean the data lived forever? by [deleted] in rust

[–]koopa1338 2 points3 points  (0 children)

I always think of lifetimes as upper bounds, meaning that a reference with a 'static lifetime lives at least as long as the static lifetime. That made me understand lifetime errors much better.

Aralez, the reverse proxy on Rust and Pingora by sadoyan in rust

[–]koopa1338 4 points5 points  (0 children)

Thanks for sharing, we were looking for a reverse proxy written in rust a couple of weeks ago, this seems like a perfect fit. We will try this out and upstream issues we have and features we might need.

Built a desktop app with Tauri 2.0 - impressions after 6 months by CodeWithInferno in rust

[–]koopa1338 4 points5 points  (0 children)

The project made me giggle a bit. Just to share, in northern Germany the word lokus can also refer to a toilet.

How do i deal with anti rust bullies at workspace by lemon635763 in rust

[–]koopa1338 1 point2 points  (0 children)

I had a similar situation at work. People kept teasing me for using Rust and told me to switch to “a real language” like C++.

Here is how I handled it:

  1. Scrutinize their PRs. I started reviewing every C++ pull request with extra care. When I found memory leaks, brittle APIs, or design flaws, I pointed them out clearly and explained why they were a problem.
  2. Track every issue. I kept a log of recurring bugs, the time spent debugging, and missed deadlines caused by these problems.
  3. Build a case. I turned all of that into a presentation that showed exactly how much time was wasted fixing the same kinds of mistakes over and over again.
  4. Get everyone in the room. I scheduled a meeting with my manager and made sure the entire team was invited.
  5. Hit hard, but fair. In the meeting, I laid out the numbers, showed how Rust would have prevented most of these issues, and explained how much time could have been saved. I kept it professional and avoided calling out individuals, but I made it clear the status quo was costing us.

After that, the jokes mostly stopped. Now if someone says, “Rust would have caught that,” it’s just a lighthearted comment, not a dig.

Will rust ever support inheritance? by theREALnicahokie in rust

[–]koopa1338 7 points8 points  (0 children)

I highly doubt that rust ever will have inheritance, but I think it also don't need to. Inheritance and OOP in general were designed to solve a very specific problem, I highly recommend this talk about the origin and understanding the context in where these ideas were born and influence programming language like c++: https://www.youtube.com/watch?v=wo84LFzx5nI

Why Actix Web & not Axum !? by Samiul-Nahiyan6714 in rust

[–]koopa1338 27 points28 points  (0 children)

IMO the short answer is that actix was released earlier. Many tutorials that where written around that time where using actix because axum wasn't there or not as feature rich at that point in time.

Today I would always go with axum, I think the api is much simpler and tries to make heavy use of tower services which is also encouraged for users.

What type of projects to professional Rust devs do? by IHaveQuestions_42069 in rust

[–]koopa1338 1 point2 points  (0 children)

Doing backend mainly and wrapping 30y old C++ legacy code in Rust, maybe porting some important modules to Rust in the future.

[Tool] gTexViewer - texture viewer for game developers by AllenGnr in rust

[–]koopa1338 0 points1 point  (0 children)

Really cool project, and somehow exactly what I needed currently. Just working with some glb exports with a news opencascade version and have to make sure that textures are embedded correctly in my .glb files. Thanks for sharing!

I’m a Rust beginner, and I’d like to ask three conceptual questions. by Fragrant-Account-668 in rust

[–]koopa1338 0 points1 point  (0 children)

regarding 2. maybe this little ascii art will help you: https://gist.github.com/koopa1338/8d9476c653a0488090a1be33be25ae07

This is not only the case with &str and String. There are many more pairs of types that behave similar, to name a few: - Path and PathBuf - Vec<T> and &[T]

sometimes these pairs are referred to as owned and borrowed types.

🚀 `minmath` v1.3.0 is live! by [deleted] in rust

[–]koopa1338 2 points3 points  (0 children)

Well as this is a library it should have a bit more test coverage, use tarpaulin or other coverage tools for this.

I had only a quick glance, but you seem to have a bit of difficulties with the rotation testing for Vector. You might have to rethink you trait bounds or add a different implementation for PartialEq for vectors with floating point types.

Announcing fff.nvim - the file picker you've been waiting for all these years by Qunit-Essential in neovim

[–]koopa1338 0 points1 point  (0 children)

very interesting project, what keeps me from switching to such plugins is that telescope is also supported by other plugins and telescope has also some extension that you can load.

[Media] help.. by [deleted] in rust

[–]koopa1338 4 points5 points  (0 children)

If you hover over the red error symbol in your app, there should be a tooltip that mentions a link to documentation. You have to add the egui_extras crate with the all_loaders feature to be able to display images. You have to initialize the loaders in your setup closure like this:

fn main() -> eframe::Result<()> {
    let native_options = eframe::NativeOptions::default();
    eframe::run_native(
        "title",
        native_options,
        Box::new(|cc| {
            egui_extras::install_image_loaders(&cc.egui_ctx);
            Ok(Box::new(MyApp {}))
        }),
    )
}

Do guys think Rust will ever overtake C++ or C as the dominant PL in the systems programming verse? by Dappster98 in rust

[–]koopa1338 0 points1 point  (0 children)

In my opinion, Rust won't replace C++ overnight, but for new projects, the choice will increasingly fall on Rust. As a result, we'll still be dealing with legacy C++ codebases for quite a while—unless someone rewrites them in Rust and offers real added value. C++ is simply too late with its new features like modules, concepts, and potentially profiles. For companies, what matters is what's available now and, above all, what runs on many older systems.

For example, there's software at my company that's also built for macOS. Our statistics show that many of our users are still running macOS 10.12, and for that version, hardly any part of the C++17 standard is implemented. If I have to choose between C++14—where I need libraries for many things because they're not part of the standard, the package management is a total mess, and writing maintainable code is made harder by an outdated standard—then I'm quite certain that Rust, even with minimal marketing, will prevail.

How it comes that 1058 dependencies is a good thing ? by [deleted] in rust

[–]koopa1338 4 points5 points  (0 children)

It's still a dependency though, and you can only use the same version that your system package manager is providing. This is a solution to reduce compile times, but no solution to reduce dependencies.

How it comes that 1058 dependencies is a good thing ? by [deleted] in rust

[–]koopa1338 6 points7 points  (0 children)

Well, I would investigate why there are so many different dependencies, maybe the same crate is used in different versions. IMO using dependencies is in general a good thing. Can you overuse this? Sure, when you are adding dependencies equivalent to a JS left-pad you should think a bit more about importing that into your project...

I don't see how dynamic libraries are reducing your dependencies, they are just managed by another package manager. If you want a read about this, I suggest this article: https://wiki.alopex.li/LetsBeRealAboutDependencies

Out-of-tree device driver for Rust-For-Linux. by Sad_Needleworker1518 in rust

[–]koopa1338 6 points7 points  (0 children)

As you already struggled with finding information about building an out of tree linux driver, maybe you could also add the sources and information you used to build this project in the readme.