139
top 34 comments
sorted by: hot top new old
[-] mrspaz@lemmy.world 57 points 4 days ago

Lookin' good. Just be sure to put "unsafe" before all your function definitions.

unsafe fn main()

That'll do ya.

[-] rockSlayer@lemmy.blahaj.zone 33 points 4 days ago

Excellent, thanks for the tip! I'm thinking of writing a linked list and creating reference pointers to the list so I can copy it and change the copy. Unsafe fixed all the problems, but my PC keeps crashing. I think it's some non-rust util smh

[-] rtxn@lemmy.world 14 points 4 days ago

It's that damn borrow checker again! Try the rust-- compiler, it disables that antifeature.

[-] LegoBrickOnFire@lemmy.world 1 points 3 days ago

I am scared... But is rust without borrow checker actually a goodenough language ?

[-] rtxn@lemmy.world 4 points 3 days ago* (last edited 3 days ago)

The borrow checker is a feature in the compiler. It only ensures that the source code doesn't violate its rules at compile time, and if it does, stops the compilation and shows an error message. If the borrow checker is disabled, the code will be compiled even if borrowing rules are violated (as long as the source code is otherwise valid).

In short: removing the borrow checker turns Rust into C.

[-] ShutUpWesley@piefed.zip 28 points 4 days ago

Rust is cool, but not the end-all-be-all solution some people have the impression it is.

[-] rockSlayer@lemmy.blahaj.zone 24 points 4 days ago

I know lol I'm just shitposting based on the C++ post from yesterday

[-] Sxan@piefed.zip 7 points 4 days ago* (last edited 4 days ago)

~~It was C~~

Edit: it wasn't C; it was C++.

[-] rockSlayer@lemmy.blahaj.zone 12 points 4 days ago

My bad. This is what happens when your brain isn't memory safe

[-] Sxan@piefed.zip 6 points 4 days ago

Naw, it was my mistake. I misremembered it -- it was C++.

[-] MaskedNybbles@piefed.social 6 points 4 days ago
[-] Sxan@piefed.zip 4 points 4 days ago

Huh. You're right.

[-] olafurp@lemmy.world 5 points 3 days ago

It's not all good but the memory management and no undefined state is a huge plus for libraries to have.

[-] AVincentInSpace@pawb.social 1 points 2 days ago

I swear I must be the only Rustacean in the world who agrees with you. I'm embarassed to share a language of choice with these people sometimes. Yes, Rust makes it harder to write incorrect programs, but it still requires you to use your brain and besides, the process of rewriting is likely to introduce a metric shitton of bugs, especially if you vibe code it like I've seen a lot of people doing.

[-] chrash0@lemmy.world 14 points 4 days ago

i mean, it’s a good fit for a utility like this. starts quick, runs fast, small memory footprint… all the benefits of C/C++ but with modern tooling and a sane type system.

[-] tal@lemmy.today 2 points 4 days ago* (last edited 3 days ago)

I could understand caring a lot about the language if I were writing or maintaining something, but not usually if I'm just using a software package, unless it has performance implications. Maybe for software that has privilege escalation risk you maybe want a language that might help mitigate some security issues, but launchers shouldn't fall into that camp.

But, hey, people have their own preferences and opinions. Maybe someone's super into Rust and wants to try to run as pure a Rust environment as possible or something.

[-] Ephera@lemmy.ml 3 points 4 days ago

I mean, just to offer you the counter perspective, IMHO programs written in X tend to have problem Y:

  • Python: Terrible error messages, buggy, sluggish, slow, but good documentation
  • Java: Gurgles RAM like there's no tomorrow (but tends to do something useful with it), sluggish
  • Node.js: Just gurgles RAM for the fun of it, buggy, over-engineered functionality, confusing documentation
  • Rust: Over-engineered functionality
  • Go: Bad error messages, quirky detail behavior
  • Haskell: Practically 0 bugs, but if you do run into a bug, good luck. Thin documentation.
  • C/C++: Basically no bells or whistles, and no compiled build available. Also stupidly difficult compile on anything, except the singular dev's PC.

Obviously, these are caricatures, i.e. I'm overdrawing the details and omitting nuance. And these are also influenced by the kind of people that are drawn to these languages. And these are influenced by what I know about the languages, I didn't conduct a double-blind study.

But yeah, there's a reason why Python ended up first on that list. I don't have that hard of an opinion about the others, but genuinely, when I know a non-trivial program is written in Python, I will think twice whether I want to use it. Because it always seems to cost me a non-trivial amount of nerves in the end.

