Pharo in the Browser with WebAssembly
This project brings the Pharo Smalltalk environment directly to your browser using WebAssembly, demonstrating the impressive portability of Smalltalk's dynamic bytecode. It's a classic Hacker News hit, tapping into the community's enduring love for niche, powerful programming paradigms and the cutting-edge potential of browser-based runtimes. The discussion explores both the technical marvel and the practical implications of such an ambitious undertaking.
The Lowdown
Pharo in the Browser showcases a fascinating technical achievement: running a full Pharo Smalltalk development environment directly within a web browser. This project leverages WebAssembly to compile the Smalltalk bytecode interpreter, allowing users to interact with a living, breathing Pharo image without local installation. It's a compelling demonstration of how traditional desktop-oriented development environments can be reimagined for the web.
- The application functions as a web-based Pharo VM, enabling users to
Start freshwith a new Pharo image or loadSaved in this browsersessions, akin to a persistent local environment. - It operates by compiling the Pharo Virtual Machine's bytecode interpreter to WebAssembly, a feat that allows complex, dynamic languages to execute efficiently in a browser.
- The project highlights WebAssembly's capability to host sophisticated runtime environments, pushing the boundaries of what web applications can achieve.
- While primarily a proof-of-concept, it opens doors for educational tools, rapid prototyping, and collaborative coding in Smalltalk without the usual setup friction.
This initiative serves as a powerful testament to both the enduring flexibility of the Smalltalk ecosystem and the transformative potential of WebAssembly for porting entire programming language runtimes to the web.
The Gossip
WASM Wonders and Woes
Commenters were quick to laud the technical achievement of running Pharo in the browser, assuming it's the bytecode interpreter compiled via Emscripten. The discussion naturally veered into the limitations, particularly the challenge of implementing JIT compilation within WebAssembly's current execution model. Some questioned the ultimate 'purpose' of an in-browser Pharo, while others drew parallels to VSCode's web iteration, noting that such experiences can still feel 'hacky' due to download sizes and hardware friction.
Hacker News's Heart for Smalltalk
A recurring theme was Hacker News's undeniable affection for Smalltalk and Lisp. The author of the post expressed surprise at its rapid ascent, attributing it to HN's receptiveness to such languages. This sparked a broader conversation about the 'small but loving community' around Pharo and Smalltalk, acknowledging that these niche technologies consistently find an appreciative audience on the platform, even if their practical, widespread uses are less obvious to some.
Browser Bugs and Broken Back Buttons
Despite the technical marvel, users quickly pointed out several practical usability issues. Reports included broken zooming functionality on Firefox (Linux), which distorted the viewport and mouse clicks. More critically, the application was found to break the browser's back button on both Android and Chrome for Windows, creating a navigational dead-end. These critiques highlighted the challenges of integrating a complex desktop-like environment seamlessly into the unpredictable world of web browsers.