Oocli Fantasies #
I love a few of these concepts Reyn Vlietstra has dropped on the Ruby-Talk list for an object-oriented shell. Gleaned from discussion on the R:O:S mailing list:
- methods added to filetypes
>> somesong.mp3.play
>> some.jpg.rotate(90).view
>> somefile.extension.defaultopen("/usr/bin/somebinary")
>> somefile.extension
[which would open it using somebinary]
- custom global objects
>> db.somedatabase.sometable.find_all
[active_record could be used here]>> apache.config.port = 81
[Not sure how this would work ? read/write the .conf file ?]>> apache.restart
>> samba.config.global.security = user
- chaining of commands
[grep something] | invoke a graphing application which will show the number of ocurrances by filename with a bar chart
gimp.applyfilter(gimp.filters.blur) | email.send("blured image","someone@somewhere.com")
- opengl for the command line:
- The cli then becomes more of an ide, a combo box could be popped up for command suggestions instead of the usual list of commands which saves space.
- images could be displayed on the cli iteself
- a nice graph of the chained commands could be displayed with each command’s projected inputs and outputs for the current fsm [Could be generated by doxygen]
A very sturdy list. I think you’d run into the same problem that Yubnub’s found with pipes. Especially in the case of a gimp-to-email pipe, how does the email know how to translate the incoming string? I imagine metadata will need to accompany strings which are piped. (Ripped from ruby-talk:152684.)
MenTaLguY
Or named arguments to
email.send
indicating how to interpret the incoming data. At least that’s how it’s usually dealt with already.~scpi
I didn’t entirely buy into this the first time I read it, but I’m starting to…
MenTaLguY
Aww heck, let’s do object-oriented pipes.
Example usage from
irb
:...which is equivalent to
ls -lt | grep '\.rb$' | head -8
in the Unix shell.JasonWatkins
very interesting. I really like the
pattern, that should be in ruby. Perhaps a module for any object that can be interpreted as a file, ie a byte stream. Then extensions would be methods within this module to cast these objects to an object representing the type?Another interesting idea would be to add something like distributed lexical scopes a la Obliq. Imagine this from your ruby CLI :
or even block migration to compute servers:
hgs
Interesting. The syntax is rotated in relation to the shell though:
verb obj indirect_obj
becomesobj.verb indirect_obj
which may feel odd for a shell. It might flow better in the Io language because there are spaces instead of dots between obj and its method.I think it should be tried to see if it produces something usefully novel. If people see benefit in an Adventure Shell then why not this?
Bil
FWIW , my officemate, Bill Wood, likes to use
irb
for his shell.zimbatm
Crazy, I was just thinking about this !
What would also be nice, is to use reflection on binaries to get their starting arguments.
robert
Some of this crosses over into Quicksilver: take this, do this to it…
Jo
What sounds quite interesting as well is the combination of ‘nix config files & XML (see the ruby-talk link). Some time ago I’ve run across an interesting article on “launchd” (over at www.afp548.com/article.php) that I think already combines ‘nix & XML !
Leno
So Microsoft has been touting their new shell called Monad (Hey, better late than never I always say). Now apparently theres a new Ruby-based OOCLI that will be under the GPL … it’s gonna be called…. Gonad.
b’dp ba!
rasputnik
” I imagine metadata will need to accompany strings which are piped.”
Look up “plan9 plumber” on the Googletron sometime.
Skorgu
Someone should mention the wiki
Mark
“I imagine metadata will need to accompany strings which are piped.”
The pipe could report what mime-types are available, and allow the data to be read in any applicable format; in this example, email.send would check the mime-types, see that it’s an image, and select the preferred format.
Comments are closed for this entry.