lamas
lamas

Reputation: 4598

Use of general-purpose scripting languages

There are many scripting language communities claiming that the language can be used for everything but in fact, nearly everybody uses it for one specific thing, e.g.: web development. If I take a look at Ruby, for example, they tell you its general-purpose but actually everybody is using it with rails for web development only..

best regards, lamas

Upvotes: 3

Views: 3122

Answers (5)

Nathan
Nathan

Reputation: 3920

Nobody mentioned AppleScript!

Hahah, no seriously, Perl runs everywhere, is installed by default on (almost) any Unix-family OS (and is easy to get on Windows), and is extremely useful for gluing things together. And if you browse a bit at CPAN you'll see that it's extremely general-purpose. "Swiss army chainsaw" was intended as a slur but I think of it fondly. Performance is good too, though it hardly ever actually matters. Larry Wall's goal was "make easy things easy and hard things possible".

OK OK, so I'm a fanboy still, sigh.

Upvotes: 0

Chinmay Kanchi
Chinmay Kanchi

Reputation: 65883

I tend to use Python for most things that aren't compute bound, i.e. they aren't restricted by how many computations you do per second. Some of the things I've used Python for are:

  1. General scripts to manipulate images etc. with the Python Imaging Library.
  2. GUI frontends for command line applications using the pexpect module.
  3. Mathematical modeling of microbial systems.
  4. Bioinformatics.
  5. Some web programming.

etc...

When the program/algorithm is compute bound, I use C together with Python and Ctypes. Does this fit your definition of general purpose? It's certainly useful for a wide variety of applications, but not suitable if the program needs to crunch numbers fast.

Stability: Python 2.5/2.6 is rock solid. Never had a crash that wasn't caused by self-stupidity.

Fast development: It's definitely worth it for me. For the most part, in the field where I work, programmer time is orders of magnitude more valuable than processor time. I'm quite happy to let a program run for hours if I can write it in a few days instead of a few weeks.

Upvotes: 3

Earlz
Earlz

Reputation: 63815

I often use ruby for what other people would create bash/sh files for. I find Ruby syntax intuitive for batch tasks along with a lot of other sorts of tasks(it's my goto language)

Perl is extremely popular for general scripting in unixes, such as there are package managers and websites and maintenance scripts written in perl.

Python is extremely popular for both web and application use.

VBA Is popular for being abused to write programs inside of Access, and also was once commonly used in ASP for websites (right?)

Upvotes: 1

Aiden Bell
Aiden Bell

Reputation: 28386

claiming that they can be used for everything but I often can't find any examples for that

You are basing your question on an incorrect assumption. Although, as pointed out, a Turing complete language will be able to compute what you require ... languages are 'viewed' by most as the sum of their most useful features and productive semantics.

The reality is:

  1. Most scripting languages can do the same things, or support the most common things via libraries.
  2. Some languages make a subset of operations more convenient, take Perl and regular expressions as an example
  3. CPU time is cheap, as is RAM. Simple to understand code is the priority for most people.

The rise of the scripting languages is natural. Trying to assert any one language, approach or level of execution is good for a range of situations is usually fruitless.

  1. What do you want?
  2. What is the best language for that?
  3. Is is fast enough or small enough? Usually the answer is yes

Imagine trying to use Python where you should be using Erlang, or C instead of Lisp because you thought all languages are equal. They aren't, even though, you can achieve the same things in a problem domain, in most languages/platforms with varying levels of ballache dependant on the task.

Upvotes: 2

Joeri Sebrechts
Joeri Sebrechts

Reputation: 11136

I often use PHP for things that I used to use bat files for. Much easier to write. Ironically, the deployment scripts to create installable materials for my web apps from the subversion sources are written in PHP.

Python is popular in the gaming community. EVE Online is written in python.

Upvotes: 2

Related Questions