Page 1 of 1

LiveCode 1 - WASM

Posted: Tue Sep 28, 2021 6:21 pm
by richmond62
https://livecode.com/livecode-10-sneak-peek/
The new version is based on Web Assembly (WASM).
Is that the whole of LiveCode 10, or just web deployment?

I see that WASM does NOT support multi-threading . . .

Maybe the implementation (?) of 'wait' allows one to work around the lack of multi-threading.

Re: LiveCode 1 - WASM

Posted: Tue Sep 28, 2021 9:00 pm
by FourthWorld
LiveCode, JavaScript, Python and others are single-threaded.

What do you need from multi-threading? In some cases timers may suffice, in others multiprocessing can work very well.

Once we know the specifics of your goal we can direct you to the most appropriate solution.

Re: LiveCode 1 - WASM

Posted: Wed Sep 29, 2021 7:33 am
by richmond62
My "goal" such as it is is to carry on teaching LiveCode to programming neophytes, and as far
as that goes multi-threading is of no interest.

However, when I read menus of "things to come" that don't really explain as much as they
might I feel an urge to ask questions.

Re: LiveCode 1 - WASM

Posted: Sun Oct 10, 2021 12:12 am
by mwieder
Careful what you ask for then.
WebAssembly does indeed support multithreading (mostly). Code does, of course, need to be idempotent.
Here are some examples of how it might be implemented in C++, JavaScript, Rust...

https://www.syntaxsuccess.com/viewartic ... ebassembly
https://web.dev/webassembly-threads/
https://emscripten.org/docs/porting/pthreads.html

Re: LiveCode 1 - WASM

Posted: Sun Oct 10, 2021 10:49 am
by Bernard
I remember the parallel programming course of my IT degree. Yikes. Semaphores, monitors, mutexes, etc. It was by far the hairiest part of the degree.

It would have been less hairy if they had taught how to do multi-threading using Tcl.

https://www.activestate.com/blog/thread ... right-tcl/

I've done multi-threading using Tcl and it was a breeze. But I don't see threads coming to LC any time soon, since we've been waiting something like 14 years for the promised secure sockets to be delivered (incredibly "secure sockets" is listed in the Dictionary but don't exist). I know I'm not telling Mark anything he doesn't know.

Re: LiveCode 1 - WASM

Posted: Fri Nov 05, 2021 9:41 am
by SteveFI
I thought "idempotent" may have been a typo until I looked it up.

Good word! Every day is a school day.

Steve