Lua vs cob - Page 4

Lua vs cob

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Lua vs cob

Post by AF »

I used it as an example of how even a primitive construct like DOS can be more concise and friendlier than the likes of COBOL
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Lua vs cob

Post by lurker »

Anything that's turing complete is a programming language. If you don't think DOS is a programming language you are probably vastly misinformed about how much it can do despite horrible syntax.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Lua vs cob

Post by Das Bruce »

Ok, it is a programming language, but I was more thinking of it's comparison to practical/popular ones.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Lua vs cob

Post by zwzsg »

I would say that Batch is a programming language, but DOS is an operating system and shell.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Lua vs cob

Post by lurker »

I would say 'batch' is a generic word for shell scripts and does not specifically mean dos or cmd. I'm not aware of any single word that can be used to refer to the language.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Lua vs cob

Post by Tobi »

zwzsg wrote:Though some explanation for the signal would be useful. The bitmask thing is not obvious.
With version of the gadget that I'm about to commit now you can have arbitrary objects as 'thread names'. Not only that means you can just always use

Code: Select all

local SIG_AIM = {}
so you have a unique table that designates this signal, but also it means you can use more than 24 unique signals safely.
It's true that a new tutorial, on new unit scripting method, should not use a hide/show flare but a CEG. I guess Tobi wanted to stay close to the Cavedog scripts roots, or to avoid having to explain how to add CEG to a unit definition.
IMO both techniques are useful. I suppose for the stumpy a CEG could look nicer, but for e.g. MGs in S44 you don't want a bunch of particles to be created every second frame or so.

But indeed, explaining how CEG works, how to add it to unit definition etc. would go outside scope of the tutorial. (Also deserves tutorial on it's own.)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Lua vs cob

Post by KDR_11k »

AF wrote:I used it as an example of how even a primitive construct like DOS can be more concise and friendlier than the likes of COBOL
Yes and a Hello World in HQ9+ looks like this:

Code: Select all

H
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Lua vs cob

Post by lurker »

Why not just make signals simple ID numbers, and make the people using bitmasks call signal() with more than one number? Probably be just as fast in lua.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Lua vs cob

Post by Tobi »

Hmm that may be an idea.

Also: http://tvo.github.com/spring/2010/04/26 ... mpy-2.html (First one was better though)
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Lua vs cob

Post by FLOZi »

Tobi wrote:Hmm that may be an idea.

Also: http://tvo.github.com/spring/2010/04/26 ... mpy-2.html (First one was better though)
End column should be 2 'ARMSTUMP_HEAP' end, same mistake in the script.Killed example code too. :wink:

Is there a reason not to use Spring.UnitScript.GetLongestReloadTime?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Lua vs cob

Post by Tobi »

FLOZi wrote:End column should be 2 'ARMSTUMP_HEAP' end, same mistake in the script.Killed example code too. :wink:
Thanks, fixed.
Is there a reason not to use Spring.UnitScript.GetLongestReloadTime?
I just thought I'd stick with a call-out people already know for now here. Maybe I'll reconsider.
Post Reply

Return to “General Discussion”