What is everyone's scripting language of choice and why? I lean toward Lua myself. I find it's C API fairly straightforward and it can be embedded easily. It is also one of, if not the fastest interpreted scripting languages.
The down side to the language is there is considerably less documentation available, although I think what's out there is enough to do the job, your choices are just limited. It also is not as widely seen in corporate solutions. I had a project at my last employer and I busted out Lua... everyone just looked at me. No one had heard of it... granted half the team were "Oracle Developers" which was a bloated title. All they did all day was push around PL SQL. They went with Python instead.... which got the job did...
Python Python Python Python Python Python Python Python Python Python Python Python Python Python Python Python Python
Or sh. But I'm not that good at shell script.
No but it has a cool name and you seem to like it; so I will look into it.
Perl is the one that I want to study more in-depth
Me too. My excuse is that I can't afford the book. It's like £28. I have £5. And I'm meant to be saving for my own computer so I can install four operating systems...
use chilkat;
# The mailman object is used for sending and receiving email.
$mailman = new chilkat::CkMailMan();
# Any string argument automatically begins the 30-day trial.
$success = $mailman->UnlockComponent("30-day trial");
if ($success != 1) {
print "Component unlock failed" . "\n";
exit;
}
# Set the SMTP server.
$mailman->put_SmtpHost("smtp.chilkatsoft.com");
# Set the SMTP login/password (if required)
$mailman->put_SmtpUsername("myUsername");
$mailman->put_SmtpPassword("myPassword");
# Create a new email object
$email = new chilkat::CkEmail();
$email->put_Subject("This is a test");
$email->put_Body("This is a test");
$email->put_From('Chilkat Support <support@chilkatsoft.com>');
$email->AddTo("Chilkat Admin",'admin@chilkatsoft.com');
# Call SendEmail to connect to the SMTP server and send.
# The connection (i.e. session) to the SMTP server remains
# open so that subsequent SendEmail calls may use the
# same connection.
$success = $mailman->SendEmail($email);
if ($success != 1) {
print $mailman->lastErrorText() . "\n";
exit;
}
# Some SMTP servers do not actually send the email until
# the connection is closed. In these cases, it is necessary to
# call CloseSmtpConnection for the mail to be sent.
# Most SMTP servers send the email immediately, and it is
# not required to close the connection. We'll close it here
# for the example:
$success = $mailman->CloseSmtpConnection();
if ($success != 1) {
print "Connection to SMTP server not closed cleanly." . "\n";
}
print "Mail Sent!" . "\n";
Here's some PHP to do roughly the same thing:
1 2 3 4 5 6 7 8 9 10
$_subject = "Re: Test";
$_body = "This is some body text";
$_from = "bill_g@microsoft.com";
$_to = "you@somewhere.com";
if (mail($_to, $_subject, $_body) {
echo "Email sent.\n";
} else {
echo "Error. Try a bigger eNET cable so the internet can fit through better.\n";
}
On a serious note, I know a little bit of each language since I've made some cool little programs that basically do nothing useful. I wish I still had them to show of though. >.>
If I had to say my favorite, it'd be.... *drumroll* None of the above. For games, it MIGHT be Lua. I don't really like scripting to be anywhere around my games. For everything else, I'd probably enjoy Perl or Python. Like, I said, I made some small tools but they're years old, even before my days of Unreal Script. I haven't scripting something using a script language in ages.
How old are you? I always imagined you in the range of 16-19...
I like Python and PHP best. PHP I've forgotten most of; I only spent two days learning it (a Saturday and Sunday, so a total of 10-16 hours) and then about a week using it.
I haven't done much on BASH script; I spent about an hour learning it when I was meant to be doing homework, so I don't really know it very well. I'm still learning Python. I'm probably going to make a large effort at Python, Perl and PHP in February (I'll have been programming C/C++ for ~1 year), but who knows? I like to take the "cross that bridge when I come to it" approach to everything...
I might start learning bash script again tonight...