Advertisement

Recommended Scripting Languages

Started by February 08, 2012 04:32 PM
23 comments, last by Eelco 12 years, 7 months ago
I have been reading The Pragmatic Programmer, and it recommends learning a scripting language, and I happen to agree and feel this is a good idea. I have used batch scripts and linux shell scripts occasionally, but think it is time I learned a particular scripting language more fully.

What would everyone recommend?

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.

However, I also occasionally work on linux systems too, so cross platform support would be good.

Ideally it would be possible to use the script on a machine without any pre-requisites, i.e installing some sort of runtime.

My first thoughts were the following:

Perl
one of only a few langauges to tick the cross platform box, but it requires a runtime to be pre-installed.

Windows Power Shell
Doesnt require a runtime (at least on Windows 7 onwards), which is a great plus. But then from what I have just read, you need to digitally sign a script (fee) before you can use it on another computer. This shoots it completely dead in the water...

Bash / cygwin
I guess I could use bash via cygwin or similar, but again this requires a runtime, so is on a par with perl. How is its ability to interface with windows applications?

Any feedback very much appreciated.
Gavin Coates
[size="1"]IT Engineer / Web Developer / Aviation Consultant
[size="1"][ Taxiway Alpha ] [ Personal Home Page ]
My personal preferences are Lua or Python. Both are lightweight (Lua being a bit more lightweight than Python), both are easily embeddable, both are well-supported on many different platforms.
Advertisement
I'm going to go out on a limb here and say Javascript! You're not going to get cross platform without installing something on the systems.
If your focused more on a production pipeline i suggest Python or Perl, that's what I see used most often. If your learning with the intent of making games, I suggest Lua in that case. You can also check out commercial game scripts by downloading the SDK for Unreal and Unity. Unreal uses a proprietary scripting language and Unity uses several opensoruce scripting languages , Javascript, Boo, etc..
If you want it to automate system tasks, then bash, Power Shell, or Python -- also keep in mind that doing that sort of thing is as much about knowing the various other system utilities (like sort, grep, or sed for linux systems) as it is the syntax of the script itself. Most useful scripts are more of a patchwork of utilities than they are a standalone application.

If you want to create small applications then something like Python or Ruby is a good choice.

If you want to integrate the scripting language into another application, then Lua is a good choice.

Javascript also deserves an honorable mention -- for all its faults, it is the language of the web, and between node.js, the rise of web-apps, and its use in the Windows 8 Metro application model, its only going to become more useful. It's an imperfect language, but its not bad as long as you don't approach it thinking its anything like C++ or Java (despite the name).

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

Don't learn perl. That is all.
Advertisement
Python is easy and used almost everywhere. Try it and you will find it very simple to learn Python. ;)
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?
Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.

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.
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
I'd go with JavaScritp,
If you already know .net you could try the .net variant to learn the language while knowing the API and not having to annoy yourself with the DOM

This topic is closed to new replies.

Advertisement