Byte arrays in J are 1 byte per boolean.

Henry Rich

On 11/29/2014 1:47 PM, Joe Bogner wrote:
Hi greg,

Yes, see https://joebo.github.com/j-emscripten/full.html and the interop
examples

I hacked jtforeign to execute a different function on 15!:0 which can be
overridden in javascript:

https://github.com/joebo/j-emscripten/blob/master/full.html#L317

I can probably undo the hack and go back to using stock jtforeign

Interacting with the DOM/javascript can be seen with the alert or canvas
examples

There's some oddities still with passing arrays. An array that looks
boolean [0,1,1] seems to be stored differently than regular numeric array
[2,3,4]

I can't say that I have it all figured out yet, but enough for a proof of
concept. I can pass strings and numeric arrays that don't contain 0,1





On Sat, Nov 29, 2014 at 1:35 PM, greg heil <[email protected]> wrote:

Joe

Lovely! Have you found anyway for this Javascripted j to communicate with
the DOM though. Or even a way to sift from a javascript array to a (boxed)
J array?

greg
~krsnadas.org

--

from: Joe Bogner <[email protected]>
to: [email protected]
date: 29 November 2014 at 10:09
subject: Re: [Jprogramming] Emscripted J

Hi Devon,

Yes, exactly.

See: http://jsoftware.com/pipermail/chat/2014-November/006332.html

Here's is a extremely minimal example with jsFiddle
http://jsfiddle.net/50Lf2m6v/1/ . The only dependency is the
j-called.min.js file

You can see a trimmed down version version of the generated script here:
https://github.com/joebo/j-emscripten/blob/master/j-called.js . Minified
it is about 1MB

--

from: Devon McCormick <[email protected]>
to: J-programming forum <[email protected]>
date: 29 November 2014 at 09:34
subject: [Jprogramming] Emscripted J

Hi -

to be clear, does having this emscripted, Javascript version of J mean I
should be able to run J code on a client-side web page by including the
Javascript module?

---
Devon McCormick, CFA
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
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