Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would guess not, given how the article notes later on that "cp" has no recursion flag:

> Imagine how many separate Unix commands have the TreeWalking built into them... RefactorMercilessly.

And suggests the following shell script instead:

  #!/bin/rc
  switch ($#*) {
        case 2 @{ cd $1 && tar c . } | @{ cd $2 && tar x }
        case * echo usage:  dircp from to >[1=2]
  }
Which is horrifying (how would you ever figure out what " $#* " means?), even without the context of the article's own dislike and distrust of system customization:

> The wide variety of superusers allowed each of them to inflict their style guidelines on the structure of the file system... Now where did that @#!$ superuser put gcc or perl or ...

So what's going to happen here? Every time someone wants to list or copy or search or whatever recursively, they're going to have to either write their own potentially buggy variation on this script, or use someone else's. Is there a convention for where they put that script? Every time someone deploys a new Plan9 box, they're probably going to remember that this was a problem before and provide some kind of script like this. Now where did that @#!$ sysadmin put it?

The solution to the repeated code problem is a library, not stripping critical functionality from core system utilities and burdening users with unnecessary complexity. Why is this 40 year old operating system making me so angry!? I should get out more.



> (how would you ever figure out what " $#* " means?)

The same way you figured out what "$@" or "$*" mean on unix: Reading the manual. For that matter, the variable's meaning is the same as on Unix, except with a 'count length of list' operator in there.

Because the plan 9 shell has proper lists, integrated in nicely. Which means that the script above will work even if the arguments have spaces in the filenames.

> Now where did that @#!$ sysadmin put it?

Doesn't matter, I bound it in to my /bin. All binaries are in /bin after you're done setting up your namespace.


> (how would you ever figure out what " $#* " means?)

It's in the manual.

> Now where did that @#!$ sysadmin put it?

The point of Plan 9 is that you don't rely on the sysadmin to put things places for you. You'd mount your home filesystem from wherever it lives and everything would be back to where you expect it. You could even mount /bin from whatever machine you wanted.

Plan 9 does not work in pieces. It only works if you're all-in, which is the reason I don't use it. But when you're all-in, it's very nice. None of the things you're objecting to turn out to be problems in practice. The problems in practice come from not having a c++ compiler or a web browser.


> You could even mount /bin from whatever machine you wanted.

Neat! Now my system is completely unusable if another computer is down or unreachable!

And to think people around here bad-mouth cloud computing.


The fact this got downvoted without discussion must prove it completely discredits Plan 9.


It has more to do with nobody getting paid to teach you about systems engineering. Some search engine keywords to get you started are "distributed systems fault tolerance".


That's utterly irrelevant to my point, but thanks for playing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: