Live data from Hacker News

A cross-platform multi-target dotfiles manager written in Rust

github.com

11–20 of 87 posts

Re: A cross-platform multi-target dotfiles manager written in Rust

#11

Serious question: why Rust? Sounds like this is not exactly systems level programming or any user would suffer from or even notice garbage collection latency. Is Rust building up a decent ecosystem now for application programming? When I tried developing in Rust I came to the conclusion that you pay a heavy price for not having a garbage collector. Was I doing it wrong?

I find Rust super ergonomic for any kind of app. The memory management aspect is trivial and second nature to anyone used to unmanaged languages, and the type system equally is not difficult to understand.

It's a general purpose language, but it does give you full control. Plus, of course, you can encode a large amount of program states in the type system and borrowing checks enforce rules that programmers usually have to check in their head.

I find that when I write Rust, I have to worry about an order of magnitude less about silly things like lifetime bugs, reference bugs, resource cleanup, all of which are 80% of my job when I write C#, or other similar managed languages.

Plus Rust can generate a static executable, which is reasonably small, and doesn't require a third party runtime.

Re: A cross-platform multi-target dotfiles manager written in Rust

#12

Serious question: why Rust? Sounds like this is not exactly systems level programming or any user would suffer from or even notice garbage collection latency. Is Rust building up a decent ecosystem now for application programming? When I tried developing in Rust I came to the conclusion that you pay a heavy price for not having a garbage collector. Was I doing it wrong?

Good dependency management, a rich package ecosystem, defaults to static binaries which are easy to distribute and a tendency to be fast (even if it’s just the lack of startup overhead) make it a popular choice.

It also helps that rust attracts the kind of devs that make nice tools.

Re: A cross-platform multi-target dotfiles manager written in Rust

#13

Serious question: why Rust? Sounds like this is not exactly systems level programming or any user would suffer from or even notice garbage collection latency. Is Rust building up a decent ecosystem now for application programming? When I tried developing in Rust I came to the conclusion that you pay a heavy price for not having a garbage collector. Was I doing it wrong?

Honestly, Rust is a breeze to make CLI/TUI apps in. Some crates worth looking into: tokio (mostly for stuff built on top of it), clap, promptly, colored, ratatui. These are just a few ones to get you started, but there's lots more depending on what you need to accomplish!

Re: A cross-platform multi-target dotfiles manager written in Rust

#14

Is this using ”dotfiles” as a general term for ”text based configuration files”? Is this a thing? I only have two actual dotfiles on my system (git and one more)

Lots of config files begin with a dot themselves or because they are inside dot-names directories (ie xdg config default to ~/.config)

Re: A cross-platform multi-target dotfiles manager written in Rust

#15
post #13

Serious question: why Rust? Sounds like this is not exactly systems level programming or any user would suffer from or even notice garbage collection latency. Is Rust building up a decent ecosystem now for application programming? When I tried developing in Rust I came to the conclusion that you pay a heavy price for not having a garbage collector. Was I doing it wrong?

Honestly, Rust is a breeze to make CLI/TUI apps in. Some crates worth looking into: tokio (mostly for stuff built on top of it), clap, promptly, colored, ratatui. These are just a few ones to get you started, but there's lots more depending on what you need to accomplish!

[deleted]

Re: A cross-platform multi-target dotfiles manager written in Rust

#16

Serious question: why Rust? Sounds like this is not exactly systems level programming or any user would suffer from or even notice garbage collection latency. Is Rust building up a decent ecosystem now for application programming? When I tried developing in Rust I came to the conclusion that you pay a heavy price for not having a garbage collector. Was I doing it wrong?

Two things:

1. Historically a CLI like this would often be written in C, so Rust isn't that strange of a choice.

2. Rust is know for the borrow checker and being a great low level language. However, it's also an excellent modern general purpose language with a great ecosystem. People end up using it for all kinds of things because it's a joy to use.

"When I tried developing in Rust I came to the conclusion that you pay a heavy price for not having a garbage collector. Was I doing it wrong?"

Rust is tricky to grasp initially, the learning curve goes pretty much vertical immediately, but once you "get it" it's very nice. When I started out I overused borrowing and ran into heaps of lifetime problems. I think limiting yourself to only using references for function arguments and, rarely, return values is a good place to start. As soon as you are start adding references to struct you should stop and think about who owns the data and what its lifetime is. Thinking properly about ownership is the big shift from GC languages. Once you've gotten into that habit, lifetimes are downstream from that.

Re: A cross-platform multi-target dotfiles manager written in Rust

#17

Serious question: why Rust? Sounds like this is not exactly systems level programming or any user would suffer from or even notice garbage collection latency. Is Rust building up a decent ecosystem now for application programming? When I tried developing in Rust I came to the conclusion that you pay a heavy price for not having a garbage collector. Was I doing it wrong?

Syntactically it's a pretty nice language, with a nice and sane ecosystem (crates, etc), and it's fun to write (which is a pro especially for unpaid hobby projects). If you get used to it, it's nice to write various things in it. I'd probably use it for CLI tools at this point.

You do pay a bit in syntactic overhead (lifetimes, borrow checking perplexities), though you get used to it. I'd still not use it for a standard product-y web app. For CLI tools though, it's pretty good.

Re: A cross-platform multi-target dotfiles manager written in Rust

#18
post #4

why something so specialized needs a configuration file? my dot file scripts just have very opinionated dir/file naming conventions and things just fall into place. it's not like you need to give tune much... even adding the template thing which i think is overkill (time would be best spent with a way to validate code cross platform of you ask me.. templating makes this more difficult while pretending to remove the n…

So you can manage your dotfile manager with a dotfile manager!

Nothing against the project, this part just seems pretty amusing

Re: A cross-platform multi-target dotfiles manager written in Rust

#20
post #14

Is this using ”dotfiles” as a general term for ”text based configuration files”? Is this a thing? I only have two actual dotfiles on my system (git and one more)

Lots of config files begin with a dot themselves or because they are inside dot-names directories (ie xdg config default to ~/.config)

At least on Linux they do yes. But this is cross platform. A Normal total number of dotfiles on a windows system is about 0 or 1.
Post reply on HN