Considering picking up Lua

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Considering picking up Lua

Post by Lafolie »

Eh, you get used to it pretty sharpish. I'm enjoying using it, and I think bartbes likes the fact that someone is actively using it. I consult him now and then when I try to do something I haven't done before. It works a treat, and the source code for the 'class' object is just.... insane. Some crazy syntax in there!
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
snake
Citizen
Posts: 52
Joined: Tue Jul 14, 2009 6:59 pm

Re: Considering picking up Lua

Post by snake »

sient wrote: If you really like Lua, make sure to look into Lisp (Clojure is the "trendy" dialect as of now).
Thumbs Down for Clojure
I would rather suggest starting with Common Lisp or Scheme first, if you don't have to use the Java VM.
A nice book for learning Lisp or even programming in general is Common Lisp: A Gentle Introduction to Symbolic Computation.
If you want to become excited about lisp just read some
Paul Graham

As for Lua:
It is a very nice and clean and powerful language, definitely worth learning.
Even though "Tables" are obviously a wonderful feature there are like no other language offering anything comparable to lua tables.
(And yeah Python might come with more libs but as a language it is clearly inferior in my onion, especially when compared to metalua.
Though all in all Python is no so bad for a first language and has some interesting ideas,)

As for Lua and OOP:
You really should not brother learning about OO as long as you are not able to write an OO-system for lua yourself.
In fact you CAN write non-trivial games in lua without having ever having read anything about OO and it doesn't have to become a mess at all
Just cause OO might be a good idea for huge application doesn't mean it is the only way to do stuff.
Also people should keep in mind that OO can also have disadvantages like increase of code size, making stuff more bloated.

Of course OO is still a wonderful concept, if someone really is interested in it, I recommend watching this talk:
Alan Kay: The Computer Revolution hasn't happend yet.
I invented the term Object-Oriented, and I can tell you I did not have C++ in mind
If you really want to try some language that is based on the idea of OO you should try
squeak
It is one of the best development environments available today,
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Considering picking up Lua

Post by Robin »

Lafolie wrote:I disagree with you both! :P I'm using bartbes' latest OOP invention: https://bitbucket.org/bartbes/slither/overview
I'd bring up Slither if it wasn't so Pythonesk. I love Python, but I fear Slither might only confuse people new to Lua, so I took the safer bet.

Plus, SECS is easily understandable. Slither and MC less so.
Help us help you: attach a .love.
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Considering picking up Lua

Post by Lafolie »

Robin wrote:Plus, SECS is easily understandable. Slither and MC less so.
It's interesting that you say that. I find Slither to be easier to use than the others. Just a preference I guess. They're all wonderful, intuitive options.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Considering picking up Lua

Post by Robin »

I meant source code, not usage. ;)
Help us help you: attach a .love.
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Considering picking up Lua

Post by Lafolie »

Oh man, I TOTALLY agree with that. I concur :monocle:

But uh, as long as I understand what the source is doing, I feel comfortable not knowing exactly how the syntax works. I'm sure I'll reach the point where I can read it with 100% clarity someday.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Considering picking up Lua

Post by BlackBulletIV »

Yeah, slither makes very clever usage of Lua's syntax. Such as the ability to call a function with a single string argument without parenthesis, and the constructor syntax (method{blah = foo, 'blah', 'blah'}). Does take a bit to get your head around it does.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests