pouët.net

Scripting language?

category: code [glöplog]
I'm looking for some tiny scripting language to automate some processes... requires reading and writing text files and lot's of string processing. Any suggestions? Lua and Python are out... those two suck hard.
added on the 2015-10-22 12:45:32 by EvilOne EvilOne
If you're on windows, try AutoIt? Otherwise use lua, it rulez big time. :3

Or... Perl! *brrr*
added on the 2015-10-22 12:54:09 by fgenesis fgenesis
nodejs?
added on the 2015-10-22 13:10:13 by psenough psenough
Hmmm... after some goggle sessions, Java will do... sigh.
added on the 2015-10-22 14:00:03 by EvilOne EvilOne
Java for scripting? Don't you mean JavaScript?
added on the 2015-10-22 14:15:42 by Tomoya Tomoya
I mean, sure you can use it, but I'm not sure if that's really the best solution :) (not that i can quickly recommend anything better)
added on the 2015-10-22 14:17:40 by Tomoya Tomoya
@EvilOne

I would go for Python no doubts.
added on the 2015-10-22 14:36:45 by AlienTech AlienTech
vbs/PowerShell/AutoIt
added on the 2015-10-22 14:54:37 by g0blinish g0blinish
Maybe telling us what exactly "sucks hard" about lua and python might actually help with sensible suggestions. I've written a few small process automation tools in Python and can thus not see what sucks more about it than about other languages.
Depends on how heavy the processing required is.. last thing related I did was processing large numbers of .RC files converting then to unicode and doing some lookups.. Did it in C with a call back triggered per-line that was managed via a struct to maintain some state (whether inside certain begin/end blocks and type of resource being processed .. Wasn't too much of a ball ache.
added on the 2015-10-22 15:14:23 by Canopy Canopy
Squirrel/Lua :
Squirrel was my favorite, over Lua, because it looks prettier but there's no recent JiT of Squirrel.
The Evoke 2013 invotro was written in Squirrel.

Python :
Atm I'm in love with Python but I think the Python's VM is not exactly meant to be embedded into another binary.

Js :
V8 Js is JiT only I think. Might be a problem if you want your script to run on exotic CPUs

C# maybe ? See the productions by Stil.
added on the 2015-10-22 15:25:18 by fra fra
... and yeah, please define "sucks hard".

If it's Lua syntax that is supposed to suck hard, I don't want to enter this debate, but Squirrel might be an answer (along with the way it handles garbage collection).

As for Python... if you can solve how to embed the VM in your C++ project (https://docs.python.org/3/extending/embedding.html), I'd be curious to hear why it sucks :)
added on the 2015-10-22 15:31:10 by fra fra
Tcl! :)
added on the 2015-10-22 16:57:36 by cce cce
errr, python is sort of perfect for the use case you described!
I would suggest AutoIt since it is simple but can help you do quite complex stuff if you need. Also, consumes virtually no system resources at all.
added on the 2015-10-22 17:22:40 by Defiance Defiance
Calm down :-D

Python isn't my cup of tea because of that weird indentation... and Lua as a language is just shit, the syntax sucks, the libs suck, anything sucks. If it don't has curly braces, it simply sucks, end of story.

Found some pure gold in the meantime Wren
added on the 2015-10-22 17:55:31 by EvilOne EvilOne
Are you 12?
added on the 2015-10-22 18:07:32 by evilpaul evilpaul
to curly brace or not to curly brace that is the question
added on the 2015-10-22 18:39:50 by psenough psenough
Yeah, p much all grownups use Python for that kind of stuff.
added on the 2015-10-22 18:45:25 by okkie okkie
Indentation is a bitch to get used to and can lead to silly mistakes in terms of scoping, especially if you forget to indent that break in your while loop.

On the other hand... if your braced code isn'y properly indented, what the fuck are you doing with that unreadable shit?

It takes about a day to get used to. Python is fast to write, runs fast, and above all, feature complete, anything crazy that you need that isn't in there already has a wrapped C library for it ready.
I vote Python! don't be afraid of the indentation it actually is nice. no more typing { } or end or anything like that. makes you feel faster which is great for quick scripting :)
added on the 2015-10-22 19:56:10 by blackpawn blackpawn
Quote:
Atm I'm in love with Python but I think the Python's VM is not exactly meant to be embedded into another binary.


There have been "AAA" games with embedded Python.

Quote:
If it don't has curly braces, it simply sucks, end of story.


Why does syntax need redundant information to not suck? Or don't you indent your curly braced code?
added on the 2015-10-22 20:04:24 by absence absence
Quote:
Are you 12?
Yeah, p much all grownups use Python for that kind of stuff.


My youngest daughter uses python... She's 11...
added on the 2015-10-22 23:13:08 by ringofyre ringofyre
Grownups using Python also like Girl Basic. There is no question it blows big time!

Why do you need script langauge, use C++11 and proper string library, seriously, it has proper tools, debugger, dick-proof syntax, you will write your shit faster than any crippled bullshit like Python or Lua or whatever. Who the hell is even approving this retardation? Scripting bullshit is just frustration and blue-balls all day long. It only saves time if you don't know C++, otherwise it's a HUUGE waste of time, of your life, of your sanity, and of your opportunities to mate.
added on the 2015-10-23 01:47:14 by putt3r putt3r
LOL, did your daddy touch your python or something?

login