Hypercard Simulator

A place to discuss any and all xTalk implementations, not just LC LCC Forks, but HyperCard, SuperCard, MetaCard, Gain Momentum, Oracle MediaTalk, OpenXION, etc.
Forum rules
Please limit any bashing/harping on any commercial interests to a minimum, thanks!
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Hypercard Simulator

Post by OpenXTalkPaul »

richmond62 wrote: Thu Dec 14, 2023 8:11 am As my focus is xTalk as a teaching tool that is NOT dependent on web-access . . . 8-)
AH BUT..
This is NOT dependent on 'web-access' (I believe you meant 'internet access'), it's ONLY dependent on having an HTML5/JS rendering engine, no internet connection required! HTML5 and WebAsembly CAN run offline. That's exactly how Electron and similar 'engines' can create 'native' applications. it's how Atom/Pulsar code editor and bunches of other cross platform apps are built. IMO its a lot more interesting if it does have a internet access. Kids are growing up in a world where virtually everyone on the planet has an internet connected mini-computer in their pockets, they expected internet. And this xTalk interpreter can run even on those mini-computers. But I do understand what a distraction internet could be in a class room environment.

I'm just really excited by the possibilities, but I guess it does hit a nerve a little because I think you guys are not really being very open to the 'Open' part of of OpenXTalk. You're focused too much on the the continuation of LC Community Engine, and not so much on keeping the xTalk language alive and open to all (which I beleive is the more important goal). That focus will eventually leave you stuck waiting for some pro software engine to come along and volunteering their time for free to solve problems like 'Browser Widget' broken or 'Player' control broken on some obscure Linux distribution. I think there's a better chance that one of us turns turns themselves into a 'real software engineer' (whatever that is). Meanwhile, there's already several options that would can on any OS, and web-based can run on anything with an HTML5 engine available (read as 'virtually ever OS in the last 5 to 10 years'), which includes an HTML5 engine that is offline.

And there's other reasons for me to be working on this instead of that that I'm not going to talk about publicly (I'll PM you guys).
User avatar
richmond62
Posts: 2766
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Hypercard Simulator

Post by richmond62 »

because I think you guys are not really being very open to the 'Open' part of of OpenXTalk. You're focused too much on the the continuation of LC Community Engine, and not so much on keeping the xTalk language alive and open to all (which I beleive is the more important goal).
Well, the 'Open' bit was a decision you took unilaterally, and if we do inhabit an 'open' universe, we should be allowed a different opinion.

And, while I do see your point, I feel that before we teach our "fish" how to fly, we need to catch them first, and without a reasonable up-and-running IDE we won't catch any fish at all.
https://richmondmathewson.owlstown.net/
dandandandan
Posts: 8
Joined: Thu May 05, 2022 9:02 pm
Contact:

Re: Hypercard Simulator

Post by dandandandan »

Thanks for these great comments.

One thing: the simulated objects are all real html elements. So you can set the innerHTML of button 1 for example (maintain case sensitivity, only HC is case agnostic)

The changes to the simulator script will be loaded and saved in your account if you push the little upload button above it after changes.

I don’t support embedding custom JavaScript in stack and other scripts because it’s unsafe for the user. But if you self-host, you can add or change anything about the simulator in your script.js.

Dan
User avatar
richmond62
Posts: 2766
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Hypercard Simulator

Post by richmond62 »

AH BUT..
This is NOT dependent on 'web-access' (I believe you meant 'internet access'), it's ONLY dependent on having an HTML5/JS rendering engine
Actually, I meant interweb access. 8-)

Let's imagine a school in Tanzania (fourth poorest country in the world) with a load of old (that means OLD as in 20 years plus) computers, and some donated solar panels on the roof for an electricity supply.

SO:

32-bit Intels with half-a-Gig of RAM and 40 GB hard disks . . .

(just to prove the point, I have a 24 year old Pentium 'something', with 128 MB RAM, a 20 GB DH, running Xubuntu 10.something &&&& LC 7).

Now I am not sure whether they would 'cut the mustard' with what you are proposing.
--

