Advertisement

Recommended Scripting Languages

Started by February 08, 2012 04:32 PM
23 comments, last by Eelco 12 years, 8 months ago

[quote name='Luckless' timestamp='1329083103' post='4912353']
Python really is beautiful once you get into using it, either as an embedded scripting language, or high level "Frame-work" language as a primary programming language.

I've often heard a lot of stuff about Lua, but have never really had time to dive into it. Any real advantage to exploring it (Beyond knowing a new tool) or using it over Python if you're not going to work on existing Lua code base?


The main advantage i can think of is that it is extremely easy to integrate it with an existing C or C++ application, it is far more lightweight than python and last time i checked luaJIT outperformed its python counterparts, other than that its mostly down to personal preferences.
[/quote]
Easier than boost::python?

To make the case for python:it is way more popular than lua, with an insane number of great libraries. Is there such a thing as numpy for lua, and if not, what does that mean for the defacto efficiency of a typical calculation-intensive application written in either? I mean, where it really matters you would fall back to C, but how does a lua-loop stack up to a numpy expression, which is just some syntactic sugar for a C library call?

Im not familiar with lua at all, but even if it has some theoretical niceties over python, there is something to be said for the herd mentality here, and defer to the popularity of python.

Easier than boost::python?

To make the case for python:it is way more popular than lua, with an insane number of great libraries. Is there such a thing as numpy for lua, and if not, what does that mean for the defacto efficiency of a typical calculation-intensive application written in either? I mean, where it really matters you would fall back to C, but how does a lua-loop stack up to a numpy expression, which is just some syntactic sugar for a C library call?

Im not familiar with lua at all, but even if it has some theoretical niceties over python, there is something to be said for the herd mentality here, and defer to the popularity of python.


More popular than who, and to whom? In what application domain?

Lua is very widely used for scripting in commercial games, and has strong use in other applications. If your focus is on an embeddable scripting language, then Lua is increadibly competitive on the popularity front. Lua gained its popularity in large part because it is easy to embed, and has a strong feature set. Something like boost::python would probably find it tough to be adopted in games since the focus is on console games, and console devs in particular shy away from (or simply can't) use boost on their platform (which may or may not matter to the OP).

Python might well be a nice language to use in an embedded way, but that's really not its base -- the good feelings about python (and again, I'm not saying they're incorrect) are in large part due to its more stand-alone uses (writing apps, shell scripts), so its an incomplete analysis to simply say that Python is just so popular that you should give in and use it.

throw table_exception("(? ???)? ? ???");

Advertisement

[quote name='Eelco' timestamp='1329165162' post='4912720']
Easier than boost::python?

To make the case for python:it is way more popular than lua, with an insane number of great libraries. Is there such a thing as numpy for lua, and if not, what does that mean for the defacto efficiency of a typical calculation-intensive application written in either? I mean, where it really matters you would fall back to C, but how does a lua-loop stack up to a numpy expression, which is just some syntactic sugar for a C library call?

Im not familiar with lua at all, but even if it has some theoretical niceties over python, there is something to be said for the herd mentality here, and defer to the popularity of python.


More popular than who, and to whom? In what application domain?

Lua is very widely used for scripting in commercial games, and has strong use in other applications. If your focus is on an embeddable scripting language, then Lua is increadibly competitive on the popularity front. Lua gained its popularity in large part because it is easy to embed, and has a strong feature set. Something like boost::python would probably find it tough to be adopted in games since the focus is on console games, and console devs in particular shy away from (or simply can't) use boost on their platform (which may or may not matter to the OP).

Python might well be a nice language to use in an embedded way, but that's really not its base -- the good feelings about python (and again, I'm not saying they're incorrect) are in large part due to its more stand-alone uses (writing apps, shell scripts), so its an incomplete analysis to simply say that Python is just so popular that you should give in and use it.
[/quote]
Of course, it all depends on what you want to do. Im not saying python is the end to be all, just making a case for it. I suppose lua is good for embedded scripting if you say so; (though if you happen to be developing on .NET, the integration with ironpython is unbeatable). But anyway, embedded scriping is kindof a niche application. To go back to the OP:


[color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

Obviously the choice is going to vary depending on need, which is where im struggling to pick one. I primarily work on Windows based systems, doing everything from system admin to application and web development. [/quote]

[/font][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

Python excels at both of these; no mention of a particular need for embedded scripting.

[/font]



Obviously the choice is going to vary depending on need, which is where im struggling to pick one. I primarily work on Windows based systems, doing everything from system admin to application and web development.


[color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

Python excels at both of these; no mention of a particular need for embedded scripting.[/font]



[/quote]
yes, I was not looking for an embedded scripting language, but rather a scripting language for automating admin tasks and manipulating text files etc.

I completely forgot about Python when writing my post, but having read the replies, I feel this is probably the most suitable language to learn. Thanks everyone for all the comments.
Gavin Coates
[size="1"]IT Engineer / Web Developer / Aviation Consultant
[size="1"][ Taxiway Alpha ] [ Personal Home Page ]
Perl or Python is the closest thing to cross-platform scripting language that can automate admin tasks that I know of.
Going with Python is a nobrainer because it can pretty much do why Perl does but does take years to grok the syntax and you'll actually be able to come back to your code and be able to read it months later laugh.png

Here's a short article comparing Python and Perl and some of the problems you might run into if you are using them on Windows.
Making the Command Line Cool Again
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
I've done a decent amount of powershell scripting. It's not true about the license fee. You can use it on other computers. By combining powershell scripts and VMWare's vSphere SDK, I am able to deploy an entire network infrastructure with two mouse clicks (domain controller, sql server, exchange, sharepoint, etc). If you're looking for a scripting language to support your job as a sys admin, powershell is the way to go. It's got a bit of a learning curve to it, but it's not impossible for scripting newbies to pick up.
Advertisement

If you're looking for a scripting language to support your job as a sys admin, powershell is the way to go.

Unless, of course, your sysadmin job happens to cover Linux/Unix/Mac in addition to Windows.

In which environment, Python is really hard to beat.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Actually -- don't mean to hijack this thread but don't want to start a new one for something so similar -- but I need to do some scripting of Blender for something I'm working on but have never touched Python. I've been meaning to learn Python for a long time (because I have an irrational hatred of Perl which is the only scripting language I know well). Anyway, can someone suggest an internet-based resource for learning Python quickly for someone who is coming from a strong C++ background?

Anyway, can someone suggest an internet-based resource for learning Python quickly for someone who is coming from a strong C++ background?

Back in the day, I just ran through the tutorial on python.org - coming from a C++ background with a smattering of functional programming, that was plenty.

I've subsequently been told that it isn't a very accessible tutorial, so YMMV.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]


[quote name='jwezorek' timestamp='1329245321' post='4913071']
Anyway, can someone suggest an internet-based resource for learning Python quickly for someone who is coming from a strong C++ background?

Back in the day, I just ran through the tutorial on python.org - coming from a C++ background with a smattering of functional programming, that was plenty.

I've subsequently been told that it isn't a very accessible tutorial, so YMMV.
[/quote]
Learn Python the Hard Way
and
Invent with Python are both fun and easy reads to learn it.
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe

This topic is closed to new replies.

Advertisement