LiveCode 1 - WASM

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

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

LiveCode 1 - WASM

Post by richmond62 » Tue Sep 28, 2021 6:21 pm

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.

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

Re: LiveCode 1 - WASM

Post by FourthWorld » Tue Sep 28, 2021 9:00 pm

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.
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: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: LiveCode 1 - WASM

Post by richmond62 » Wed Sep 29, 2021 7:33 am

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.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: LiveCode 1 - WASM

Post by mwieder » Sun Oct 10, 2021 12:12 am

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

Bernard
Posts: 351
Joined: Sat Apr 08, 2006 10:14 pm
Location: London, England

Re: LiveCode 1 - WASM

Post by Bernard » Sun Oct 10, 2021 10:49 am

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.

SteveFI
Posts: 30
Joined: Tue Mar 16, 2021 6:15 pm

Re: LiveCode 1 - WASM

Post by SteveFI » Fri Nov 05, 2021 9:41 am

I thought "idempotent" may have been a typo until I looked it up.

Good word! Every day is a school day.

Steve

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”