Oh, and is it true that Dandandandan is really Bob Geldof?
-
SShot 2023-12-15 at 16.38.42.png
SShot 2023-12-15 at 16.38.42.png (952.59 KiB) Viewed 924 times
-
https://www.imdb.com/title/tt0060214/ch ... /nm0001889
https://richmondmathewson.owlstown.net/
FourthWorld
Posts: 280
Joined: Sat Sep 11, 2021 4:37 pm
Contact:

Re: Hypercard Simulator

Post by FourthWorld »

richmond62 wrote: Fri Dec 15, 2023 2:36 pm 32-bit Intels with half-a-Gig of RAM and 40 GB hard disks . . .

(just to prove the point, I have a 24 year old Pentium 'something', with 128 MB RAM, a 20 GB DH, running Xubuntu 10.something &&&& LC 7).

Now I am not sure whether they would 'cut the mustard' with what you are proposing.
Does that Xubuntu configuration run OXT?
User avatar
richmond62
Posts: 2766
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Hypercard Simulator

Post by richmond62 »

I doubt it as, as far as I know, OXT is 64 bit: but I am sure one could swap round the 32 bit LC 963 engine so it runs.

Certainly worth a try.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 1533
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Hypercard Simulator

Post by tperry2x »

I probably wouldn't advocate applying all the patches to a v7 build of LCC and expecting it to work. You'll likely end up with a broken mess. Having said that, what I would recommend if you wanted to produce a 32-bit version, happily enough LCC 9.6.3 was also available as a 32bit build, so you could probably expect that to work on your older 'buntu computers if you were to build it from there.

https://community.livecode.com/9_6_3/

As I have all the changes listed in my changes stack, it would be quite simple to apply them all in order, one after another. If I get a chance, I may make a 32-bit version for you and put it into the dropbox folder.

To pick up on the other points here, as I mentioned - I'm well aware that everything and everyone thinks 'web first' these days.
Yes, it's possible to wrap things in an Electron wrapper, but that is really slow. If you wanted something quick and responsive, you cannot beat native C+ code (well you can, assembly - but we aren't about to convert everything to assembly language either).

