On May 5, 2006, at 4:25 p, Bob Hanson wrote:

Timothy Driscoll wrote:

On May 5, 2006, at 2:28 p, Bob Hanson wrote:
Tim, the issue is simply this: It's unlikely that the Jmol team would know, for example, that a specific user had used "src" (just as an example). Are we to then consider asking all users "Can we use 'src' for a command, or are you already using it?" That's what I mean by being careful with your definitions. Any user defining terms risks future breaks. That's all I'm saying. I'm personally recommending tilde (not underscore) because I know for a fact that it is not used in any Jmol definition, and so that works.

I understand and can appreciate this. and I have little experience with software development. but from what I know, predefined terms often can be overridden by the user without breaking things (perl comes to mind especially, but this is also true in Rasmol and was in Chime). the term is simply redefined in local context. then it is the author's responsibility to make sure their application makes proper use of the term. hopefully this is what Jmol will do.

Not yet, though.

ok; I can appreciate that. not all software con function the same way. I imagine there are good reasons *not* to allow/accept this.



undoubtedly it is my ignorance showing, but I would expect Jmol to know the difference between a keyword string and a token. for example, from context? for example, I would never use a defined set called 'connected' in the context 'select connected (x)'; likewise, I could never use the token 'connected' in 'select connected' (or could I?).

The compiler isn't that smart. It first runs through the list checking for known "tokens" assigning them their integer-based identifier. When you define a term, that term is looked up in the "known token" database. If the token is there, you are out of luck. Full stop: "invalid expression token..."

So whether the term is followed by parentheses or not, that's not the issue. "connected" is defined; you cannot reassign it.

ack.  I did not fully understand that.


Now, SHOULD you be able to reassign it? That's a question Miguel has to answer. I'm pretty sure he does not agree with me that the user should be able to override tokens "locally" as you say is possible in other scripting languages and, apparently in Chime and RasMol. (I'm not so sure about that -- I see you can't, for example, define "backbone" in RasMol.) It's just introduces too much unpredictability into the application to let people do that.

I think 'override tokens' was the wrong language for me to use. I was thinking about redefining predefined sets like protein and nucleic. but in fact, in hindsight, I see the problem is with tokens, and I can see how this may be undesirable. I do not use definitions like 'backbone' or 'connected' myself, but I can see how it would be quite easy to do so.

I have some thoughts about this, but I want to wait and bring them up a little later. too far off-topic already. :-)


You have some great, very elaborate scripts there, Tim. I know you have worked very very hard to make them do the most amazing things. I think there are probably 4 or 5 people in the world with that sort of extensive scripting base. I don't want to make more work for you, and it worries me that we might introduce a capability like

  select molecule=3

that would break your pages.

I appreciate the compliment, but I can see how this issue could bite even a simple script. so we need some obvious way to tell an author that he/she has used a token as a defined set. other than having the script die, if possible. but we can discuss this another time.


thanks for the clarification, Bob,

tim
--
Timothy Driscoll                                em: [EMAIL PROTECTED]
Virginia Bioinformatics Institute               ph: 540-231-3007
Bioinformatics I                                im: molvisions
Washington St., Blacksburg, VA 24061

"Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin." - J von Neumann





-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to