6 ms·
IOS Programming with Lua
- krob 14y agoWould anyone actually use lua to build a full on ios application though? Is Lua an acceptable alternative to Obj-C?..
- tudorizer 14y agoThis might give you more insight: http://od-eon.com/blogs/alumni/tudor/lua-vs-obj-c/ http://od-eon.com/blogs/alumni/tudor/lua-vs-obj-c/
- mahmud 14y agoThat's a flattering post. Lua is a much better language than Objective-C and should see more use.
- rimantas 14y agoBut make sure to look into comments for insight, not the post itself.
- tudorizer 14y agoyup. The discussion sparked in the comments and here on HN 1 year ago was quite interesting
- donpark 14y agoWax 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.
- esusatyo 14y agoI should note that Codea uses Lua too: http://twolivesleft.com/Codea 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 https://github.com/TwoLivesLeft/Codea-Runtime
- DaveSapien 14y agoYeah 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 http://www.youtube.com/watch?v=MOV8j7GM3JA FYI, Everything was made on the ipad.
- outworlder 14y agoWhat do you mean by 'joke language'? It is used professionally for far longer than some 'enterprisey' languages are around.
- DaveSapien 14y agoYeah 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
- epaga 14y agoAnother 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/ http://getmoai.com/
- toddz 14y ago+1 for Moai!
- wiradikusuma 14y agoI'm wondering if MoonScript (http://news.ycombinator.com/item?id=4741331 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 14y agoYep, 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!
- anonymoushn 14y agoOne moonscript implementation is a loader, so this would be pretty easy to do.
- brianchu 14y agoThe 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 14y agoApple 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).
- pygy_ 14y agoThere are remote debuggers for Lua, like Zerobrane Studio (http://studio.zerobrane.com/ http://studio.zerobrane.com/), that allows to patch the code at runtime, enabling live coding, or Koneki (http://www.eclipse.org/koneki/ldt/ http://www.eclipse.org/koneki/ldt/). I know there's more, see here for the full list of IDEs: http://lua-users.org/wiki/LuaIntegratedDevelopmentEnvironments http://lua-users.org/wiki/LuaIntegratedDevelopmentEnvironmen...
- outworlder 14y ago
- ibisum 14y agoAlso: MOAI.
- fyolnish 14y agoIf you want to use the very fast LuaJIT I wrote an Objective-C bridge (purely in lua) for it: https://github.com/fjolnir/tlc https://github.com/fjolnir/tlc
- outworlder 14y agoMy understanding was that iOS did not have BridgeSupport. Am I mistaken?
- fyolnish 14y agoYou 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.