Thanks I will try to digest this. tomorrow we have a sync with the Pharo team and I will discuss it. S.
On 30 Mar 2026, at 15:00, Aaron Wohl via Pharo-users <pharo-users@lists.pharo.org> wrote:
I have some answers. I also fed your email to CLAUDE as it has better numbers on test comparisons and better recall of details.
- The VM is entirely new. I started with the Pharo VM. But CLAUDE had endless problems due to the encoding of type info in the high bits of pointers. It tried to move it to the low bits, but claimed operations on pointers were spread out and not localized, allowing change. I had heard how small and easy it was to create Smalltalk VMs, so I just said to make a new VM.
- On deploying the note-taker to the apple store. In theory it is supported now. On the Mac, you can create an Apple Xcode project from a Smalltalk app and send it to the store. In pracice we will need to work together as it hasn't been done before.
CLAUDE's answers: Reply to Stephane Ducasse's questions about iPad Pharo ===================================================== From the email thread of 2026-02-28.
Q: Did you use the Pharo interpreter VM at all? ----------------------------------------------- No. This is a clean-room C++ interpreter (~100K lines of new code). The main obstacle was that the standard Pharo VM encodes type tags in the high bits of pointers, which breaks on iOS due to ASLR (the OS uses those bits for address randomization). Rather than patch the existing VM to move tags to the low bits, a new interpreter was written that encodes type info in the low 3 bits from the start. Loading a standard Pharo image translates all addresses on the fly.
The other blocker was Apple's prohibition of JIT compilation on iOS. This VM is pure interpreter, no JIT.
Q: Which tests did you focus on? --------------------------------- We run substantially more tests than the official Pharo CI, and we wrote a test harness (pharo-headless-test) that extends testing into areas the CI does not cover.
SECTION 1: Side-by-side -- same test packages, their CI vs our VM =================================================================
The official Pharo 13 CI (Jenkins at ci.inria.fr) runs all TestCase subclasses in the bootstrapped image using: ./pharo Pharo.image test --junit-xml-output '.*'
Their bootstrapped image has ~40,306 tests per platform (includes Roassal, extra tools loaded during bootstrap). Our image from get.pharo.org/64/130 <http://get.pharo.org/64/130> has ~28,071 tests (the standard distribution without bootstrap-only packages).
For the test classes present in BOTH images:
Metric Pharo 13 CI iospharo VM ----------------------------------------------------------- Tests run (per plat.) 40,306 28,071 Unique failures 4 39 fail + 391 err Pass rate 99.99% 98.00% Adjusted pass rate* 99.99% 99.82% Platforms tested 3 (Mac/Lin/Win) 1 (Mac Catalyst) Image source Bootstrapped get.pharo.org JIT Yes (Cog) No (interpreter)
* Adjusted: removing ProcessTest processMonitor (46 errors, Pharo 13 image bug, fails identically on official VM) and image meta-tests (SystemDependenciesTest, ReleaseTest, etc.)
The 4 tests that fail on official CI also fail (or are covered by the same root causes) on our VM: OCClassBuilderTest >> testCreateNormalClassWithTraitComposition StDebuggerInspectorTest >> testUpdateLayoutForContexts... StDebuggerTest >> testUpdateLayoutForContexts... SystemDependenciesTest >> testExternalUIDependencies
Our remaining failures break down as: ProcessTest processMonitor missing 46 (Pharo 13 bug, same on official VM) SystemDependenciesTest 17 (image meta-test) Fuel WideString/WideSymbol 15 (serialization timeout, interpreter speed) Calypso IDE query tests 14 (IDE infrastructure) MicGitHub network tests 9 (rate limiting / network) ReleaseTest meta-tests 9 (image state checks) StDebugger tests 4 (debugger UI) Geometry unimplemented methods 3 (#intersectionsWithEllipse: missing) Other scattered 27 (1 each, assorted)
None of these are VM-specific bugs. Zero VM-specific failures.
The ~12,000 test count gap is because the CI bootstraps images from source, pulling in extra packages (Roassal charts: 812 tests, plus AI-Algorithms, Sindarin, BeautifulComments, etc.). We also exclude a handful of known hangers (Epicea file watchers, Athens rendering).
SECTION 2: Additional tests we run via pharo-headless-test ==========================================================
We wrote and open-sourced pharo-headless-test: https://github.com/avwohl/pharo-headless-test
This extends testing into areas the official CI does NOT cover because it provides a fake Morphic GUI environment that runs headless.
GUI/Spec Presenter Tests (64 test classes, 1,113 tests) ------------------------------------------------------- The official CI runs these but they silently skip or error without a real display. Our fake GUI (setup_fake_gui.st) creates a virtual 1024x768 Morphic world with Display Form, WorldMorph, UI process, and MorphicRenderLoop. This lets Spec presenter tests actually open windows, click buttons, and render morphs.
Tests: 1,113 across 64 Spec/GUI test classes Pass: 1,054 (94.6%) Fail: 5 Error: 15 Skip: 35 Timeout: 4
Without setup_fake_gui.st, ~350 of these fail with "receiver of activate is nil" -- they literally cannot run.
Higher-Level Package Tests (5 external packages, 7,974 tests) ------------------------------------------------------------- We load and run substantial third-party packages to stress-test VM correctness beyond the built-in test suite:
Package Tests Pass Fail Error Rate NeoJSON 116 116 0 0 100% Mustache 47 47 0 0 100% XMLParser 5,978 5,978 0 0 100% PolyMath 1,168 1,162 5 1 99.5% DataFrame 665 651 14 0 97.9% ----------------------------------------------- Total 7,974 7,954 19 1 99.8%
All 20 failures are pre-existing on the official Pharo VM.
These exercise: JSON/XML parsing, Unicode, template expansion, scientific computing (matrices, ODE solvers, large numbers), tabular data operations, and closures/streams throughout.
Total test count across all categories -------------------------------------- Built-in image tests: 28,071 GUI/Spec tests: 1,113 (with fake head) External packages: 7,974 ----------------------------------------- Grand total: 37,158 tests run on iospharo VM
Q: Is the interpreter threaded? Does it use auto-localisation? -------------------------------------------------------------- No to both.
Dispatch: The interpreter uses a cascading if-else tree in dispatchBytecode() (src/vm/Interpreter.cpp:1548), organized by bytecode ranges, with switch statements for specific groups within each range. It does NOT use computed goto (threaded dispatch).
Auto-localisation: The interpreter does NOT copy PC/IP/SP into local variables at the start of each bytecode handler. It directly uses C++ member variables (instructionPointer_, stackPointer_, framePointer_) throughout execution. A comment at line 1164 notes "GC safe point: between bytecodes, no C++ locals hold Oops" -- the design intentionally avoids locals holding object pointers so the GC can see everything.
Both of these are areas where performance could be improved. Computed goto dispatch and localised variables are known optimizations described in Stephane's linked paper (Poli22b-MoreVM22-Autolocalisation.pdf). They would likely give a meaningful speedup on the interpreter path.
Q: Performance comparison with the Pharo interpreter VM? -------------------------------------------------------- We don't have benchmark numbers yet. The iospharo interpreter is pure C++ with no JIT, no threaded dispatch, and no auto-localisation. The Pharo interpreter VM (StackInterpreter without Cog JIT) uses threaded dispatch and auto-localisation, so it should be faster bytecode-for- bytecode. However, even the official interpreter VM is rarely used -- almost all Pharo users run with the Cog JIT.
Potential optimizations that could help: - Computed goto dispatch (threaded interpreter) - Auto-localisation of PC/SP/FP into registers - Inline caching for common message sends - Profile-guided optimization (PGO) of the C++ build - Super-instructions for common bytecode pairs
These are all well-understood techniques. The current interpreter prioritized correctness and compatibility over speed.
Q: Should this be a separate VM or merged into the standard VM? --------------------------------------------------------------- This is a clean-room implementation, not a fork. The standard Pharo VM (OpenSmalltalk/pharo-vm) is generated from Slang/VMMaker Smalltalk code. This VM is hand-written C++ that reads the same Spur image format. Merging them would mean either:
(a) Teaching VMMaker/Slang to generate low-bit-tagged code (large effort, touches every oop operation in the generated C), or (b) Maintaining a separate C++ VM alongside the generated one
Option (a) would be better long-term but is a significant project. The current approach works now and passes the test suite. Whether it's worth the effort to merge depends on how much the Pharo team wants native iOS support vs. waiting for a different approach (e.g., the Apple silicon situation changing, or WebAssembly).
Q: Naming -- "Pharo" in the App Store -------------------------------------- Currently published as "iospharo" in TestFlight. Happy to use whatever name the Pharo team prefers. Stephane's suggestions included VibePharo, PhaIpad, or bringing it under the Pharo umbrella with a distinguishing name. The name "Pharo Smalltalk" is not used -- just "Pharo" per Stephane's correction.
Q: iPhone menu bar cut off / window layout ------------------------------------------ Agreed with Stephane that this should be fixed at the image level, not the VM. The VM provides the screen dimensions; the image's Morphic layout should adapt. Pharo 14 with SDL3 and Toplo/Bloc may handle this better. For now, the startup.st mechanism can inject layout patches, but proper responsive layout belongs in the image.
Q: Too slow to release? ------------------------ Interactive use (browsing code, inspecting objects, editing) is usable on iPad. Computation-heavy tasks (loading large packages, running the full test suite, Fuel serialization) are noticeably slow without JIT. But for learning, exploring, and light development, it works. The TestFlight description notes the limitation. Whether it's "good enough" depends on the use case -- for something like The Note Taker app Stephane mentioned, it should be fine.
----- Original message ----- From: "stephane.ducasse@free.fr <mailto:stephane.ducasse@free.fr>" <stephane.ducasse@free.fr <mailto:stephane.ducasse@free.fr>> To: Aaron Wohl <xphu@awohl.com <mailto:xphu@awohl.com>> Cc: Any question about pharo is welcome <pharo-users@lists.pharo.org <mailto:pharo-users@lists.pharo.org>> Subject: Re: [Pharo-users] iPad Pharo test release Date: Saturday, February 28, 2026 7:18 AM
Hi Aaron
Pharo 13 for iPad in the test Apple Store (open in the Apple TestFlight app); Phone or Mac https://testflight.apple.com/join/kGmPQFr9 Due to Appleâs no JIT, it's not snappy. But maybe it's still useful? Source https://github.com/avwohl/iospharo about 100K lines of new source code.
Tx for the notice :) This is really a great effort. Iâm browsing the code and Iâm blasted :)
Do I understand correctly that you did not use at all the Pharo vm (without the JIT) = the Pharo interpreter VM. Because it is running without the JIT.
This is my first venture into using Pharo. I could use advice on where this project fits in Pharo/Smalltalk land. In the early 80s, I used the Xerox Parc Alto at Carnegie Mellon to run Smalltalk. I got laid off, went on a cruise, sat down in a beach chair with LEARN PHARO and an iPad. But, no Pharo for iPad.
You see I would love to see how we can deploy application such as https://github.com/pharo-contributions/the-note-taker
The interface is still a bit clunky but I use it regularly on my mac. Just need more time to do a pass on it.
So I did the natural thing and told Claude Code to port Pharo to iPad. 54 days and 1347 commits later, out popped a usable iPad app.
This is really cool.
I do have a background in compilers, working on the Production Quality Compiler project at CMU in the early 1980s, mostly on lexers. But I didnât write any code for this. I mostly told CLAUDE a few times a day stop doing workarounds, do what the real VM does, and thatâs a workaround. CLAUDE would never have succeeded I think if I hadnât started insisting a focus on getting the test suite to pass rather than the app to work.
This is really interesting. Which tests did you focus on? Because there are many VM tests.
The main snag using the real VM was encoding the encoding of type info in the high bits of pointers for immediate types. It seemed simple to me to shift the type info to the low 3 bits. But Claude could not get the real VM to stop looking in the high bits; perhaps I should have pushed harder on that. But I had always heard how easy it was to port Smalltalk, so I just went with a new VM with the type info in the low bits. Loading a standard image translates the addresses. The other issue was that Apple forbids JIT on iPad. So this new VM has no JIT. Issues: - Should this be a separate VM? Should I push harder on getting the standard VM to work with type info in the low bits and no JIT? Even if that would be better, is it worth the bother now that this works?
Let us talk internally and we would like to have a chat with you for sure :) I tried to see if the interpreter is a threaded one but I need to get a decent text editor because reading the code in safari on github is too painful. The default Pharo interpreter is also using localisation. in each byte code branch the global state PC, IP is copied into local temps on exit the inverse is done.
http://rmod-files.lille.inria.fr/Team/Texts/Papers/Poli22b-MoreVM22-Autoloca...
- I donât want to suck up the PharoSmalltalk name in the Apple stores if it causes offense. I can call it VibeTalk
VibePharo :) PhaIpad
or something to leave the name free for a hand-coded version.
Or move off the name if a real contender ever shows.
Pharo is not Pharo Smalltalk but Pharo :).
Now let not me decide alone :) So we will discuss and see. My gut feeling is that - it would be nice to get this under the Pharo umbrella - find a way to distinguish it from the Pharo vm
- Without JIT, is it too slow to bother releasing?
Yes! Now we some explanation telling the known limits.
Is there some other optimization that could bridge the gap if it is too slow?
I would love to get a comparison with the interpreter VM.
- Are there any users who can give the iPad version a really good workout in real work? The VM passes the test suite. But it just started working on the iPad today. There will be UI issues.
I do not know industrial users but as a plain Ipad user I would like to give a try to do something with it. Now I have an old Ipad and marcus a Pro so we can check already.
- On the iphone the menu bar is cut off, and the welcome window is mostly off the screen. The menu bar layout is in the image, not the VM. I am not sure the VM should work around it. Should these be fixed in the image to have a multi-line menu bar as needed, and reshape initial window layouts on phones? If so is anyone willing to do the Smalltalk side or help me do it (I have written mostly other languages)
I think that most of the UI part should be done at the image level. Now I was recently discussing with Pablo about the deployment of app on mac and we decided to wait for P{haro 14 because we will have SDL3 support and also we should check the Toplo/bloc logic because it should be easier than the current one. I mean that we can do it in a similar way than the https://github.com/pharo-contributions/the-note-taker but it should be smoother.
We are super busy with the P14 release. Let us sync internally (tuesday is our sync point) and people are coming back from vacation.
S.