Rust Programs Every Linux User Should Know About

Sdílet
Vložit
  • čas přidán 11. 06. 2024
  • It seems like every new program is written in Rust these days. In fact, many older programs are being rewritten in Rust, including a lot of the standard shell utilities. Today, I wanted to briefly mention seven Rust programs that I have installed that I think you should know about.
    REFERENCED:
    ► starship.rs/ - Starship Prompt
    ► the.exa.website/ - exa
    ► github.com/sharkdp/bat - bat
    ► github.com/BurntSushi/ripgrep - ripgrep (rg)
    ► github.com/sharkdp/fd - fd
    ► github.com/XAMPPRocky/tokei - tokei
    ► github.com/dalance/procs - procs
    WANT TO SUPPORT THE CHANNEL?
    💰 Patreon: / distrotube
    💳 Paypal: www.paypal.com/cgi-bin/webscr...
    🛍️ Amazon: amzn.to/2RotFFi
    👕 Teespring: teespring.com/stores/distrotube
    SOCIAL PLATFORMS:
    🗨️ Mastodon: distrotoot.com/@derek
    💬 IRC: irc://freenode #distrotube
    👫 Reddit: / distrotube
    📽️ LBRY: lbry.tv/$/invite/@DistroTube:2
    DT ON THE WEB:
    🕸️ Website: distrotube.com/
    🐿️ Gopherhole: gopher://distro.tube
    📁 GitLab: gitlab.com/dwt1
    🔊 Audio Podcasts: www.buzzsprout.com/1263722
    FREE AND OPEN SOURCE SOFTWARE THAT I USE:
    🌐 Brave Browser - brave.com/dis872
    📽️ Open Broadcaster Software: obsproject.com/
    🎬 Kdenlive: kdenlive.org
    🎨 GIMP: www.gimp.org/
    🎵 Audacity: www.audacityteam.org/
    💻 VirtualBox: www.virtualbox.org/
    🗒️ Doom Emacs: github.com/hlissner/doom-emacs
    Your support is very much appreciated. Thanks, guys!
  • Věda a technologie