[-] fushuan@lemmy.blahaj.zone 3 points 3 days ago

I know you said those are caricatures, but with C or C++, programs usually do have a make or cmake script to be built in 1-3 commands explained in the repo.

I'd have mentioned that their more typical execution error message is "segfault". Where? Fuck you, that's where.

[-] Ephera@lemmy.ml 3 points 3 days ago

Ah yeah, segfault is a good point. And if you get more than that, it's still often just an exit code and some generic print statement. 🫠

And well, with C/C++ programs being difficult to compile, I was referencing that installing libraries is typically left as an exercise for the user.
If you're on a similar distro as the dev, it's usually documented what you need to do. But if not, you get to guess what the library package might be called. Or if it's available in a compatible version. Or at all.
You just need to hope you get lucky, which should not be a factor in whether software compiles...

[-] KernelTale@programming.dev 1 points 2 days ago

I like C and C++ so naturally I am drawn to Rust, but how do programmers make bigger programs without OOP? Is the project structure written in C++ and then it calls Rust functions with the C++ just being wrappers?

[-] rockSlayer@lemmy.blahaj.zone 3 points 2 days ago

Rust is also object oriented, it's just more like C in the sense that there is no Object class to inherit from. It's also similar to Python in that the OOP language has enough features borrowed from functional programming that it can be used that way

[-] MaskedNybbles@piefed.social 12 points 4 days ago* (last edited 4 days ago)

I am unwilling to make light of another's desire to learn so that they might help themselves, even if some of the phrasing feels a little silly and market-y.

What does this post accomplish? Feels mean-spirited, really.

[-] rockSlayer@lemmy.blahaj.zone 23 points 4 days ago

I'm not making fun of that person. More power to them. I'm making fun of the rust community's desire to rewrite the fabric of the universe in Rust

[-] MaskedNybbles@piefed.social 12 points 4 days ago* (last edited 4 days ago)

Alright. It just seems to me that anti-intellectualism is everywhere and that is what I first jumped to. I apologize for the accusation. It was knee-jerk. Carry on with your light-hearted ribbing, then.

[-] Ephera@lemmy.ml 10 points 4 days ago

As a Rust dev, I approve of this.

(Especially the rewriting. Spacetime has way too many quirks and should be deprecated.)

People rewriting common software in Rust is a good thing, regardless how good the original and its code was, it's a fun exercise in coding if nothing else, and if it ends up worse than the original, that's fine! That's how you practice and learn, and it should be encouraged.

Fuck corporations using Rust rewrites to replace GPL-licenced software with Expat-licenced ones.

[-] GottaHaveFaith@fedia.io 2 points 4 days ago

I have to admit that reading the other post I did think "why is he learning C instead of rust", so...

[-] DonutsRMeh@lemmy.world 11 points 4 days ago

Your brain is going to rust before you learn rust.

[-] rockSlayer@lemmy.blahaj.zone 11 points 4 days ago

Perfect. I will not be satisfied until my entire body is rust

[-] felsiq@piefed.zip 8 points 4 days ago

semi-relevant to the joke, but for anyone who actually does want a rust based launcher there’s anyrun which works great on my systems

[-] Randelung@lemmy.world 4 points 4 days ago* (last edited 4 days ago)

Wow, I hate the thumbnails just from this screenshot.

Good luck, Rust is easy if you have a background in C/C++. Lifetime specifiers are a wrinkle, but also doable. I recommend you do Advent of Code tasks and ask an LLM for stylistic feedback.

[-] rockSlayer@lemmy.blahaj.zone 7 points 4 days ago

Dropping the /s for a moment, I actually already learned Rust about 7 years ago for my CS courses. There was a 7 week writing course where we had to pick a programming topic, centered on language design. I chose to generally discuss Rust because of lifetimes and found that there are a lot of cool things, but the syntax can get extremely dense

[-] rockSlayer@lemmy.blahaj.zone 4 points 4 days ago

Sorry, I'm sure it's because you were excited to learn rust too, but the videos didn't play

[-] some_guy@lemmy.sdf.org 1 points 4 days ago

That's a pretty great dunk. On multiple levels.

this post was submitted on 29 Oct 2026
139 points (94.8% liked)

linuxmemes

33301 readers
380 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry of any kind will not be tolerated. This is an LGBTQ+-friendly community -- if that is a problem for you, you should leave.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • Don't come looking for advice, this is not the right community.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves / tolerates / hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. 🇬🇧 Language/язык/Sprache
  • This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 3 years ago
    MODERATORS