Julia in iPad

Hi!

I talked to some people at JuliaCon and it seems that we will never get a native Julia REPL in an iPad due to Apple’s restrictions regarding JIT :frowning:

That’s too bad, because we have this impressive hardware that can do a lot of things to… play angry birds if you are not a content creator…

However, the bright spot at the end of the tunnel is WebAssembly (WASM). Is there a way to contribute to or check the development of WASM support in Julia? Are there any recent developments in this area? The repositories I’ve found are quite old.

9 Likes

Is it possible to use the interpreter (Home · JuliaInterpreter.jl) to execute Julia code without compilation?

  1. Precompile all of JuliaInterpreter and build it into the sysimage.
  2. Axe the JIT compiler from Julia and make sure the interpreter is used for everything.
  3. Put this interpreter into a Julia IDE, similar to Pythonista or Pyto.
  4. Ship this as an iOS app.

I guess this won’t be fast because interpreters usually aren’t fast, but at least it’s something.

2 Likes

Not worth it.

1 Like

Why do you want to run julia on an iPad.
I own both an iPad Pro 12 inch and an iPad mini 6 but they had been dust collectors for several years. they are merely toys for children (I think).
They have neither keyboard, mouse, big screen, nor they have sufficient RAM…

1 Like

When the iPad Pro 2024 with M4 was released it had the first publicly available aarch64 CPU with the SME extension, now also available in MacBooks and Mac Studios. People went crazy doing matmul benchmarks on the iPad, see for example Overview | Hello SME documentation or GitHub - tzakharko/m4-sme-exploration: Exploring the scalable matrix extension of the Apple M4 processor.

6 Likes

Technically, you can get around the no-JIT restriction by bundling a browser (which has to be Safari) with your app. But it wouldn’t help target native code from Julia.

Metal.jl is the easiest way to target GPUs in Apple Silicon Macs. As the others said, the same hardware exists in some iPads. If you could use the same Julia code to target desktop+laptop+tablet, it would open up the device for new applications, especially outside gaming and ML.

Speaking of new applications, the iPad is the only device of its kind with stable, low-latency audio drivers. It’s already possible to create AUv3 audio plugins that work on Mac+iPad from the same C++ codebase. What if you could use Julia instead?

3 Likes

Maybe it’s a dumb question, but would juliac work if cross-compilation becomes a thing?

2 Likes

The tablets (iPads and others) are becoming more and more powerful tools. I guess they will finally replace most laptops in a few years. Having them as work platforms will be important. I would bet Apple will (have to) flexibilize that restriction. And Julia support for these hardware will become increasingly important. (I’m using a samsung tablet as a replacement for most of my travelling work and, not without some glitches, it works).

3 Likes

Why do you need cross-compilation? It’s the same platform as any other Apple Silicon MacBook or Mac Mini/Studio.

1 Like

I have zero idea how compatible iOS and MacOS are. If juliac on a Macbook works, then that’s one less reason to wait for cross-compilation.

Because it would be a good idea to start growing future Julia developers. I’d agree this isn’t where you want to do intensive scientific computational work, but offering the opportunity to learn mathematical problem solving on a platform that is readily available to schools is a good application. It’s going to be easier to start kids on Julia than convert them from the alternatives, and base Julia has a very approachable syntax, from which you can expand into the much more powerful constructs later as needed.

7 Likes

I agree with @MDSW. Anecdotally, I had the opportunity to work with twelve high school astronomy interns yesterday on an intro to coding activity. When I asked how many had used, or even heard of, Python before, I was surprised to see that very few raised their hands. Same went for Julia (less surprising). Not going to try and make any predictions here, but by the end of the workshop we did have Julia installed on all of their school laptops (big thanks to the folks behind juliaup!)

7 Likes

I’m not sure it would be worthwhile for anything more than a curiosity, but has anyone had any luck with iSH? I know there is not a supported version of Julia for 32 bit Linux with musl instead of glibc, so all I’ve done is try to use gcompat. No luck, but I’m far from an expert