Re: [Opensim-dev] Organization and naming patterns of commands on the console
Any chance we can have the verb first, as this is much more intuitive? E.g. create user create region Also, we really want to then avoid having some commands with hyphen if some do not. That awkward to get right . I always do create-user and then realise it does not work. E,g, command-script would have to be changed Another thing... if the command is not recognized or has parameter issues, just now it just comes back to the prompt. A little acknowledgement that the command is not recognized would be nice. ___ Opensim-dev mailing list Opensim-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/opensim-dev
Re: [Opensim-dev] Organization and naming patterns of commands on the console
Justin, I like this idea - it also greatly simplifies the initial help, which can simply refer the user to the sub command helps - e.g. user help These new sub command helps can then be much more lengthy if need be... Justin Clark-Casey wrote: Hello, I want to add more commands to the archiving module but I want to do this within the module itself rather than adding any specific logic to core. The terrain module already has a 'module commander' to help do this, but this prefixes all commands with the word terrain (e.g. terrain fill, terrain load, etc.) For consistency purposes, eventually I think that all console commands should largely follow the same pattern. If we the terrain module scheme, then we get the following kinds of changes (if we assume that commands from different modules can actually share the same initial 'keyword') backup= region backup create user = user create create-region = region create help users= user help (for user commands) show assets = assets show show users= user show load-xml = region xml load (?) load-oar = region oar load (?) kickuser = user kick I think that the pros of this approach are that it makes it easy to avoid name collisions and easy to distribute commands to the right module. The console seem to include the fact that it's not very intuitive (e.g. show users seems easier to remember than user show) and it involves more typing in some cases (e.g. region xml load rather than load-xml or load xml). Any thoughts on this? Just kind of thinking about it at this stage - part of me prefers typing things like show users or help terrain while another part of my mind likes the 'tidiness' of prefixing every module command with the same word (e.g. terrain fill or region oar load). -- Kurt Taylor (Kurt Stringer) ___ Opensim-dev mailing list Opensim-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/opensim-dev
Re: [Opensim-dev] Organization and naming patterns of commands on the console
Ai Austin wrote: Any chance we can have the verb first, as this is much more intuitive? E.g. create user create region Also, we really want to then avoid having some commands with hyphen if some do not. That awkward to get right . I always do create-user and then realise it does not work. E,g, command-script would have to be changed I hear you - I'm also personally starting to favour a solution that doesn't require an initial module keyword (though then ideally one has to try and catch clashes between modules which try and register the same command). I also know what you mean about the inconsistency - I do hope that will clear up eventually (at least within core), but it's actually quite a chore to correct because of the various ad hoc parsing of commands that goes on. Another thing... if the command is not recognized or has parameter issues, just now it just comes back to the prompt. A little acknowledgement that the command is not recognized would be nice. I agree. Unfortunately, there is again quite a bit of messiness in the code that prevent this being easily done right now. -- justincc Justin Clark-Casey http://justincc.wordpress.com ___ Opensim-dev mailing list Opensim-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/opensim-dev
Re: [Opensim-dev] Organization and naming patterns of commands on the console
+1 on having a clear *and* documented interface for console commands. I think that the verb + target paradigm is much more universal in Unix, SQL (create Table, not table create) and people can remember easily. Also commands should help people in understand why there are similar commands save-xml save-xml2 save-oar and the meanings of some obscure ones. In case of errors also some hints, for instance create shoud prompt for a list of available create objects... Should this be a good start? ___ Opensim-dev mailing list Opensim-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/opensim-dev
Re: [Opensim-dev] Organization and naming patterns of commands on the console
I always liked a feature often seen on some older unix terminal based programs, like some curses based IRC clients, where just typing enough characters of a command to resolve any ambiguity would give you the complete command, and where the help section is nicely organized. It sounds to be like that may be what you are describing? Another issue I find, not sure if it's related or not, is the inability to use the backspace key in the OpenSim console while running on various linux distributions. I don't know where this is coming from, but I wonder if it's something OpenSim could control? On Thu, Feb 5, 2009 at 10:28 AM, Stefan Andersson ste...@tribalmedia.sewrote: Just chipping in my 2c: How about the modules are supposed to register the 'command' whatever that is, but that the 'command' can include spaces? So, create user should be a valid command, sending the remainder to that region (via the registered delegate). which means another module can register create region but not create user, as that would have already been registered. Of course, it cannot register a non-character terminated subset either, like simply create. the command parser would simply run thru the list, doing a 'starts with characters' match, probably with a non-character terminator in the regexp. (If you're really anal on performance, the whole list of matches can be concatenated into a regexp and compiled once) Of course, you would have to register help create user as well, but it seems to me that there could be an abstract base class providing some protected generative helper functions. (To either create and register verb+ +noun and/or noun+ +verb, and the corresponding help text in one go) This seems like the most flexible approach to me, as it poses no limitations on what commands makes the most sense for each context. Best regards, Stefan Andersson Tribal Media AB Date: Thu, 5 Feb 2009 18:30:25 +0100 From: drscofi...@xyzzyxyzzy.net To: opensim-dev@lists.berlios.de Subject: Re: [Opensim-dev] Organization and naming patterns of commands on the console Justin Clark-Casey wrote: Ai Austin wrote: Any chance we can have the verb first, as this is much more intuitive? E.g. create user create region i prefer addressing the entity that is supposed to do something first (to get it's attention, so to speak), then tell it what to do: region create user create user reset password that approach also has the advantage that it's up to the module what vocabulary to support. -- dr dirk husemann virtual worlds research ibm zurich research lab SL: dr scofield drscofi...@xyzzyxyzzy.net http://xyzzyxyzzy.net/ RL: h...@zurich.ibm.com - +41 44 724 8573 - http://www.zurich.ibm.com/~hud/ ___ Opensim-dev mailing list Opensim-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/opensim-dev ___ Opensim-dev mailing list Opensim-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/opensim-dev ___ Opensim-dev mailing list Opensim-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/opensim-dev
Re: [Opensim-dev] Organization and naming patterns of commands on the console
Well, I don't mean anything that advanced; It just struck me that commands could just as well contain spaces. Best regards,Stefan AnderssonTribal Media AB Date: Thu, 5 Feb 2009 10:53:26 -0800From: dahliatrim...@gmail.comto: opensim-...@lists.berlios.desubject: Re: [Opensim-dev] Organization and naming patterns of commands on the consoleI always liked a feature often seen on some older unix terminal based programs, like some curses based IRC clients, where just typing enough characters of a command to resolve any ambiguity would give you the complete command, and where the help section is nicely organized. It sounds to be like that may be what you are describing? Another issue I find, not sure if it's related or not, is the inability to use the backspace key in the OpenSim console while running on various linux distributions. I don't know where this is coming from, but I wonder if it's something OpenSim could control? On Thu, Feb 5, 2009 at 10:28 AM, Stefan Andersson ste...@tribalmedia.se wrote: Just chipping in my 2c: How about the modules are supposed to register the 'command' whatever that is, but that the 'command' can include spaces? So, create user should be a valid command, sending the remainder to that region (via the registered delegate). which means another module can register create region but not create user, as that would have already been registered. Of course, it cannot register a non-character terminated subset either, like simply create. the command parser would simply run thru the list, doing a 'starts with characters' match, probably with a non-character terminator in the regexp. (If you're really anal on performance, the whole list of matches can be concatenated into a regexp and compiled once) Of course, you would have to register help create user as well, but it seems to me that there could be an abstract base class providing some protected generative helper functions. (To either create and register verb+ +noun and/or noun+ +verb, and the corresponding help text in one go)This seems like the most flexible approach to me, as it poses no limitations on what commands makes the most sense for each context.Best regards,Stefan AnderssonTribal Media AB Date: Thu, 5 Feb 2009 18:30:25 +0100 From: drscofi...@xyzzyxyzzy.net To: opensim-dev@lists.berlios.de Subject: Re: [Opensim-dev] Organization and naming patterns of commands on the console Justin Clark-Casey wrote: Ai Austin wrote: Any chance we can have the verb first, as this is much more intuitive? E.g. create user create region i prefer addressing the entity that is supposed to do something first (to get it's attention, so to speak), then tell it what to do: region create user create user reset password that approach also has the advantage that it's up to the module what vocabulary to support. -- dr dirk husemann virtual worlds research ibm zurich research lab SL: dr scofield drscofi...@xyzzyxyzzy.net http://xyzzyxyzzy.net/ RL: h...@zurich.ibm.com - +41 44 724 8573 - http://www.zurich.ibm.com/~hud/ ___ Opensim-dev mailing list Opensim-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/opensim-dev___Opensim-dev mailing listopensim-...@lists.berlios.dehttps://lists.berlios.de/mailman/listinfo/opensim-dev___ Opensim-dev mailing list Opensim-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/opensim-dev