Komentáře • 681

  • @flyingsquirrel3271
    @flyingsquirrel3271 Před 3 lety +289

    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

    • @paulosantana9607
      @paulosantana9607 Před 3 lety +2

      lmao what was that? Are these bots?

    • @flyingsquirrel3271
      @flyingsquirrel3271 Před 3 lety +22

      @@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.

    • @mbvalency
      @mbvalency Před 3 lety +4

      It's spam. I recommend you report these as soon as you see them.

    • @paulosantana9607
      @paulosantana9607 Před 3 lety +12

      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!

    • @alexpetrean827
      @alexpetrean827 Před 3 lety +5

      Ytop is a nice alternative for top/htop as well

  • @LucyPero
    @LucyPero Před 3 lety +517

    Rewrite every GNU tool in Rust so you can say "I use Rust/Linux"

  • @robertobautista2171
    @robertobautista2171 Před 3 lety +405

    I think using Rust is the new "i use arch btw"

    • @ultradude5410
      @ultradude5410 Před 3 lety +10

      Then there’s me, installing exa on macOS (I’m not joking, it’s available)

    • @robertobautista2171
      @robertobautista2171 Před 3 lety +3

      @@ultradude5410 yeah most of us know about homebrew or macports

    • @YoloMonstaaa
      @YoloMonstaaa Před 3 lety +2

      bat works on windows :)

    • @UnicycleSoul
      @UnicycleSoul Před 3 lety

      @@YoloMonstaaa Man bat is just amazing, i have to admit

    • @swirl6996
      @swirl6996 Před 3 lety +2

      @William Berry no it isn't

  • @truefirstmagic
    @truefirstmagic Před 2 lety +84

    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.

    • @wildflowers465
      @wildflowers465 Před 2 lety +3

      Same goes for bat when piping it to another program

    • @vikingthedude
      @vikingthedude Před 6 měsíci

      How does it implement that differentiation? Does the stdout printing module have some option for that

  • @lupuscanis4370
    @lupuscanis4370 Před 2 lety +67

    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.

    • @SbF6H
      @SbF6H Před rokem +2

      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.

    • @user-sn9dy5sq1q
      @user-sn9dy5sq1q Před rokem +2

      ​@@SbF6Hwell, actually rust memory system is not based on RAII

    • @SbF6H
      @SbF6H Před rokem

      @@user-sn9dy5sq1q Yeah it is based around furry magic.

    • @user-sn9dy5sq1q
      @user-sn9dy5sq1q Před rokem +2

      @@SbF6H No,, just on type system. Why so arrogant lol

    • @SbF6H
      @SbF6H Před rokem

      @@user-sn9dy5sq1q What? Furry magic is omnipresent.

  • @hostgrady
    @hostgrady Před 3 lety +164

    Bat really isnt a cat replacement it's more of a less/more replacement

    • @DistroTube
      @DistroTube  Před 3 lety +45

      True.

    • @aedd3307
      @aedd3307 Před 3 lety +17

      not true though, bat justs highlights syntax and adds line numbers, then sends its output to less

    • @hostgrady
      @hostgrady Před 3 lety +6

      @@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)

    • @CMG78
      @CMG78 Před 3 lety +1

      can do the same with cat -n .zshrc | less

    • @onehaxxor8574
      @onehaxxor8574 Před 3 lety +30

      @@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.

  • @flamendless
    @flamendless Před 3 lety +174

    Bat should have beed called "rat", because r is for rust

  • @katech6020
    @katech6020 Před 3 lety +122

    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

    • @DistroTube
      @DistroTube  Před 3 lety +36

      Yes, also.....broot. Another Rust program that I have talked about on video.

    • @jonbikaku6133
      @jonbikaku6133 Před 3 lety +1

      haha, exactly what I was commenting!

    • @Reliktish
      @Reliktish Před 3 lety +3

      Actually rust goes lower than c++
      On c level

    • @siddharthupadhyay6347
      @siddharthupadhyay6347 Před 3 lety +17

      @@Reliktish Nope, Rust has vectors,HashMaps(python dict),VecDeques,BTreeMaps, also you rarely interact with pointers directly ,like modern C++.

    • @Reliktish
      @Reliktish Před 3 lety +1

      @@siddharthupadhyay6347 yet is it designed to be used in the fields that are exclusive to C, like embedded systems

  • @grtcdr
    @grtcdr Před 3 lety +80

    exa is available in the official Arch repos, not just the AUR.

    • @Muttisuri
      @Muttisuri Před 3 lety

      You can just use cargo, installing it is realy easy, like easyer than npm in my opinion.

    • @grtcdr
      @grtcdr Před 3 lety +2

      @@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.

    • @raphtlw
      @raphtlw Před 3 lety +5

      @@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

    • @flexagonpark5467
      @flexagonpark5467 Před 3 lety +2

      @@Muttisuri Why not just use an AUR helper like Paru?

    • @Muttisuri
      @Muttisuri Před 3 lety

      @@raphtlw
      I'm not 100% sure but doesn't cargo update the package if it finds a more recent version?

  • @pascal7947
    @pascal7947 Před 3 lety +26

    The major thing with ripgrep for me is the performance. You can ripgrep through big projects considerably faster than with grep.

  • @famailiaanima
    @famailiaanima Před 3 lety +79

    Getting started on Rust:
    Step 1: Gather some resources with your rock

    • @eli1882
      @eli1882 Před 3 lety +1

      Ily

    • @ahmadshahzad6674
      @ahmadshahzad6674 Před 2 lety

      Aye, I never made it far with my rock. Were good days playing it.

  • @scheimong
    @scheimong Před 2 lety +12

    Vscode already uses rg for its workspace search feature IIRC. It's simply too much faster than grep to ignore

  • @dtinth
    @dtinth Před 3 lety +3

    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!

  • @jgttech
    @jgttech Před 3 lety +103

    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.

    • @notuxnobux
      @notuxnobux Před 3 lety +18

      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
      @apestogetherstrong341 Před 3 lety +7

      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?

    • @ssokolow
      @ssokolow Před 3 lety +2

      @@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.)

    • @apestogetherstrong341
      @apestogetherstrong341 Před 3 lety +1

      @@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

    • @ekremdincel1505
      @ekremdincel1505 Před 3 lety +1

      @@notuxnobux If you change a value of immutable variable via hacks or something on runtime you will probably introduce a UB in the program.

  • @paintitblack4199
    @paintitblack4199 Před 3 lety +104

    Even Microsoft is starting to rewrite Windows in Rust.

    • @rahilarious
      @rahilarious Před 3 lety +11

      Meme?

    • @randomforrest4199
      @randomforrest4199 Před 3 lety +3

      @@rahilarious doubt it

    • @malcolmx86
      @malcolmx86 Před 3 lety +3

      Word?

    • @siddharthupadhyay6347
      @siddharthupadhyay6347 Před 3 lety +22

      They aren't trying to rewrite windows but they are experimenting,how well Rust could fit into their ecosystem. medium.com/the-innovation/how-microsoft-is-adopting-rust-e0f8816566ba

    • @rumplstiltztinkerstein
      @rumplstiltztinkerstein Před 3 lety +1

      they started rewriting a couple of years ago. Now they are developing an open source clone for them to use as well. Search for project Verona.

  • @CodeSmell
    @CodeSmell Před 3 lety +10

    Excellent list. One more: delta -- a viewer for git and diff output - 🦀⚙️ - it is fantastic. Thanks for doing the video!

  • @TimoWelde
    @TimoWelde Před 2 lety +5

    The best thing about ripgrep is, that it is insanely fast! Very useful for searching a string in a file recursively.

  • @nano_chad
    @nano_chad Před 3 lety +1

    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.

  • @makarnautovic434
    @makarnautovic434 Před 3 lety +2

    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.

  • @jdnoss1234
    @jdnoss1234 Před 3 lety +1

    I have been running bottom as a rust replacement for htop and it looks really nice with a lot of good info.

  • @donaldwilliams6821
    @donaldwilliams6821 Před rokem

    Very cool! Thank you. If you find more please do another video.

  • @auroradraco9974
    @auroradraco9974 Před 3 lety +5

    All I am waiting for now is a window manager written in Rust. Thats all we are missing

  • @oglothenerd
    @oglothenerd Před měsícem +1

    DT: "I am not a programmer."
    Also DT: *starts programming in Haskell*

  • @lemurza5236
    @lemurza5236 Před 3 lety

    No doubt. I've been using exa and starship for a few months now. And now om deffinitly going to use the rest

  • @paulderscheid4816
    @paulderscheid4816 Před 3 lety

    Awesome tools! Thanks for sharing

  • @richsadowsky8580
    @richsadowsky8580 Před 2 lety +1

    Great video also with great comments by viewers. I've installed all of these on Raspberry Pi's and m1 Mac.

  • @mattwilliams1844
    @mattwilliams1844 Před 3 lety +5

    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.

  • @steffahn
    @steffahn Před 2 lety

    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.

  • @tobiasz0090
    @tobiasz0090 Před 3 lety +1

    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...

    • @edakimling133
      @edakimling133 Před 3 lety

      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.

  • @simozonelayer
    @simozonelayer Před 3 lety

    the standard find command also has an --exec to run additional commands with the find results.

  • @KhalidJ
    @KhalidJ Před 3 lety +35

    I really hate when command line tools have no man page.

    • @Ricojo777
      @Ricojo777 Před 3 lety +6

      Ripgrep has one. You just have to use rg instead of ripgrep

    • @KhalidJ
      @KhalidJ Před 3 lety +3

      @@Ricojo777 I was talking in general actually, this video just reminded me. But thanks for letting me know! :D

    • @randaldavis8976
      @randaldavis8976 Před 3 lety

      I always thought man pages could be a whole lot better. include the top 10 useage examples for one idea

    • @KhalidJ
      @KhalidJ Před 3 lety

      @@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

    • @edakimling133
      @edakimling133 Před 3 lety

      @@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

  • @sergeydocenko
    @sergeydocenko Před 3 lety +1

    I have all of them installed! And use it often!

  • @lucasmsoares96
    @lucasmsoares96 Před 3 lety +2

    Hey dt! Could you take a look at the ion shell?

  • @netbin
    @netbin Před 3 lety +2

    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.

  • @SherifAbdelhay
    @SherifAbdelhay Před 2 lety

    Thank you so much. It is really so handy programs.

  • @sujayr6983
    @sujayr6983 Před 3 lety

    Hey DT, what's the best AUR helper?? Is it yay, because it's 3 letters?? Or is there more to it??

  • @remrevo3944
    @remrevo3944 Před rokem +2

    Tokei actually also recognizes embeded languages. So if you have javascript in your html it shows that as separate.

  • @brentgreeff1115
    @brentgreeff1115 Před 3 lety +1

    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 :)

  • @oglothenerd
    @oglothenerd Před rokem +1

    How do you get those awesome "images" when you start up your terminal?

  • @jessegodsey
    @jessegodsey Před 3 lety +12

    Good video, always enjoy the CLI stuff. Better to me than distro hopping videos.

    • @elinoamrichter162
      @elinoamrichter162 Před 3 lety +1

      He's DISTROtube

    • @jessegodsey
      @jessegodsey Před 3 lety +2

      @@elinoamrichter162 Yeah I know, just stating my opinion.

    • @jessegodsey
      @jessegodsey Před 3 lety +1

      @Grisosthone No, I have many, you're right, I cannot have ONE !!!

    • @kieranwoodward575
      @kieranwoodward575 Před 3 lety

      @@jessegodsey Keep talking like that and you're gonna get yourself cancelled

    • @jessegodsey
      @jessegodsey Před 3 lety

      @@kieranwoodward575 Lol, o.k.

  • @chadthunder6915
    @chadthunder6915 Před 3 lety +8

    my man stole luke's beard

  • @LucyPero
    @LucyPero Před 3 lety

    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

  • @krausg
    @krausg Před 3 lety

    Also check out bottom: a bashtop like replacement for top.

  • @iamkneel517
    @iamkneel517 Před 3 lety +3

    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)

    • @Axlefublr
      @Axlefublr Před 10 měsíci

      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

  • @octagear
    @octagear Před 3 lety

    Cool. But are these more efficient in relation to the added features or just more colorful?

    • @ssokolow
      @ssokolow Před 3 lety +4

      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.

  • @boxguardian1026
    @boxguardian1026 Před 3 lety +3

    Can you do a video on wtftw, a wm written in rust.

  • @lifebarier
    @lifebarier Před 3 lety +1

    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?

    • @ssokolow
      @ssokolow Před 3 lety +1

      bat is designed to turn off all its fancy features and behave just like cat if you feed it into a shell pipeline.

  • @Valeriooooh
    @Valeriooooh Před 3 lety +8

    DT showing rust programs in a terminal made in rust.

    • @krausg
      @krausg Před 3 lety

      Alacrity is written in rust if remember well

    • @blackrastafarian
      @blackrastafarian Před 3 lety

      In a rusty computer, and that'd be perfectly rusted.

  • @eduingarciacordero9255

    thank's this was very good

  • @act.13.41
    @act.13.41 Před 2 lety +1

    Great stuff. I always seem to get something good from every video. I don't have a linux machine right now, but I have been putting all of this knowledge to use in my WSL/openSUSE setup. Granted, not everything wants to run on Wayland, but most things do it just fine.
    A quick edit of my alias list and I can now see folders and files by color and sorted. Before, I couldn't tell a folder from a file. Awesome.
    For FD, I set an alias for "find" to search where I am and I set "search" to search from the / directory. Sweet.

  • @pnuema1.618
    @pnuema1.618 Před rokem

    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.

  • @jeremymendes9217
    @jeremymendes9217 Před rokem +1

    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.

  • @Chr0n0s38
    @Chr0n0s38 Před 3 lety +2

    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.

    • @JosueRodriguez08
      @JosueRodriguez08 Před 3 lety +1

      He did

    • @Chr0n0s38
      @Chr0n0s38 Před 3 lety

      @@JosueRodriguez08 It's been a year since then. Probably worth another look.

    • @Chr0n0s38
      @Chr0n0s38 Před 3 lety

      @@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).

  • @der_kloenk
    @der_kloenk Před 3 lety

    I'm thinking of rewriting efitools in rust. As the don't compile from upstream. Missing a little financing for that yet though

  • @tiitulitii
    @tiitulitii Před 3 lety

    The other current programming language of serious consideration is Julia. Do you know any Linux programs in Julia?

  • @neo_snakejazz
    @neo_snakejazz Před 3 lety

    How can I get a header art like yours? I love the random art at the beginning of the terminal.

    • @neo_snakejazz
      @neo_snakejazz Před 3 lety

      Nvm I found it czcams.com/video/U6e05Y3DC5E/video.html

  • @ruirodrigues705
    @ruirodrigues705 Před 3 lety

    this is pure gold!

  • @elys7563
    @elys7563 Před 3 lety +6

    You know there is even an os written in rust called "redox".

  • @kissmyoradora83
    @kissmyoradora83 Před rokem

    what distro is he using? looks pretty slick

  • @kaerithmallock
    @kaerithmallock Před 3 lety

    Thank you for bat

  • @Lyndeno
    @Lyndeno Před 3 lety

    Fractal is a GTK Matrix client written in rust

  • @learningbird9940
    @learningbird9940 Před 3 lety +3

    Congrats for these Rust pearls. Now...waiting for the part II of these Rust pearls...or the review of Redox, the OS written in Rust.

  • @ronnythompson9115
    @ronnythompson9115 Před 3 lety

    wont alias to legacy command names break bash and other scripts since the output and flags differ?

    • @edakimling133
      @edakimling133 Před 3 lety

      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!

  • @umermaqsood8219
    @umermaqsood8219 Před 3 lety

    Can you please tell me how to get suggestions in terminal while typing? Thanks

    • @edakimling133
      @edakimling133 Před 3 lety

      that comes with the shell he uses - called 'fish'. Install it and you will get autocompletion support. It is awesome

  • @mclang5932
    @mclang5932 Před 2 lety

    I would probably start using these all right away, but much of the work I do is on company servers into which I cannot install what ever I fancy :/
    So I think that except for Alacritty and Fish shell, I have to stick with the old ones for now so I don't remember which commands are available on which computers...
    Thanks for the list though, it is nice to see that more and more Rust programs like `bottom` to replace `htop` are coming!

    • @Dee-Ell
      @Dee-Ell Před rokem

      Often, it's preferable to stick with commands that are standard/default to most machines. Getting efficient/proficient with those "standard" commands offers much higher "return on investment" because that skill is more "portable". So while all these tools are cool, it's not cool enough for me to invest on them and abandon the more widely available standard commands.

    • @dapodix
      @dapodix Před rokem +1

      I tend to agree with sticking with the POSIX standard tools but would point out that these rust tools are statically compiled binaries that you can copy around via scp/ssh and run them arbitrarily without even needing to install them into a standard $PATH.
      Cant imagine doing this for a prog written in python or node/typescript however.

  • @aniketd7495
    @aniketd7495 Před 3 lety

    Huh, I’ve thought you were a programmer since I started watching the channel. Do you do youtube full time? Or do you have a day job?

    • @hostgrady
      @hostgrady Před 3 lety +5

      Dt used to do retail full time and youtube as a hobby but now he does exclusively youtube. He has also never been a programmer by trade he's said it a lot.

  • @abdulararak4672
    @abdulararak4672 Před 3 lety

    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

    • @davidh.4944
      @davidh.4944 Před 3 lety +1

      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.

    • @abdulararak4672
      @abdulararak4672 Před 3 lety

      @@davidh.4944 Thanks! Now I can switch to it.

  • @attutorials2121
    @attutorials2121 Před 2 lety +1

    Even Pop!_OS is making their own DE in Rust!

  • @marioschroers7318
    @marioschroers7318 Před 3 lety +1

    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
      @itsamcb Před 3 lety

      look into Windows 10, my guy

    • @marioschroers7318
      @marioschroers7318 Před 3 lety +2

      @@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++?

    • @JosueRodriguez08
      @JosueRodriguez08 Před 3 lety

      @@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

    • @hogstudio4819
      @hogstudio4819 Před 3 lety +5

      @@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.

    • @marioschroers7318
      @marioschroers7318 Před 3 lety

      @@JosueRodriguez08 Ah, the bloat meme. Didn't catch it this time. Gracias por explicar!

  • @Andrii-zc4dp
    @Andrii-zc4dp Před 3 lety +2

    Hey dt what wm are you using now?

  • @thesobercoder
    @thesobercoder Před 2 lety

    Please do version 2 of this video.

  • @lucioferrando579
    @lucioferrando579 Před rokem

    The package name for fd is fd-find!

  • @saulramirez727
    @saulramirez727 Před 3 lety

    Good one

  • @laughingvampire7555
    @laughingvampire7555 Před 10 měsíci

    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*.

  • @kellingc
    @kellingc Před 3 lety

    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.

    • @whaaaaaaaaaaaaaaaaaaaaaaaaaat
      @whaaaaaaaaaaaaaaaaaaaaaaaaaat Před 3 lety

      I just tested it. Yes, it can concatenate. Though, if you want strictly like how cat functions , just add the '--plain' flag.

    • @kellingc
      @kellingc Před 3 lety

      @@whaaaaaaaaaaaaaaaaaaaaaaaaaat Well, that's cool.

    • @ssokolow
      @ssokolow Před 3 lety +1

      @@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.

  • @laughingvampire7555
    @laughingvampire7555 Před 10 měsíci

    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.

  • @AdrianDucao
    @AdrianDucao Před 2 lety +1

    i want to create my own distro, create my own command, my own planet, my own universe, my own species and my own dna

  • @zanesalti8929
    @zanesalti8929 Před 3 lety +1

    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

    • @ssokolow
      @ssokolow Před 3 lety

      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.

  • @wumwum42
    @wumwum42 Před 2 lety

    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?

    • @Scymet
      @Scymet Před rokem +1

      It's done automatically when not outputted to an interactive terminal

  • @juanandrescastillofuenmayo6619

    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.

  • @karlheinzneugebauer
    @karlheinzneugebauer Před rokem +1

    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.

    • @koderkev42
      @koderkev42 Před rokem

      This is my thought as well. Bat is nice but not a replacement for sure.

    • @Scymet
      @Scymet Před rokem +1

      @@koderkev42 bat checks for the output method first, that formatting only happens in terminal, not piping; read the man.

  • @brielov
    @brielov Před 3 lety

    Bottom is a nice one too

  • @gotchaxp
    @gotchaxp Před 3 lety +21

    Hey DT. You do know that Rust comes from Mozilla Research. I repeat: Mozilla ;-)

    • @hostgrady
      @hostgrady Před 3 lety +3

      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.

    • @gotchaxp
      @gotchaxp Před 3 lety +1

      @@hostgrady It's called a joke ;-)

    • @hostgrady
      @hostgrady Před 3 lety +2

      @@gotchaxp so you were trolling? Ok well thats good

    • @techpriest4787
      @techpriest4787 Před 3 lety +1

      Rust isn't part of Mozzila anymore. They are their own faundation now.

  • @stephen9849
    @stephen9849 Před 3 lety +1

    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.

    • @lieywe3438
      @lieywe3438 Před 3 lety +1

      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

    • @brinckau
      @brinckau Před 3 lety

      @@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.

    • @ekremdincel1505
      @ekremdincel1505 Před 3 lety +1

      @@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.

    • @brinckau
      @brinckau Před 3 lety

      @@ekremdincel1505 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.

    • @ekremdincel1505
      @ekremdincel1505 Před 3 lety +2

      @@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.

  • @Asdayasman
    @Asdayasman Před 2 lety

    > 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.

  • @nicolasbarrios7877
    @nicolasbarrios7877 Před 3 lety +1

    Hey dt, did you know of "yi: The Haskell-Scriptable Editor" ? It would be awsome if you made a video about it

  • @TheSulross
    @TheSulross Před 3 lety

    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.

    • @edakimling133
      @edakimling133 Před 3 lety

      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....

    • @peter9477
      @peter9477 Před 2 lety

      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. :-(

    • @TheSulross
      @TheSulross Před 2 lety +1

      @@peter9477 Well, everyone in the West will be looking at that scenario by around late summer

  • @jfltech
    @jfltech Před 3 lety

    Another Rust cool program for queuing long running cmd line programs is called Pueue

  • @craigw4644
    @craigw4644 Před 3 lety

    Like the bat command, will use it going forward. Thank DT

  • @fcolecumberri
    @fcolecumberri Před 3 lety +1

    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++.

    • @ekremdincel1505
      @ekremdincel1505 Před 3 lety

      For which code Rust outputs worse ASM then C++?

    • @fcolecumberri
      @fcolecumberri Před 3 lety

      @@ekremdincel1505 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/

  • @petrdemuth4963
    @petrdemuth4963 Před 3 lety +10

    Hi mate. time stampts might be useful in this video :)

  • @jan-Juta
    @jan-Juta Před 3 lety

    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.

  • @tomarchelone
    @tomarchelone Před 3 lety +2

    As a Rust lover and enthusiast, I'm very pleased to see this video on your channel)

  • @onehaxxor8574
    @onehaxxor8574 Před 3 lety +1

    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.

    • @onehaxxor8574
      @onehaxxor8574 Před 3 lety

      @@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.

    • @onehaxxor8574
      @onehaxxor8574 Před 3 lety

      @@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.

    • @Scymet
      @Scymet Před rokem

      @@onehaxxor8574 bat works exactly like cat when not in interactive terminal output, check before talking ?

  • @johnrayburn6578
    @johnrayburn6578 Před 2 lety +1

    If someone ever rewrites emacs in rust, hopefully they will take the best parts of emacs & the best parts of vim and combine them.

  • @warmwaffles
    @warmwaffles Před 3 lety +1

    procs seems pretty handy. I will check that out.

  • @sable5923
    @sable5923 Před 2 lety +1

    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.

    • @janosimas
      @janosimas Před 2 lety +2

      It behaves differently in scripting/piping. you should check it's docs, they have some nice options.

    • @Knirin
      @Knirin Před rokem

      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.

  • @leeh.1900
    @leeh.1900 Před 3 lety

    Very cool vid Derek...thanks again. I've heard of RUST...and like you am not a programmer. But I'm gonna be checking this stuff out. Cheers!

  • @MyDvR7
    @MyDvR7 Před 2 lety

    DT you amaze me..... you are very good at this.... I am learning at such a high pace because of this...... if you enjoy doing this channel please keep going😎

  • @jhonasn
    @jhonasn Před 2 lety

    nice apps loved it