5 ms·
Rob Pike apparently regrets all the "." file naming. https://plus.google.com/u/0/+RobPikeTheHuman/posts/R58WgWwN9jp https://plus.google.com/u/0/+RobPikeTheHuma
by tyingq 8y ago
Rob Pike apparently regrets all the "." file naming.
https://plus.google.com/u/0/+RobPikeTheHuman/posts/R58WgWwN9jp https://plus.google.com/u/0/+RobPikeTheHuman/posts/R58WgWwN9...
- nickysielicki 8y agoThis comment made me realize that there are a lot of really good posts on Google Plus by people like Rob Pike, Greg Kroah-Hartman, Linus Torvalds and others. For whatever reason, systems programmers liked Google Plus. Anyway, I hope someone is archiving them somewhere, because there's a lot of knowledge there that will otherwise be lost in a few months.
- z3t4 8y agoI always wondered about the "dot files" convention. That's a really good story! If I knew there where posts like this one I would join in a heartbeat. Where can I find communities like this today !? I always seem to be too late ...
- donatj 8y agoMy immediate thought when they announced they were shutting down was "What about Linus's posts?!"
- dcbadacd 8y agoGoogle Plus played less with people's emotions, that's why it sucked as a social media but was quite okay to follow content makers and to manage/participate in groups.
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- charonn0 8y agoIsn't he talking about something different, though? Specifically the convention that file names starting with "." are hidden?
- lottin 8y agoYep, nowhere in the post does he suggest regretting chosing "." to denote the current working directory.
- ori_b 8y agoReading that post indicates that he regrets the existence of hidden files, not the existence of '.' and '..'
- tyingq 8y agoYes, that's right. He does have issues with how ".." works in Unix though. There's a pretty detailed explanation from him here: http://doc.cat-v.org/plan_9/4th_edition/papers/lexnames http://doc.cat-v.org/plan_9/4th_edition/papers/lexnames (scroll down to about the third appearance of "..")
- cyphar 8y agoYes, though Plan9's implementation of ".." Is incredibly different to Unix. It's treated as a lexical token rather than an actual directory entry, and so therefore certain strange cases with symlinks are handled differently (though Plan9 doesn't have symlinks either). From memory Rob Pike had a blog post about this problem and why Plan9 does lexical path cleaning on all paths before resolution.
- IgorPartola 8y agoI had no idea .. wasn’t treated as a lexical token in POSIX. Why the hell is it not and what would break if it suddenly was? Also, why do you need a new syscall to do it when it seems like string manipulation is all that’s necessary?
- cyphar 8y agoThe most obvious example of something that would break is any code that uses symlinks. Here's an example: % ln -s foo/bar/baz link % ls ./link/.. This resolves in POSIX to "./foo/bar", not "." (which is how it would resolve in Plan9 if Plan9 had symlinks). If you treated ".." as a lexical token you'd have to sanitise it before doing anything else and thus you'd end up with Plan9-like semantics. You could also make the argument that Plan9's ".." semantics actually cause inconsistencies between "cd $path; ls .." and "ls $path/.." -- and this is especially true for Linux's "magic links" in procfs. So if you prefer a consistent VFS then making ".." a lexical token is not the best idea. > Also, why do you need a new syscall to do it when it seems like string manipulation is all that’s necessary? I'm not sure what you mean -- Plan9 is a separate operating system which does the above path sanitisation with each path-related syscall.
- IgorPartola 8y agoYour comment is a bit misleading. He is regretting introducing a bug which resulted in creation of hidden files. He isn’t regretting using . and ..