Re: [R] R on the iPhone/iPad? Not so much....a GPL violation

2010-06-02 Thread Gustaf Rydevik

 As I noted in my closing comments in my second post, if one has a desire to 
 make R's functionality available on smartphones (iPhone, Android, etc.) or 
 iPad-class devices, then a client/server approach may be the most efficient 
 means to do so. That approach also avails you of more powerful computing 
 platforms than the client side mobile devices have, at least at present, 
 which will also limit aspects of portable functionality.

 Regards,

 Marc


Indeed, the client/server approach is what is used in MatLab Mobile,
which is now on sale in the app store.
See
http://blogs.mathworks.com/desktop/2010/05/24/introducing-matlab-mobile-%E2%80%93-an-iphone-app-to-connect-remotely-to-your-matlab/

If matlab can do it, then surely the R community can as well.

Regards,
Gustaf


-- 
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R on the iPhone/iPad? Not so much....a GPL violation

2010-06-01 Thread Marc Schwartz
Hi all,

Thanks to an offlist e-mail from Thomas (Lumley), I have spent the past few 
days getting a bit more edumacated on additional restrictions on the 
opportunity for R to appear on the iPhone/iPad. These in fact go well beyond 
the GPL issue that I raised in my initial post, which in and of itself, is not 
trivial by any means. I now know, or at least think I know, more about these 
issues than I probably wanted, but I also want to present a better picture of 
the situation.

Note that I am not a lawyer and am not intending to represent my findings from 
a legal perspective. I am reporting them here using a common sense approach 
from my own reading of the relevant Apple iPhone SDK language, as well as being 
based upon specific examples and discussions that I located on the web.

So, in summary, here are the key issues. I will follow each with some 
additional details below, but note that all such restrictions would need to be 
removed or otherwise overcome, before R could in fact appear on these two 
platforms, at least through Apple approved means in the App Store.


1. Distribution of GPL covered applications is not permissible via the App 
Store due to the Apple Terms of Service language, which infringes upon rights 
granted under the GPL.

'Nuff said.




2. The use of FORTRAN is precluded (explicitly from SDK version 4.x forward)

Version 3.x of the iPhone SDK has the following language:

3.3.1   Applications may only use Documented APIs in the manner prescribed by 
Apple and must not use or call any private APIs.


Apple of course does not offer a FORTRAN compiler, as those who build R from 
source on OSX, as I do, are keenly aware. Thanks to Simon, we have one to use 
for OSX, but one is not officially available for the iPhone/iPad in the SDK. 

Note that there is an important distinction here. The ability to build R versus 
the ability to have the resultant application pass Apple's review to be able to 
appear in the App Store.

The above language has also been interpreted to apply to Java/Flash, precluding 
those environments from appearing on the iPhone/iPad.

However, the beta release of the 4.x version of the iPhone SDK has the 
following language in the same section:

3.3.1 — Applications may only use Documented APIs in the manner prescribed by 
Apple and must not use or call any private APIs. Applications must be 
originally written in Objective-C, C, C++, or JavaScript as executed by the 
iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may 
compile and directly link against the Documented APIs (e.g., Applications that 
link to Documented APIs through an intermediary translation or compatibility 
layer or tool are prohibited).


Thus, in fact, one can only use Objective-C, C, C++ or JavaScript to develop 
applications for the iPhone/iPad. No FORTRAN, upon which of course, R is 
dependent. The above language has also been interpreted to further reinforce 
restrictions specifically on Java/Flash.

 


3. The implementation of programming language interpreters, of which R is one, 
is precluded.

The following language appears in version 3.x of the iPhone SDK:

3.3.2   An Application may not itself install or launch other executable code 
by any means, including without limitation through the use of a plug-in 
architecture, calling other frameworks, other APIs or otherwise. No interpreted 
code may be downloaded or used in an Application except for code that is 
interpreted and run by Apple's Documented APIs and built-in interpreter(s).


The above language has been (pardon the pun) interpreted to restrict the 
implementation of programming language interpreters on these devices. Some 
sites I found have narrowly focused on the No interpreted code may be 
downloaded part of the language as an out of sorts. However, upon review, 
they seem to ignore the or used wording, which would seem to be independent 
of the action of downloading. If the language was and used, then one could 
envision the use of locally stored or entered code, but this is not the case. 
In either case, of course, R would not be one of Apple's built-in 
interpreters.

I found two interesting examples of how Apple has either approved or rejected 
applications that can be considered interpreters. It is not clear where Apple 
drew the line between these two, such that it might enable one to better 
differentiate the reasoning and therefore design an app that would pass muster 
with them. Thus, one complication may be Apple's lack of internal consistency 
in making decisions on allowing or disallowing apps in the App Store. 

