Live data from Hacker News

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

github.com

31–40 of 87 posts

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

#31

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)

Are you using windows? I feel like dotfiles are much more common on unix-like systems. For me I've got dotfiles for zhs, ssh, git, two for my window manager, vim, and much more. I've even got one for nethack. I quite like it, I get new laptops up and running and feeling like home in a matter of minutes.

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

#32
post #21
post #11

Earlier quoted context omitted.

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 ha…

As someone used to unamaged languages since 1986, and with a major focused on systems programing, it isn't that clear cut. Rust executables are only 100% static on OSes that expose system libraries as static libraries, and there are not many of those around, outside embedded systems.

After years navigating this issue, I think the common understanding of "static" binary is just "something that won't give me a dll / dylib error on startup when I copy it to my friend's computer"

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

#33
post #21

Earlier quoted context omitted.

As someone used to unamaged languages since 1986, and with a major focused on systems programing, it isn't that clear cut. Rust executables are only 100% static on OSes that expose system libraries as static libraries, and there are not many of those around, outside embedded systems.

After years navigating this issue, I think the common understanding of "static" binary is just "something that won't give me a dll / dylib error on startup when I copy it to my friend's computer"

Which is a possibility, given that ldd/Dependency Walker result won't be an empty list.

Even shipping the whole computer on a container, might not do it, because most containers are leaky abstractions the way their Dockerfiles are written.

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

#35

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)

Are you using windows? I feel like dotfiles are much more common on unix-like systems. For me I've got dotfiles for zhs, ssh, git, two for my window manager, vim, and much more. I've even got one for nethack. I quite like it, I get new laptops up and running and feeling like home in a matter of minutes.

Yes windows. That’s my point: dotfiles are synonymous with ”configuration files” on Linux/Unix but not elsewhere so making a ”cross platform dotfiles manager” seems like a contradiction almost.

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

#36

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?

Serious question: why not, if the author just knows Rust? Are you so allergic to anything written in Rust? Then get some new pills and ointments because there's going to be more and more of it.

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

#37
post #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 p…

>Historically a CLI like this would often be written in C

*Perl

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

#38

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)

By historical accident, Unix-like shells tend to hide by default files whose names begin with a dot. This led to programs naming their config files ".$program_name" and throwing them into $HOME. It's no longer cool to do this, but the tradition lives on.

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

#39

I just use a “dotfiles” folder that is a git repo and then hard-link the files in there into the home directory. One for unprivileged user and one for root on each platform. Simple enough and doesn't require an extra tool.

I went a different route and use different branches for different OS environments. macOS, macOS-arm, Linux, Windows (wsl)

The environments are basically the same in each but there’s some functionality I can do I one that I cannot do in another

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

#40

Pretty cool, I personally just use Stow. 1. git clone my dotfiles repo 2. run `stow .` 3. profit This pretty much guarantees that if my Mac dies today, I can just get up and running in no time on a new machine.

Same. Stow is pretry great! I only recently discovered about the .stowignore very handy!

This looks like it can work with windows as well and you can easily switch between profiles if you have multiple which is great too

Post reply on HN