Not working as expected?

Bringing your stacks to the web

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9251
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Not working as expected?

Post by richmond62 » Wed Jun 02, 2021 5:17 pm

Quite a while ago LiveCode had a "stab"at producing something that would run in a web-browser, and it did,
after a fashion. That was later abandoned, and I don't know why that was.

Now there is a new version.

Now here are my expectations (for what they are worth):

1. If I make a LiveCode stack I know that I can run off standalones from it to run on Windows, Linux and Macintosh in an extremely
easy and straightforward way.

2. I know that I can run off standalones to run on Android and iOS with a bit more fiddling around.

My personal experience is that making standalones for Windows, Linux and Macintosh results in standalone executables that
98% of the time reproduce the functionality of the source stack as well as its appearance (and that 2% can, normally, be ironed
out without undue effort).

My expectations re something that can be viewed on a web-browser
(regardless of the underlying operating system that web-browser is running on) are
similar to my expectations of a standalone on the three desktop platforms I mentioned.

So, for the sake of argument, the very simple stack I prepare of a slideshow of my holiday snaps should look
almost identical in a web-browser to a standalone, and its functionality should be the same.

Or, to get a bit more technical, a web-based version of my Devawriter Pro (that leverages non-standard Unicode fonts)
should allow end-users everything that a desktop standalone offers.

This is also the way I understand what is written here: https://livecode.com/

"Create native applications for iOS, Android, Windows, Mac, Linux, Server & The Web all from the same code."

Reading about Emscripten: https://en.wikipedia.org/wiki/Emscripten

"Emscripten allows applications and libraries written in C or C++ to be compiled ahead of time and run efficiently in web browsers, typically at speeds comparable to or faster than interpreted or dynamically compiled JavaScript. With the more recent development of the WebAssembly System Interface (WASI)[5] and WebAssembly runtimes such as Node.js, Wasmtime,[6] and Wasmer,[7] Emscripten can also be used to compile to WebAssembly for execution in non-Web embeddings as well."

Tells me nothing that has any obvious connexion with LiveCode . . .

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Not working as expected?

Post by FourthWorld » Wed Jun 02, 2021 6:04 pm

That was step 1. Now you're ready for step 2.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9251
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Not working as expected?

Post by richmond62 » Wed Jun 02, 2021 6:19 pm

If by "step 1" you mean 'read about Emscripten', I'm up to my oxters in mud.

and . . .
2. Study how browsers work, esp. how they differ from the desktop.
Well . . . pause while I reflect on the fact that Hyperscript Markup (erm . . . HTML) is, supposedly derived
from the same roots as LiveCode (HyperCard) . . .

. . . so, would it be unreasonable for a multicard LiveCode stack to be converted into a multipage web-thing when spun off
as an HTML standalone?
3. Adjust your expectations to match what you learn.
That might be what I just did "up there".

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Not working as expected?

Post by FourthWorld » Wed Jun 02, 2021 8:16 pm

Level 3 not yet unlocked. In step 2, start with layout models, then security models, then use cases...
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9251
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Not working as expected?

Post by richmond62 » Wed Jun 02, 2021 8:25 pm

Use cases . . .

Well I, for one, would expect any stack I exported to HTML to be used in much the same way as any
desktop standalone I might produce from the same stack.

There are, after all, many online applications that function via web-browsers that do much the same thing as their desktop equivalents.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Not working as expected?

Post by FourthWorld » Wed Jun 02, 2021 8:58 pm

Dogs and cats are both quadraped carnivorous mammals that live with humans, often roughly the same size.

If they appear to be the same thing keep looking.

"God is in the details." - Mies van der Rohe
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9251
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Not working as expected?

Post by richmond62 » Thu Jun 03, 2021 8:28 am

Sumo Paint: https://www.sumopaint.com/

has both online versions (i.e. the thing functions in a web-browser) and a downloadable version.

The Sumo Paint people, perhaps realizing that there is no obvious advantage of downloading a desktop application (unless you need to work offline)
have been clever enough to build in extra features to the downloadable version.

From my point of view at least, whether I am being chased by a sabre-toothed tiger or its marsupial homologue
makes little difference: I'm going to run.
-
st.jpg
st.jpg (7.56 KiB) Viewed 6151 times
Thylacosmilus.jpg
Thylacosmilus.jpg (6.67 KiB) Viewed 6151 times
-
The underlying composition of the animal that bites my bottom is going to be the least of my worries!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Not working as expected?