Personally I already consider MacOS builds imminently at a dead end. As I've mentioned, when Rosetta 2 is phased out, it'll mean the end of intel Applications / Programs (whatever you'd like to call them) - they won't open anymore.
Given that MacOS is being iOS-ified more and more with each update, I'd be quite happy to cease development of a Mac version.
This leaves Windows x64, which will be going for the forseeable future. (Server infrastructure still runs lots of x32-bit code) and Microsoft will no doubt continue to support x64 intel chipsets until I'm at retirement age.

Given that Windows can be found everywhere in Education, and then Linux boxes (because it's a good way of keeping old hardware running with security updates), macs are very much in the minority because of their closed nature, their various tie-ins to the app store, and the inherrent cost of them (unless you buy refurb, but even then you can get three capable i9 intel-based Radeon PCs for the cost of an equivalent iMac). I'm not overly phased if the Mac builds ceased to run tomorrow, since you can go and buy a new intel-x64 chipset based PC off the shelf today. It's a current architecture and one that won't be going away any time soon for the reasons I mentioned above.

This is why I would be looking to carry on with the desktop-only approach, non-web focussed (even if locally running as an instance, rather than running over the cloud), but the more sub-layers and abstraction seems like unnecessary baggage. I don't see why we couldn't use openxion with wxwidgets for a GUI layer (which is cross-platform and provides native interface controls across all platforms). This is then only two layers rather than involving multiple abstraction. I'm a big fan of the 'keep it simple' approach.

But, please don't see this as a comment to take away from anything you are doing Paul. I find it very interesting regarding what is possible with these versions that run through a web browser - I'd just like to have two angles of attack to the problem. A desktop instance and a browser-based one.

As far as continuing with the LCC engine, I couldn't agree more on the point that pouring lots of effort into keeping it going is very much a dead end too. There will imminently come a time when I can only try and fix so much at stack level. Many of the issues I'm finding are to be found at the engine-level, and I do believe we need to switch away to something else.

However...

Whatever we switch to has to be something that is capable from the get-go. Something that you could take a .livecode stack or an .oxt stack and open it in directly, and expect everything to work - for all the xtalk syntax to be there already for compatibility with existing stacks and projects.
This is why I follow your browser-based versions with interest, as they are looking more and more capable, but there is a big elephant in the room as far as I'm concerned. How does someone start getting their teeth into all of this without first downloading github repositories, compiling, installing javascript or any other libraries that might be required, then the prospect of manually having to edit javascript files is an instant no-go for me. There's a reason we are all here, and that's because we are interested in xtalk as a language. If we wanted Java or any of the others, I guess we'd be forced to go and learn that.

This is why I was massively impressed to see the appimage format being used for the linux releases of the RCx versions - you double click it - it runs (okay, maybe you have to make it executable first), but you get my point. It's not rocket science to get started with it. You don't need to edit anything to get set up, you don't need to spend over an hour downloading extras, and you don't need to poke around in another language to get up and running.

From my point of view (and anyone else?) what we want is something we can double-click, it opens a native GUI interface with natively drawn controls, a tool palette that supports buttons, fields, interface elements (when is the last time someone actually tried to draw anything inside LCC/OXT? - just the ability to handle imported graphic objects such as PNG / JPG / SVG would suffice) and video support a bonus. Once we have this and an xTalk script editor up and running, then I'll gladly pour effort into designing a UI without the glitches of the inspector palettes (and more) that plague me with the existing engine.

It would be absolutely brilliant not to have to deal with all the legacy cruft from the LCC engine. (no more registration stack workarounds, tighter (seamless) integration with the UI elements for every OS, native light/dark mode support).

Going through the 'all guides' documentation as I am, as of late. There's no physical size limit in MB to a stack. (aside from the fact that 32-bit builds of OXT would only see 4GB of memory maximum). As stacks are loaded into memory fully at runtime, this means on 32-bit computers, you do actually have a maximum size of 4GB for stacks. But that is hefty. I've never seen a stack that big. Conversely, what stack size can the browser-based stacks support? Are they limited to 10MB? 20MB? - what the browser would allow in sandboxed mode? if so, I can see more complex stacks such as the 'all guides' and Richmond's Devawriter stack having problems. I'm sure there are lots of examples of large commercial stacks out there which this approach would not be suitable for. You mention Myst, but I once had a macformat DVD with a load of commercial supercard (allegiant?) stacks on that were 10+MB in size. I suspect they would all struggle to run under a web-browser instance as only a subset of the available hardware is made available through a browser.
dandandandan
Posts: 8
Joined: Thu May 05, 2022 9:02 pm
Contact:

Re: Hypercard Simulator

Post by dandandandan »

Electron is not really necessary for pure web pages anymore. macOS and windows will both let you save a PWA that doesn’t use any extra resources compared to the browser. And the browsers are very capable, handling large media and pages. Besides that, making apps is possible but you have to support them through OS upgrades, so having a xtalk export consumer stand-alones aren’t the right choice anymore.

You mentioned compatibility with .livecode or .oxt, I don’t know these formats, is there any documentation about their bytes?
User avatar
tperry2x
Posts: 1533
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Hypercard Simulator

Post by tperry2x »

dandandandan wrote: Sat Dec 16, 2023 6:26 pm ...having a xtalk export consumer stand-alones aren’t the right choice anymore.
I'm not so sure. That's quite the statement and does not support everyone's use case.
dandandandan wrote: Sat Dec 16, 2023 6:26 pm You mentioned compatibility with .livecode or .oxt, I don’t know these formats, is there any documentation about their bytes?
Just stack files created by LCC / OXT. I don't know if the specifics of the format or the header are documented anywhere. How they are structured etc. They aren't XML, seem to be a mixture of xtalk mixed in with a header, then some kind of internal formatting to record which ui elements are positioned where and on what card.
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Hypercard Simulator

Post by OpenXTalkPaul »

dandandandan wrote: Sat Dec 16, 2023 6:26 pm Electron is not really necessary for pure web pages anymore. macOS and windows will both let you save a PWA that doesn’t use any extra resources compared to the browser. And the browsers are very capable, handling large media and pages. Besides that, making apps is possible but you have to support them through OS upgrades, so having a xtalk export consumer stand-alones aren’t the right choice anymore.

You mentioned compatibility with .livecode or .oxt, I don’t know these formats, is there any documentation about their bytes?
if you open a .livecodescript, oxtscript, .lc 'stack' files, or .lcb (Extension Builder Language) then you can look at those in a code editor as those are 'script only' text format (there's language packages for various code editors like BBEdit, Pulsar/Atom, VSCode -> even some linting support there IIRC, etc. ).
.livecode and .oxtstack are some binary format that starts with a magic-num + stack version, you can read a lot of the text clear (unless you get a stack that was password encrypted by one of their commercial version engines). We do have the C++ source available to look at the .h (obviously we don't get the encryption bits of code with the GPLv3 community source).

I favor finishing the work of creating an xCard/xTalk interchange format, perhaps htmX-based or like HC Sim stack exports, but that has a section for resources embedded into it, that could then be loaded and exported by even something crazy old like HyperCard IIGS (laugh but I know at least one guy how still plays with HC GS), it would just need text I/O and base64Encode/Decode * for 'ResFork'), a minimal set of language features and part object support to be useful, or assign different levels of support (something like: "Does it have Color?"= Level 2? or 'does the xTalk natively support arrays?' if so that's Level 3, 'can it loading Extension Builder bitcode modules?' is so level 9 ).
Even if an xCard can only use the stack layout info and included ICONs, GIFs resources in order to auto-rebuild the stacks UI (or a reasonable proximity), that would be very useful to me.

I have OXT stacks with AU and WAV sounds embedded into them that I have no way of exporting back out to manipulate them, some of them don't even show up in the 'Application Browser' or crash when you try to 'get the text of audioClip', which is lame. Similarly I'd like to export the content from my 'Start Center' stack, colors, shadows, gradient blends and all, into some other useful HTM format. There have been Stacks that try, with various degrees of success, to export card layouts to HTML pages since the mid 1990s, but this century we have data URLs that we can embed in a page.

I understand the security concern about enabling arbitrary live loaded script JS editions from the web stack. I thought it was brilliant that you allow user to do that manually, paste isome polyglot code right in the Sim and immediately reload the SimScript to test it out (No GitHub required @tPerry2x ). One problem I've hit is this loses code indentation when I paste it back into a code editor, and trying to 'beautify' the page's code breaks can break it (something malformed there?).

I do like the idea of embedding all images sounds and any other dependencies of a stack, for stack-embedded-code perhaps we could have the Sim ask the stack user if they trust the stack author before loading it from the stack? We could tag resources with attributes so that it doesn't load any resource if they are already existing in memory as a DOM object or something? Just spit ballin here.

But basically I'd like an encapsulated, platform agnostic, text transmission-safe, stack format (HTM/X based makes sense to me).

xtPerry2x it looks like someone did do porting of wxWidgets to run (as compiled byte code) on WASM/Emscripten so I could penitentially work on supporting that UI Kit in a web context too.
Link found in this GitHub tread where they also mention pontential licensing issue:
https://github.com/wxWidgets/wxWidgets/issues/18600
https://github.com/wxWidgets/wxWidgets/issues/18600
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Hypercard Simulator

Post by OpenXTalkPaul »

Running in a browser the JS is sandboxed but you can still do user approved file I/O with HTML5 APIs.
Both web 'engines' run fairly well on my Phone or several years old iPad (although I have to get touch support working in our Emscripten Engine (which shouldn't be too difficult). Hell they even run on my Android TV.

Running inside a standalone desktop app that's properly set up, the JS is typically no longer running in a sandbox (unless it's some other OS enforced Sandbox), so you should be able to run a process like you would in LC from 'shell()'.
I've built many of these sort of quick/drag-drop utilities, where the bulk of the scripts are just scripting the UI, but then a CLI app does the actual file processing, the point is the stack wasn't doing a lot of scripted data processing. HyperSim is small (so far) and loads as fast as most web pages do (depending on storage device/transport mechanism).

Using JS as 'the processor' in a HTML5 'the platform', you can run your stack on virtually any device with a fairly modern Web Browser engine available. CPUs are only going to keep getting faster, Moores law be damned, so speed will only get better going forward. Maybe not on a solar powered Pentium 3 at some impoverished school, but come-on now, let's be reasonable, we can't fix the worlds problems and we can't support every possible potential use case. This kids will have to learn with something different like Decker or Python I guess and there's Squeak/SmalltalkVMs that I'm sure would run fine on that.

Like the man said, someone could try to build the 32bit Retro-Hardware IDE build.
It might be as simple as extracting the files in that .AppImage, replacing the main binary, and externals with their 32bit counterparts and repacking it into a new AppImage (its a disk image in disguise ).

But that's going off topic (ya) for this thread.
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Hypercard Simulator

Post by OpenXTalkPaul »

Here's a copy of HyperSim with 'OXT Simscript Additions' (so far):
http://openxtalk.org//WebStacks/simulator.html

And my test stack as HTML that uses that sim script to add some more syntax to the sim.
http://openxtalk.org//WebStacks/HC3PlusPlus.html

Its missing the HC included icons again (needs embedding)

You can make the window frames look like whatever we want, its just style sheets (CSS) that defines their look. Could be 'Native' Buttons (like its 'Check Box' part)

BTW, I absolutely use do bitmap drawing features of the engine, both manually and scripted, and I also really miss the 'Brush Multiples' fun that HC 1 had.
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Hypercard Simulator

Post by OpenXTalkPaul »

WebDev-Offline.jpg
WebDev-Offline.jpg (132.09 KiB) Viewed 840 times
You may have noticed the in some of my screen shots I'm loading these web stacks in Safari for testing from a local (completetly offline) folder, including the .js engine.
To do this Is simple, just enable the Develop menu, and select 'Disable Local File Restrictions' from that menu, then open your test files. For security reasons, don't forget to reenable when you're done playing,
User avatar
richmond62
Posts: 2766
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Hypercard Simulator

Post by richmond62 »

You may have noticed
I am not sure how we would have noticed that.
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Hypercard Simulator

Post by OpenXTalkPaul »

Just to prove the easier point about the parts/controls having that Mac 'System 7' look is created via style sheets (and web font), here is the same page with CSS Styles turned off. You can see the popup menus are as 'native' as they get in safari.
Untitled.jpg
Untitled.jpg (107.37 KiB) Viewed 836 times
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Hypercard Simulator

Post by OpenXTalkPaul »

richmond62 wrote: Sun Dec 17, 2023 9:55 am
You may have noticed
I am not sure how we would have noticed that.
From the file path in the title tab in some of my browser screen shots.
User avatar
richmond62
Posts: 2766
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Hypercard Simulator

Post by richmond62 »

From the file path in the title tab in some of my browser screen shots.
I, for one, am not 'that' into the details of screenshots: I normally look at the pictorial details. 8-)
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 1533
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Hypercard Simulator

Post by tperry2x »

OpenXTalkPaul wrote: Sun Dec 17, 2023 7:19 am (No GitHub required @tPerry2x )
haha, :lol: this made me chuckle
OpenXTalkPaul wrote: Sun Dec 17, 2023 7:19 am xtPerry2x it looks like someone did do porting of wxWidgets to run (as compiled byte code) on WASM/Emscripten so I could potentially work on supporting that UI Kit in a web context too.
Link found in this GitHub tread where they also mention potential licensing issue:
https://github.com/wxWidgets/wxWidgets/issues/18600
That's a pain if there are licensing restrictions. Reading the post on github, it does not seem to be clear as to 'how' restricted.
User avatar
tperry2x
Posts: 1533
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Hypercard Simulator

Post by tperry2x »

OpenXTalkPaul wrote: Sun Dec 17, 2023 8:58 am Here's a copy of HyperSim with 'OXT Simscript Additions' (so far):
http://openxtalk.org//WebStacks/simulator.html
We seem to have UI colour issues unfortunately:
ui1.png
ui1.png (38.98 KiB) Viewed 829 times
I'm particularly impressed that it can get the platform and the systemversion though
test1.png
test1.png (39.2 KiB) Viewed 829 times
result1.png
result1.png (5.28 KiB) Viewed 829 times
Will we have licensing issues using this?:
license.png
license.png (11.67 KiB) Viewed 829 times
User avatar
tperry2x
Posts: 1533
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Hypercard Simulator

Post by tperry2x »

Aside from changing the background colour, and the speech works. Also the button that points to openxtalk.org works.
However, none of the other buttons do anything at http://openxtalk.org//WebStacks/HC3PlusPlus.html
Tested in Firefox and Opera (both fully updated).
incompatible.png
incompatible.png (248.1 KiB) Viewed 827 times
WebMidi support button also comes back with an alert which says "lame"
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests