Rust enthusiast here. These are some other amazing rust tools: - zoxide (smart replacement for cd) - hexyl (nice hex viewer) - nomino (batch renaming) - sd (intuitive string find+replace tool) - du-dust (disk usage analyzer) - eva (cmd calculator replacement for bc) and there are many more :D
Yeah, I already did that @@flyingsquirrel3271 I realized I didn't ever thank you for the tools you pointed out. It has been a great time since I started using zoxide and eva. I appreciate it man!
As a professional programmer I can tell you, is not a meme, is just a really cool language that has a very innovative memory management that offers the safety of a garbage collected language, without the garbage collection or any overhead/bloat of runtime, because it uses a memory model of 'ownership' and borrowing with a powerful type system that C can only dream of.
The biggest reason for ripgrip (rg) wasn't mentioned: speed. When it comes to recursive searches, rg absolutely destroys stock grep. It's way, way faster. It's also clever: that pretty output that it does to make it more human readable only occurs when it knows the output is the terminal. If you pipe the rg results to anything else, it knows that and switches to the more typical line-by-line response.
@@aedd3307 ok. But in practice the experience is the less command. So in reality it replaces less more than cat (at least by default idk if theres any flags)
@@aedd3307 and that's exactly what a 'cat' replacement must not do. 'cat' comes from 'conCATenate'. The intended usage of 'cat' is to concatenate multiple files, as in '$ cat file1.txt file2.txt >> file1-2.txt'. Thus 'cat' must not mess with the input stream unless you explicitly tell it to do so. If you replace standard gnu utils the system relies on with tools behaving differently (like eg 'alias cat='bat') things will break.
You forget alacritty which is the terminal you are using in this video. For Rust, people are switching to it,because it is a very replacement to C++ that has similar performance while handling memory in a better way and being memory safe
@@Muttisuri yes you can use cargo but tbh using the package manager is better because updating the packages would be much easier as you dont have to keep doing cargo install --force every time theres a new update for exa
I am a Sr Software Engineer who does know Rust. Rust is a "immutability first" language. Often times the reasons vulnerabilities in code occur is due almost exclusively to mutable data in memory that's getting modified in real-time by other software trying to take advantage of the memory exploits. Rust makes mitigating this a first-class citizen. Which means, if immutability principles are followed, the amount of vulnerabilities will naturally fewer and, when they do occur, much less likely to have downstream effects, while being more easily maintained. Rust as an amazing system-level language. It is a C-level language. Other languages based on Rust are coming down the line at some point. NodeJS linked-libraries are being written in Rust as well as Web Asslembly. Web Assembly is a compile target of Rust for web applications. Rust has a TON to offer the software community.
immutable variables in rust only guarantee compile-time immutability. They can be modified if the program is hacked. On linux you need to mmap a memory region and use mprotect to prevent the data from being modified at runtime.
@@apestogetherstrong341 I get what you meant but that *can* actually happen in both Rust, C, and other languages. It's called "const promotion". Basically, when the compiler recognizes that it's safe to perform the calculation at compile time and store the result in the compiled binary as an optimization even though you didn't use explicitly use `const`. That said, Rust *does* help to give the compiler backend more freedom to do stuff like that by making stronger promises about how things will behave. (And, as such, it'd also be more amenable than C or C++ to automatic insertion of calls like mprotect.)
@@ssokolow well, const promotion can't happen with something like "let x = arg_1 + 2", in that case it's just incrementing the stack pointer and moving to it. But yeah, i get what you meant too
Go and Rust are popular modern systems programming languages for a reason. Built in build systems, package management, and testing suites lead to building robust fast reliable software very quickly. Just look at how fast the Pop!Os team can pump out really good systems level software with some of the best runtime safety in the game. Go routines provide a revolutionary way to implement concurrency. So many benefits behind these languages. They also lack all the "history" and backwards compatibility bloat issues that languages like C++ have. Referring to these languages as "memes" merely shows a drastic misunderstanding of what they accomplish.
I struggle to keep up with all the new CLI tools in the ecosystem... so it's great to just watch a roundup video like this one. Thanks and looking forward to more roundups!
@@randaldavis8976 It depends on the man page. For example, Linux programmer's manual have some nice usage examples. Anyway, I think you might make use of `tldr` command
@@randaldavis8976 pipe it through bat. It improves it :). Then in fish, make the bat an abbr for man, and there you go, it will always do this for you no extra typing
Sorry, but judging by the output of bat, it's not a replacement of cat, but for something like less or more. Because when using cat, you only expect the file content to show up on stdout. That's necessary for piping as well.
The reason your .bashrc didn't show up in fd is because fd ignores hidden files by default. Also fun fact - bat uses less under the hood (and i'll guess that procs does as well)
alias bat="cat" is bad advice, since you couldn't pipe the contents of a file in an interactive shell using cat anymore. Better use alias cat="bat -Pp" instead.
> I don't see why anyone wouldn't just replace `cat` Because it works just fine, and you really shouldn't be using it for reading files at the terminal (use `less`). Rust's advantage over C is its memory safety. `cat` is already memory safe. Thus as a user, there is no advantage to me switching.
You should check out nushell. It's a shell written in Rust. It's now at minimum viable product status. I doubt you'll use it as your main shell any time soon, but you may find the general concept to be interesting. Like fish it isn't aiming to be POSIX compliant, but is instead trying to evolve the shell as we know it.
@@IcarianHeights Right now? Probably. Long term, who knows. That said, nushell isn't trying to be a PS clone, it's just borrowing some of PS's concepts along with others (such as the functional programming paradigm).
Ignoring the discussion c/c++ vs rust, the problem I have with these rewrites is that they often change the default behavior and interface. There most probably is a reason why tools behave the way they do, even if you as a user don't understand or know it. cat, ls, find, ... are all POSIX standard utilities the system and a lot of software relies on that you simply cannot mess with. You want to reimplement gnu or standard utils? Fine, but retain default behavior and the interface. Otherwise, do not advertise them as replacements, bc they are not. They are alternatives, but not replacements.
@@bigpod replacements have exactly the same behavior and are completely interchangeable. Not the case with most of these rewrites. It's like changing APIs or interfaces. If they do not behave exactly the same, they are not interchangeable and thus not replacements. Also you should care about standards like POSIX because they guarantee interoperability and portability. But then again, if people do not understand the crucial importance of stable APIs and interfaces, and why there have to be reliant contracts for IPC, then they shouldn't program essential tools or services in the first place. Changing well-known, reliant and expected behavior, just for the sake of being different and promoting one self's ego (I know better, I do it my way), will break systems and make maintaining interoperability between processes a nightmare.
@@bigpod try the following then: $ sudo cp -f ~/.cargo/bin/bat $(command -v cat) $ sudo mkinitcpio # on arch, or update-initramfs on debian, check your distro $ sudo reboot With my understanding of replacement, this should work flawlessly, but then again, my understanding could quite possibly be flawed. Chances are, your system won't even boot anymore, because 'cat' is an essential binary used in the initial ramdisk to boot practically all unixoid OSes, which is possible thanks to standardization like POSIX. But since you do not care about standards, interoperability and portability, having to repair constantly breaking and non-functioning systems is probably not a problem for you anyways.
Dude, I absolutely love your channel. I've been an emacs user for seven years and switched to doom about a year ago before finding your channel. I always learn something useful from your channel and this vid is no exception.
it's not just a "less"-feel for e. g. bat command (and I would assume probably the process listing one, too), it literally just pipes into "less". AFAIR, the choice of pager is also configurable; might have some kind of environment variable.
Can I ask why you have the super hardcore mixer / sound setup in the background? - you could master Bon Jovi with all that - its not podcast / youtube stuff :)
Don't worry, in a few months the Rust crowd will have found something new and will replace the battle cry "Rewrite it in Rust", with "Rewrite it in ", perhaps Julia or VisualMalbolge. Fred Brooks is smiling somewhere.
@@lorenzocabrini As someone who's been in /r/rust/ since before v1.0, I have to say that we've always been annoyed at having to run damage control for the RIIR crowd. That said, Julia and VisualMalbolge haven't been the most loved language on StackOverflow's developer survey five years running.
bat vs cat - is If "bat file | grep 22" will get lines with 22 or line 22 too? How much slower is it? same question with all of them - old gnu utils can be chained - can these? Will they break old scripts?
the difference is that C is a programming language with the most basic features from the 1960s these features allow you describe low level stuff C is basically a template language for good programming patterns in ASM but this comes without safety and is prone to produce all sorts of damage like segfaults Rust is a programming language with sophisticated features from different languages including Programming Language Theory (research) including the experience of the last 30 years in the industry and lessons learned in C++ also allows you to describe low level stuff its memory model protects you from segfaults without producing any runtime dependency (due to that ivory tower research that hackers tend to despise) basically C is garage amateur carpentry while Rust is space tech engineering.
A year and a half has passed since this vid posted.Amazing stuff going on in Rust.Pkg's,like alacritty DT did showed us what cpu accelleration accomplishes.Rust doesn't do null reference (Tony Hoare conjured that up in 1965.Stated in public forum 2009 that null reference was $billion mistake.)Valid Rust doesn't,anyways but one can try unsafe Rust to get through compilation.Hazard pointers need to be dealt with correctly,though,or panic/crash at run time.Rust doesn't do garbage collection. 100% thread safety.Suscinct error handling.Zero cost abstractions.Rust compiler expects all but absolute perfection or no compilation.Even details minor 'errors' at run time,if any. ie #[error(unused-variable)] concider using '_' .The detail in Rust compiler info is something else. Even most experienced computer science phd's get stumped here and there in Rust.This language is a whole new ball game even though it's C++11 and C++20 at core. Alien/Greek to those familiar with earlier computer languages.Cat's out of the bag now and those who bawked before now realize they better get on board or get left behind.Rust stuff coming faster than tutorial vid producers can deep dive into it. async/await concurrency is revolutionary.It looks like Rust is going to blow the lid off everything ever written code before.
2:08 Why do youtubers use “clear”? Is there a benefit to it instead of using Ctrl+l? I’m genuinely curious. ‘Cause I’m so confused that you use a window tiling manager to be “productive”, saving every keystrokes as possible, not using a mouse, but still types “clear” in the terminal, which I think is commonly used. I’m not being rude really. I’m noob in Linux so I most probably am missing something.
I didn't know that Ctrl-L is not default for all terminals/shell. Good to know. 'Cause every distro and/or DE I tried with the built-in terminal, it just works. I'm also using vim keybinding in the shell (zsh) and Ctrl-L still works. I didn't rebind it or anything. Also, I understand if it's really for the youtube video showing what he's doing for the viewers. If that's the case, then that's totally a valid reason.
The only true con of Rust is that Gentoo user will wait more for their software to compile. Rust has a lot of pros (security, speed, compiler errors, memory management, ...) even though purists will always prefer C and Go may be seen as simpler.
Nobody who really prefers C should be called a purist. It's about the most impure language one could create. (Spoken as someone who's been programming C since the 80s....)
colorls is a ruby port of ls. I think colorls is better then exa because it has all of exa color stuff but it has file icons and has the date of the file that changes in tint based off date
Maybe lsd? (lib.rs/crates/lsd) I wouldn't want to have to wait for an ls replacement to wait for Ruby or Python or whatever else to seek around, gathering its files, if I'm still on an SSD-less machine and they're not already in the disk cache.
I liked most of this programs but I'm not switching to most of them because if you run for example cat the file stays in the terminal but with bat when I quit it isn't above(it don't stay in terminal) same with Procs
bat uses your $PAGER (less by default) to display its contents when in an interactive shell. This can be bypassed with the -P option, or configured to use a different one, or none.
I ve got an off topic question, as you are using the ergodox. There is something like the zsa moonlander have you ever heard of it if yes is it likely that you would give it a try if the one you currently got for example broke? Unfortunately there aren't many user videos and like reviews so that there would be more than just first impressions...
There are quite a decent number of reviews now. One guy even specializes in it. Just search for ergodox vs moonlander. A british guy did a fantastic review of both. There are some major differences, and I mean really significant to consider. I would tend to say moonlander si better, but ergodox also has ome points going for it. It depends what you want. I ordered my moonlander a week ago. Still 1 month to go till I receive it. Major differences I found: moonlander is more compact; better for travel. The thumb area swivels, this is more ergonomic and also allows for adjustment for smaller/bigger hands. Thumb area has better key redesign. Moonlander has RGB on every single key; not so on ergodox. Lot of keys do not have RGB. RGB is thicker, more robust and also since thumb area does not pivot, it has 1 less point of breakage in the hinges. In fact the reviewer in the youtube video I mentioned - his hinge on the thumb pad broke. Could have been a defect though. Moonlander uses type c cable (not that big deal though). Exterior row on each side has keys that are less wide on the moonlander, bringing the center point where you press closer to your finger, which could be important. These are some major highlights. Cost is the same. It was here, on DT video I learned of the ergodox and subsequently bought the moonlander! Super excited.
But cat doenst have these lines, because its often used in script, so bat is more a replacement for less Same for ripgrep. So using it as a alias should not be done Can you disable these visual extras with a flag?
Rust is basically C++ with an extremely strict compiler with far improved error messaging for developers. Rust is focused on avoiding bad security practices. You cannot compile code that has glaring security problems. It will stop and force you to fix your code and it Is pretty good about giving you a meaningful error message for the compile failure. Rust is far more opinionated and security focused than C++ which allows a developer to do whatever they want without much complaint, providing it compiles. Rust will stop someone from compiling bad code. Rust won't remove all security issues but it covers the big ones that are most common among most security exploits. This is why there is so much talk about using Rust for systems programming such as an OS kernel. Linux is looking to allow device drivers to be written in Rust. But that isn't the only reason to choose Rust for any development project. It's a very nice language and that compiler still gives you much better feedback when a compile fails. Lots of people have been dipping their toes into Rust and that is why there are so many nifty Rust programs. Rust programs can be highly performant.
I haven't programmed anything serious on Rust, but as far as I have seen about the language, it seems to be a modern and better version of C++, I have programmed on C++ since before C++11 was a thing and by today's standard C++ has became a very bizarre language. For example on C++ is a best practice to mark every variable as «const» or «constexpr» unless you need it to change while on Rust variables are «const» by default and you only need to mark them as «mut» when you need it. Some people have said that “Rust is not as efficient as C++” by comparing the ASM output of same codes, but that is not true, the compiler might not be as efficient, but IMHO the language is as efficient as C++.
@@ekrem_dincel Sorry I can't find the video where I found the original source, but I remember the video comparing the output of the same program using godbolt.org/
bat is not a replacement for cat, it looks more like less replacement. When I use cat in terminal I expect its content to stay, not get away after escape. Ripgrep - how it compares to silversearcher?
rg is significantly faster than ag. There's a simple example in the ripgrep README, as well as a link to a blog post detailing a more thorough comparison. As for bat, it pipes itself through $PAGER by default, but will behave identically to cat if it detects that it's not connected to an interactive terminal. (Both behaviours you can override through command-line arguments.)
@@ssokolow so, bat is more like a faster pygmentize, claiming it's a cat replacement is just misleading. Ok, I'll check that rg, maybe it worth a shot.
@@w01dnick With default settings on an interactive terminal, bat is sort of a "cat | pygmentize | nl | $PAGER" pipeline with some extra borders and "name of the file that's now beginning" headers added in. I won't dispute that it's not at all UNIXy as far as separation of concerns goes, but some of the formatting would be pretty difficult to do *without* something like a new standardized JSON schema for exchanging structured data through shell pipelines. That's always been the reason people who are more concerned with achieving an effect than having beautiful architecture have shied away from pipelines. There's no standard for exchanging structured data through them beyond "hope both sides have an option to treat NUL al "end of line" and NULNUL as "end of group". Heck, for exactly that reason, I'm preparing to write a new frontend for skim (a Rust fzf clone with some extra features including being usable as a library) to make it properly understand ripgrep's --json output mode. (I'm going to pair it up with a gzcat-esque tool for ripgrep's --pre option, which will autodetect and preprocess not just archives, but also do things like rendering HTML, EPUB, PDF, etc. to grep-friendly word-wrapped text. The point of the whole pipeline being to easily search through eBooks in the terminal.)
Does bat actually function like the cat command? That is dies it concatenate two files without the extended cimmands for color and line numbers? Remenber cat is made to be in a string of commands.
@@kellingc To quote the README, "Whenever bat detects a non-interactive terminal (i.e. when you pipe into another process or into a file), bat will act as a drop-in replacement for cat and fall back to printing the plain file contents"... though you can still use things like "--color=always" to override that.
bat seems like more of a less replacement than a cat replacement, unless it behaves differently in scripting contexts. The thing I want out of any cat program is 1) it outputs all the characters from a file in order, and 2) it concatenates the things I give it. The formatting makes it kinda useless as a cat replacement.
Cat is one of the few things in GNU Coreutils that doesn’t have any colorization in its output. Even ls is starting to use colorization by default in most cases. Disabling the colorization is pretty easy. There are a few fairly standard ways of testing if a file descriptor is connected to a terminal.
The linux kernel and most of the linux programs used to be written in C which is a very old language and even for those with experience it can be hard to write code in C, rust is a new programming language which can replace C because it's also low level, so it's very fast (not faster than C but close) and it has some features that make it easier to code in.
Recent benchmarks have shown that Rust can be faster than C. However, I don't think of Rust as a C replacement but an addition to systems programming. There will always be scenarios where it'll be preferable to use C/C++ in systems programming. Rust allows you to write low level code in a precise, short and abstract way - that is brilliant. But it also has very strict rules and sometimes doesn't let you do "your way of programming". Nevertheless, I do most of my programming in Rust. I just don't think of it as a replacement
@@lieywe3438 How can it be faster than C? Is it a compiler issue (poor optimisations by C compilers), or is it the langage itself? It seems to me that C is closer to machine code than Rust. So I don't get how Rust could be faster.
@@brinckau Rust, as a abstract language, has more optimization opportunities than C, the abstract language. It is about language semantics. And C is not more close to the hardware than Rust, they are same.
@@ekrem_dincel Assembly is not an abstract language, is converted to machine code without any optimization, and yet cannot be beaten in terms of speed (because in the end, everything is machine code, so writing machine code directly, or assembly code, makes it possible to do exactly the same as a C or Rust program would do). Provided you're good enough to write excellent code, of course. So I'm not convinced by your argument about optimization opportunities. I also believe that C is closer to machine code than Rust, because Rust has more abstractions than C. Otherwise, Rust would not have more optimization opportunities than C.
@@brinckau Every language is abstract. I mean the formal definition of the language regardless of current implementations. I didn't even say anything about assembly in my previous post. You can write inline assembly in Rust. Rust's abstractions are zero cost. And having useful abstractions not necessarily prevents you from having tools for writing low level code in your language. Rust have both safe references and unsafe raw pointers, for example. "So I'm not convinced by your argument about optimization opportunities." An example about language semantics: Rust inserts C's equivalent of "restrict" keyword everywhere, thanks to it's borrow checker, and this gives the more optimization opportunities. People use the "restrict" keyword in C so rarely. Not everything is theoretical.
I can't say about all of them, but ripgrep is specifically designed to be faster than all competitors (there's a whole blog post linked from the README going into great detail on it) and, while piping things through pygmentize is known to be a bit sluggish, bat uses a syntax highlighting library named syntect that's specifically designed to be lightning fast.
Yeah, python and rust for the most part of the code. I’m a programmer for the pop_os terminal source code, we do it mostly in python there but there are also great part of the base gnome code in rust.
there is *git-delta* which is a better diff, you can configure it with git and then see the diff in color, custom color schemes, and even side by side diff, with numbered lines on each side. It goes great with *bat*.
best thing is to use abbr (abbreviations) - something fish has. It is like alias, but before execution, fish replaces your alias on the CLI with the actual content of the abbr. So even in history scrolling, you see the actual command. It is ingenious!
Pretty sure people are switching to rust because it removes the performance issues of C++. As well, its syntax forces you to write clean code. Don't know the C family myself, but would definitely choose rust to learn if I were to pick it up.
Not really. The performance of C++ is not an issue. C++ is very performant. It's really just the modern syntax and concepts that lets you write safer code with not that much effort, without sacrificing performance.
In my experience Rust and C++ perform about the same (very close to C). I find Rust far more pleasant to work in though. I tend to write code faster in Rust, in part because it doesn't need as much boilerplate as C++. I spend less time debugging Rust code too.
And unlike in C and C++ getting 3rd party dependencies is not a realm of incomprehensible suffering. You just declare what version of the package you want to use and it works.
@@whenimnotaround If that is the case, why are still a lot of video games written in C, precisely for the reasons because it gives them more performance?
Assuming you aren't trolling here there's a clear difference between Rust, a programming language and Firefox, Thunderbird, etc which are internet programs. Rust is a programming language, it is harder to censor and almost conpletely pointless to do so anyways because of the abundance of other programming languages which aren't censored. Mozilla's other software like their browser and their email client are much easier to censor and there is a motivation to do so.
@@rahilarious Because Rust? What do you mean? I'm confused why we even have a list of rust programs to begin with. After they're distributed there shouldn't be much reason to care what language they were written in.
@@0xCAFEF00D Im just gonna copy and paste this response: because seamling everything written in rust is faster and safer because of rusts zero cost abstractions and inherit memory safety.
People love rust because it can be written at a pretty high level but without the disadvantages of other similar languages like go because it's not a garbage-collected making it wicked fast.
I got curious about how exa performed, so I timed it and it just crashed when I did it. Too bad. Really doubt that it would be better than BusyBox ls, so it's fine, I guess.
Better not say that. Rust people think their language is flawless and that Rust programs can't crash. You are going to shatter many people's worldview with statements like this. At least for the moment. By mid-2021, 82% of all those who claim Rust is the ultimate language will have found something new and moved on.
@@lorenzocabrini Please don't make generalizations like that. I take every opportunity to remind other Rust devs that Rustig needs to be revived. github.com/MichaelMauderer/rustig/
@@ekrem_dincel Nothing. Just mentioning that it happened. I tested every program mentioned in the video and now I'm using a bunch of them and all of them work just fine.
Replacing ls for exa, or grep for rg I think it's ok, but find for fd for me it's not advisable, I'll forget the syntax of the original, and every other computer or server you use will have the original find, not fd
@@edakimling133 No. fd and find have different arguments by design. My point was that his "I'll forget find's syntax" argument only holds true if you're masochistic enough to not have already wrapped `find` in convenient shortcuts for the common cases. ...and if you *have* already made shortcuts, you might as well use `fd` since there's a better chance everyone will be using the same shortcuts.
A big part of it is that they want to write Rust code but they don't have any original ideas so they pick an existing tool that they think they might be able to enhance.
@@basedfacistman The whole point of having a compiler with same programming language will then be ignored. There is no point of rewriting something to reproduce same output (grown compilers such as gcc will take years to fully replicate in other language if not giving up before). It's like you are telling someone to rewrite something just because rust is superior, in the end will it be worth it?
@Nate Higgers That's one thing I hate about rust binaries. I remember one day when I used a musl static compilation to get a >60 mb executable for an ftp client, where In c++ I managed to get 4-5 mb
Rust language would be my top choice for a programming language to be stranded on a desert island with a laptop and solar powered battery recharger - if could have only one language choice. It's intrinsically versatile enough to be applied to about any programming domain - with Web Assembly support, could even be used to write programs that run in the browser. And presumably being stranded on said island, would have plenty of time to master its borrow checker and annotations - and the cool kids stuff like pattern matching and other functional programming features. And finally get around to learning how to write macros in its powerful macro sub-language.
haha it's COVID time, we're all stuck on an island...your wish came true...get cracking....as for me, I live offgrid in the mountains in Canada, so, pretty much the scenario you already describe....
You'd have plenty of time to program, on this desert island, for about a week, until you became so weak from lack of food that you couldn't type any more. :-(
You have to feed the cults! You can have a bad design written in the fastest language and it could still run slower than a good design written in python
"Whenever bat detects a non-interactive terminal (i.e. when you pipe into another process or into a file), bat will act as a drop-in replacement for cat and fall back to printing the plain file contents"
Not a programmer by trade, but until now, I come to love every Rust program I ever used. Fast, efficient, easy to use. _fd_ is such a breeze compared to the standard _find_ command. _exa_ has won my _ls_ alias. I'm still looking for a window manager written in Rust. Will you dive into that, DT?
@@itsamcb Not really. Windows 10 was one of the most important reasons for me to switch to Linux. 😂 Seriously, is anything about Windows actually written in Rust? I thought it was all C++?
@@marioschroers7318 what he is trying to say is that if you love bloated stuff over very efficient and already working standar tools the you should as well go ahead and get windows
@@JosueRodriguez08 The things is that, for instance, ripgrep and fd are much more efficient than their standard counterparts (see their benchmarks on their github pages). All of that with better memory guarantees. Go ahead and go use "more" instead of "less", why not.
Rust enthusiast here. These are some other amazing rust tools:
- zoxide (smart replacement for cd)
- hexyl (nice hex viewer)
- nomino (batch renaming)
- sd (intuitive string find+replace tool)
- du-dust (disk usage analyzer)
- eva (cmd calculator replacement for bc)
and there are many more :D
lmao what was that? Are these bots?
@@paulosantana9607 Yes they certainly are. I saw the exact same comments under other videos as well. Super annoying. I hope nobody falls for this BS.
It's spam. I recommend you report these as soon as you see them.
Yeah, I already did that
@@flyingsquirrel3271 I realized I didn't ever thank you for the tools you pointed out. It has been a great time since I started using zoxide and eva. I appreciate it man!
Ytop is a nice alternative for top/htop as well
Rewrite every GNU tool in Rust so you can say "I use Rust/Linux"
Rewrite Linux in Rust and call it Rusty Linux
Goals
@@Handskemager no.. why would it? as long as if it's FOSS..
btw
@@Handskemager considering they are all clones of UNIX commands, no
I think using Rust is the new "i use arch btw"
Then there’s me, installing exa on macOS (I’m not joking, it’s available)
@@ultradude5410 yeah most of us know about homebrew or macports
bat works on windows :)
@@YoloMonstaaa Man bat is just amazing, i have to admit
@William Berry no it isn't
As a professional programmer I can tell you, is not a meme, is just a really cool language that has a very innovative memory management that offers the safety of a garbage collected language, without the garbage collection or any overhead/bloat of runtime, because it uses a memory model of 'ownership' and borrowing with a powerful type system that C can only dream of.
Yeah RAII didn't exist before Rust. Of course C++ is the same as C. Of course it's not a meme, with all zealots telling to rewrite programs in Rust.
@@SbF6Hwell, actually rust memory system is not based on RAII
@@СергейГордиенко-п4д Yeah it is based around furry magic.
@@SbF6H No,, just on type system. Why so arrogant lol
@@СергейГордиенко-п4д What? Furry magic is omnipresent.
The biggest reason for ripgrip (rg) wasn't mentioned: speed. When it comes to recursive searches, rg absolutely destroys stock grep. It's way, way faster. It's also clever: that pretty output that it does to make it more human readable only occurs when it knows the output is the terminal. If you pipe the rg results to anything else, it knows that and switches to the more typical line-by-line response.
Same goes for bat when piping it to another program
How does it implement that differentiation? Does the stdout printing module have some option for that
Bat really isnt a cat replacement it's more of a less/more replacement
True.
not true though, bat justs highlights syntax and adds line numbers, then sends its output to less
@@aedd3307 ok. But in practice the experience is the less command. So in reality it replaces less more than cat (at least by default idk if theres any flags)
can do the same with cat -n .zshrc | less
@@aedd3307 and that's exactly what a 'cat' replacement must not do. 'cat' comes from 'conCATenate'. The intended usage of 'cat' is to concatenate multiple files, as in '$ cat file1.txt file2.txt >> file1-2.txt'. Thus 'cat' must not mess with the input stream unless you explicitly tell it to do so. If you replace standard gnu utils the system relies on with tools behaving differently (like eg 'alias cat='bat') things will break.
You forget alacritty which is the terminal you are using in this video.
For Rust, people are switching to it,because it is a very replacement to C++ that has similar performance while handling memory in a better way and being memory safe
Yes, also.....broot. Another Rust program that I have talked about on video.
haha, exactly what I was commenting!
Actually rust goes lower than c++
On c level
@@Reliktish Nope, Rust has vectors,HashMaps(python dict),VecDeques,BTreeMaps, also you rarely interact with pointers directly ,like modern C++.
@@siddharthupadhyay6347 yet is it designed to be used in the fields that are exclusive to C, like embedded systems
Bat should have beed called "rat", because r is for rust
brat
Pin this comment already 😂😂
Ah but cat gets to eat rat. At least bat could get away
But bats are flying rats (check their faces in google image)
Thank god alias exists
The major thing with ripgrep for me is the performance. You can ripgrep through big projects considerably faster than with grep.
exa is available in the official Arch repos, not just the AUR.
You can just use cargo, installing it is realy easy, like easyer than npm in my opinion.
@@Muttisuri Of course you can, I just thought I'd mention it was in the official Arch repositories because DT said it was in the AUR.
@@Muttisuri yes you can use cargo but tbh using the package manager is better because updating the packages would be much easier as you dont have to keep doing cargo install --force every time theres a new update for exa
@@Muttisuri Why not just use an AUR helper like Paru?
@@raphtlw
I'm not 100% sure but doesn't cargo update the package if it finds a more recent version?
I am a Sr Software Engineer who does know Rust. Rust is a "immutability first" language. Often times the reasons vulnerabilities in code occur is due almost exclusively to mutable data in memory that's getting modified in real-time by other software trying to take advantage of the memory exploits. Rust makes mitigating this a first-class citizen. Which means, if immutability principles are followed, the amount of vulnerabilities will naturally fewer and, when they do occur, much less likely to have downstream effects, while being more easily maintained.
Rust as an amazing system-level language. It is a C-level language. Other languages based on Rust are coming down the line at some point. NodeJS linked-libraries are being written in Rust as well as Web Asslembly. Web Assembly is a compile target of Rust for web applications.
Rust has a TON to offer the software community.
immutable variables in rust only guarantee compile-time immutability. They can be modified if the program is hacked. On linux you need to mmap a memory region and use mprotect to prevent the data from being modified at runtime.
hey mr. Sr Software Engineer, could you explain how local variables in a function which are on the stack are immutable at the binary level?
@@apestogetherstrong341 I get what you meant but that *can* actually happen in both Rust, C, and other languages. It's called "const promotion". Basically, when the compiler recognizes that it's safe to perform the calculation at compile time and store the result in the compiled binary as an optimization even though you didn't use explicitly use `const`.
That said, Rust *does* help to give the compiler backend more freedom to do stuff like that by making stronger promises about how things will behave. (And, as such, it'd also be more amenable than C or C++ to automatic insertion of calls like mprotect.)
@@ssokolow well, const promotion can't happen with something like "let x = arg_1 + 2", in that case it's just incrementing the stack pointer and moving to it. But yeah, i get what you meant too
@@notuxnobux If you change a value of immutable variable via hacks or something on runtime you will probably introduce a UB in the program.
Getting started on Rust:
Step 1: Gather some resources with your rock
Ily
Aye, I never made it far with my rock. Were good days playing it.
Vscode already uses rg for its workspace search feature IIRC. It's simply too much faster than grep to ignore
DT: "I am not a programmer."
Also DT: *starts programming in Haskell*
The best thing about ripgrep is, that it is insanely fast! Very useful for searching a string in a file recursively.
All I am waiting for now is a window manager written in Rust. Thats all we are missing
There is LeftWM
Go and Rust are popular modern systems programming languages for a reason. Built in build systems, package management, and testing suites lead to building robust fast reliable software very quickly. Just look at how fast the Pop!Os team can pump out really good systems level software with some of the best runtime safety in the game. Go routines provide a revolutionary way to implement concurrency. So many benefits behind these languages. They also lack all the "history" and backwards compatibility bloat issues that languages like C++ have. Referring to these languages as "memes" merely shows a drastic misunderstanding of what they accomplish.
Go is not for systems programming.
How do you get those awesome "images" when you start up your terminal?
Tokei actually also recognizes embeded languages. So if you have javascript in your html it shows that as separate.
that's so cool 🤯
I struggle to keep up with all the new CLI tools in the ecosystem... so it's great to just watch a roundup video like this one. Thanks and looking forward to more roundups!
I really hate when command line tools have no man page.
Ripgrep has one. You just have to use rg instead of ripgrep
@@Ricojo777 I was talking in general actually, this video just reminded me. But thanks for letting me know! :D
I always thought man pages could be a whole lot better. include the top 10 useage examples for one idea
@@randaldavis8976 It depends on the man page. For example, Linux programmer's manual have some nice usage examples.
Anyway, I think you might make use of `tldr` command
@@randaldavis8976 pipe it through bat. It improves it :). Then in fish, make the bat an abbr for man, and there you go, it will always do this for you no extra typing
You’d probably like the bat-extras repo. turns tools like ripgrep and man into batgrep and batman. so nice. also works well with diff-so-fancy.
Excellent list. One more: delta -- a viewer for git and diff output - 🦀⚙️ - it is fantastic. Thanks for doing the video!
For Arch based, I much prefer Paru to Pacman.
Sorry, but judging by the output of bat, it's not a replacement of cat, but for something like less or more.
Because when using cat, you only expect the file content to show up on stdout. That's necessary for piping as well.
This is my thought as well. Bat is nice but not a replacement for sure.
@@koderkev42 bat checks for the output method first, that formatting only happens in terminal, not piping; read the man.
The reason your .bashrc didn't show up in fd is because fd ignores hidden files by default.
Also fun fact - bat uses less under the hood (and i'll guess that procs does as well)
extra fun fact: you can add the -u flag up to three times to make fd ignore less and less files. if I *really* wanna make sure, I run fd -uuu
alias bat="cat" is bad advice, since you couldn't pipe the contents of a file in an interactive shell using cat anymore. Better use alias cat="bat -Pp" instead.
> I don't see why anyone wouldn't just replace `cat`
Because it works just fine, and you really shouldn't be using it for reading files at the terminal (use `less`).
Rust's advantage over C is its memory safety. `cat` is already memory safe. Thus as a user, there is no advantage to me switching.
DT showing rust programs in a terminal made in rust.
Alacrity is written in rust if remember well
In a rusty computer, and that'd be perfectly rusted.
You should check out nushell. It's a shell written in Rust. It's now at minimum viable product status.
I doubt you'll use it as your main shell any time soon, but you may find the general concept to be interesting. Like fish it isn't aiming to be POSIX compliant, but is instead trying to evolve the shell as we know it.
He did
@@JosueRodriguez08 It's been a year since then. Probably worth another look.
@@IcarianHeights Right now? Probably. Long term, who knows. That said, nushell isn't trying to be a PS clone, it's just borrowing some of PS's concepts along with others (such as the functional programming paradigm).
Ignoring the discussion c/c++ vs rust, the problem I have with these rewrites is that they often change the default behavior and interface. There most probably is a reason why tools behave the way they do, even if you as a user don't understand or know it. cat, ls, find, ... are all POSIX standard utilities the system and a lot of software relies on that you simply cannot mess with. You want to reimplement gnu or standard utils? Fine, but retain default behavior and the interface. Otherwise, do not advertise them as replacements, bc they are not. They are alternatives, but not replacements.
@@bigpod replacements have exactly the same behavior and are completely interchangeable. Not the case with most of these rewrites. It's like changing APIs or interfaces. If they do not behave exactly the same, they are not interchangeable and thus not replacements. Also you should care about standards like POSIX because they guarantee interoperability and portability. But then again, if people do not understand the crucial importance of stable APIs and interfaces, and why there have to be reliant contracts for IPC, then they shouldn't program essential tools or services in the first place. Changing well-known, reliant and expected behavior, just for the sake of being different and promoting one self's ego (I know better, I do it my way), will break systems and make maintaining interoperability between processes a nightmare.
@@bigpod try the following then:
$ sudo cp -f ~/.cargo/bin/bat $(command -v cat)
$ sudo mkinitcpio # on arch, or update-initramfs on debian, check your distro
$ sudo reboot
With my understanding of replacement, this should work flawlessly, but then again, my understanding could quite possibly be flawed. Chances are, your system won't even boot anymore, because 'cat' is an essential binary used in the initial ramdisk to boot practically all unixoid OSes, which is possible thanks to standardization like POSIX. But since you do not care about standards, interoperability and portability, having to repair constantly breaking and non-functioning systems is probably not a problem for you anyways.
@@onehaxxor8574 bat works exactly like cat when not in interactive terminal output, check before talking ?
Dude, I absolutely love your channel. I've been an emacs user for seven years and switched to doom about a year ago before finding your channel. I always learn something useful from your channel and this vid is no exception.
Can you do a video on wtftw, a wm written in rust.
it's not just a "less"-feel for e. g. bat command (and I would assume probably the process listing one, too), it literally just pipes into "less".
AFAIR, the choice of pager is also configurable; might have some kind of environment variable.
Can I ask why you have the super hardcore mixer / sound setup in the background? - you could master Bon Jovi with all that - its not podcast / youtube stuff :)
You know there is even an os written in rust called "redox".
what happened to rewrite everything in javascript?
That died when people realized that JavaScript cannot run on bare metal.
@@enderger5308 quickjs technically can do it.
Don't worry, in a few months the Rust crowd will have found something new and will replace the battle cry "Rewrite it in Rust", with "Rewrite it in ", perhaps Julia or VisualMalbolge. Fred Brooks is smiling somewhere.
JS is bloat. Rewrite in binary
@@lorenzocabrini As someone who's been in /r/rust/ since before v1.0, I have to say that we've always been annoyed at having to run damage control for the RIIR crowd. That said, Julia and VisualMalbolge haven't been the most loved language on StackOverflow's developer survey five years running.
Hey dt! Could you take a look at the ion shell?
bat vs cat - is If "bat file | grep 22" will get lines with 22 or line 22 too? How much slower is it?
same question with all of them - old gnu utils can be chained - can these? Will they break old scripts?
bat is designed to turn off all its fancy features and behave just like cat if you feed it into a shell pipeline.
the difference is that
C is a programming language with
the most basic features from the 1960s
these features allow you describe low level stuff
C is basically a template language for good programming patterns in ASM
but this comes without safety and is prone to produce all sorts of damage like segfaults
Rust is a programming language with
sophisticated features from different languages
including Programming Language Theory (research)
including the experience of the last 30 years in the industry and lessons learned in C++
also allows you to describe low level stuff
its memory model protects you from segfaults without producing any runtime dependency (due to that ivory tower research that hackers tend to despise)
basically C is garage amateur carpentry while Rust is space tech engineering.
A year and a half has passed since this vid posted.Amazing stuff going on in Rust.Pkg's,like alacritty DT did showed us what cpu accelleration accomplishes.Rust doesn't do null reference (Tony Hoare conjured that up in 1965.Stated in public forum 2009 that null reference was $billion mistake.)Valid Rust doesn't,anyways but one can try unsafe Rust to get through compilation.Hazard pointers need to be dealt with correctly,though,or panic/crash at run time.Rust doesn't do garbage collection. 100% thread safety.Suscinct error handling.Zero cost abstractions.Rust compiler expects all but absolute perfection or no compilation.Even details minor 'errors' at run time,if any. ie #[error(unused-variable)] concider using '_' .The detail in Rust compiler info is something else.
Even most experienced computer science phd's get stumped here and there in Rust.This language is a whole new ball game even though it's C++11 and C++20 at core.
Alien/Greek to those familiar with earlier computer languages.Cat's out of the bag now and those who bawked before now realize they better get on board or get left behind.Rust stuff coming faster than tutorial vid producers can deep dive into it. async/await concurrency is revolutionary.It looks like Rust is going to blow the lid off everything ever written code before.
2:08 Why do youtubers use “clear”? Is there a benefit to it instead of using Ctrl+l? I’m genuinely curious. ‘Cause I’m so confused that you use a window tiling manager to be “productive”, saving every keystrokes as possible, not using a mouse, but still types “clear” in the terminal, which I think is commonly used. I’m not being rude really. I’m noob in Linux so I most probably am missing something.
He uses vi key binding in the shell, Ctrl-L does nothing there.
In zsh with vi mode ctrl-L works
I didn't know that Ctrl-L is not default for all terminals/shell. Good to know. 'Cause every distro and/or DE I tried with the built-in terminal, it just works. I'm also using vim keybinding in the shell (zsh) and Ctrl-L still works. I didn't rebind it or anything. Also, I understand if it's really for the youtube video showing what he's doing for the viewers. If that's the case, then that's totally a valid reason.
Bat just looks like nvim -R or Vim but with less functionality. Which you could easily alias to "nvR", "nvr", "vir" or "viR" inside your bashrc file.
The only true con of Rust is that Gentoo user will wait more for their software to compile. Rust has a lot of pros (security, speed, compiler errors, memory management, ...) even though purists will always prefer C and Go may be seen as simpler.
Nobody who really prefers C should be called a purist. It's about the most impure language one could create. (Spoken as someone who's been programming C since the 80s....)
@@peter9477 What do you mean by "impure"?
@@charlubermensch2395 You used the term "purists". In that context, I used impure to mean "the type of language a purist would not like".
rust-bin.
colorls is a ruby port of ls. I think colorls is better then exa because it has all of exa color stuff but it has file icons and has the date of the file that changes in tint based off date
Maybe lsd? (lib.rs/crates/lsd) I wouldn't want to have to wait for an ls replacement to wait for Ruby or Python or whatever else to seek around, gathering its files, if I'm still on an SSD-less machine and they're not already in the disk cache.
I liked most of this programs but I'm not switching to most of them because if you run for example cat the file stays in the terminal but with bat when I quit it isn't above(it don't stay in terminal) same with Procs
bat uses your $PAGER (less by default) to display its contents when in an interactive shell. This can be bypassed with the -P option, or configured to use a different one, or none.
@@davidh.4944 Thanks! Now I can switch to it.
i want to create my own distro, create my own command, my own planet, my own universe, my own species and my own dna
I ve got an off topic question, as you are using the ergodox. There is something like the zsa moonlander have you ever heard of it if yes is it likely that you would give it a try if the one you currently got for example broke? Unfortunately there aren't many user videos and like reviews so that there would be more than just first impressions...
There are quite a decent number of reviews now. One guy even specializes in it. Just search for ergodox vs moonlander. A british guy did a fantastic review of both. There are some major differences, and I mean really significant to consider. I would tend to say moonlander si better, but ergodox also has ome points going for it. It depends what you want. I ordered my moonlander a week ago. Still 1 month to go till I receive it.
Major differences I found: moonlander is more compact; better for travel. The thumb area swivels, this is more ergonomic and also allows for adjustment for smaller/bigger hands. Thumb area has better key redesign. Moonlander has RGB on every single key; not so on ergodox. Lot of keys do not have RGB. RGB is thicker, more robust and also since thumb area does not pivot, it has 1 less point of breakage in the hinges. In fact the reviewer in the youtube video I mentioned - his hinge on the thumb pad broke. Could have been a defect though. Moonlander uses type c cable (not that big deal though). Exterior row on each side has keys that are less wide on the moonlander, bringing the center point where you press closer to your finger, which could be important. These are some major highlights. Cost is the same. It was here, on DT video I learned of the ergodox and subsequently bought the moonlander! Super excited.
But cat doenst have these lines, because its often used in script, so bat is more a replacement for less
Same for ripgrep. So using it as a alias should not be done
Can you disable these visual extras with a flag?
It's done automatically when not outputted to an interactive terminal
Rust is basically C++ with an extremely strict compiler with far improved error messaging for developers. Rust is focused on avoiding bad security practices. You cannot compile code that has glaring security problems. It will stop and force you to fix your code and it Is pretty good about giving you a meaningful error message for the compile failure. Rust is far more opinionated and security focused than C++ which allows a developer to do whatever they want without much complaint, providing it compiles. Rust will stop someone from compiling bad code. Rust won't remove all security issues but it covers the big ones that are most common among most security exploits. This is why there is so much talk about using Rust for systems programming such as an OS kernel. Linux is looking to allow device drivers to be written in Rust. But that isn't the only reason to choose Rust for any development project. It's a very nice language and that compiler still gives you much better feedback when a compile fails. Lots of people have been dipping their toes into Rust and that is why there are so many nifty Rust programs. Rust programs can be highly performant.
I haven't programmed anything serious on Rust, but as far as I have seen about the language, it seems to be a modern and better version of C++, I have programmed on C++ since before C++11 was a thing and by today's standard C++ has became a very bizarre language.
For example on C++ is a best practice to mark every variable as «const» or «constexpr» unless you need it to change while on Rust variables are «const» by default and you only need to mark them as «mut» when you need it.
Some people have said that “Rust is not as efficient as C++” by comparing the ASM output of same codes, but that is not true, the compiler might not be as efficient, but IMHO the language is as efficient as C++.
For which code Rust outputs worse ASM then C++?
@@ekrem_dincel Sorry I can't find the video where I found the original source, but I remember the video comparing the output of the same program using godbolt.org/
bat is not a replacement for cat, it looks more like less replacement. When I use cat in terminal I expect its content to stay, not get away after escape.
Ripgrep - how it compares to silversearcher?
rg is significantly faster than ag. There's a simple example in the ripgrep README, as well as a link to a blog post detailing a more thorough comparison.
As for bat, it pipes itself through $PAGER by default, but will behave identically to cat if it detects that it's not connected to an interactive terminal. (Both behaviours you can override through command-line arguments.)
@@ssokolow so, bat is more like a faster pygmentize, claiming it's a cat replacement is just misleading.
Ok, I'll check that rg, maybe it worth a shot.
@@w01dnick With default settings on an interactive terminal, bat is sort of a "cat | pygmentize | nl | $PAGER" pipeline with some extra borders and "name of the file that's now beginning" headers added in.
I won't dispute that it's not at all UNIXy as far as separation of concerns goes, but some of the formatting would be pretty difficult to do *without* something like a new standardized JSON schema for exchanging structured data through shell pipelines.
That's always been the reason people who are more concerned with achieving an effect than having beautiful architecture have shied away from pipelines. There's no standard for exchanging structured data through them beyond "hope both sides have an option to treat NUL al "end of line" and NULNUL as "end of group".
Heck, for exactly that reason, I'm preparing to write a new frontend for skim (a Rust fzf clone with some extra features including being usable as a library) to make it properly understand ripgrep's --json output mode. (I'm going to pair it up with a gzcat-esque tool for ripgrep's --pre option, which will autodetect and preprocess not just archives, but also do things like rendering HTML, EPUB, PDF, etc. to grep-friendly word-wrapped text. The point of the whole pipeline being to easily search through eBooks in the terminal.)
the standard find command also has an --exec to run additional commands with the find results.
Does bat actually function like the cat command? That is dies it concatenate two files without the extended cimmands for color and line numbers? Remenber cat is made to be in a string of commands.
I just tested it. Yes, it can concatenate. Though, if you want strictly like how cat functions , just add the '--plain' flag.
@@whaaaaaaaaaaaaaaaaaaaaaaaaaat Well, that's cool.
@@kellingc To quote the README, "Whenever bat detects a non-interactive terminal (i.e. when you pipe into another process or into a file), bat will act as a drop-in replacement for cat and fall back to printing the plain file contents"... though you can still use things like "--color=always" to override that.
bat seems like more of a less replacement than a cat replacement, unless it behaves differently in scripting contexts. The thing I want out of any cat program is 1) it outputs all the characters from a file in order, and 2) it concatenates the things I give it. The formatting makes it kinda useless as a cat replacement.
It behaves differently in scripting/piping. you should check it's docs, they have some nice options.
Cat is one of the few things in GNU Coreutils that doesn’t have any colorization in its output. Even ls is starting to use colorization by default in most cases. Disabling the colorization is pretty easy. There are a few fairly standard ways of testing if a file descriptor is connected to a terminal.
I have been running bottom as a rust replacement for htop and it looks really nice with a lot of good info.
The linux kernel and most of the linux programs used to be written in C which is a very old language and even for those with experience it can be hard to write code in C, rust is a new programming language which can replace C because it's also low level, so it's very fast (not faster than C but close) and it has some features that make it easier to code in.
Recent benchmarks have shown that Rust can be faster than C. However, I don't think of Rust as a C replacement but an addition to systems programming. There will always be scenarios where it'll be preferable to use C/C++ in systems programming. Rust allows you to write low level code in a precise, short and abstract way - that is brilliant. But it also has very strict rules and sometimes doesn't let you do "your way of programming". Nevertheless, I do most of my programming in Rust. I just don't think of it as a replacement
@@lieywe3438 How can it be faster than C? Is it a compiler issue (poor optimisations by C compilers), or is it the langage itself? It seems to me that C is closer to machine code than Rust. So I don't get how Rust could be faster.
@@brinckau Rust, as a abstract language, has more optimization opportunities than C, the abstract language. It is about language semantics.
And C is not more close to the hardware than Rust, they are same.
@@ekrem_dincel Assembly is not an abstract language, is converted to machine code without any optimization, and yet cannot be beaten in terms of speed (because in the end, everything is machine code, so writing machine code directly, or assembly code, makes it possible to do exactly the same as a C or Rust program would do). Provided you're good enough to write excellent code, of course.
So I'm not convinced by your argument about optimization opportunities.
I also believe that C is closer to machine code than Rust, because Rust has more abstractions than C. Otherwise, Rust would not have more optimization opportunities than C.
@@brinckau Every language is abstract. I mean the formal definition of the language regardless of current implementations.
I didn't even say anything about assembly in my previous post.
You can write inline assembly in Rust.
Rust's abstractions are zero cost. And having useful abstractions not necessarily prevents you from having tools for writing low level code in your language. Rust have both safe references and unsafe raw pointers, for example.
"So I'm not convinced by your argument about optimization opportunities."
An example about language semantics:
Rust inserts C's equivalent of "restrict" keyword everywhere, thanks to it's borrow checker, and this gives the more optimization opportunities. People use the "restrict" keyword in C so rarely. Not everything is theoretical.
How can I get a header art like yours? I love the random art at the beginning of the terminal.
Nvm I found it ua-cam.com/video/U6e05Y3DC5E/v-deo.html
Cool. But are these more efficient in relation to the added features or just more colorful?
I can't say about all of them, but ripgrep is specifically designed to be faster than all competitors (there's a whole blog post linked from the README going into great detail on it) and, while piping things through pygmentize is known to be a bit sluggish, bat uses a syntax highlighting library named syntect that's specifically designed to be lightning fast.
If I'm not wrong, gnome has been adapting their gui apps to rust as well
gtk has offical rust bindings
@@basedfacistman yup and GTK-rs is pretty simple to use
Yeah, python and rust for the most part of the code. I’m a programmer for the pop_os terminal source code, we do it mostly in python there but there are also great part of the base gnome code in rust.
Yeah. They see it as a way to leapfrog what they tried to create with Vala.
(Sorry if it's already been said. ""View 3 replies" is bugging out.)
there is *git-delta* which is a better diff, you can configure it with git and then see the diff in color, custom color schemes, and even side by side diff, with numbered lines on each side. It goes great with *bat*.
Great video also with great comments by viewers. I've installed all of these on Raspberry Pi's and m1 Mac.
wont alias to legacy command names break bash and other scripts since the output and flags differ?
best thing is to use abbr (abbreviations) - something fish has. It is like alias, but before execution, fish replaces your alias on the CLI with the actual content of the abbr. So even in history scrolling, you see the actual command. It is ingenious!
So make them packages and available to the ecosystem as is already established, *nbd*?
Can you please tell me how to get suggestions in terminal while typing? Thanks
that comes with the shell he uses - called 'fish'. Install it and you will get autocompletion support. It is awesome
the real question is when rust will be rewritten in emacs lisp
Soon
Hey dt what wm are you using now?
XMonad for this video.
Thanks 😊
my man stole luke's beard
Hey DT, what's the best AUR helper?? Is it yay, because it's 3 letters?? Or is there more to it??
Good video, always enjoy the CLI stuff. Better to me than distro hopping videos.
He's DISTROtube
@@elinoamrichter162 Yeah I know, just stating my opinion.
@Grisosthone No, I have many, you're right, I cannot have ONE !!!
@@jessegodsey Keep talking like that and you're gonna get yourself cancelled
@@kieranwoodward575 Lol, o.k.
Pretty sure people are switching to rust because it removes the performance issues of C++. As well, its syntax forces you to write clean code. Don't know the C family myself, but would definitely choose rust to learn if I were to pick it up.
Not really. The performance of C++ is not an issue. C++ is very performant.
It's really just the modern syntax and concepts that lets you write safer code with not that much effort, without sacrificing performance.
In my experience Rust and C++ perform about the same (very close to C). I find Rust far more pleasant to work in though. I tend to write code faster in Rust, in part because it doesn't need as much boilerplate as C++. I spend less time debugging Rust code too.
And unlike in C and C++ getting 3rd party dependencies is not a realm of incomprehensible suffering. You just declare what version of the package you want to use and it works.
@@whenimnotaround If that is the case, why are still a lot of video games written in C, precisely for the reasons because it gives them more performance?
Hey DT. You do know that Rust comes from Mozilla Research. I repeat: Mozilla ;-)
Assuming you aren't trolling here there's a clear difference between Rust, a programming language and Firefox, Thunderbird, etc which are internet programs.
Rust is a programming language, it is harder to censor and almost conpletely pointless to do so anyways because of the abundance of other programming languages which aren't censored.
Mozilla's other software like their browser and their email client are much easier to censor and there is a motivation to do so.
@@hostgrady It's called a joke ;-)
@@gotchaxp so you were trolling? Ok well thats good
Rust isn't part of Mozzila anymore. They are their own faundation now.
The other current programming language of serious consideration is Julia. Do you know any Linux programs in Julia?
Hey DT, I would like to see a REDUX OS review of Yours about that linux distro since we are watching RUST things now, would be very interesting.
No doubt. I've been using exa and starship for a few months now. And now om deffinitly going to use the rest
* me watching while making a command line program in rust *
Why use exa when there's lsd 🤔 it has more functionality and better coloring with an folder/file type emoji next to the dir/file
Cause rust and more functionality doesn't necessarily mean better *cough* sudo *cough*
@@rahilarious Because Rust? What do you mean? I'm confused why we even have a list of rust programs to begin with. After they're distributed there shouldn't be much reason to care what language they were written in.
@@0xCAFEF00D Im just gonna copy and paste this response:
because seamling everything written in rust is faster and safer because of rusts zero cost abstractions and inherit memory safety.
Lsd is written in rust 🤣 do your goddamn research first before start arguing about something you have no idea about.
@@poms3559 lol they just hate rust
Think it's the fact that it has manual memory management and it's not very verbose. People love it and it's pretty swift.
People love rust because it can be written at a pretty high level but without the disadvantages of other similar languages like go because it's not a garbage-collected making it wicked fast.
If someone ever rewrites emacs in rust, hopefully they will take the best parts of emacs & the best parts of vim and combine them.
Very cool! Thank you. If you find more please do another video.
I believe ripgrep already covers most of the use cases of fd with "rg --files".. I often pipe that to "rg [string]" to find files
Fractal is a GTK Matrix client written in rust
I got curious about how exa performed, so I timed it and it just crashed when I did it. Too bad. Really doubt that it would be better than BusyBox ls, so it's fine, I guess.
Better not say that. Rust people think their language is flawless and that Rust programs can't crash. You are going to shatter many people's worldview with statements like this. At least for the moment. By mid-2021, 82% of all those who claim Rust is the ultimate language will have found something new and moved on.
@@lorenzocabrini Please don't make generalizations like that. I take every opportunity to remind other Rust devs that Rustig needs to be revived.
github.com/MichaelMauderer/rustig/
Meh. Every program can have bugs, just report it. What do you want from the Rust language? Preventing bugs?
@@ekrem_dincel Nothing. Just mentioning that it happened. I tested every program mentioned in the video and now I'm using a bunch of them and all of them work just fine.
@@ekrem_dincel yes; the compiler should have the flag --bug-auto-squash on
You cannot replace cat with bat. Cat is useful because you can pipe from it, piping from bat is like trying to pipe from less.
You are mistaken, check their docs
Replacing ls for exa, or grep for rg I think it's ok, but find for fd for me it's not advisable, I'll forget the syntax of the original, and every other computer or server you use will have the original find, not fd
That assumes you haven't already done something to alias it, like `f() { find "${2:-.}" -iname "*$1*" }`
@@ssokolow he means the flags to find...are they all the same?
@@edakimling133 No. fd and find have different arguments by design. My point was that his "I'll forget find's syntax" argument only holds true if you're masochistic enough to not have already wrapped `find` in convenient shortcuts for the common cases.
...and if you *have* already made shortcuts, you might as well use `fd` since there's a better chance everyone will be using the same shortcuts.
A big part of it is that they want to write Rust code but they don't have any original ideas so they pick an existing tool that they think they might be able to enhance.
Garusta Linux when?
... but can you rewrite Crysis in rust?
4:36
rickroll alias?
XD
Rewrite GCC in Rust.
...
not a bad idea to write newer compilers in rust if the rustc wasn't depending on llvm
@@basedfacistman The whole point of having a compiler with same programming language will then be ignored. There is no point of rewriting something to reproduce same output (grown compilers such as gcc will take years to fully replicate in other language if not giving up before).
It's like you are telling someone to rewrite something just because rust is superior, in the end will it be worth it?
@Nate Higgers That's one thing I hate about rust binaries. I remember one day when I used a musl static compilation to get a >60 mb executable for an ftp client, where In c++ I managed to get 4-5 mb
There is GCC frontend for Rust,you could have a look on it.
Rust language would be my top choice for a programming language to be stranded on a desert island with a laptop and solar powered battery recharger - if could have only one language choice. It's intrinsically versatile enough to be applied to about any programming domain - with Web Assembly support, could even be used to write programs that run in the browser. And presumably being stranded on said island, would have plenty of time to master its borrow checker and annotations - and the cool kids stuff like pattern matching and other functional programming features. And finally get around to learning how to write macros in its powerful macro sub-language.
haha it's COVID time, we're all stuck on an island...your wish came true...get cracking....as for me, I live offgrid in the mountains in Canada, so, pretty much the scenario you already describe....
You'd have plenty of time to program, on this desert island, for about a week, until you became so weak from lack of food that you couldn't type any more. :-(
@@peter9477 Well, everyone in the West will be looking at that scenario by around late summer
Why does it matter what language a tool is written in? And while we are at it: Why Rust > Go?
One reason mat be that Go is a garbage collected language. Though i’m not sure about its performance so what I’m saying may not matter
You have to feed the cults! You can have a bad design written in the fastest language and it could still run slower than a good design written in python
Rust > Go if you don't consider the developer's time.
With cat you dont always want the line numbers though
"Whenever bat detects a non-interactive terminal (i.e. when you pipe into another process or into a file), bat will act as a drop-in replacement for cat and fall back to printing the plain file contents"
The package name for fd is fd-find!
Not a programmer by trade, but until now, I come to love every Rust program I ever used. Fast, efficient, easy to use. _fd_ is such a breeze compared to the standard _find_ command. _exa_ has won my _ls_ alias.
I'm still looking for a window manager written in Rust. Will you dive into that, DT?
look into Windows 10, my guy
@@itsamcb Not really. Windows 10 was one of the most important reasons for me to switch to Linux. 😂 Seriously, is anything about Windows actually written in Rust? I thought it was all C++?
@@marioschroers7318 what he is trying to say is that if you love bloated stuff over very efficient and already working standar tools the you should as well go ahead and get windows
@@JosueRodriguez08 The things is that, for instance, ripgrep and fd are much more efficient than their standard counterparts (see their benchmarks on their github pages). All of that with better memory guarantees. Go ahead and go use "more" instead of "less", why not.
@@JosueRodriguez08 Ah, the bloat meme. Didn't catch it this time. Gracias por explicar!
Please do version 2 of this video.
I'm thinking of rewriting efitools in rust. As the don't compile from upstream. Missing a little financing for that yet though
Also check out bottom: a bashtop like replacement for top.
Even Pop!_OS is making their own DE in Rust!