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?
Shan
May 10 2003, 01:38 AM
Perl! The language was built for processing text.
Alorael
May 10 2003, 04:22 AM
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.
Guest
Aug 5 2003, 05:58 PM
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
discussion about Ruby 1.8, a scripting language. Reading thru the threads, here's a couple of choice comments people made:
QUOTE
Ruby is cool (Score:0)
by Anonymous Coward on Tuesday August 05, @01:31PM ( #45698 )
Ruby is pretty cool. It has a nice smalltalky approach which makes it quite agreeable if you love OOD - far nicer than Perl or Python. I still prefer Perl for scripting since CPAN has a lot more to offer than Ruby, and I generally am writing sysadmin scripts where OOD is not really needed or appropriate. Plus Perl is still a lot faster than Ruby or Python. But I am looking forward to seeing a wider availability of libs for Ruby's since when OOD/OOP is appropriate Ruby is a lot nicer to work with that the inconsistent mess that is Python, and Perl is even worse (though Perl 6 looks really promising).
And someone else wrote:
QUOTE
Ruby is cool but I prefer F-Script (Score:0)
by Anonymous Coward on Wednesday August 06, @09:11AM ( #45776 )
Ruby is quite nice and it is cool to see it included in OS X. However, I much prefer Smalltalk (in some way, it is sad to see that Ruby is not as good as a language designed 30 years ago), and as far as OS X scripting is concerned, I recommend looking at F-Script [fscript.org], which is natively based on the Cocoa/Objective-C object model.
Any of you guys familar with Ruby and/or F-Script?
/Jay
cybern8r
Aug 9 2003, 03:40 AM
...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.
Shan
Dec 31 2003, 04:11 PM
I vote for Perl or Lua.
Vesence
Feb 11 2004, 11:15 PM
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.
Brennan Young
Apr 4 2006, 12:36 PM
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.
water
Aug 18 2006, 08:51 PM
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
Makyo2
Aug 18 2006, 10:20 PM
I don't know it, but I've seen lots of positive comments for Ruby.
Leshke
Oct 22 2006, 09:05 PM
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.
jay
Oct 23 2006, 02:28 PM
Its still something I want to add.
Do you have a preferred scripting language? (Been wanting more feedback from the user community.)
Leshke
Nov 1 2006, 06:13 PM
I wouldn't mind PERL myself.
Ankiseth
Dec 21 2006, 01:29 AM
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.
jay
Dec 22 2006, 01:27 PM
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.
nevlik
Nov 17 2007, 06:39 PM
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.
Myra
Mar 28 2009, 03:27 AM
dont know if it is to late to vote, but what about bash scripting, I know how to use that
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.