Can Julia be installed and used on an iPhone?

I just find Julia language interesting, is it possible to carry it with me on the go? :smiley:

1 Like

Easiest way would be to run it in the cloud, e.g. via mybinder.org.

2 Likes

Another way would be to install code-server on your server and connect to it via vscode.dev interface either on browser or with apps like Blink which has it built in.

1 Like

(Disclaimer: I’m the developer of Pialytic)
We just released Pialytic for iOS. It lets you manage your Julia projects on your device and generate the result and plots. If you need to share the projects you can use automatic Dropbox or Box synchronization as well as Git integration.

4 Likes

I heard that iOS restricts JIT compilation (I don’t really understand it or how it’s done), so how does Pialytic let us use Julia on iOS? Does it run on a server somewhere?

Seems fine, but how to do graphics? (I am using an IPad).

Trying

  using Plots
  scatter(rand(10))

does show nothing.

Thanks,
JD

PS. Apparently the execution is delegated to Verbosus.com server?

Thank you for trying it out. You need to write the plot to a file by using savefig(…) or something similar:

using Plots

# Create some data to plot
x = 1:10
y = rand(10)

# Create a plot
plot(x, y, label="Random Data", xlabel="X Axis", ylabel="Y Axis", title="Simple Plot")

# Save the plot to a file
savefig("simple_plot.png")

And yes, currently it uses the web service available at verbosus.com to generate the result. We’re working on an offline version as well but might take some time to become available, as it is not an easy task to do on iOS.

3 Likes

Thanks for your quick answers. Best wishes for your (future) work !

1 Like

Best wishes!

This is actually quite an interesting construction. As on almost every OS, ios doesn’t permit user code to directly mess with page-tables; instead there is a syscall interface where you request whatever you need.

So the kernel gets to see and consent whenever you want to map memory as readable, writable or executable.

On ios, you never get both writable and executable. And when you request an executable mapping, then the ios kernel inspects the code, and especially verifies cryptographic signatures (and you don’t have a valid signing key! Apple ios devices are not your property, you are a mere serf in the walled garden).

This suggests an obvious way out: If you provision the right kind of developer certificate on your ios device, then you can probably use a JIT, by signing the jitted code before asking the kernel to map it executable.

I think there are proof-of-concepts for this, but afaiu none of the major JIT engines have full support (meaning: Somebody wrote and integrated and maintains the code to make this work), where major JIT engines would be java hotspot/graal, javascript chrome/v8 and firefox, and LLVM.

2 Likes