3,084 karma · joined March 2, 2017
I really struggle with yak shaving and perfection being the enemy of good as well, my ADHD often devolves into OCD like behaviors.
Once again, you could just use a language where they do this for you in the runtime instead of trying to reinvent (probably poorly) these ideas yourself.
You could have a garbaged collected language with an actor model, implicit yielding, easy runtime inspection, easy to learn, easy to teach, but instead you're picking Rust because it's cool. The author could have just used Elixir, or Go, and they'd spend half of the time they did learning and writing Rust code on the millionth web framework/userspace work stealing scheduler. I mean, they know Erlang, so why not Elixir? Why not Phoenix which they've been working on for like 10 years now. It actually astonishes me how often these very well trodden wheels get reinvented for no reason at all because web frameworks are apparently all developers work on these days.
Systems programming absolutely needs Rust, but this "it's a great fit for everything" has to stop. You don't need manual memory management. You don't need to think about lifetimes. You don't need explicit yielding. If you're choosing Rust because you just want to use a complicated language, learn a new toy, feel like your web app needs to go at light speed, maybe stop and consider that you're doing yourself and whoever your building your software for a disservice when something like Go is way easier and will cover the 95%. I have seen these garbage collected languages scale to incredible loads with good engineering that focused on good architecture rather than magic tools.
If on the other hand you actually need to write software that's going to run on a TPM, or in the kernel, interface with a new hardware protocol, ok, use Rust. C is obviously a huge danger and we've known that for a very long time. That's what Rust is good at, and trying to use it for everything just leads to code bases that are way more complicated than they ever needed to be. And truly, being as simple as possible is almost always the right way to go.
The strongest argument for Rust is its safety features. Abstractions have made C++ an unusable mess that even C++ developers complain about on a constant basis.
I absolutely need to worry about what assembly I get. I am often checking my assembly or looking for optimizations in my assembly. And I'm doing this across multiple architectures.
I do not want abstractions where they aren't needed. I want control, simplicity, a clear correspondence between what I'm writing and what logical assembly I'll be generating (logical, not physical). Most of all I want my code to be stupidly clear to the next person reading it. Systems programming isn't like writing a Java app, the domain is complicated enough that there's no room for abstraction astronauts to create problems where there are none.
I am still very wary of Rust. I have used it and will continue to use it, but it still teeters on being too complicated to be useful in the same way as C.
I’m worried about trading good vision with glasses for less that perfect and light sensitivity.
Personally I use emacs on a large dev machine running in a container in a terminal emulator. I can work from my iPad Pro, iPhone, MacBook Pro, Windows Desktop, Linux Desktop, or any guest machine by just adding one public key. Terminal Emulators are still just GUI apps and fit into the GUI ecosystem. Modern emulators also have true color support, GPU based rendering, full unicode support, support for custom fonts that add additional graphics, etc. You can make a terminal editor look like something incredibly modern if you want to. I personally don't find any value in that, for me the basic appearance of a terminal editor is less distracting.
- LSP support for completion, refactoring, listing.
- Tree sitter support for super fast highlighting.
- File supporter just like VSCodes.
- Project management tools.
- Fuzzing finding for everything, including files, commands, and buffers.
- Probably the best git client out there (magit). It's seriously magical.
- Terminals (can pipe terminal contents directly into other buffers).
- DAP mode for debugging, ctags, cscope.
It's all FOSS, worked on by a non-profit foundation and volunteers, it can be used as a GUI or in the terminal, and it's insanely extensible thanks to it being a small C core running a lisp environment. Lisp is easy to learn and fun, and if you don't like lisp there's still a bazillion more packages you can install for extra features.
Rather than mastering a bunch of programming languages they should have focused on one and built clout as a problem solver that doesn’t see a new shiny tool as a way to label their career. Boring popular language + focusing on building stuff and solving problems are the key to actual career growth.
Yes definitions are sometimes nebulous but that doesn’t mean words should lose all meaning and we should stop trying. Systems programming is a useful label for the boot stack, kernel, protocol implementations etc. which support the application layer.
If you are not an expert at C or C++ and being paid to learn Rust or Nim, you’re actively harming your career by not mastering the languages that people want today. If learning hot new fads brings you joy, then perhaps the intrinsic value outweighs the real world loss, but it’s the hard to swallow truth.
My whole setup can also be used with emacs. I have an emacs config as well and have tested using Eglot etc - basically the same setup as what I have in Vim.
The real power move here is to stick to a terminal based workflow. GUIs lock you down to a machine and a platform. Using a terminal based editor, tmux, etc. allows you to be instantly portable, infinitely flexible, and allows you to work anywhere.
SSH is also the other power tool. I mean SSH is actually insane. If you understand SSH agent forwarding, port forwarding, proxy jumping, you can actually be anywhere with any keys you want, proxy dev as a prod environment, use services on any computer anywhere you want, it’s absolutely incredible what you can do with SSH.
You’ll never convince me, however, that Microsoft’s embrace, extend, extinguish partially proprietary editor that uses the same LSPs as any other LSP client should be used by anyone. I wouldn’t touch it with a 100 foot pole.
There are turn key solutions for both Emac, Vim, and Neovim. They can all talk to LSPs, have DAP clients, fuzzy finders, file tree explorers, project managers, remote editing (terminal editors are by nature the ultimate remote editors).
Why isn’t he world would you put neovim inside of VSCode when you could just use neovim directly via GUI or terminal.
The vast majority of people spouting opinions on Rust don't even write systems software, and have never even compiled a kernel driver. Linux, systemd, grub are all written in C and continue to have fewer flaws than trivial userland applications that allow for privilege escelation. The kernel core is incredibly high quality C, and time would be better spent working on the actual kernel security model. Dennis Ritchie himself wrote a paper about the deficiencies of the Unix security model which was designed for a trusting and shared computing environment.
But of course updating the API surface isn't as sexy as writing in a new cool programming language.
Cargo culting this notion that Rust is good because it is a security silver bullet is both ignorant AND dangerous because it moves the focal point away from the areas that actually need work to make Linux more secure. It's also completely asinine to assume that poorly written Rust will have fewer flaws than expertly written C that has been vetted for literally decades.
Iterative improvement has ALWAYS been the answer over throw everything away and start fresh. C tooling has gotten better over the decades, the C standard has evolved, and people will continue to successfully write secure and performant applications in C.
Edit:
Also are you upset that people still use hammers in 2022? I guess if we aren't throwing away all of our tools instead of improving on their design we aren't really seeing any *Progress*
I am surprised Linus agreed to this given that he doesn’t like C++ and usually errs on the side of clear over clever, and we have yet to see tangible benefits of using Rust.