30 Mar, 2009, David Haley wrote in the 21st comment:
Votes: 0
elanthis said:
Making Lua safe is VERY easy. Just don't import the IO or sys libraries, and Lua is automatically 100% locked down. There is no need for sandboxing and the like at all, unless you plan on exposing admin-only functions to Lua scripts. Even then, it's as easy as giving the "admin approved" scripts a different environment than the builder-supplied scripts, and only putting the admin functions into the admin environment.

So very easy, compared to other languages.

Oh, yes, it is very easy. But it's still not trivial. Any time any kind of data is touched, be it "admin-only" or not, you need to think about sandboxing. Now, it's possible that it's so hard in other languages that you're saying it's extremely easy in Lua by comparison :smile: (And yes, in the scale of things, Lua does make it very easy.) But I can easily imagine not wanting room tags, for example, to be implemented in an environment that has write-access to data, whereas many progs might need some kind of write access, etc.
31 Mar, 2009, Tyche wrote in the 22nd comment:
Votes: 0
There's a sweet little script language called C that's easily embedded.
31 Mar, 2009, Scandum wrote in the 23rd comment:
Votes: 0
It's always an option to implement MrMud's tokenized mobprog engine and variable system. With a full blown scripting language you'll end up doing the exact same thing needing 4 times as many lines at slower execution speeds.
31 Mar, 2009, David Haley wrote in the 24th comment:
Votes: 0
Scandum said:
It's always an option to implement MrMud's tokenized mobprog engine and variable system. With a full blown scripting language you'll end up doing the exact same thing needing 4 times as many lines at slower execution speeds.

Backup for that claim?
31 Mar, 2009, flumpy wrote in the 25th comment:
Votes: 0
Hmm

Maybe I'll integrate a java lua engine into GroovyMud.. shouldn't be too hard.. then coders can use Lua in my mud engine too :D

intwesting..
31 Mar, 2009, Kayle wrote in the 26th comment:
Votes: 0
You're going to embed a scripting language in another scripting language?

..That seems pointless.
31 Mar, 2009, elanthis wrote in the 27th comment:
Votes: 0
David Haley said:
Backup for that claim?


