Help - Search - Members - Calendar
Full Version: Scripting Support
Heynow Software Forums > Savitar Software Application > Feature Requests
jay
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
Perl! The language was built for processing text.
Alorael
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
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.
jay
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
...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. tongue.gif
Shan
I vote for Perl or Lua.
Vesence
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
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
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 cool.gif 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
I don't know it, but I've seen lots of positive comments for Ruby.
Leshke
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
Its still something I want to add.

Do you have a preferred scripting language? (Been wanting more feedback from the user community.)
Leshke
I wouldn't mind PERL myself.
Ankiseth
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
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
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
dont know if it is to late to vote, but what about bash scripting, I know how to use that smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.