I can’t wait until pop os updates. Looking forward to cosmic.

Is rust like a super efficient language? Everyone always says good things about rust

Reply to this note

Please Login to reply.

Discussion

Same, been running the alpha on a 10 year old dell and it's beautiful

I’m on LTS 22.04 and I’m too scared to update to the alpha. Hopefully the update comes before summer lmao

Yeah, my daily driver is still on 22.04 but I have a spare super old laptop that distro hops. This is really nice though. Feels clean after some tweaks

Maybe I should try it out on my old laptop too lol. An old Sony with an Nvidia GT735M. It’s dual booted with whatever version of Pop I installed in 2021 but I went back into windows and can’t figure out how to go back to Linux lmao.

My daily driver is single booted because of that 🤣 But putting Linux on that old thing is what Linux pilled me. Went from a 15 minute boot up in windows to a 60 second (if that) boot in Linux.

Ironically, my gaming PC boots slightly slower in Linux than it did in windows. Maybe because of disk encryption, idk

Do it! Wipe the whole thing

The issue is that I’m lazy and the charging cable is finicky, I have to balance something on it for it to work 🤣

Rust is very efficient. It compiles to assembly just like C++, and I think it even uses C++ as an intermediary. Most C++ compilers make the binary SUPER fast. The only high level language that aignificantly beats it is a new one called Zig, which also is basically yet another take on C++.

I’m not much of a coder but C++ was the first language I messed with and I love everything about it. I’ll have to look into Rust, and Zig, after I learn a little more. I’m doing the freecodecamp courses and I’m learning JS right now and the basics of OOP and stuff

That's awesome!! Great languages. I'm familiar with C++ but only just starting to get familiar with Zig, last time I coded for fun or for my own projects. Feeling inspired to get back into both!

Rust is C++ done right. C++ has a ton of problems stemming from how different features interact. E.g. function overloading and implicit casting. It's riddled with potential to get memory vulnerabilities.

Rust fixes all this and keeps many of the good aspects of C++. I loved C++ too but after years of coding in it I started to get annoyed by the bugs. Rust was a salvation. It may sound crazy but the type system also prevents many non-memory bugs to the point that compiled programs often work correctly the first time. You don't get this in any other popular language.

Also OOP is overrated. Some of the concepts are useful but the way traditional languages implement objects is inflexible (can't implement an interface/abstract class for non-class types) and the idea of inheritance has problems around leaking internal details and comprehension.

Composition is much better than inheritance. The only problem with composition is if you want to delegate many things it gets annoying. This is not very frequent problem though and can be worked around using macros.

So far the only thing I’ve used objects for was a Roman numeral converter. I stored a bunch of objects in an array, with each object having two keys, the Arabic numeral, and its Roman counterpart. Then I built a recursive function and iterated through the array to convert a number to a Roman numeral.

I mean I’ve used objects in the courses but that was the first time I’ve used them in a project. The courses haven’t even gotten to OOP, so idk if that’s actually OOP

I suppose there was no inheritance, in which case you could say it's "a sane version of OOP".

It doesn't use C++ but LLVM, which is a library for making compilers is written in C++. But your point stands to a degree - it uses the same optimizer as a C++ compiler (clang). That doesn't mean it'll be automatically equally fast, it also depends on what IR you feed into LLVM. Now the interesting thing is Rust inputs IR that is in some rare occurrences worse but in many other it's better, so overall people tend to find their code equal or slightly faster.

And the cool thing is that the worse part can be affected by the programner. If you profile your code and find a problem there you can fix it.

Zig is not another take on C++, but C and it doesn't really beat Rust. Because you have complete control over Rust code you can modify it to produce exactly the same machine code Zig would. It might be possible Zig is a bit faster by default but it is also much harder to write correct programs in.

Zig doesn't try to address memory vulnerabilities at all. Rust was proven to prevent all memory bugs if you don't use any unsafe code (clearly marked with unsafe keyword) or if you prove your unsafe code to be sound.

I thought PopOS was abandoned? Always liked it, still prefer Debian and ((BTW)) but will try a new Pop

Definitely not abandoned. LTS 24.04 and COSMIC DE is nearing beta, should have a full release relatively soon

Programming languages are like penises; its how you use them that matters.

🤣