Post by FourthWorld » Thu Jun 03, 2021 5:16 pm

Was Sumo Paint written in LiveCode? Does it use Emscripten at all? Is the desktop version even written in C++?

Much of my career has involved converting applications from one platform and/or format to another. And much of that conversion work has been between desktop and web.

But of course, to the degree that your own conversions from desktop to web are satisfying, no cautionary tales I've learned from those years of experience would be helpful to you.

Carry on...
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Re: Not working as expected?

Post by thatkeith » Tue Aug 10, 2021 9:51 pm

FourthWorld wrote:
Wed Jun 02, 2021 8:16 pm
Level 3 not yet unlocked. In step 2, start with layout models, then security models, then use cases...
I must say that compared to your normal deeply helpful responses this is exceptionally unedifying! :lol:

I've been paying for the HTML5 subscription for quite some time. I'm wondering seriously whether it's worth continuing. (For clarity I am NOT asking anyone else to make that decision for me, I'm voicing this as it's a valid thing to consider given the apparent lack of any movement in this area from the mothership.)

I just looked again at the HTML5 section of the Standalone Application Settings window. It says "For more information about deploying to HTML5, please read the "HTML5 Deployment" guide in the Dictionary." Unfortunately that guide doesn't seem to exist in the Dictionary. I did find an overview and notes about deploying an HTML5 standalone deep down in the Deploying Your Application section – surely this isn't it? Is the Standalone Applications Settings note incorrect? :(

k
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Not working as expected?

Post by FourthWorld » Tue Aug 10, 2021 11:11 pm

thatkeith wrote:
Tue Aug 10, 2021 9:51 pm
FourthWorld wrote:
Wed Jun 02, 2021 8:16 pm
Level 3 not yet unlocked. In step 2, start with layout models, then security models, then use cases...
I must say that compared to your normal deeply helpful responses this is exceptionally unedifying! :lol:
It's a reference to the post before it, and the one that post refers to.

It's also not that interesting, though it was comforting to read that you've found some of my posts helpful. Thank you for that.
I've been paying for the HTML5 subscription for quite some time. I'm wondering seriously whether it's worth continuing. (For clarity I am NOT asking anyone else to make that decision for me, I'm voicing this as it's a valid thing to consider given the apparent lack of any movement in this area from the mothership.)
I can't speak to the issue with the docs for HTML export. In my world anything I deliver is expected to meet the six-second load threshold, so while I have an HTML export license I have yet to activate it.

But I can say the team has done a surprising amount of work on the HTML export, at least judging from the fixes and enhancements listed in the last several Release Notes.

Whether that's encouraging enough to make a difference for you or anyone else will of course depend on what you want to do, and how much of what you need to do can be seen with the software in hand.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9251
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Not working as expected?

Post by richmond62 » Wed Aug 11, 2021 10:56 am

Unfortunately that guide doesn't seem to exist in the Dictionary.
Quite, 'nuff said.

Nor for that matter here: https://livecode.com/resources/api/

When I run up a stack and then decide to produce Mac. Linux and Windows standalones ALL I have to is click a few
boxes in the standalone settings and 98% of the time I get perfectly functional executables for those 3 operating systems:
BLOODY FANTASTIC and an endless source of wonder and admiration to me . . .
but I am like the kid in the sweet shop, having tasted 3 sweets and found them wonderful
I am all set to moan and whinge when I suck on sweet number 4 and it seems to taste like a dirty sock . . .
Last edited by richmond62 on Wed Aug 11, 2021 1:59 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9251
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Not working as expected?

Post by richmond62 » Wed Aug 11, 2021 11:23 am

The key to this thread is in the title: "as expected".

Exercise for the reader:

1. Read up on what Emscripten is, and isn't.
2. Study how browsers work, esp. how they differ from the desktop.
3. Adjust your expectations to match what you learn.
I just love those experts who look down their patrician noses at me.

I am a Primary school teach FFS! If I had really wanted to make my living
programming computers I would not have studied Philosophy and BEER so
vigorously at University, but would have studied what was. at the time, termed
'Computer Science' . . . like my amazingly brilliant cousin:

https://journals.sagepub.com/doi/abs/10 ... lCode=simb

Why should I have to bother about Emscripten? Surely the 'job' of the
LiveCode team is that "all that" should have been sorted out by them
so we fellahin can plough the fields without having to worry about
how the fuel injector in our tractor works.
-
1066LCn.jpg

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Re: Not working as expected?

Post by thatkeith » Wed Aug 11, 2021 11:40 am

FourthWorld wrote:
Tue Aug 10, 2021 11:11 pm
It's a reference to the post before it, and the one that post refers to.
Yes, I read the thread. I get what you were saying, it's just that it felt oddly like a brush-off. I guess the lack of concrete, direct advice rather reflects the lack of concrete capabilities of this area of output.
FourthWorld wrote:
Tue Aug 10, 2021 11:11 pm
it was comforting to read that you've found some of my posts helpful. Thank you for that.
You are most welcome! I remember the first help you gave me, back in the days of QuickTime beta about using it in HC and SC in the early 90s, and onwards from that point. Helpful, insightful, etc. :)