He has no backup for it, because it's not possible to back it up, because he's wrong on every count except the lines of code (in terms of integration, not the scripts themselves). We already know that Scandum values having low line counts over actual performance, correctness, readability, or clean architecture. That he thinks that parsing strings over and over (especially in the horrendously brain-dead way that MR's mobprog system works) pretty much invalidates his opinion on the topic.
31 Mar, 2009, David Haley wrote in the 28th comment:
Votes: 0
Aw come on, I was trying to be friendly and charitable. :sad:
31 Mar, 2009, elanthis wrote in the 29th comment:
Votes: 0
You're a better man than I, then.
31 Mar, 2009, Tyche wrote in the 30th comment:
Votes: 0
Kayle said:
You're going to embed a scripting language in another scripting language?

..That seems pointless.


Is the term "scripting" as applied to general programming languages even meaningful?
I think that there are several possible levels of language use in game programming, and it depends on the intent and architectural point of the embedding.
31 Mar, 2009, Scandum wrote in the 31st comment:
Votes: 0
elanthis said:
He has no backup for it, because it's not possible to back it up, because he's wrong on every count except the lines of code (in terms of integration, not the scripts themselves).

I only gave two arguments, so I think you mean I'm wrong on one count, and you didn't even bother to explain why. You're full of hot air.

elanthis said:
We already know that Scandum values having low line counts over actual performance, correctness, readability, or clean architecture.

Talking about your 'libtelnet' again? In it's unfinished state it's already a bulky simpleton implementation and it completely sucks. Bashing my elegant telnet snippet isn't going to change that.

elanthis said:
That he thinks that parsing strings over and over (especially in the horrendously brain-dead way that MR's mobprog system works) pretty much invalidates his opinion on the topic.

Apparently you're so self-conscious about your own beliefs that you feel it necessary to write about me in the third person. Almost as if you're frightened of the confrontation. This would either mean, if you are a follower of Freud, that you were raped at an early age and can only act out if you remove yourself, or, if you are a follower of Jung, that you haven't had sex at all because you lack either the desire or the ability.
31 Mar, 2009, David Haley wrote in the 32nd comment:
Votes: 0
You didn't make any arguments, you just threw claims out there without justification. That's why I asked you for something to back up your claims. You still haven't FWIW.

Scandum said:
This would either mean, if you are a follower of Freud, that you were raped at an early age and can only act out if you remove yourself, or, if you are a follower of Jung, that you haven't had sex at all because you lack either the desire or the ability.

:stare:
You're not helping yourself by resorting to this kind of stuff…
31 Mar, 2009, Scandum wrote in the 33rd comment:
Votes: 0
David Haley said:
You didn't make any arguments, you just threw claims out there without justification. That's why I asked you for something to back up your claims. You still haven't FWIW.

MrMud tokenizes mobprogs allowing fast parsing and execution speeds, and if you compare mobprogs to something like dg scripts they tend to be a lot leaner, though arguably that's because builders outpace the developers and start adding custom build functions in scripts that ought to be globally available. If the last statement is beyond you I'm gonna let it slide.

David Haley said:
You're not helping yourself by resorting to this kind of stuff…

Neither are your and his angry infant act. What's the point of randomly bringing up this telnet and related crap? You even do it at other boards, probably cause you're afraid of doing it in my face. Hopefully people realize you're just spewing forth opinionated nonsense like the clueless fan boy you truly are.
31 Mar, 2009, David Haley wrote in the 34th comment:
Votes: 0
Scandum said:
MrMud tokenizes mobprogs allowing fast parsing and execution speeds, and if you compare mobprogs to something like dg scripts they tend to be a lot leaner, though arguably that's because builders outpace the developers and start adding custom build functions in scripts that ought to be globally available.

Your claim was about interpreted languages in general, not just dg scripts.

Since you're making performance based arguments, I'm sort of expecting to see profiling results. And not just of dg scripts, since your claim was about interpreted languages.
Scandum said:
If the last statement is beyond you I'm gonna let it slide.


Scandum said:
Neither are your and his angry infant act. What's the point of randomly bringing up this telnet and related crap?

Umm. Correct me if I'm wrong, but it appears that you brought up the telnet implementations first in this thread. :wink: I will grant that Elanthis made a reference to bad programming on your part.
Scandum said:
You even do it at other boards, probably cause you're afraid of doing it in my face.

…?
For starters I'm not sure what you're talking about, but I've told you to your face several times here that I think some of your implementations have been, err, sub-optimal.
31 Mar, 2009, Scandum wrote in the 35th comment:
Votes: 0
David Haley said:
For starters I'm not sure what you're talking about, but I've told you to your face several times here that I think some of your implementations have been, err, sub-optimal.

Sure, I'm expecting to see your profiling results, before you continue brown nosing elanthis and his unfinished implementation. With sub-optimal you mean that you had one far fetched complained, which I fixed just to shut you up, after which the two of you continued with increasingly vague and incorrect remarks. Needless to add that it's pretty pathetic.
31 Mar, 2009, David Haley wrote in the 36th comment:
Votes: 0
Scandum said:
Sure, I'm expecting to see your profiling results

:stare:
I am now satisfied that you do not, in fact, have anything to back up the claim you made. Thanks for confirming, I was wondering if there might be something clever going on.
31 Mar, 2009, Scandum wrote in the 37th comment:
Votes: 0
David Haley said:
I am now satisfied that you do not, in fact, have anything to back up the claim you made. Thanks for confirming, I was wondering if there might be something clever going on.

Good job weaseling out of that one fanboy. I'll be expecting a reliable secondary source or detailed statistics whenever you make a claim from now on.
31 Mar, 2009, David Haley wrote in the 38th comment:
Votes: 0
You'll have to forgive me if I'm not entirely sure what you're expecting me to provide. I wasn't the one making a claim to back up, Scandum.
01 Apr, 2009, elanthis wrote in the 39th comment:
Votes: 0
This is tiring. This thread is about Lua. Now it's not. All because Scandum has to be right, and anyone who doesn't understand that his code is the most elegant and beautiful thing ever crafted by man is obviously just a jerk. And now also either a rapee or impotent, apparently. (Either I'm doing some seriously Hollywood-hardcore memory repression or else my girlfriend is going to be pissed when she finds out I've been faking my orgasms. sux2b me lolz.)

Dude had a question about Lua. You made a factually bogus comment, which I responded to because I hate it when those without clue spread misinformation, because somebody ends up reading that nonsense and – lacking the knowledge and experience to filter out the crap – ends up believing it and suffers in the long term because of it. I really cannot fathom what goes through your head, Scandum, how you possibly think that unreadable jumbled messes of incomplete, incorrect, and/or inefficient code are "elegant" (I really mean this: it truly boggles my mind, especially because I know that you DO actually have a strong technical grasp on things), but what I do know is that people who get sucked into believing your claims end up being the worse for it. I know you aren't trying to do harm, you aren't intentionally lying or anything like that, you're not Bad™. You're just clueless. I did try to point out the problems with your mucked up sense of good code in the hopes of helping you become a better programmer; I mean, I don't begrudge people for lacking skill – I used to have pretty similar ideas of "good code" as you do back when I was a teenager, so it'd be pretty silly of me to hate on someone for being inexperienced. You have however shown an unfortunate obstinence and because of that you are saddled with wilfilly-inflicted incompetence. You do however make very logical-sounding arguments masking your flawed reasoning and that makes you sound very convincing to other novices. I can't help you grow because you're too convinced of your own elitist awesomeness, but I sure as hell can help make sure others don't end up suffering because of your ego issues.

I'm not interested in comparing whose code is better any more than I'm interested in finding out whose wiener is whoppier (which is what this thread seems to have degenerated into). All I care about is helping people learn to write good, correct, efficient, understandable code, because that's what about coding is for, and because when the MUD community as a whole is writing better code, the MUD community as a whole is healthier and makes better games enjoyable by more people. I'd be posting on RateMyDick.com if I cared about anything else. (… please, dear God, don't let that site doesn't actually exist. If humanity has sunk that low, I'm bailing off the ship right now.)

Back to Lua

If you want proof of Lua's performance, just read the papers found on Lua.org. They're not hard to find. One might even say that they're easy to find.

Languages like mrmud's mobprogs have no intermediate representation at all. It doesn't tokenize its input, either, contrary to what was stated above. Every single line of code is going to have to go through full string parsing every time it's run. If you want a logical way to see why that's so much slower than something like Lua, try this little experiment at home: run strcmp() on some small strings 100,000 times, and then compare two ints 100,000 times using the == operator. Which is faster? Furthermore, mrmud's mobprogs are _weak_. It is not a turing-complete language. There are a million and one things you can do with Lua that you cannot do in a language that has no higher-level data structures, limited control flow, and which isn't even capable of parsing basic expressions like (a == b && c == d) || (e > f && g == h). Anything that can be written in C (or any other language) can be written in Lua, but almost nothing besides very simplistic, rigid, inflexible behavior can be written in something like most mobprog interpreters.

If you have an obsession with small code size, at least take these stats into mind: mob_prog.c in mrmud is over 68K. The whole of Lua's source code is 450K. Lua is only 6.6x as large as mobprog and yet includes a Turing-complete language, grammar supporting operator precedence, user-defined functions and types, complete data structure support, co-routines/threading, garbage collection, a respectful standard library including a full pattern matching suite and I/O, one of the most efficient interpreters made to date, and can be reused as a data file format for storing rooms and the like (it was originally designed as a data file parser and compiler, actually) or for configuration files. If Lua is a swiss army knife, then mrmud mobprogs is a plastic spork.

If that's what you want, knock yourself out. But for slightly more effort you can get a far more powerful and more efficient solution backed by over a decade of industry use and satisfaction.
01 Apr, 2009, David Haley wrote in the 40th comment:
Votes: 0
elanthis said:
If Lua is a swiss army knife, then mrmud mobprogs is a plastic spork.

Now there's a good utensil metaphor :lol:

Agreed for the rest too, if that wasn't obvious already. (I can't believe we actually had to compare mudprogs to Lua though in terms of their expressive power.)
20.0/82