If there is interest or questions, I am happy to help try to answer. I
intentionally started with the gpl j source as the initial starting point
in GitHub and commited the changes required at that time with the emscipten
tool chain.

I used it to play with J on my phone and experimented with possibly
building a browser app for data analytics.

I ended up going a different direction though with the work I did on microj
(https://github.com/joebo/microj). I also tried getting that to run with
blazor in the browser and had some success, but it wasn't good enough for
production use







On Wed, Dec 8, 2021, 3:13 PM Michal Wallace <[email protected]>
wrote:

> The topic of compiling J to WASM came up in conversation recently. This is
> the past work in the area I'm aware of:
>
> WASM (Web Assembly) is a modern standard for running sandboxed native code,
> especially in web browsers.
>
> It evolved out of attempts to transpile C code to a reduced subset of
> javascript that could be heavily optimized by the developers of javascript
> engines.
>
> Anyway, it looks like Joe Bogner had this working through emscripten
> (c->js/wasm compiler) circa 2014:
>
> https://code.jsoftware.com/wiki/NYCJUG/2014-12-09#Emscripten_Version_of_J
>
> It's still running online, and you can try it here:
>
> http://joebo.github.io/j-emscripten/
>
> It looks like the changes necessary to make J7 compile under emscripten
> were rather minimal:
>
>
> https://github.com/joebo/j-emscripten-src/commit/32088fe4f89ac2a13b82e73dffdb756fea2152ab
>
> Then again, it only includes some basic parts of j.. .for example, trying
> to run (4!:1)''
> (nl) to see what has been defined results in a `missing _jtnl1` error... As
> far as i can tell, it only includes primitives, not predefined names.
>
> So my guess is if someone wanted to put the effort in, it wouldn't be too
> hard to get this working for j9, but then the trick would be filling in the
> gaps and figuring out how to load the standard library... And then probably
> a lot of design decisions about exactly what API to expose to the host
> environment (javascript).
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to