A common user feature request has been to adding the ability to program a trigger. You know, with if-then statements and for loops, etc.
If you had to choose a language, what would it be? Why?
Perl! The language was built for processing text.
I'd vote for C/C++, but only because that's the language with which I am most familiar. Really, almost anything that allows trigger and macro programming is great.
—Alorael, who would have to except a few languages. FORTRAN, for one, is a bit esoteric for casual client-users. A punchcard system might also prove less than popular.
Dangit, I JUST got done e-mailing Jay with this idea, and now I find out there's a topic devoted to it. Hehe, sorry 'bout that.
Being a guest, I can't vote, and I'm too lazy to register, but I think Javascript would be best. Many people are already familiar with it(me being one of them), and it's very easy to learn, easier than C++ or Perl.
I was reading macslash.com today and there is a http://macslash.org/article.pl?sid=03/08/05/1532213&mode=thread, a scripting language. Reading thru the threads, here's a couple of choice comments people made:
...Never heard of it. But any language for Savitar would be great, even one that's custom made for it. Unless it's like binary or something. That would be too confusing.
I vote for Perl or Lua.
I dont know much about programming but I think I know what you all are talking about. I used to use another client and in the trigger editing window there were options for the trigger firing conditions. Such as:
If: <variable>
Is: <greater than, less than, equal to>
Then: <fire trigger, gag text, send text, etc>
This was followed by the Reply Text window.
I belive changeable menu tabs like this client had would be better than user programable triggers and such because like I said I have no idea how to program.
PERL is an obvious choice, because of it's special strengths with text processing, but it's ugly.
Python and Applescript are both good choices too, although Applescript has quite poor string handling.
HOWEVER, Applescript has a *very* neat thing called 'do shell script' which means that if you support Applescript, we can use whatever language we like - including C, just pass a string to whatever shell script, written in whatever language. Many Applescript folks just call grep, sed or PERL with 'do shell script' if they want to do any serious string crunching. Works very nicely.
A basic scripting implemetation would need at least TWO input parameters:
1 String - the server output (trigger), or user input (macro)
2 A reference to the world where this is happening (name?, id?)
The script should return true or false, indicating whether it handled the event or not. It should also be possible to send messages to the server, and/or write something into the input line ready to be sent.
That's the bare minimum, but we can already do a lot with it.
I would suggest looking at the scripting implementations of various irc clients, such as Snak, ircle, Xchat and so on. (Snak and Xchat both support more than one scripting language).
Apart from tinyfugue, scripting MUDs on Mac is almost impossible. I'll buy Savitar in a trice if I could have this feature.
I think most will vote for any language they already know.
I would look for a language and a) takes little time to implement on the coding side, and has a history of being simple to learn, and has good and available (online free) documentation.
No matter what you choose, the majority will have to learn it.
The language must be able to do arithmetic functions, and assign values to variables. Number and String variables are needed.
I am eager to see this implemented in Savitar. I would put it high on the priority list of 'things to do'.
Thanks
I don't know it, but I've seen lots of positive comments for Ruby.
Since it's been over three years since this topic was first created, and more than two months since the last post.... is there any chance this'll be implemented? I'd really be interested to see it added.
Its still something I want to add.
Do you have a preferred scripting language? (Been wanting more feedback from the user community.)
I wouldn't mind PERL myself.
Personally I'd vote for javascript, like mentioned above most would probably vote for what they are most familiar, and I can't say my opinion is any different from that. But Javascript is fairly powerful language, is not that hard to learn (I've coded my own yahtzee game in it for fun, I'm still in the process of learning perl, I know its a powerful language but it takes some getting used to, for me anyhow) and it has plenty of references out there. Otherwise I'd say go with perl
[Quick Edit:] I think support for another language would be a very good thing for savitar. I've always loved rapscallion for its range of features that even today 8 years after it lost any development are still quite good, but I moved to Savitar when I moved to OS X and have enjoyed it since, though I have used other clients such as Mudwalker, GGmud or Atlantis for their other languages that I can write scripts for, either Lua which has a syntax somewhat similar to Javascript, or Perl respectively and would be a great thing for savitar to have as well.
Good feedback. I've been pondering both JavaScript and Lua.
Now that Savitar 1.4 is out the door, the real fun begins. Savitar 2.0 will pick up development speed now. Savitar 2.0 is going to be the foundation for the new scripting language.
I hate to necrotize a thread, but I would vote for perl and/or shell (sh/ksh/csh/bash) scripting, with a definite boost for the Applescript 'do shell script' mentioned on page one.
Also, if the language in question could be used at the command line, that would be great, too. This would be fantastic for troubleshooting script segments in real time, as well as performing multiple commands, inserting aliases, redefining variables, and so on, in a live mudding environment.
dont know if it is to late to vote, but what about bash scripting, I know how to use that
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)