The first is an application which was intended to be a BASIC interpreter on the 
iPhone and which was apparently rejected by Apple under the name BasicMatrix:

 http://smartcalc.coollittlethings.com/?p=3

After the author substantially restricted the functionality of the application 
to being an enhanced calculator under the name SmartCalc, Apple approved 
the application.


Re: [R] R on the iPhone/iPad? Not so much....a GPL violation

2010-06-01 Thread Ken Williams
Hi Marc,

I want to debate a couple points from your post:

 1. Distribution of GPL covered applications is not permissible via the App

 Store due to the Apple Terms of Service language, which infringes upon
rights
 granted under the GPL.

 'Nuff said.

I'm not sure I agree with this, but there's so much wiggle room in
interpreting what the GPL means that there would probably be no way to
decide without a courtroom  judge, so I'll leave this part alone. =)  I
also haven't yet read your other post where you discuss this.

 3.3.1Applications may only use Documented APIs in the manner
prescribed by
 Apple and must not use or call any private APIs.

I believe that language only refers to *Apple's* APIs.  In other words, they
don't want you to call hidden functions that aren't supposed to be exposed
to developers.  If it meant no use of any APIs private to the developer, it
would rule out pretty much every application in existence, considering that
a call from one function to any other is an API call.

 However, the beta release of the 4.x version of the iPhone SDK has the
 following language in the same section:

 3.3.1 — Applications may only use Documented APIs in the manner prescribed
by
 Apple and must not use or call any private APIs. Applications must be
 originally written in Objective-C, C, C++, or JavaScript as executed by
the
 iPhone OS WebKit engine, and only code written in C, C++, and Objective-C
may
 compile and directly link against the Documented APIs (e.g., Applications
that
 link to Documented APIs through an intermediary translation or
compatibility
 layer or tool are prohibited).

Here again I believe the private API language refers to
unsanctioned-but-exposed pieces of Apple's platform that you're not supposed
to touch.  The language restrictions I interpret to mean that if you call
their Official API hooks, you must do it from one of the Official Languages.

However, FORTRAN code will never call Apple's API hooks, it just does its
little matrixy/FFT/etc. stuff and returns the results.  In the call stack,
FORTRAN is always a dead end.  It doesn't call Apple's APIs, and it doesn't
call a translation layer that calls Apple's APIs.  So again, R may be in the
clear here, under this interpretation.

Note that Java  Flash applications, under this interpretation, are *NOT* in
the clear, because they do call GUI APIs (among others).

 3.3.2An Application may not itself install or launch other executable
code
 by any means, including without limitation through the use of a plug-in
 architecture, calling other frameworks, other APIs or otherwise. No
 interpreted code may be downloaded or used in an Application except for
code
 that is interpreted and run by Apple's Documented APIs and built-in
 interpreter(s).

I think this indeed pretty effectively rules out installation of packages
from CRAN, which is a bummer - unless those modules are downloaded 
installed through the app store.  Not sure if that would even work though,
since they're not apps.

