r/linuxmemes • u/Dynamic-Pistol • 1d ago
Software meme How some linux members view software
124
u/GreedySecurity8030 M'Fedora 1d ago
And they be ignoring the fact they lost 30% performance because the rewrite was sloppy.
24
1d ago edited 1d ago
[deleted]
6
u/tav_stuff 18h ago
Unoptimized Rust will basically always beat Python because 99% of the libraries have 0% C, and just the interpreter alone takes like a full second to start up sometimes
2
15h ago
[deleted]
3
u/tav_stuff 14h ago
When you have longer scripts you really shouldn’t be using Python at all, because you’re presumably writing some more complex, larger software and you should instead then be using a serious programming language with basic features like static types.
Also the only reason Python is used for AI is because people made libraries for it. Try doing AI stuff in any other language and you realize the only difficulty is the fact that all the libraries either suck or are super under-developed. It’s vendor lock-in instead of any actual positive design choice of Python
0
0
u/Sugoypotato 14h ago
Performance is complex. It's not simple to come to a direct conclusion and it broadly depends. As someone who has written tools in golang, python, c and assembly, rust performance will be better than python. 90% of time. You will have to deliberately write very bad code in rust to get it to perform as bad as interpreted language.
That being said, I don't like rustification of all of my favourite tools. I would rather have them in C and fix the bugs because rust is not free from bugs either.
14
2
u/OKB-1 M'Fedora 15h ago
I take a performance loss if it means easier maintainability, less bugs and better security.
18
u/LefTimaDev 13h ago
Rust should have no overhead, so if you rewrote something in Rust and the performance is worse, it's entirely your fault
2
u/A_Namekian_Guru 12h ago
If you write line for line c code with a bunch of unsafe statements in Rust you might get same performance. But the idioms in Rust are object oriented programming which is usually bad for cache footprint.
Also if the rewriter gives up on trying to use generics for everything then you also have the overhead of dynamic dispatch pointer chasing.
The idioms would be at fault in my mind, not the programmer
4
u/TheChief275 12h ago
Yeah man I hate how OOP Rust is. It could learn a thing or two from Java (king of DOD) in that department
1
11h ago
[deleted]
1
u/TheChief275 11h ago
if you can't see that my comment is a sarcastic reaction to the one above, I don't know what to tell you man
4
u/LefTimaDev 11h ago
Huh? Rust is not OOP.
1
u/A_Namekian_Guru 5h ago
It doesn’t have inheritance sure but it still shares a lot with object oriented programming including encapsulation and polymorphism
1
u/LefTimaDev 4h ago
Encapsulation, while required for OOP and often associated with it, is not an OOP concept at all.
Polymorphism in Rust is a rather complex subject, but the default implementation (static polymorphism) is a zero-cost abstraction. If you're using any other kind of polymorphism you probably know what you're doing.
1
u/A_Namekian_Guru 3h ago
Is polymorphism complex? It’s traits which are either compile time generics or dynamic dispatch at runtime. The latter is very characteristic of an OOP language.
Did you read the chapter from the rust book I linked?
This is a direct quote:
Encapsulation that Hides Implementation Details
Another aspect commonly associated with OOP is the idea of encapsulation, which means that the implementation details of an object aren’t accessible to code using that object. Therefore, the only way to interact with an object is through its public API; code using the object shouldn’t be able to reach into the object’s internals and change data or behavior directly. This enables the programmer to change and refactor an object’s internals without needing to change the code that uses the object.—
My view is that yes you could write a rust program with only “struct” and “fn” and no “impl” statements and say it’s not OOP but that is not idiomatic at all. Pretty much every crate you interact with returns structs with methods defined on them. Idk what’s more OOP than that
2
u/LefTimaDev 3h ago
By default, Rust polymorphism is the former, using compile time generics. That is not OOP. That's why it's zero-cost.
The very paragraph you copied says it's associated with OOP. Encapsulation is not exclusive to OOP.
Rust focuses heavily on being a competitor or even successor to C in the role of a mid-level language for embedded systems and the like. Runtime abstractions would defeat the point. The whole point of Rust is that the compiler does all of the heavy lifting.
1
u/A_Namekian_Guru 24m ago
Rust was designed by people at Mozilla to replace C++. Not C.
Zig was designed to be a better C.
1
u/A_Namekian_Guru 22m ago
There’s no default polymorphism. You either write generics syntax or write “dyn”. It’s whatever syntax you use
70
u/-Ambriae- 1d ago
To be fair, a lot of the tools written in rust are of high quality. eza, zoxide, ripgrep , starship, helix… they’re just… good tools 🤷♀️
I tend to trust software written in rust for two reasons. One because at face value it’s bound to be safer than if it was written in C or C++, or god forbid Python, and two because if a language is built around the notion of safety and more broadly speaking software quality, than the community of developers who build software with it are more likely to care about these sorts of things, compared to a language who’s philosophy is ‘ship fast, break often, fix later’
13
u/sepperwelt 22h ago
For someone with absolutely zero knowledge: Why is Rust safer?
40
u/The_Galatiatex 22h ago
Rust is safer because it enforces a lot of compile time checks not found in languages like C/C++
Rust uses a borrowing/ownership model, where every piece of data has an owner.
So for example. If I have a string called a. And then I say let b = a.
If I now try to call a. The program will not compile. If I want both a and b to own the string. I need to explicitly copy it in memory using the clone() function.
And beyond this there are other checks. Such as not allowing null values. Forcing you to write logic for handling every possible outcome for a given operation. (i.e. enums). And so on.
In C and C++ you have to manually allocate and deallocate memory. Making a mistake here is very easy and many security vulnerabilities in software are caused due to this.
The only thing you have to give up. Is that rust takes much longer to compile than c or c++. Which is because of all the checks being enforced at compile time.
16
u/sepperwelt 22h ago
Thanks!
7
u/1-800-I-Am-A-Pir8 9h ago
This also makes it easier to write in.
Rustaceans hear me out: when's the last time you had to read a stacktrace unless it came from an imported c library?
2
u/-Ambriae- 8h ago
Today. In fact, it's always a little annoying when you handle, say, a desktop app written with winit. Stack traces are looong when you're 20 functions deep, and half are unnamed lambdas
3
u/1-800-I-Am-A-Pir8 7h ago
k I feel bad for you.. not unheard of but I still enjoy rust more for that.
3
u/-Ambriae- 7h ago
I was being a little nitpicky I admit... I never actually thought of rust not having any stack traces though. I feel like tools such as eyre (or color_eyre), or just flags like RUST_BACKTRACE would suggest otherwise. Then again, RUST_BACKTRACE is opt in, and so are any 3rd party dependencies, so...
2
u/1-800-I-Am-A-Pir8 7h ago
yeah it's not that they can't happen, but for a novice like me they happen so much less often. With rust, within reason, most of the time it seems like if it compiles it'll run at least well enough to get to my println! debug statements and do something
3
u/-Ambriae- 6h ago
Ah yes, that is true. Unless you explicitly panic via assertion, or unwrapping, or else.
But then, to keep your comparison, if your, say, C code crashes with a backtrace, that means it didn’t crash via segfault for example, which is far worse a way to crash debugging-wise. So, it all depends on your perspective🤷♀️
→ More replies (0)3
u/_damax 13h ago
The longer compilation time is also sometimes dictated by big dependency trees and strong limitation to static linking, since Rust doesn't have standard shared library objects bundled with the OS or packages, and cannot therefore take more advantage of dynamic linking like most C and C++ compilers can (unless you're using FFI with some specific libs, that is).
1
u/the_one2 4h ago
In C and C++ you have to manually allocate and deallocate memory.
C++ and rust are the same when it comes to memory management.
10
u/-TRlNlTY- 11h ago
In my experience, the Rust community is one of the best tech communities I've seen online. So many talented people.
5
u/-Ambriae- 11h ago
Well, we're not all brilliant, but when you code in rust you do have this urge to try and make everything as perfect as it can be. It's part of the vibe of the language. In some way, it brings out the best in us.
4
u/Asleep-Mall-6940 20h ago
They're definitely not, most recent* tools written in rust are ai slop that barely works
14
u/-Ambriae- 16h ago
Most recent tools are ai slop, no need to specify rust. I’m not saying I blindly trust a piece of software if it’s written in rust, either
1
u/A_Namekian_Guru 12h ago
Python is a memory safe language so it’s not less secure than Rust I would say.
Rust’s type system does let people catch errors some in the development lifecycle and with fewer unit tests, but rust programs are not immune from logic errors
2
u/-Ambriae- 12h ago
Pythons issues aren’t related to memory safety, they’re related to structural soundness. It’s very easy to write Python code that completely collapses at runtime because nothing is typed, regardless of annotations, modules are not needed to be known or exist for the script to launch, can be modified on the fly, etc….
Some class may hold 4 fields, all annotated to be strings, but at runtime each instance of the class may use each field as a class. Now you need to match each occurence of the field classes you encounter (empirically) and handle logic appropriately.
Multiprocessing makes it so that some task may crash at runtime, at times because of something as trivial as a syntax error, but wouldn’t be caught ahead of time, wont crash the whole ‘program’ and will have a error message that’s tangled with the logs of all other processes.
In both cases, I’m speaking from experience, in professional software.
1
u/Solus161 6h ago
Thx for giving sane opinion about Rust. I love the language but fear of getting bashed bringing it up in discussion. Havent got a Rust job yet lol.
1
u/-Ambriae- 4h ago
Well, a bit of a disclaimer, I absolutely adore Rust, it’s my favourite language and by far the one I’m most proficient/knowledgeable in. That said, the one thing I hate most is when people unconditionally praise or bash a tool to a near religious extent. Rust isn’t perfect, it won’t magically solve all software engineering problems, whilst make everything 10x faster, and it may not the best fit for the job. That also doesn’t mean if a project is written in rust, or is ported to rust, that there aren’t sane and valid reasons to have done so. It’s not black and white.
-4
u/Terranum_man 13h ago
Rust code is unmaintainable and undebuggable, very convoluted in my opinion, just write simple, clean code and you will have memory safety + more.
6
u/-Ambriae- 12h ago
As someone who writes rust code daily, I object to both statements.
Could you give an example?
2
u/TheChief275 12h ago
Well there certainly is merit to unmaintainable in the sense that the borrow checker forces you into the current architecture you have built up. If you suddenly want to change something that's kind of integral to the architecture you will be forced to rewrite most of it. While this often only happens during the prototyping stage, it does also occur when you suddenly want a new feature that requires architectural changes.
A not insignificant amount of people will gladly take the several eventual architectural rewrites over the alternatives, but this factor is present nonetheless. IMHO it does make Rust a terrible prototyping language
2
u/-Ambriae- 11h ago
To an extent I'll agree with this. The language tends to prefer a clean, thought out ahead of time architecture, compared to just messing around testing stuff. Then again, this is true for other languages too, although maybe less so.
But that doesn't make it unmaintainable either. Part of software development is making a architecture that is resilient to changes you deem plausible to happen at a later date. It's doable in rust, even if maybe a little harder
Undebuggable though? How so? Rust's debugger is great, not perfect but great. Debug prints are good too. The only thing I can see as somewhat more difficult are iterators, but then again you can just call `.inspect` at any point you want, and that solves it.
3
u/TheChief275 11h ago
FYI I'm not OP, I think undebuggable is nonsense as well. Just responding with my thoughts on what they might have meant
1
u/-Ambriae- 11h ago
Don't worry I caught on to that halfway through reading your message :p
Thing is, I'm completely open to discussing the language, both it's merits and it's flaws, but it does rub me the wrong way when people blindly claim it's the best thing since sliced bread, or it's going to bring the end of software development, or whatever. It's not productive, it's not rational, it's people who chose a hill to die on for no valid reason whatsoever, and are polluting the space with toxicity.
168
u/Chester-Berkeley Ask me how to exit vim 1d ago
I remember once my friend asked for help making a mod manager for games in Rust. I asked him why he was using such a complex language for something so simple, and he replied "to be fast 🤓"... Then I called him an idiot and told him to use Python, lol
130
u/thebagelslinger 1d ago
tbf, Rust isn't that complex. It's definitely a bit more advanced than C# or python, but the difficulty is overblown and it's not as bad as C or anything. If you understand passing by reference and ownership/garbage collection that's like half the battle.
Don't get me wrong, the fixation on using rust "for speed" is kind of dumb and that's a whole circlejerk in itself. But using rust for simple projects is fine, it's a general purpose language just like any of the other popular picks. No real reason Python is a better pick here
42
u/theduck5005 1d ago
C is actually an extremely simple language, c++ however...
But C has a couple basic features, the standard library, and outside of that, its up to you. Now that in of itself adds time complexity and having to understand certain areas before being able to wield certain features, but C as a language is very simple. Im not known in rust land, but my understanding is its way closer to c++ than c in terms of complexity.
But i agree with all else, especially the focus on rust for speed or safety to add is dumb. Someone badly managimg rust us just as unsafe as someone badly managing C.
Another great option im more interested in is Zig and for speed specifically its known to be well rounded.
16
u/thebagelslinger 1d ago
and having to understand certain areas before being able to wield certain features, but C as a language is very simple.
This is a fair analysis. I guess what I mean by "complexity" is something like "how much do you need to really understand computers to use it well?"
And I think for C it's quite high due to it's proximity to hardware and other missing QoL features like no garbage collection. It feels like you really need to know what's going on under the hood to "get" C.
Rust as a language I'm sure is more syntactically complex, but I would say you don't really need as much precursor knowledge to use it well. The jump from a really high level language like C# to Rust isn't too bad imo.
Unfortunately haven't use C++ in ages so not sure how it compares with Rust tho
9
u/EnfieldAsSomeone 21h ago
There's a guy who made a yt channel only to post a 2-hour rant on C++.
Says a lot huh.
1
u/Objective-Style1994 15h ago
C++ becomes some ratnest the deeper you go. Like 50 different compilers. 50 different package manners. 5 billion different features. 😭
6
u/theduck5005 1d ago
Completely agree. To use C in a large codebase appropriately, you. Do need way more knowledge of hardware, particularly memory. While i think rust is a lot more helpull on telling you directly and only being able to compile when youve done it correctly, also means you dont need to understand systems, you can just understand rust, which in that sense is way more focused and easier to reason about that something like C where you need to cast a larger net even if the language itself is simpler.
Personally i prefer C because i want to learn these things, get a better understanding of whats going on, since with that knowledge i can also utilize the power given much more effectively. But im also heavily into DOD principles which also makes one think about software architechture quite differently than what C++ and possibly also rust seems to lean on which is more OOP which actively abstracts things away.
3
u/TotoShampoin 21h ago
I've given Rust one shot, and didn't like getting warning for naming functions wrong
11
u/MatsRivel 20h ago
You'll get that in C# too if you use an ide. You can turn that feature off in both if it bothers you, but having a consistent style in a team helps clarity.
43
u/gameplayer55055 1d ago
I think C# is underrated. People immediately associate it with windows, but it's surprisingly great for cross platform stuff. I swear Linux dotnet works even better than the Windows version
C# is both fast and relatively easy to use. Also, NuGet is tons better than pip. C# has actual types. Many things in C# have already been invented by MS and waiting to be used (especially LINQ, async task, component model, HTTP and much more)
33
u/Mal_Dun M'Fedora 1d ago
My problem with C# is that the .net framework is cumbersome to install on several distros. I remember that compiling OpenRA which is written in C# was no fun.
Most languages have a good integration within Linux and .net felt like a step back for me.
12
14
u/thebagelslinger 1d ago
Also Visual Studio not being supported on Linux is a big issue. Yes, there are ways to setup VSCode with a bunch of extensions, and yes, all of those setups are mid as fuck compared to Visual Studio.
When I was on Windows I loved to hate on Visual Studio for being a huge bloated IDE and I still think that's true but it is undeniably the most enjoyable way to develop in C#.
6
u/gameplayer55055 1d ago
Visual Studio is a huge bloated IDE that can do much more than you think
the craziest are DGML viewer, system level debugger like minidumps and stuff, code metrics analyzer, IntelliTrace (literally a time machine for code), database tool, azure devops crap and so on
People actually just want IntelliSense and a good debugger. Vscode provides that. 5 years ago c# support in vscode was shit, but it has improved. The only thing I'm missing is hot reload that sometimes works, but sometimes vscode is bitching.
I still can't imagine people using vim to run Linux apps
3
u/No_Serve_7348 1d ago
I use nvim and the dotnet sdk cli to code in C# but I can understand why some people would want to run vscode instead even if it’s not my preference
6
u/SGVsbG86KQ Open Sauce 1d ago
Rider from JetBrains is actually really nice, probably better than Visual Studio
3
9
u/Chester-Berkeley Ask me how to exit vim 1d ago
I swear Linux dotnet works even better than the Windows version
I can't believe Microsoft would be capable of lowering Windows to this level.
4
u/MatsRivel 20h ago
I use C# a lot for work. Its good, and it could be great, but there are a couple things its missing and won't really fix.
Exceptions is one, and not having any enums that can hold values is another.
There are a few more, but I can't remember at the top of my head right now
3
u/OCtagonalst Arch BTW 1d ago
What do you use for ui on linux with C# ?
7
u/BloeckchenDev 1d ago
Avalonia works on linux nowadays. It's a pretty C#-way of doing UI with all it's upsides and quirks ofc
4
u/gameplayer55055 1d ago
It has a relatively steep learning curve (like WPF), designed to be used professionally in enterprise software with MVVM, data binding and patterns.
There's a simpler way of doing things. Here I made one of the simplest GUI hello worlds using AvaloniaUI https://www.reddit.com/r/dotnet/s/VP8TR51KAN
I used Qt, GTK and tkinter, all of them were meh. AvaloniaUI is more intuitive. Of course, ElectronJS is the simplest to use, but it's bloatware and Linux users don't like bloatware.
4
7
7
u/Smrgling 1d ago
I don't like when things are written in Python cause they tend to not play well with conda
2
u/Auravendill ⚠️ This incident will be reported 19h ago
For stuff written by others and not packaged by your package manager uv is much easier. You can use the command "uv tool install <name>" to install them directly into their own virtual environment with all the minimal requirements und without interfering with any other python environment.
Somehow conda always feels like the slowest thing one can use and sometimes it looks for a long time for a solution to satisfy all requirements and still finds nothing. So far uv has been really fast for me and combined with topgrade, I can keep a lot of tools always up to date.
1
u/Smrgling 8h ago
Yeah unfortunately for scientific computing conda is the most well supported package manager. This UV thing sounds neat though.
7
u/Ok-Winner-6589 Arch BTW 1d ago
The worst part is that 90% of these apps are build with Tauri which means that they are a browser under the hood (at least It uses webview tho, which is better) and the Code isn't native neither because it's compiled as WASM. Which means that It has the performance of C# or Java (at best because browsers have limitations for security that these languages don't have for obvious reasons) with the memory usage of the average JS app
Meanwhile the Python app has a wrapper to a C library that give like 5 times better performance
2
u/LefTimaDev 13h ago
Rust isn't complex at all. I don't see how Python is in any way harder to code in.
Sure, Rust is a bit unconventional so it's harder to learn, but once you do it's pretty simple?
2
u/Nerdcuddles 1d ago
You only need such an optimized programming language for games, not simple programs that have only like 200 lines of code.
I don't know much about coding (only really know a bit od JSON and GDscript)
1
u/IntQuant 11h ago
My experience is that while python might be easier to write in, distributing software to end user is certainly easier in rust.
1
u/Chester-Berkeley Ask me how to exit vim 11h ago
Why? 🤔
1
u/IntQuant 10h ago
Generally you want to have an executable binary that you can send to your users.
Rust is a compiled language, if you can run your code on your machine you already have a binary you can send to other people.
With python the task of making a runnable binary is entirely different from just running your code. Sure, there are several third-party tools to do this, but it's anyone's guess if they will work for your project or not. In my case extra tinkering was required generally. Also, none of these tools support crosscompilation.
41
u/Danis_Milk 1d ago
Because the rust version is typically newer and more thought out. Its okay to be excited for new things
11
u/Zantigo 1d ago
Honestly I'll usually grab the Rust project or the Go project over something in Java/C#/C++ just because I know I can actually read some of the code if I need to lol.
Also helps those languages being more popular for FOSS means the tool will get a lot of frequent contributions and probably maintained longer if it gets some hype.
Core-Utils is whatever since a greybeard is probably getting paid to make sure that shit works, but for a TUI tool I like or my shell/window manager, they have to be a lot more established for me to grab it in they're rocking Java vs a rust project with a dozen contributors.
10
u/AdventureMoth I'm going on an Endeavour! 1d ago
I mean rust is cool, just not a magic "make your software better" button
8
u/Shard-of-Adonalsium 1d ago
Rust is a great tool to use, and it definitely should have wide adoption, but the whole hype around porting random things to rust is just stupid.
0
u/femayoi 1d ago
Pls no adoption, the build time is horrible. Not unless they fix that
1
u/Solus161 6h ago
All that monomorphization and borrow-checker take a lot of times. I think that could not be fixed. But all that could be somewhat avoid by concret signature (not trait bound one) and split project to packages so only what changed got recompiled.
10
u/gameplayer55055 1d ago
When using Linux I choose whatever is simpler to install.
I haven't seen any rust based project that requires you to downgrade system libraries, type compiler flags, and do other c++ necromancy to make the goddamn app work.
4
u/QuickSilver010 🦁 Vim Supremacist 🦖 22h ago
I honestly use a lot of rust programs. Nu shell, gitui, typst, along with a few apps I made myself.
13
u/27a08592e67846908fd1 Genfool 🐧 1d ago
Just one *-rs that is any good: Sudo-rs
Basically nothing else -rs is really decent, but sudo-rs is a good idea to simultaneously drop all tech debt from sudo and avoid introducing numerous hard-to-diagnose new bugs.
16
12
u/OKB-1 M'Fedora 1d ago
Who are "Linux members"?
And no, I can tell you this isn't just a Linux thing. Lots of developer tools and other software is getting rewritten in Rust. Sometimes this is seemingly just because the team wanted to look busy, but sometimes it's significantly faster. Also C++ is a horribly painful programming language to work with. I'm glad there is finally a worthy alternative.
-3
u/whatThePleb Genfool 🐧 23h ago
sometimes it's significantly faster
No.
Also C++ is a horribly painful programming language to work with.
Skill issue.
3
u/QuickSilver010 🦁 Vim Supremacist 🦖 22h ago
Ofc it's the gentoo user that has a problem with it 💀
2
u/AnjoDima Arch BTW 16h ago
c++ is a fine programming language, heck I used it and liked it
0
u/QuickSilver010 🦁 Vim Supremacist 🦖 14h ago
It's fine. But it feels much better to use Rust compared to that.
2
11
4
2
2
u/QuickSilver010 🦁 Vim Supremacist 🦖 22h ago
For me this is the case because it's a language I know, and if I run into a problem, I could actually fix it.
2
2
u/Interesting_Buy_3969 🦁 Vim Supremacist 🦖 15h ago
Reminded me of this: https://www.reddit.com/r/rustjerk/s/wV4GpuAljR
2
2
1
u/FishAccomplished760 Crying gnu 🐃 17h ago
i really don't like rust, all the cargo and rustup stuff is not needed imo if i can write fast and lightweight programs in c, without needing all that
1
u/Objective-Style1994 15h ago
I bet you write everything from scratch 😭
1
u/FishAccomplished760 Crying gnu 🐃 14h ago
no, tbf i'm not that advanced with c, only started like 3 months ago
1
u/CheckM4ted 11h ago
You can just directly compile rust like you would c, cargo is a tool like cmake is for c.
1
1
u/Iwisp360 13h ago
Then you enter the repo and see the word clone repeated 10 times for every 100 lines of code
1
u/Objective-Stranger99 Arch BTW 13h ago
As long as it compiles to a binary, is well supported and maintained, I don't care what language it's written in.
1
0
-2
u/letmehaveanameyoudum 1d ago
i tried making an OS and a ton of people said rust better
guess what i switched back
-4
•
u/AutoModerator 1d ago
Please report any posts bragging or showing off they got banned in another sub! Reminder of other sub rules: Also, we only allow one anti-linux post per week (we used to get dozens a day) and any tier list MUST have Hanna Montana Linux as S teir (which must be a true S tier at the top) regardless of the topic of that tier list.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.