Hollywood (Lua) to Swift converter?

Discuss any general programming issues here

Hollywood (Lua) to Swift converter?

Postby SamuraiCrow » Tue Feb 13, 2018 8:01 pm

Since Apple doesn't allow virtual machines with an interpreter other than one of theirs to be uploaded to the iOS app store, this limits the options for running Hollywood on iOS machines. The only way around it appears to be something to convert the Hollywood bytecode to Swift or Javascript, with the future possibility of the Web Assembly bytecode replacing the Javascript parser as a means to that end. Does anyone here know how to program Swift well enough to write a Lua or LuaJIT backend to export to it? Such a converter could be exactly what Andreas needs to get his iOS version of Hollywood Player on the app store.
SamuraiCrow
 
Posts: 120
Joined: Fri May 15, 2015 5:15 pm
Location: Ft. Collins, Colorado USA

Re: Hollywood (Lua) to Swift converter?

Postby SamuraiCrow » Tue Feb 13, 2018 10:27 pm

Updates:
Since Swift is NOT a bytecode JIT language as I had assumed before, the possibility of running Hollywood Player may not be possible on iOS. Compiling a dedicated iOS executable using the Swift runtime entails an LLVM toolchain usage.

Perhaps the first step would be to get Hollywood to run using LLVM's OrcJIT would be to try to rebase the language on an LLVM-based Lua derivative such as Ravi whose static typing will enhance performance at the very least. No minor update though so this would take us at least until Hollywood 8 or 9. :( (Further notes: Ravi is not quite up to version 1.0, OrcJIT and LLVM aren't available on the Amiga-likes yet and the Swift runtimes would still need doing.) Let's call this one a long shot. :P
SamuraiCrow
 
Posts: 120
Joined: Fri May 15, 2015 5:15 pm
Location: Ft. Collins, Colorado USA

Re: Hollywood (Lua) to Swift converter?

Postby airsoftsoftwair » Sat Feb 17, 2018 12:32 am

Converting Lua to Swift still won't get you Hollywood's extensive function library and this surely can't be ported to Swift without going to extreme pains. The only way to get Hollywood stuff on the app store is to provide a framework containing the Hollywood runtime and then use minimal glue code in Objective C or Swift to load the applet. This shouldn't be against app store guidelines because even though the app uses a custom VM now, it is hardcoded to the applet so it cannot be used to execute arbitrary code. Many of today's games have their own VM (often based on Lua) and they are still on the app store so I think Apple is ok with that. The only thing which they don't allow is software which can be used to run arbitrary code on the iOS device. As long as the VM is tied to a specific applet, it won't be a problem AFAIU.
User avatar
airsoftsoftwair
 
Posts: 2337
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany


Return to General programming

Who is online

Users browsing this forum: No registered users and 5 guests

cron