237 points · by Shank · 2y ago · 181 comments
We had all that. It was taken away.
To be fair, most electronics these days are so tightly integrated (literally IC, Integrated Circuits!) that there's not much you can do even with a full on schematic.
Long gone are the days of bigly electronics parts connected by a spaghetti nest of wires and third grade soldering.
Humans go ooo, accessibility never comes back again..
I think it's fine to get excited, but there's also getting too excited if there's no rational need for the software. Which I can't really see, since there always have been other devices to buy.
Like if I need to do spreadsheets I will get a device made for that, not demand that regulators force Apple to let me install Excel on my phone.
Hackers and Europeans framing this as some kind of civil rights or human rights issue is to me abut as ridiculous as if regulators would force every restaurant to make their menu gluten free. Which will probably happen soon, since the mental children are at the helm.
We know that recent (M2+) Apple Silicon has hardware support not only for virtualization, but nested virtualization. Time may improve Apple's risk/reward for enabling virtualization in specific iPad use cases.
Thanks to aShell and iSH emulators for pioneering Linux-alike experiences on iPads, at the cost of overheated silicon.
Thanks to Asahi for bare-metal Linux, including virtualization, on Apple Silicon.
It's more likely that the EU will improve it.
As things stand today, Android allows for JIT acceleration on all apps, essentially unrestricted. The DMA only allows for security measures that restrict APIs insofar as those measures are "strictly necessary and proportionate".
Since Android manages just fine on that front with full JIT, Apple's defense relying on that DMA exception will fail.
The DMA allows for security exceptions only when measures are "strictly necessary and proportionate", Article 6(4). Apple argues that this ban is crucial for security, yet Android permits JIT compilation and maintains robust security on that front for 99% of its user base without significant incidents.
Foxes argue the ban on chicken wire is crucial for their security.
for example, this ocaml program runs 6× slower when compiled with ocamlc (which uses an excellent bytecode interpreter) than with ocamlopt
let rec fib n = if n <= 2 then 1 else fib (n-1) + fib (n-2)
and n = 40
in Printf.printf "fib(%d) = %d\n" n (fib n) ;;
the ocamlopt-compiled version is about 5% slower than a handwritten assembly version (and orders of magnitudes slower than a version compiled with gcc, which is why i wrote the assembly version)„All the tricks“ for an interpreter would mean 1 jump per interpreted instruction, or perhaps 0.5 for some of them. It would probably mean no explicit jump tables. It would probably mean the interpreter is set up pipelined like a real cpu - loading instructions on parallel with executing previous instructions. You can get perhaps 5-15% of native speed using for an interpreter all the tricks. QEMU can maybe get 20-50% (not sure these days actually, I haven’t followed improvements for a while). Rosetta can get close to 100%, using a JIT but also hardware that is specifically designed to aid emulation (memory accesses like on x86).
Given nowadays CPUs execute like 3-5 instructions per cycle, getting 5-15% performance for an interpreter would be very fast and very difficult to achieve, but possible - if designed from the ground up for performance.
EDIT: What's with the downvoting?
In short, I’m going to keep using an ARM sidecar: https://taoofmac.com/space/blog/2023/10/07/1830
Apple doesn’t let us JIT nice things, and it’s just sad.
No, it's an Apple device. It _should_ be a general computing device, but Apple ensures that it will never be, and you should be aware of that when you buy it.
I didn’t buy an iPhone to be a general purpose computing device for the same reason
It's a pretty pointless thing to say "I didn't buy an Ipad to do X so why should it be able to do X?". Of course you didn't buy your ipad to do X. It's not capable of doing X so you'd be pretty stupid if you bought it for that purpose. That has nothing to do whether the manufacturer of the ipad should be allowed to control whether you can do X.
Jobs literally presented iPhone with “Desktop class applications & networking”.
Because it's their machine. They decide what to do with it.
I can't say I see the use case for this on iPhones, but this does unlock a lot of options for iPads. Too bad this thing is still locked to JIT-less mode.
It likewise seems clear that Apple relented in this case because a not-particularly-easy-to-use, interpreter-only PC emulator doesn't enable anything that isn't already possible with a Web app.
No need for making up new theories with no evidence, I think. They just don’t want to grant a third party JIT permission because of security concerns
The initial rejected UTM submission had no JIT compilation.
And I actually do have evidence for my conspiracy theory: iDOS 2. Apple was perfectly fine with it up until someone in tech media posted a guide on how to run ancient versions of Windows on it, then they pulled the app.
Furthermore, "fingers shall not touch mouse apps" was a Jobs decree. It's specifically the reason why Apple got into touch UI. Jobs designed the iPad out of spite due to a friend of his who was on the Windows tablet team around the turn of the millennium. Jobs was so angry that they were just putting Windows on a tablet - and handing people styluses to work around the small touch targets on XP - that he made Apple design a tablet computer demo around finger-only UI. That was then grafted onto the Purple project (which at that point was a clickwheel iPod with a phone modem in it) and we got the iPhone.
So my suspicion is that Apple has an internal "things which make Jobs spin in his grave" list that they would never allow, come hell, high water, or the European Union's antitrust regulators.
Huh… so I could run Linux on my phone!
- TCG = Tiny Code Generator; QEMU's framework for emulating CPU architectures via translating instructions[1]
- TCI = Tiny Code Interpreter? The source code says: "(TCG with bytecode interpreter, experimental and slow)"[2]
- TCTI = Tiny Code Threaded-Dispatch Interpreter? The source code says: "TCTI (TCG with threaded-dispatch bytecode interpreter, experimental and slow; but faster than TCI)"[3]
So, apparently, it's some kind of optimized interpreter. Exactly what it means by "threaded-dispatch" is unclear, there's some surprisingly tricky looking things going on[4]. Does threaded refer to OS threading, or does it maybe mean that it's doing something a bit more like a cached interpreter? I wonder if it's even more clever than that.
[1]: https://wiki.qemu.org/Documentation/TCG
[2]: https://github.com/tctiSH/qemu/blob/1e4d72b004c26724cd049798...
[3]: https://github.com/tctiSH/qemu/blob/1e4d72b004c26724cd049798...
[4]: https://github.com/tctiSH/qemu/commit/1e4d72b004c26724cd0497...
It works kind of like ROP/JOP gadgets.
At first I was thinking of cached interpreters as often seen in video game console emulators, but actually, this reminds me more of the "virtual machines" used in executable packers/obfuscators like VMProtect and Themida.
https://github.com/tctiSH/qemu/blob/with_tcti_vectors/tcg/aa...
> Also shoutout to @ktemkin whose QEMU TCTI implementation was pivotal for this JIT-less build.
Does this mean that it is just a JIT-less build? How is the performance for Linux emulation compared to the previous UTM SE build?
Although I do expect it soon, since especially opening up NFC could benefit the nationwide contactless payment solution (twint).
Last time I tried through AltStore, I couldn't get it working.
Now Apple just needs to support JIT