Suggestion A For Scripting Language


What language would you recommend for the task of just manipulating plain text-files and other “byte-based” formats, such as xml or html?

Basically, what I want to do is this:

  • open a file (e.g. a xrns-file)
  • manipulate the content with conditionals (if:s, while:s and such)
  • extract certain strings from the file
  • write new content to and render a new xml file or html file based on the extracted data

I know this is pretty standard stuff that can be accomplished in virtually every programming language out there, but I guess my real question is if there is some kind of language that niches in these tasks; i.e. data extraction/manipulation (in the same way there are languages that niche in graphics and 3D-programming).

In other words, is there a language or tool out there that basically was developed for the purpose of manipulating textbased files, with pre-definied methods and functions for common tasks. (No, I am not asking for a macrobased texteditor; the script should be able to run as stand-alone executable.)

I have some cool ideas for XRNS scripts, I just want to learn how to get started and experiment without having to spend weeks on learning how to program in Python or some other language. But maybe that’s unrealistic. Any suggestions?

same here… lots of idea’s, just don’t know where to start…

i played a bit with just altering the randomize scripts which was fun but not really satisfying because i’m baaaad with php…

hrmm right, guess i should learn php better ?

PHP has a lot a features for data extraction, XML support, regular expressions, and logic.
Which, I guess, is why is was the choice for XRNS-PHP in the first place.

Have you tried downloading the XRNS package, and messing around with it ?

Perl is probably the best scripting language for text manipulation.

Since Perl is not very common these days, his retarded cousin PHP is very good.

Yes, a lot of people like to hate on PHP. It’s not very academic, has historically been plagued with bad practices, is missing some fundamentals (like namespaces), but it has several XML libraries built in 5.2 and, around these parts anyway, was the only scripting language to step up and actually do something with XRNS (so far)

Python and Ruby are the scripting languages for “smart people”, if you don’t like PHP then check those two out. Python is used in Blender (a 3d program) and has been seen in the wild for a lot of cool web and command prompt stuff. As for Ruby? Well, I don’t know much about it except “Ruby On Rails” is the flavor of 2008 for some reason.

Good times.

After dating Python, I have a romance now.

Normal B)
Be sure to have a look at the chilkat XML library for python :