-- Leo's gemini proxy

-- Connecting to bbs.geminispace.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; charset=utf-8

Comment by ๐Ÿฆ€ jeang3nie


Re: "Software written in Rust: ripgrep"

In: s/rust_software


I started learning Rust in about 2018, about the same time I started really buckling down to learn C. I really loved it for a while, followed by a period where I started having doubts about it (mostly related to the repeated bungling of the project's leadership). I'm back to working on some of my Rust projects again now, and I have to say it feels comfy and homey for me.


I think it's a good idea for anyone using a higher level language to drill down and really learn how to use C in anger. It's the only way a lot of devs will learn how a lot of common data structures work under the hood, because they'll have to write them from scratch. But going back to Rust after a short while of abandoning it for C my experience has been that I'm dramatically more productive in Rust. When writing C I'll constantly reinvent the wheel and write my own hashmaps and linked lists, tweaking them very specifically for the actual use case, wringing every last drop of performance out that I can. With Rust I'll just use what the std library has to offer and write three times as much code in an hour. What's funny is that it winds up being just as fast most of the time.


Rust is definitely not perfect. The binary sizes are big, you get a lot of dead code compiled into your binaries and the crates ecosystem is kind of a mess because they didn't plan ahead for the explosive growth that the language has experienced. But it excels when it comes to code correctness and makes things that are hard in other languages trivially simple. I write a lot of code that executes in parallel, and you can drill down right to the hardware and register level just the same as in C if you want. As compromises go I think it's made mostly good ones.


As for cool software written in Rust I'll mention the Helix editor. I tried it out a few months ago and surprisingly just never stopped using it. Helix does everything I had painstakingly set up NeoVim to do, but it does it without having to rice your configuration four hours a day until you finally get something you like.


๐Ÿฆ€ jeang3nie

Jan 19 ยท 4 months ago


2 Later Comments โ†“


๐Ÿค– gamma [OP/mod] ยท Jan 20 at 04:33:

Thanks for the response, I agree completely and I also like Helix quite a lot! I'm hoping to make a longer post about it in the future.


๐Ÿ mifuyne ยท Jan 20 at 21:37:

I really wanted Helix to be enough for my use case, but the difference in command grammar trips me up. To be fair, I only use it to write my posts and pages for my capsule. Neovim + goyo.vim have done well for me on that front. That said, I still have Helix installed so I can use it here and there, learn it little by little ๐Ÿ™‚


On another note, I've found a curated list of projects made in Rust here:

โ€” https://github.com/rust-unofficial/awesome-rust

I don't know how many of you have already seen it though...


I think out of all of those, nu(shell) is the one I'd like to shout out here. I like their approach, where the output is structured data, rather than plain text. So you could do something like this:


> ls | sort-by size | reverse
โ•ญโ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ #  โ”‚         name          โ”‚ type โ”‚   size    โ”‚  modified   โ”‚
โ”œโ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  0 โ”‚ Gemfile.lock          โ”‚ file โ”‚   6.9 KiB โ”‚ 3 days ago  โ”‚
โ”‚  1 โ”‚ SUMMARY.md            โ”‚ file โ”‚   3.7 KiB โ”‚ 3 days ago  โ”‚
โ”‚  2 โ”‚ Gemfile               โ”‚ file โ”‚   1.1 KiB โ”‚ 3 days ago  โ”‚
โ”‚  3 โ”‚ LICENSE               โ”‚ file โ”‚   1.1 KiB โ”‚ 3 days ago  โ”‚
โ”‚  4 โ”‚ CONTRIBUTING.md       โ”‚ file โ”‚     955 B โ”‚ 9 mins ago  โ”‚
โ”‚  5 โ”‚ books.md              โ”‚ file โ”‚     687 B โ”‚ 3 days ago  โ”‚

โ€” https://www.nushell.sh/book/quick_tour.html


I know that this can be done with ls by adding the -laS flag, but the strength is from being able to use those filters on other commands too.


There's definitely a learning curve and not ready to replace traditional shells. All existing shell scripts will need to be rewritten to be used in nushell. I only use it in a specific terminal profile (although it's also my default profile), just in case I do need to run a bash script.


IMO, worth a look if you have the time and resources to spare!


Original Post


๐ŸŒ’ s/rust_software

Software written in Rust: ripgrep โ€” I made a space to discuss Rust software projects. Why Rust specifically? Well, first of all because it's a meme, and second of all because well-written Rust provides some security and performance benefits that lead me to prefer many Rust tools over others. A third reason that may resonate with some Gemini users is that many Rust tools seem to be designed with simplicity in mind. Perhaps this is due to how new many of these tools are, so they haven't had time...

๐Ÿ’ฌ gamma [mod] ยท 5 comments ยท Jan 18 ยท 5 months ago

-- Response ended

-- Page fetched on Sun Jun 2 17:34:37 2024