As far as HTML5 production goes, it is no longer something I can afford to have as part of my LC subscription. I hope what I've paid so far has contributed in some small way to the ongoing development work, but after years of finger crossing and hoping I need to rationalise things.
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9251
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Not working as expected?

Post by richmond62 » Wed Aug 11, 2021 1:26 pm

it is no longer something I can afford to have as part of my LC subscription.
All a bit sad.

The "thing" that I find a bit 'off' is that the HTML is fairly ragged round the edges yet is pushed as
if it were a done deal:
-
SShot 2021-08-11 at 15.24.38.png
SShot 2021-08-11 at 15.24.38.png (11.63 KiB) Viewed 5360 times
-
Even if one overlooks the bad grammar.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Not working as expected?

Post by FourthWorld » Wed Aug 11, 2021 6:05 pm

thatkeith wrote:
Wed Aug 11, 2021 11:40 am
FourthWorld wrote:
Tue Aug 10, 2021 11:11 pm
It's a reference to the post before it, and the one that post refers to.
Yes, I read the thread. I get what you were saying, it's just that it felt oddly like a brush-off. I guess the lack of concrete, direct advice rather reflects the lack of concrete capabilities of this area of output.
Helpful feedback, thank you.

My intent was less brush-off than helpful in the most helpful way I know: those three steps I provided needn't take much time, and can provide much understanding to assess the potential of LC's HTML export to one's projects.

LC is vast, so it's not possible to say how satisfying the current implementation will be for a given project. But if we skim the Wikipedia page on Emscripten (my Step 1) we see that it's a tool that converts C++ to JS, and doesn't convert LC to JS. So my Step 2 is an invitation to consider how much OS integration we enjoy with LC, how all that's dependent on a wide range of OS services the LC engine uses, and that browsers have their own API that's radically different and in a great many ways severely limited given their trusted role in users' lives. Step 3 is arrived at after just a few minutes of staring at the ceiling pondering how much of the LC code base can't be handled through a simple turnkey like Emscripten in any meaningful way, requiring inestimably vast effort to special-case everything dependent on OS calls.

Much of my career has involved converting applications from one programming system to another. Since the turn of the century, some of that is moving desktop applications to the web (and once the other way around). I know where the landmines lie in wait. I've stepped on several over the years. After all I've learned through direct personal experience doing this sort of thing, I do not believe attempting a truly turnkey system to convert anything to anything is economically viable. There are too many edge cases to account for. While it can be exhilarating to watch an automated solution take care of 80% of what you need in mere minutes, I know from the wear on my typing fingers that the remaining 20% will take 80% of the budget if done by hand, and 400% of the budget if one attempts to automate it. And I'm being extremely generous in estimating merely 400% for a truly automated turnkey attempt.

That said, I do know of one person who's running a production system with the current HTML export, so it's not categorically a bad thing to consider. It depends on the specifics of your project and your audience expectations.

As you know from our long shared history, I came to LC because SuperCard never delivered a working Windows version. Having bet heavily on that, I nearly lost my business and my reputation. Over the years I've also seen Apple announce a new Taligent OS in partnership with IBM, watched a demo from WWDC of HyperCard 3.0, and purchased Dreamweaver on its promise of being able to round-trip custom HTML in their GUI. None of those things ever arrived on my hard drive.

So the guidance I follow in my office is to assess my needs, see what's on offer to address them, and install it and run it. If it does what I need I use it. If not I either wait or seek an alternative, as my business planning schedule permits.

As for LC's HTML export specifically, I'd written a more detailed response more than a year ago, and having linked to it in other discussions maybe it would have been better to simply have done so here rather than risk sounding Zen with a seemingly abstract three-step exercise:
viewtopic.php?f=120&t=25210&p=190586#p190586
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “HTML5”