tperry2x wrote: ↑Sun Mar 02, 2025 8:25 am
richmond62 wrote: ↑Sun Mar 02, 2025 8:19 am
Well that is slightly better.
Although if I had a pound for every time I had either heard or read 'potential' I'd be a millionaire.
Yeah, it's all just BS until someone shows a working example of what it can do (putting it bluntly).
I don't understand this comment, we have working examples, maybe not the best, but working.

- Screen Shot 2025-03-02 at 11.28.26 AM.png (97.06 KiB) Viewed 20477 times
Sorry about the grammar error.
This is the ASM.js (wasm predecessor) compiled engine right here:
https://openxtalk-org.github.io/OpenXTalk-Playground/
And that engine has since been compiled to wasm 'over there
If you want I can share the example Electron app wrapper I made on macOS, I tested using the Emscripten engine with it.
Then there's a lot of non-xTalk engine examples of wasm.
using javascript DOM element inspecting (which would help you when formatting and saving elements back to file)
Exaclty, not just
inspecting the page/environment that the Browser engine is running on (although that is important obviously), I'm interested in creating and manipulating the DOM objects from xTalk, for example: create button "My New Button" should create a button tacked onto the page / 'stack', and also generate any relevant messages up the message hierarchy to a main event loop, the 'newButton' message in this example.
To try to simplify what I'm talking about with wasm ...
- WebAssembly conceptually is a lot like Java but Oracle corp doesn't own it. Wasm is assembly language / intermediary bytecode for a virtual computer, a generic VM.
- Code written in C/C++, like our MC>RR>LC>OXT engine AND various free open-source libraries needed to make the engine work like FreeType, and Cairo drawing library, can be compiled to this virtual machine assembly language and then can be run something that supports that virtual machine. It's he same 'Write Once Run Anywhere' (WORA) concept of Java/JVM. Code can be compiled to this VM's ASM 'bytecode' so that program can run as quickly as possible while still not being tied to a specific platform or CPU architecture. It's still not 'native' machine code, but it is much closer to that than 'higher level' languages like C/C++, Js, xTalk, etc.
- Modern web browsers engines support asm.js (Javascript 'polyfill' version can work on older browser engines) and smaller/faster wasm compiled modules. It is also possible to run.wasm modules without the web on desktop computers (no internet required to run), much like JAVA .jar files.
- The Emscripten OXT engine, used here:
https://openxtalk-org.github.io/OpenXTalk-Playground/ is the asm.js javascript build of the Engine. It has since recompliled that engine to smaller/faster .wasm bytecode module 'over there' with which is NOT covered by the GPLv3 open source license that governs OXT, so we can't use that without a subscription.
- We may however recompile the community engine to .wasm ourselves. Mark Wielder has said was able to do that, although I have not seen a .wasm compiled module from this. In the building guides doc the recommended environment for bulding the engine with Emscipten is Linux, but Emscripten developer kit can be installed on other platforms.
I
thought that I had Emscripten developer kit yesterday, but macOS 11/ Big Sur is too old for the current Homebrew formula for building the Emcripten Developer Kit. It never completed because XCode command line tools for macOS 11 is missing functions the newer build depends on. It's probably time to update the OS on this old laptop that I use for tinkering.
Then there's a different approach, used in HyperCard Simulator, ViperCard, others where there is a 'transpiling' of some sort of on-the-fly conversion of xTalk to JavaScript. JavaScript, and now WASM too, are the only languages that are 'native' to web platform. This could be done 'on the fly', but is going to yeild better results if the conversion can be done ahead of time.
I think it would be best to use a hybrid combination of xTalk -> JS transpiling method as demonstrated by the great working example we have in Dan's HyperCard Sim (there has been other projects similar to that, such as ViperCard), along with HTML5 / Web APIs (text-to-speech, geolocation, joystick support, etc.) and if helpful use compiled .wasm modules too if, for example, we want to use some chart making desktop library that's already been compiled to web assenbly.
I hope that helps make sense for anyone reading this thread.