From: David Garamond Date: 2004-05-08T00:25:11+09:00 Subject: Re: any ideas for a shell based on Ruby? Martinus wrote: > hello newsgroup, > > Recently I have played with the idea of writing a shell based on ruby. > I think this would be pretty cool, consider the following syntax: > > user@machine ~> ls.sort(:time).last.rm > > removes the oldest file in current directory: > 1. ls returns a special array of Filename objects > 2. The array is sorted by the attribute :date > 3. the last element is chosen from the array > 4. the file removes itself > > I am looking for other good ideas that justify creating such a ruby > based shell :-) Don't take this as a discouragement, but I've always had a mixed feeling towards a Ruby shell (or Perl shell, or C# shell, etc). If we stick to Ruby syntax strictly, it will be a more cumbersome/verbose shell than bash/csh (e.g. we will need to quote all filenames, environment variables will need to in a special container, etc). If we add many magic or shortcuts (e.g. adding methods like #filesize to String or even overriding #size), it will not be Ruby anymore. Some people have trouble remembering Ruby and bash, and then they now have to remember _yet another_ syntax (which is not exactly Ruby, and not quite bash either). I think I'll pass from using such a mixture shell on a daily basis, except when I'm bored ;-) -- dave