Try coding on iPad has fun, I downloaded the free app Wolfram Player in App Store and found it can interact with Wolfram notebooks *.nb or *.cdf files locally but cannot change its code.

Then I used Manipulate and InputField to construct a simple Wolfram Language interpreter.(using App-in purchase)

 {WL, "Type the WL here!", InputField[#, Hold@Expression] &},
 Initialization -> Needs["Benchmarking`"]]
(* app version 12.1.1 works fine *)

enter image description here

However this code has some problems:

  1. Some codes output blank field such as GeoGraphics[](in app System Context) and Benchmarking`Benchmark[]
  2. It’s too simple to have no syntax highlighting, code completion and error throwing mechanism.

Could we improve the code and enjoy the coding on iPad?

Or Is there text editors app or offline services that supports Wolfram Language syntax highlighting on iPad? (such connect this app with iSh app that support Linux)

interesting things:

It's a small pocket Mathematica, only 317MB on iPad rather than 11GB desktop version almost without degradation of function numbers.

 Total[FileSize /@ 
   Select[FileNames[All, $InstallationDirectory, Infinity], 
    FileType[#] == File &]], "MB"]

The efficiency on iPad Pro 2020 (12.9-inch) even faster than MacBook Pro (13-inch, 2017)! (same version 12.1.1)

It seems that iPad Pro is a real productivity tool! (But Benchmarking`Benchmark[] couldn't work for further tests)

AbsoluteTiming[CellularAutomaton[110, {{1}, 0}, 10000];]
(* Mac 2.29s iPad 0.51s, four times faster *)

Graph[Table[i -> Mod[i^2, 74], {i, 1000000}]]; // AbsoluteTiming
(* Mac 1.82s iPad 1.34s *)

 Table[Thread[{r, Nest[r # (1 - #) &, Range[0, 1, 0.01], 10000]}], {r,
 0, 4, 0.01}];]
(* Mac 5.30s iPad 2.06s, two times faster *)

(* Mac 1.34s iPad 1.02s *)

newt = Compile[{{z, _Complex}, {n, _Integer}}, Module[{zn = z},
Do[zn = (2 zn + 1/zn^2)/3, {n}]; 
If[Re[zn] > 0, 1, If[Im[zn] > 0, 2, 3]]]];
   Table[newt[x + I y, 25], {y, -1, 1, 2./999}, {x, -1, 1, 2./999}]]
(* Mac 3.30s iPad 2.75s *)

c = Compile[{{x}}, x^2 + Sin[x^2], CompilationTarget -> "C"];
{c, c[10.5]}
(* wow, the app support C language natively and links it back in for execution *)

The Wolfram Player has a location in Files, then we can Export the files to other apps or PCs for further processes. enter image description here

Welcome any comments!

This command list all the system information,cool! SystemInformation[]

  • 1
    $\begingroup$ @N0va yeah, but the wolfram cloud is not running in the local, so it has limitations on running time and memory usage. And running dynamic programs get stuck $\endgroup$
    – partida
    Nov 5, 2020 at 14:18
  • 4
    $\begingroup$ I do not know about iPad version but CDF FreePlayer does not allow arbitrary input fields. If they work it is a bug and if you use them then it is against the license though I found it only because I knew it: wolfram.com/cdf/adopting-cdf/… $\endgroup$
    – Kuba
    Nov 6, 2020 at 12:42
  • 1
    $\begingroup$ My hope is that if the player already works on an a14 chip in the ipad, Wolfram will have a short turn around time to release MMA on the new arm macbooks coming out at the end of the year and i can finally upgrade my 2013mbp $\endgroup$ Nov 7, 2020 at 10:46
  • 2
    $\begingroup$ You may already know this, but the tests in Benchmark[] can be found in AddOns/Packages/Benchmarking/Benchmarking.m if you want to run them manually. $\endgroup$
    – Chris K
    Nov 7, 2020 at 15:58
  • 1
    $\begingroup$ You cannot make a CDF Wolfram Player that can run arbitrary code through an inputfield. There are deliberate limitations on that. You need an Enterprise license on your Mathematica to lift these restrictions, IIRC. $\endgroup$ Nov 7, 2020 at 16:54


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.