Live data from Hacker News

Rob Pike: the origin of dotfiles

plus.google.com

21–30 of 156 posts

Re: Rob Pike: the origin of dotfiles

#21
post #19

For those who object that dot files serve a purpose, I don't dispute that but counter that it's the files that serve the purpose, not the convention for their names. I would like to hear a good argument for why hidden files and folders are a good thing.

They are a natural segregator of novice and advanced users. If you have a limited level of interaction with the unix shell (remember than in the old days everyone in a science academic department used a Unix machine, even the dusty professors you kept in the back of the supplies cabinet), setting up their account and then making sure that they couldnt get into any trouble because they didn't know about 'ls -a' was ve…

I wonder if that is a good solution for separating novices and pros though? For me, hidden files and folders only help to reinforce the confusion people have about computers. It's one thing to provide a folder to a user with a lock or shield on it, it's another to completely hide it from them.

Re: Rob Pike: the origin of dotfiles

#22
post #12
post #7

Earlier quoted context omitted.

I'm guessing it's because /etc contains configuration files and dot-files are just configuration files. Or do you mean, why was /etc named etc?

I think they meant the latter. Why is it /etc instead of, perhaps more obvious, /config or /settings?

If it was meant for configuration - probably it would've been - /cfg /ini /set /opt /flg /arg /prm (params)

As someone said - naming things is the hardest!

Re: Rob Pike: the origin of dotfiles

#23
post #16
post #2

Instead of putting a dotfile or dotdir in the user's home directory, do follow the XDG Base Directory specification: http://standards.freedesktop.org/basedir-spec/basedir-spec-l... . It's easy to understand and requires only a marginal increase in effort/code.

I see no benefit. It's not at all easy to understand, nor easy to implement, nor does it have any tangible advantages. It's one of these superfluous pseudo-standards that do nothing but add needless clutter. But gladly nobody seems to be using it anyway, I see only one directory in my ~/.local: vlc.

I consider it good practice to allow users to customize where your program creates files. I don't like $HOME to be the default dumping ground for anything I run.

A standard that uses environment variables means programs don't have to provide extra options for this customization (I've seen -f,--file , -c,--config and other variants). It allows for common code (libraries that implement the spec).

If you poke around for feature requests for various open source programs, you'll find XDG basedir compliance come up occasionally (moreso for CLI utils). I wouldn't say "nobody seems to be using it"; quick scan of my folders includes Chromium, uzbl, htop. Git's next release will be compliant too.

Re: Rob Pike: the origin of dotfiles

#24
post #2

Instead of putting a dotfile or dotdir in the user's home directory, do follow the XDG Base Directory specification: http://standards.freedesktop.org/basedir-spec/basedir-spec-l... . It's easy to understand and requires only a marginal increase in effort/code.

Somehow .dotfiles work just fine under Windows :). As such they are somehow more "portable"

Emacs saves them under %USERPROFILE% - I have in there - .alice, .android, .easyhg, .eclipse, .gstreamer-0.10, .lighttable, .m2, .matplotlib, .... .VirtualBox, .zenmap

Also in "Application Data" - .emacs.d, .mc, .subversion

My point is - this system works somehow even under non-unixy systems.

Because it's simple.

Re: Rob Pike: the origin of dotfiles

#26

For those who object that dot files serve a purpose, I don't dispute that but counter that it's the files that serve the purpose, not the convention for their names. I would like to hear a good argument for why hidden files and folders are a good thing.

They work well with per-directory settings. It's a simple convention and it works really well for things like .git, .gitignore, language-specific settings files and so on.

Putting files and directories like this inside another directory would not win you much, especially if you only have one in a given location (e.g. you only have a .git directory). But you wouldn't want to keep tripping over your .git directories either!

However, having a dedicated directory for configuration files applying to a user or the whole system is a different story. I would much rather just have a ~/config directory than a home folder full of dot files.

Re: Rob Pike: the origin of dotfiles

#27
post #19

For those who object that dot files serve a purpose, I don't dispute that but counter that it's the files that serve the purpose, not the convention for their names. I would like to hear a good argument for why hidden files and folders are a good thing.

They are a natural segregator of novice and advanced users. If you have a limited level of interaction with the unix shell (remember than in the old days everyone in a science academic department used a Unix machine, even the dusty professors you kept in the back of the supplies cabinet), setting up their account and then making sure that they couldnt get into any trouble because they didn't know about 'ls -a' was ve…

OS X has a ~/Library directory that houses application settings and much else. It is hidden by default.

There is no question there is a need to have a place that "plebeian users" can't access. IMO, dot-files and dot-directories are as good as anywhere.

Re: Rob Pike: the origin of dotfiles

#28
post #16
post #2

Instead of putting a dotfile or dotdir in the user's home directory, do follow the XDG Base Directory specification: http://standards.freedesktop.org/basedir-spec/basedir-spec-l... . It's easy to understand and requires only a marginal increase in effort/code.

I see no benefit. It's not at all easy to understand, nor easy to implement, nor does it have any tangible advantages. It's one of these superfluous pseudo-standards that do nothing but add needless clutter. But gladly nobody seems to be using it anyway, I see only one directory in my ~/.local: vlc.

~/.local isn't primarily where you should look; check ~/.config

Re: Rob Pike: the origin of dotfiles

#29
post #2

Instead of putting a dotfile or dotdir in the user's home directory, do follow the XDG Base Directory specification: http://standards.freedesktop.org/basedir-spec/basedir-spec-l... . It's easy to understand and requires only a marginal increase in effort/code.

I notice the $XDG_DATA_HOME environment variable isn't set in my Intrepid install. Maybe its set in later Ubuntu version.

But the value not being set for me means implies to me that it not being set is pretty common. Thus it seems like supporting this standard is going to involve supporting a fall-back of whatever you would do otherwise.

So I don't see "easy" at all but rather extra BS. Sorry.

Re: Rob Pike: the origin of dotfiles

#30
If someone thinks hidden files are a misstep, then I don't want them designing a OS. Grandma really doesn't care about some conf file, or anything like that. She cares about the pictures of her grandkids.

The opinion that there shouldn't be hidden files comes from a perspective of someone who is a "power user" and who can't step back and see that most users really don't care for some .config file. To them it's clutter that gets in the way of finding what they really care about.

That said, dot files maybe the wrong way to do it. I like ~/Library in OSX. That's one good way.

Edit: Note that I'm talking about a general trend in the post's comments and on here. Not the author's opinion.

Post reply on HN