12 Replies - 1055 Views - Last Post: 08 August 2012 - 10:16 PM Rate Topic: -----

#1 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8949
  • View blog
  • Posts: 33,547
  • Joined: 12-June 08

Lua - what's the deal?

Posted 07 August 2012 - 06:20 PM

Lua - what's up with it? Is this a used language (outside of WoW scripting), or where is everyone using it? I've heard rumors in back alley ways of people who know people who use it but haven't had a direct person to talk to regarding their appreciation, use, and so forth of the language..

It seems lite in the book shelves so this is something I would have to pick apart their site for, right?

I really don't have definitive plans for using it, but I figure a scripting language or two might be a fun addition to the tool box.

http://www.lua.org/

.... and yes.. I am reading this now:
http://www.dreaminco...duction-to-lua/

Is This A Good Question/Topic? 0
  • +

Replies To: Lua - what's the deal?

#2 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7576
  • View blog
  • Posts: 12,730
  • Joined: 19-March 11

Re: Lua - what's the deal?

Posted 07 August 2012 - 07:29 PM

I understand lua code was noticeably present in the Flame virus, for what that's worth.
Was This Post Helpful? 0
  • +
  • -

#3 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3093
  • View blog
  • Posts: 19,139
  • Joined: 14-September 07

Re: Lua - what's the deal?

Posted 07 August 2012 - 07:53 PM

I find the table/metatable concept interesting. The definite book for the language is "Programming in Lua", which is a great read; I still have it on my shelf.
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8949
  • View blog
  • Posts: 33,547
  • Joined: 12-June 08

Re: Lua - what's the deal?

Posted 07 August 2012 - 08:46 PM

Interesting.. so does Lua co-opt any usable space from say Python? Do they cover the same scripting areas, or would one have an advantage over the other?
Was This Post Helpful? 0
  • +
  • -

#5 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7576
  • View blog
  • Posts: 12,730
  • Joined: 19-March 11

Re: Lua - what's the deal?

Posted 07 August 2012 - 08:50 PM

Dammit, Modi, I'm about to go on vacation and I really shouldn't spend the whole time looking into a new language. Stop piquing my interest!
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8949
  • View blog
  • Posts: 33,547
  • Joined: 12-June 08

Re: Lua - what's the deal?

Posted 07 August 2012 - 08:51 PM

Vacations? Pffst..

From what I am skimming python is like java... big, OO, feature filled, etc.. a good utility language.. and Lua is small foot prints and "embedded" ( what ever that means).

Hmmmmmmmmmmmmmm..... then there's Iron Python that slides into VS nicely.. mmmmmmmmm

@KYA - do you mean this book?
Was This Post Helpful? 0
  • +
  • -

#7 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7576
  • View blog
  • Posts: 12,730
  • Joined: 19-March 11

Re: Lua - what's the deal?

Posted 07 August 2012 - 09:14 PM

Quote

From what I am skimming python is like java


I'd be curious to know if that view survives a deeper soak in python. Try the assignments in the MIT OCW course (consult the readings and the lectures if needed) and see how you feel.

I can see it being more like java than, say, bash is, but writing python doesn't feel much like writing java to me at all. I don't say it's better in all regards, but it's very different.
Was This Post Helpful? 0
  • +
  • -

#8 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8949
  • View blog
  • Posts: 33,547
  • Joined: 12-June 08

Re: Lua - what's the deal?

Posted 07 August 2012 - 09:47 PM

I believe, from what I am reading on other folks, it is like java because it's substantially larger than lua.. or c in this analogy.. and that's about as far as the comparison goes.
Was This Post Helpful? 0
  • +
  • -

#9 baavgai  Icon User is online

  • Dreaming Coder
  • member icon

Reputation: 5780
  • View blog
  • Posts: 12,595
  • Joined: 16-October 07

Re: Lua - what's the deal?

Posted 08 August 2012 - 04:24 AM

Lua, IMHO, is most like Javascript. Lua is kind of what happens when Javascript meets QuickBasic syntax.

Whenever I think about playing with Lua, I often just check what's out there for Javascript. There are a number of differences between the two, of course, but more is the same than different. And they occupy pretty much the same domain: an embedded scripting language that manipulates data via lower level interfaces.

The benefit of Lua over Javascript is that it's small and easily embedded. It's dead simple; good for when the heavy lifting is being done elsewhere. Its memory model is constrained by design. It tends to be amazingly fast, depending on environment. The only real problem, as you've noticed, is the echoing silence in online community and support.

I found this interesting comparison.
Was This Post Helpful? 1
  • +
  • -

#10 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: Lua - what's the deal?

Posted 08 August 2012 - 08:21 PM

Lua's main goal is to be an embeddable language that's light weight(something that also happens makes it faster than many other bytecode interpreted languges). it's seen widespread use in many games and game engines and in other highly configurable software(especially instances where memory use of importance).

It's type system and semantics are very much like Javascript but even simplair. it's syntax was somewhat based off of Oberon which is based off of pascal. It seems to get used more in games than Javascript but maybe I'm just being biased.

it's use in embedded systems(check out eLua) because it's so memory efficient for a scripting language.

Crysis 1, FarCry 1(FarCry 2 uses Squirrel which is based off of Lua) all used Lua scripting. here is a much larger list of games it's used in.

sort of in the sense that "everything is a list" in Lisps, "everything is a table" in Lua, but not quite as extreme(although it wouldn't take much code to allow for lisp style code where even the code is a table). it's uses of metatables and tables is really interesting as KYA said. it's generally easy to write generic code simply because there aren't very many data structures that aren't tables(strings and numbers are pretty much it, everything else is either a table or acts like a table because it has a metatable and even strings have metatables).

one of the primary things I use Lua for is making games for Love2D. It's a neat little game engine where you write the entire game in Lua. something else you should check out. It's the best Lua community I've found; if your looking for a more official Lua community then the mailing list might be a place to look but I found the mailing list terribly hard to fallow.

chances are you have software on your computer, most likely a game, that uses Lua.

P.S. it really irks me that the award for Lua references WoW and not tables. KYA came up with the "feet of the table" award but for everyone else voted on the "LuWoW" one...sigh, o well

P.S.S. there is also LuaJIT which is almost as fast as languages like C# and Java...not quite though, dynamic typing tends do that though

This post has been edited by ishkabible: 08 August 2012 - 08:30 PM

Was This Post Helpful? 0
  • +
  • -

#11 xclite  Icon User is offline

  • LIKE A BOSS
  • member icon


Reputation: 894
  • View blog
  • Posts: 3,153
  • Joined: 12-May 09

Re: Lua - what's the deal?

Posted 08 August 2012 - 08:59 PM

If it's any consolation, the Ruby award was based on Rails, which is what Ruby is known for, but not necessarily a requirement for using Ruby. I didn't have the creativity to think of anything better.
Was This Post Helpful? 0
  • +
  • -

#12 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7576
  • View blog
  • Posts: 12,730
  • Joined: 19-March 11

Re: Lua - what's the deal?

Posted 08 August 2012 - 09:21 PM

I've noticed that the java award - "Here comes the sun" - has stale dated rather severely at this point.
Was This Post Helpful? 0
  • +
  • -

#13 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8949
  • View blog
  • Posts: 33,547
  • Joined: 12-June 08

Re: Lua - what's the deal?

Posted 08 August 2012 - 10:16 PM

Oh but history is fun jon... I think I have time tomorrow at work to investigate some Lua and Visual Studios.. we'll see.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1