Bill Allombert on Thu, 21 Dec 2017 00:51:44 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Working on iOS port


On Wed, Dec 20, 2017 at 05:51:51PM -0500, Muhammad-Sharif Moustafa wrote:
> Oh, I did not realize that GPL was incompatible with Apple’s App
> Store.  After doing some reading about it, that does seem to be the
> case.  If the ownership of and copyright to this app was given to the
> Pari project, would the issue still remain? Since Pari would have
> control over the app, would it be possible to release the app under a
> different license for the purpose of distributing the app on the app
> store?

This is problematic because we do not have copyright assignment.

> If not, then we could continue with the development of the app as is,
> and simply direct people to compile the app on their own computers and
> load it on their devices manually.  That’s probably an issue for
> computer novices though and it would require that they had a Mac to do
> that.

Maybe the app could download the asm.js code of PARI after installation ?
This way the app would "only" need to be compatible with Apple and with
the GPL.

> In addition to an iOS app, what if we were to make a mobile-optimized
> progressive web app of Pari?  It would essentially work like the
> current GP browser implementation but it would have the features of a
> progressive web app, such as offline caching of webpage scripts and
> being able to add it to the home screen on Android and iOS devices.
> This would have the feel of an app but without going through
> restrictive app stores.  Rather, the web app would be served from the
> pari.math.u-bordeaux.fr server.  I have experience with web apps, so I
> could work on this.

> What do you think?

The problem I see is that this is a quickly evolving technology.
All phones have different amount of available memory, some support
asm.js, some Webassembly.
So it might be difficult to build something which is good on all
plateforms (especially -s TOTAL_MEMORY).
On the other hand, the industry seems to focus on Webassembly which has
a better memory model than asm.js, so maybe in some year it will be
easier.

> The website works great on my iPhone now.  It’s actually much faster
> than my app.  I’m not sure why.  I’ve built it using total_memory
> instead, but it’s still slow.  JavaScriptCore doesn’t support asm.js,
> but neither does Safari, so I don’t know why the website is faster
> than my app.  It could have something to do with the fact that I run
> it in a low-priority background thread.  Maybe if I use a
> high-priority background thread it will be faster.  I’ll try it and
> let you know.

Something you could do some research is what setting for TOTAL_MEMORY
and vsize in gp_embedded_init() is the most appropriate for phones
and desktop.

Also if you could experiment with emscripten --proxy-to-worker option,
it would be nice, because this would allow for synchronous download
(but then this requires WebWorkers...)

Cheers,
Bill.