direct result programming

Started by
4 comments, last by GameDev.net 17 years, 5 months ago
Hi guys, Im looking for a programming language that will let me directly access files by typing a mini prgramm into a terminal of some sort. Normal Compilers allow you to make a program executable which you usually spend time on optimizing etc. Then the application is used on data. I want to be able to programm for just one application on a file. No first compiling and then using the exe on the file. The langage should have easy wupport for text manipulation, image manipulation. Heres an example of what I optimally want. Right click on file, choose program. Type in short code snippet like a loop that turns rgb colors to grayscale. Hit apply and done. Anybody know of a language; compiler whatever that is close to this for windows? -CProgrammer
Advertisement
As far as text manipulation goes, I would suggest Perl (or even plain sh).
For image manipulation, I would suggest GIMP's scripting abilities.

Both are open source programs available on Windows.
Hmm.

So, first off, the way you want to use this "language" seems weird to me. You don't want to have to write anything that yeilds a file on the disk that you use to invoke the "script" that you wrote? Just right click a file, write the code, hit "go" and the "script" runs with the right-clicked file as input? What happens then, when you want to repeat the (same) process on a different file? Do you write the program again?

You probably want an interpreted language, like Python or Perl, for which programs can be run without compiling those programs into executables. Both of those languages have good text manipulation support. They don't have image manipulation support, though (unless Python has it as a module I don't know about). In fact I think that you'd be hard pressed to find a domain-specific language focusing on image manipulation that is also good for text processing.

Python's still a good place to start, in my opinion, though. A combination of Python and some batch files and additions to your right-click menu might be able to yeild the exact functionality you want, although it would be a bit of work.

You could always just run the program from the command line, you'd still get the "no compilation" benefit, just not the weird user interface you want.
Hmm, ok python seems like a good place to start. Since there doesnt seem to be such a language and since I only want minimal functionality I figured it may be good idea to just make the software myself. However I dont really have the time to make a scripting language. Is there a freeware one similar to c syntax, which I can embed in a c++ or c# app?

-CProgrammer
Quote:Original post by CProgrammer
Hmm, ok python seems like a good place to start. Since there doesnt seem to be such a language and since I only want minimal functionality I figured it may be good idea to just make the software myself. However I dont really have the time to make a scripting language. Is there a freeware one similar to c syntax, which I can embed in a c++ or c# app?


You can embed Python or PERL interpreters in a C program.

Stephen M. Webb
Professional Free Software Developer

Quote:Original post by jpetrie
They don't have image manipulation support, though (unless Python has it as a module I don't know about).


There is in fact at least one image module for Python. One of the essential modules I always get with a fresh install.

http://www.pythonware.com/products/pil/


Perl likely has some too...

This topic is closed to new replies.

Advertisement