As for the interpreted code stuff, there's so much murkiness about what
constitutes interpreted code that I don't know if this is a deal-breaker or
not.  At one extreme, it could prohibit pressing buttons in an app and then
interpreting those presses as commands for the app to do something.  At
the other extreme,  Somewhere in the middle, it would seem to cover language
translation apps.  The notion of interpreted is just not very
well-defined.  For instance, most people think of Perl as an interpreted
language, but it compiles to bytecode before executing just like Java (it
just doesn't typically save it to a bytecode file).

Finally, I do agree with the general tone implied in your post - it is a
major major hassle that Apple's overlords control the distribution channel
for software on non-jailbroken iDevices.  I don't like it at all, for the
exact reason that people like you  me  the rest of the world now have to
sit around speculating whether our helpful apps will pass muster with the
cabal.

 -Ken

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R on the iPhone/iPad? Not so much....a GPL violation

2010-06-01 Thread Marc Schwartz
Ken,

See comments inline.

On Jun 1, 2010, at 2:25 PM, Ken Williams wrote:

 Hi Marc,
 
 I want to debate a couple points from your post:
 
 1. Distribution of GPL covered applications is not permissible via the App
 
 Store due to the Apple Terms of Service language, which infringes upon
 rights
 granted under the GPL.
 
 'Nuff said.
 
 I'm not sure I agree with this, but there's so much wiggle room in
 interpreting what the GPL means that there would probably be no way to
 decide without a courtroom  judge, so I'll leave this part alone. =)  I
 also haven't yet read your other post where you discuss this.


Please do, including the links therein. It's not my interpretation, it is the 
FSF's action and Apple's response to that action, which sets at least an 
operational precedence, if not one that could also affect any future litigation 
pertaining to GPL'd apps in the App Store. That all just took place within the 
past week or so, which is what prompted my initial post on the matter, since it 
would be relevant to any R offering via that channel.


 3.3.1Applications may only use Documented APIs in the manner
 prescribed by
 Apple and must not use or call any private APIs.
 
 I believe that language only refers to *Apple's* APIs.  In other words, they
 don't want you to call hidden functions that aren't supposed to be exposed
 to developers.  If it meant no use of any APIs private to the developer, it
 would rule out pretty much every application in existence, considering that
 a call from one function to any other is an API call.


I am not in disagreement on that point. The key issue to date has been the lack 
of a compatible FORTRAN compiler, at least off the shelf, based upon what I can 
tell. Arguably, that is at least a notable deterrent to use FORTRAN on the 
iPhone for now.

There are other programming language tools for current iPhone development, but 
nothing for FORTRAN that I can find.

I can find no references to anyone building iPhone apps using FORTRAN (even in 
part) and the few queries that I can find that even mention an interest in 
doing so, reference the same issues that I have. Some have referenced f2c, but 
it is not clear to me that such an approach would work for R, not to mention 
the development overhead and the extensive testing of any conversion of 
critical functionality.

That all changes with the new language in 4.x.


 However, the beta release of the 4.x version of the iPhone SDK has the
 following language in the same section:
 
 3.3.1 ˜ Applications may only use Documented APIs in the manner prescribed
 by
 Apple and must not use or call any private APIs. Applications must be
 originally written in Objective-C, C, C++, or JavaScript as executed by
 the
 iPhone OS WebKit engine, and only code written in C, C++, and Objective-C
 may
 compile and directly link against the Documented APIs (e.g., Applications
 that
 link to Documented APIs through an intermediary translation or
 compatibility
 layer or tool are prohibited).
 
 Here again I believe the private API language refers to
 unsanctioned-but-exposed pieces of Apple's platform that you're not supposed
 to touch.  The language restrictions I interpret to mean that if you call
 their Official API hooks, you must do it from one of the Official Languages.
 
 However, FORTRAN code will never call Apple's API hooks, it just does its
 little matrixy/FFT/etc. stuff and returns the results.  In the call stack,
 FORTRAN is always a dead end.  It doesn't call Apple's APIs, and it doesn't
 call a translation layer that calls Apple's APIs.  So again, R may be in the
 clear here, under this interpretation.
 
 Note that Java  Flash applications, under this interpretation, are *NOT* in
 the clear, because they do call GUI APIs (among others).


The key wording change relevant to R (and of course for other iPhone developers 
and tool providers) in 4.x is:

Applications must be originally written in Objective-C, C, C++, or JavaScript 
as executed by the iPhone OS WebKit engine

Ignore the other wording pertaining to API's and other layers for the time 
being.

The app must be written natively in one of those four languages. There appears 
to be no interpretation that I can find that differentiates a scenario where a 
library of low level functions, written in a language such as FORTRAN, may be 
called from a higher level language such as those listed above.

Unless there is some subtlety in differentiating the abstraction layers within 
which the application is executed on the iPhone, I see no recourse here.

Note that the entities that provide iPhone cross-compilation/framework tools 
(eg. MonoTouch, Titanium, unity3D, Rhodes, etc.) which convert other code 
directly to native iPhone apps are also trying to figure out where they stand. 
Similarly, folks who develop natively in other languages are also having 
headaches over the new SDK wording.

There is even a question relevant to cross-compilation tools that take another 

Re: [R] R on the iPhone/iPad? Not so much....a GPL violation

2010-05-30 Thread Tal Galili
Android + rattle:
http://www.r-bloggers.com/data-mining-through-the-android/

Contact
Details:---
Contact me: tal.gal...@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
--




On Sat, May 29, 2010 at 10:25 PM, Lanre Okusanya
lanre.okusa...@gmail.comwrote:

 Android FTW?

 On Sat, May 29, 2010 at 11:12 AM, Marc Schwartz marc_schwa...@me.com
 wrote:
  Hi all,
 
  There have been posts in the past about R being made available for the
 iPhone and perhaps more logically now, on the iPad. My recollection is that
 the hurdle discussed in the past was primarily a lack of access to a CLI on
 the iPhone's variant of OSX, compelling the development of a GUI interface
 for R specifically for these devices. R itself, can be successfully compiled
 with the iPhone development tools.
 
  Well, now there is another, clearly more profound reason.
 
  The FSF has recently communicated with Apple on the presence of a GPL
 application (GNU Go) in the iTunes store because the iTunes TOS infringes
 upon the GPL. Apple, given a choice, elected to remove the application,
 rather than amending their TOS.
 
  The FSF also informed the developers of the iPhone port of GNU Go that
 their distribution is in violation of the GPL. R Core and any others
 considering an iPhone/iPad port of R, if you are not already aware, take
 note...
 
  More information is here:
 
   http://www.fsf.org/news/2010-05-app-store-compliance/
 
  with an update here:
 
 
 http://www.fsf.org/news/blogs/licensing/more-about-the-app-store-gpl-enforcement
 
  So, until Apple amends their TOS agreement, it looks like there will be
 no GPL apps available for the iPhone/iPad, since the only way to make
 applications available for these platforms is via the iTunes store (unless
 you unlock the device). Hence, no R for these devices in the foreseeable
 future.
 
  BTW, I am posting this as an FYI, not as a catalyst for a discussion on
 the political aspects of this situation. So please, let's not go there...
  :-)
 
  Regards,
 
  Marc Schwartz
 
  __
  R-help@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R on the iPhone/iPad? Not so much....a GPL violation

