

IOS Programming with Lua - wiradikusuma
http://www.luanova.org/ioswithlua

======
esusatyo
I should note that Codea uses Lua too: <http://twolivesleft.com/Codea>

You can even code on the iPad itself, and use Codea Runtime to convert it to
Objective-C: <https://github.com/TwoLivesLeft/Codea-Runtime>

~~~
DaveSapien
Yeah I used it to while I was recovering from an operation. I like lua but
still feels like a joke language to me. Anyway heres a video of what I did
<http://www.youtube.com/watch?v=MOV8j7GM3JA> FYI, Everything was made on the
ipad.

~~~
outworlder
What do you mean by 'joke language'?

It is used professionally for far longer than some 'enterprisey' languages are
around.

~~~
DaveSapien
Yeah I know the history, I absolutely recommend it as a learning tool and for
some professional jobs. It's just, if that then do this end. Feels like a lot
of key pushes to get a result. Anyway I'm going to run a lua poetry
competition on my twitter feed later today if your interested? @DaveSapien

------
donpark
Wax looks good at least for experiments and prototypes. However, a quick look
at Wax issues on github reveals the project has issues that have not been
addressed in recent months. So it appears to be a fixer-upper for now.

------
brianchu
The problem with using Lua is that you lose debugging/profiling support and
incur performance overhead. The loss of the debugging support afforded to
Objective-C code might be enough to eliminate any time saved. I do believe
that Corona offers debugging support, but Corona has it's own problems: it's a
cross-platform engine that necessarily incurs overhead and restricts
flexibility.

Furthermore, one of the benefits of Lua that the article cites, automatic
memory allocation, is obviated by using automatic reference counting in
Objective-C (which also makes Obj-C more concise).

~~~
cageface
Apple has polished enough of the warts of Obj-C now that I'd be pretty
reluctant to throw out all the benefits you get from tight tooling
integration. I think in most cases it makes more sense to just use what Apple
hath provided (but edit your code in AppCode instead of XCode).

~~~
brianchu
Hm... Is AppCode really that much better than Xcode?

~~~
cageface
Opinions vary a bit and Xcode is certainly much better at 4.5 than it was at
4.0 but I live in AppCode and would hate to have to actually write much code
in Xcode.

------
krob
Would anyone actually use lua to build a full on ios application though? Is
Lua an acceptable alternative to Obj-C?..

~~~
tudorizer
This might give you more insight: <http://od-eon.com/blogs/alumni/tudor/lua-
vs-obj-c/>

~~~
rimantas
But make sure to look into comments for insight, not the post itself.

~~~
tudorizer
yup. The discussion sparked in the comments and here on HN 1 year ago was
quite interesting

------
wiradikusuma
I'm wondering if MoonScript (<http://news.ycombinator.com/item?id=4741331>)
can be combined with this Lua-based iOS (quick googling reveals nothing).

It's like CoffeeScript for iOS!

~~~
jacktoole1
Yep, there's nothing preventing it, although I don't know enough about systems
like Corona, Codea, or Moai to know whether you'd miss out on any IDE
functionality. I'm currently using moonscript to power my side project on iOS.
It's great!

------
epaga
Another Lua-based framework for iOS programming is Moai. I played around with
it a while back and fell in love with Lua. Really simple yet powerful stuff.

<http://getmoai.com/>

~~~
toddz
+1 for Moai!

------
fyolnish
If you want to use the very fast LuaJIT I wrote an Objective-C bridge (purely
in lua) for it: <https://github.com/fjolnir/tlc>

~~~
outworlder
My understanding was that iOS did not have BridgeSupport. Am I mistaken?

~~~
fyolnish
You can generate your own with gen_bridge_metadata. But bridgesupport is only
necessary if you want automatic access to things you can't get from the
runtime.

