Lua

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Postby Niya » Fri May 25, 2007 3:51 am

Graf Zahl wrote:I'd have to agree with that. I really, *really* don't like this language - at all!

It's a real shame that they had to use crap BASIC syntax as a guideline to design their language.


Its more like C/C++ than BASIC. Basic naming convention doesnt allow leading underscores in the names of identifiers, also square braces and curly braces aren't used at all in basic. Function return values using the return keyword. BASIC uses explicit assignment of the returns to the function name. These are C conventions. The only things it seems to take from BASIC is the if..else..then construct and worded operators.
User avatar
Niya
 
Joined: 14 Sep 2006

Postby Graf Zahl » Fri May 25, 2007 4:07 am

I don't see much of C in Lua. If not BASIC than more PASCAL - but no C.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Postby Ryan Cordell » Fri May 25, 2007 4:14 am

IMO, I never thought DoomScript was planned with UnrealScript at first. LUA seems a bit like an odd language to use or even master. C or C++ would sound awesome with it, but that's just my personal opinion.
User avatar
Ryan Cordell
Smashing!
 
Joined: 06 Feb 2005
Location: Capital of Explodistan.

Postby Niya » Fri May 25, 2007 4:20 am

Graf Zahl wrote:I don't see much of C in Lua. If not BASIC than more PASCAL - but no C.


As a matter of fact you're right. I just looked up some sample pascal code and Lua bears a most remarkable resemblance to it. Id say Lua was based strongly on pascal.

Blade Nightflame wrote:IMO, I never thought DoomScript was planned with UnrealScript at first. LUA seems a bit like an odd language to use or even master. C or C++ would sound awesome with it, but that's just my personal opinion.


ACS was modeled on C. But I believe that Lua would be a better choise. The syntax is more english like which seems better suited for scripting events in a virtual world. I think newcomers will be more at ease reading english like scripts than program like scripts. The veterans here would disagree but remember you're already versed in ACS/DECORATE/C++ but there are a lot of people who aren't.
User avatar
Niya
 
Joined: 14 Sep 2006

Postby TheDarkArchon » Fri May 25, 2007 5:26 am

However, the switch to Lua would make the newbies pick it up but would bamboozle the vetrans who are used to using C-style syntaxes in ZDoom.
User avatar
TheDarkArchon
This, ladies and gentlemen, is glee
 
Joined: 07 Aug 2004
Location: Some cold place

Postby Ryan Cordell » Fri May 25, 2007 5:41 am

Certainly Randy could implent Lua AND C (Either work when used. Don't think crossing between should be possible), but that would take WAY more time and, well.. Hearing from Randy then will be like knowing anything about Area 51.
User avatar
Ryan Cordell
Smashing!
 
Joined: 06 Feb 2005
Location: Capital of Explodistan.

Postby Nash » Fri May 25, 2007 6:52 am

I'm not the kind who just takes whatever that gets thrown at me but if Lua is any chance of seeing anything more advanced (because I don't like hacks anymore)... I'd say just let it happen.

I've been waiting for almost five years for DoomScript, I'm sure there are others who've waited even more (ZDoom will be ten years old next year!), I just don't want to wait anymore.
User avatar
Nash
http://twitter.com/ISurvivorGame
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Postby Graf Zahl » Fri May 25, 2007 7:33 am

Just looking at the Lua examples gives me the creeps. All the stuff I hated about Pascal which made me convert completely to C 15 years ago is back with a vengeance. I always found code that requires written keywords to declare blocks of statements very hard to read because there's nothing intuitive about these kinds of separators. C's braces are nice and easily spotted and among all programming languages I know are the most readable solution of all.

To be honest, I'd rather write an ACC-style compiler rather than use this language.
Yes, I know that a grammar-based parser is supposed to be the way to go and I also know that expanding this with unexpected new features might be harder but somehow I never got anywhere with a grammar based parser. It's just not my style of doing things.

A few years ago I did some work on ACC to expand it to be able to write action functions. It was working to some degree but since I never tried to eliminate ACC's limitations I gave up eventually. A language without type checking and a high risk of undetectable programming errors wasn't that appealing. But I think that with my current experience I could get something to work that can parse a more powerful language.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Postby Risen » Fri May 25, 2007 8:00 am

I'd prefer a C-like syntax over this, but if this is the only chance we have to get a lot of these features in...

I find no value in the argument that a programming language needs to look like English. I have a little experience coding in a lot of different things, and in my opinion the "English-like" languages are the worst. English is vague and ambiguous. Code should not be. Code does not have to look like prose to be readable. In most cases, that makes it worse.
User avatar
Risen
 
Joined: 08 Jan 2004
Location: N44°30' W073°05'

Postby Enjay » Fri May 25, 2007 8:17 am

For a non-programmers POV, it seems a little odd to be introducing something that is quite different in feel to what already exists. IMO, standardisation should be considered as an important factor rather than having to use one set of rules when doing one thing to Zdoom and a different set when doing something else to it.
User avatar
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

Postby Zippy » Fri May 25, 2007 8:37 am

Fun times.

Lua is certainly capable. Garry's Mod is a good demonstration of that, allowing custom weapons, game rules, menus, and a slew of other things I have no idea about because I never got into it. I'm more or less impartial about the whole style and syntax side of it; syntax has never really been an issue with me for small scripting languages provided a reasonable reference is available. Likewise, I think most people would probably pick it up if it were the only solution available. The value of that is in the eye of the beholder, though. Something that is reasonable and convienent for end users is very desirable, and how well Lua really does fit that... I can't be sure.

Other people wrote:Brainfuck, Malbolge
Whitespace is another beauty of a language.
User avatar
Zippy
Scathing political commentary!
 
Joined: 23 Mar 2005
Location: Rochester

Postby TheDarkArchon » Fri May 25, 2007 8:50 am

Graf Zahl wrote:I always found code that requires written keywords to declare blocks of statements very hard to read because there's nothing intuitive about these kinds of separators. C's braces are nice and easily spotted and among all programming languages I know are the most readable solution of all.


Seconded! Oh, so seconded.
User avatar
TheDarkArchon
This, ladies and gentlemen, is glee
 
Joined: 07 Aug 2004
Location: Some cold place

Postby HotWax » Fri May 25, 2007 10:51 am

I share the opinion that it'd be nicer to have something closer to C, however as others have stated, if this is the way it's got to be done for us to have the power of DoomScript, then I'm all for learning a new language.
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby Nash » Fri May 25, 2007 10:52 am

Speaking of esoteric programming languages, which was the one where you had to actually DRAW the code (the source is actually an image where different colours and directions will be intepreted as different commands and stuff).

It was beautiful. :trippy:
User avatar
Nash
http://twitter.com/ISurvivorGame
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Postby Necromage » Fri May 25, 2007 11:58 am

@nash: http://www.dangermouse.net/esoteric/piet.html
I started working on an interpreter for it and its almost to the point that it works but I am stuck in a few areas.

As for lua, I think graf said everything that needs to be said on the topic.
User avatar
Necromage
Your neighborely friendly hobo
 
Joined: 10 Feb 2005
Location: NJ

PreviousNext

Return to Editing

Who is online

Users browsing this forum: PermaNoob and 1 guest