2010-05-29 Thread Marc Schwartz
Hi all,

There have been posts in the past about R being made available for the iPhone 
and perhaps more logically now, on the iPad. My recollection is that the hurdle 
discussed in the past was primarily a lack of access to a CLI on the iPhone's 
variant of OSX, compelling the development of a GUI interface for R 
specifically for these devices. R itself, can be successfully compiled with the 
iPhone development tools.

Well, now there is another, clearly more profound reason.

The FSF has recently communicated with Apple on the presence of a GPL 
application (GNU Go) in the iTunes store because the iTunes TOS infringes upon 
the GPL. Apple, given a choice, elected to remove the application, rather than 
amending their TOS. 

The FSF also informed the developers of the iPhone port of GNU Go that their 
distribution is in violation of the GPL. R Core and any others considering an 
iPhone/iPad port of R, if you are not already aware, take note...

More information is here:

  http://www.fsf.org/news/2010-05-app-store-compliance/

with an update here:

  
http://www.fsf.org/news/blogs/licensing/more-about-the-app-store-gpl-enforcement

So, until Apple amends their TOS agreement, it looks like there will be no GPL 
apps available for the iPhone/iPad, since the only way to make applications 
available for these platforms is via the iTunes store (unless you unlock the 
device). Hence, no R for these devices in the foreseeable future.

BTW, I am posting this as an FYI, not as a catalyst for a discussion on the 
political aspects of this situation. So please, let's not go there...  :-)

Regards,

Marc Schwartz

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R on the iPhone/iPad? Not so much....a GPL violation

2010-05-29 Thread Lanre Okusanya
Android FTW?

On Sat, May 29, 2010 at 11:12 AM, Marc Schwartz marc_schwa...@me.com wrote:
 Hi all,

 There have been posts in the past about R being made available for the iPhone 
 and perhaps more logically now, on the iPad. My recollection is that the 
 hurdle discussed in the past was primarily a lack of access to a CLI on the 
 iPhone's variant of OSX, compelling the development of a GUI interface for R 
 specifically for these devices. R itself, can be successfully compiled with 
 the iPhone development tools.

 Well, now there is another, clearly more profound reason.

 The FSF has recently communicated with Apple on the presence of a GPL 
 application (GNU Go) in the iTunes store because the iTunes TOS infringes 
 upon the GPL. Apple, given a choice, elected to remove the application, 
 rather than amending their TOS.

 The FSF also informed the developers of the iPhone port of GNU Go that their 
 distribution is in violation of the GPL. R Core and any others considering an 
 iPhone/iPad port of R, if you are not already aware, take note...

 More information is here:

  http://www.fsf.org/news/2010-05-app-store-compliance/

 with an update here:

  http://www.fsf.org/news/blogs/licensing/more-about-the-app-store-gpl-enforcement

 So, until Apple amends their TOS agreement, it looks like there will be no 
 GPL apps available for the iPhone/iPad, since the only way to make 
 applications available for these platforms is via the iTunes store (unless 
 you unlock the device). Hence, no R for these devices in the foreseeable 
 future.

 BTW, I am posting this as an FYI, not as a catalyst for a discussion on the 
 political aspects of this situation. So please, let's not go there...  :-)

 Regards,

 Marc Schwartz

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.