So I didn't notice that another scripting language was available until after I already learned how to use mzscript. A look through some of the forums seem to imply that SOME people think lua is faster than mzscript. Is this true? And would it be worth it to re-learn lslua after already learning mzscript for whatever speed boost there may be?
Speed-wise, with the newest lslua, I can't tell the difference between the two. Which you should use really depends on your preference. Lslua can really simplify certain things (Cerbie's mzscript for rgb to hex vs his lslua script comes to mind), though, because of its internal functions. But, for the most part, theme's never really get complex to the point where the scripts actually needs to be using a real coding language.
I personally like lslua better now, because I like the structure/syntax better, but there's no reason to not use mzscript if that's what you're familiar with.
If you're open to relearning something, go for it, and learn lslua. Nothing wrong with learning stuff.
Hmm, I don't like mzscript's flexibility in terms of some of the conditional statements. Especially the lack of elseif, for loops, and some other stuff I'm thinking of right now that I'm particularly used to. If lua is more like a programming language, I'll probably have an easier time with it anyways.
Well, mzscript can handle loops.
For example, this in mzscript...
*Script exec !varset i 1
*Script label loop
*Script gotoif ["%{i}" = "5"] break
*Script exec !dostuff
*Script exec !varadd i 1
*Script goto loop
*Srcipt label break
is the same as this in lslua...
i = 1
repeat
lslua.exec ("!dostuff")
i = i + 1
until i == 5
or even better...
for i = 1, 5 do
lslua.exec ("!dostuff")
end
...and you can make "i" part of the iteration.
But yes, lslua is much more flexible - and a lot easier on the eyes heh.
Yea, you're right, but then I keep hearing people say how "bad" goto statements are (I'm no programmer, so I don't know what their logic is.) But I've gotten to the habit of avoiding it. Mzscript feels a bit basic-ish overall, which I guess can be both good and bad.
I've played with mzscript since many years
I've made real huge scripts
I've spent many time switching from mzscript-0.9 to 1.0 in rewriting most of my scripts
But when I've started to play with lua, I've definitively switched to it
It's a little bit more "abstract" than mz but it's really an object oriented langage
It should be part of the "GlobalSchemes" project (OTS3)
Then...
whoa, OTS3? where is that being developed?
Just for those interested, I was bored and did a loop speed test of mzscript vs lslua. I moved a small label 1px at a time across the screen (1600px) and back. I used a similar loop script for mzscript as above, and I used the repeat until loop for lslua. (The site wouldn't let me paste the code...you would think the code tags would let you paste things explicitly. :P )
This probably won't come as a surprise to the real coders out there, but lslua blew away mzscript. For this test, lslua was clearly faster when running its loops, showing an obvious speed increase in the label's movement.
Haha, well I don't need anymore convincing. I like this syntax better anyways.
I'm a bit confused about OTS, I thought OTS stood for something like Official Theme Standard, like a way to distribute themes? Is this definition too narrow? It looks like it also involves the LS build involved?
I hope the 'for' loops runs just as fast as the repeat until, because I like for loops better :-o
OTS is a "configuration" used to standardize theming so that contributions from many and various themers would all work compatibly "out of the box". OTS has been through two incarnations now - OTS3 will be the third. The previous theming standard was known as "Anarchy". =P
"Anarchy"
You can say that again boreas...
Any idea on what stage of development it's at?
The links are whores or me? I'd like to be the link pimp. :D
Heh - you should register that domain name - link-pimp.com =)
Oops - looks like someone already did. Oh well.
Well I already saw that page, but it hasn't been updated since december
mzscript is string-based assembly language.
What are the ramifications of that?
Your code can get tied in [k]nots.
I laughed at that. Does that mean any social hopes I had are ruined? :)
Yes. Yes it does.
/me contiues beating up nerds with my macho jock buddies
The fact that we are even posting anything here is, in itself, a pretty good sign that a so-called "normal" life is beyond our grasp. Making jokes about assembly language? Just another step down that road...