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

Well it's an interresting project, although i fail to see the improvement over a regular bash/zsh shell.

> bash and ssh, we love you, but your era is past.

I'd love for that to be true, but let's see how their first example does compare against bash/ssh:

    local = Rush::Box.new('localhost')
    remote = Rush::Box.new('my.remote.server.com')
    local_dir = local['/Users/adam/myproj/']
    remote_dir = remote['/home/myproj/app/']
    
    local_dir.copy_to remote_dir
    remote_dir['**/.svn/'].each { |d| d.destroy }
versus

    remote=my.remote.server.com
    local_dir=/Users/adam/myproj/
    remote_dir=/home/myproj/app

    scp -r $local_dir $remote:$remote_dir
    ssh $remote "find $remote_dir -name .svn | xargs rm"
Okay so, bash/ssh is a tiny bit shorter, but that was to be expected.

Contrary to bash reputation, there is a lot less hard to type line noisy characters in the bash/ssh version than in the rush one, namely all the |[{ etc of the ruby version.

In my opinion, due to the reduced line noise, the bash/ssh version is a lot easier to read too. But it's less self-explanatory, in that scp/ssh commands are replaced by full names.

One might argue that the rush version is more conceptually elegant, because everything is objects, and you can streamline treatments this way, but :

- Even if this isn't true for bash, in practice it's the same thing, because connection strings are treated like hosts by all relevant programs, directory strings like directories by all relevant programs, etc. You lose in typing but not in usability

- This is in a context of a script where the authors considered it was better to actually have variables for everything, so that, i guess, the thing be better configurable, readable, and reusable. That's a good goal, but it's not always necessary.

Let's see how "raw" versions of the two compare :

    scp -r /Users/adam/myproj/ my.remote.server.com:/home/myproj/app
    ssh my.remote.server.com "find /home/myproj/app/ -name .svn | xargs rm"
versus

    root['/Users/adam/myproj/'].copy_to Rush::Box.new('my.remote.server.com')['/home/myproj/app/']
    Rush::Box.new('my.remote.server.com')['/home/myproj/app/**/.svn/'].each { |d| d.destroy }
The verboseness is of course worse when you don't declare variables. Let's be honest, i don't often declare variables for one off commands on the shell. I use auto-complete and i'm done with it. And for having typed this rush example by hand, i can assure you i'm not really ready to type that again anytime soon.

So i seriously doubt something like rush can replace something like bash/ssh. The benefits are likely to show up for bigger operations, where lots of people already use perl/python/ruby anyway because bash is a PITA for any serious programming, but bash still seems a lot more usable as a "shell", and i kind of understood this was the purpose of this.



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

Search: