Page MenuHomePhabricator

Support "safe" WASM applet applications
Open, LowestPublicFeature

Description

Recently I noted that BBC BASIC for SDL, gained a WASM applet version. BBC BASIC for SDL is on Github at https://github.com/rtrussell/BBCSDL snd the respoitory contains the modified makefile for WASM.

During the 1980's and 1990's A lot of educational software was written in BBC BASIC in the UK, and it seemed reasonable that there may be some people that grew up with it, who were now interested in developing content in support of Wikimedia projects, that would want to make use of an in page applet for semi-interactive demonstrations. ( potentially reusing existing open source BBC BASIC programs.). The availability of a powerful means to generate such semi interactive content. would also be useful, especially if it can use an available 'open' solution (as opposed to a deprecated propitiatory technology like Flash which is incompatible with Wikimedia style licensing.)

I am therefore asking if it would be possible to implement support for placing WASM applets in Mediawiki pages, with the longer-term aim of seeking interested individuals with a view to a pilot project in using the BBC BASIC for SDL WASM applet to provide semi-interactive displays, to support educational content on Wikimedia and other projects.


See Also:
T181451: RFC: WebAssembly and compiled JS code best practices

Event Timeline

WASM = https://en.wikipedia.org/wiki/WebAssembly , or does that stand for something else? Asking at that page has zero results for "applet".

How is "safe" defined, and how to find out if something is "safe"?

Is this basically a very specific implementation, trying to solve a very small part of T56213?

WASM = Web assembly.

I use the term applet, in the same sense 'java' applet was used. Is there a better term? One of the intended uses case was 'semi-interactive' items that on another site might use Flash ( although that's now deprecated) , to present a concept or content in a way that text, images or other media cannot.

"Safe" means sandboxed sufficiently strongly that it can't 'leak' code or information outside of the sandbox, or in ways that would arbitrarily effect the rest of the browser or wiki page with nagative consequences. There were some comments on the Discord, that this might not be feasible because of concerns about being able to effectively sandbox any aribtary javascript running in wiki page.

Yes, this was partly about 'data representation', (a small part of T56213) but it was also about having the ability for competent developers, that were willing to have their applet code torn to shreds in public, being able to use a suitable WASM applet ( which need not be the BBC BASIC one mentioned.) , to develop semi-interactive content so support specific pages where some degree of interactivity with the content would aid understanding. Some example use cases being simulations of probability, gravitation in planetary system, engineering dynamic systems, electrical circuit behavior, hydrological systems, biochemistry reactions and so on where although a simple animation or static image can explain things, a fuller simulation would aid understanding further. (Naturally the relevant content article if of a good standard should note the limitations of any simulation.)

These 'applets' could also be written directly in an appropriate tool, and compiled for WASM, they don't have to be interpreted BBC BASIC running in the applet whose source I linked. ( I like BBC BASIC because it's one consistent API for most things. )

There are some examples of the specific BBC BASIC linked from a forum thread here - https://stardot.org.uk/forums/viewtopic.php?f=63&t=20383
(Most aren't relevant to Wikimedia projects)

The actual BBC BASIC for SDL applet is here - https://www.bbcbasic.co.uk/bbcsdl/wasm/bbcsdl.html, examples are *.BBC files in the sub-directories presented by the interface.)

Aside: Amongst the examples, which aren't necessarily open source sadly, was a simple jigsaw puzzle, under Games. This is something that would otherwise be done in Flash (which is now depreciated), and was something I had previously raised a low priority phabricator ticket about, in order to make use of Commons images for something 'fun'.

Has existing interest been expressed somewhere by some WASM folks about Wikimedia, which could be linked to?

I am not aware of any yet., so if this ticket is kept open it should be marked as low priority.

Aklapper triaged this task as Lowest priority.Oct 4 2020, 3:31 PM
Aklapper renamed this task from Support "safe" WASM applet applications... to Support "safe" WASM applet applications.Jun 14 2021, 2:21 PM
Aklapper updated the task description. (Show Details)