Open gregglind opened 5 years ago
Proposed solution: Babel and TC39 work
Use Babel with transforms.
Matrix.ones
seems terrible. See also the math
object. We could pre load a lot more into the 'env', as with Node, or WebExtensions, or Window. This also has risks. Eslinting can help with a 'no-reassign-matrix' work. Thanks for the issue @gregglind! We've talked internally about making a babel mode for scientific computing needs (matrix stuff like broadcasting, precision, complex numbers, etc.) that connects to some library w/ an API, but not enough bandwidth right now to implement it. What you're proposing on a high-level matches a lot of what we've talked about on private channels.
WATLab syntax was something we were looking at earlier this year. @bcolloran has some strong thoughts about what this might all look like, so I'll let him chime in.
Layer-wise, we'll need:
These clearly seem related, but could also be viewed as modular concerns.
I've transferred this issue to our new repo, iodide-transpiler
, to track progress.
I also would prefer 0 based indexing. Numpy actually does not feel bolted on at all to me. In fact I greatly prefer it to both R and Matlab. Perhaps using webgl would be simpler way to accelerate matrix multiplication on gpu. This person accomplished it with a few hundred lines of code:
http://watmough.github.io/webgl-matrix-demo/ https://github.com/watmough/webgl-matrix-demo/blob/master/gpu_matrix.js
Problem statement: Matrix work in JS stinks.
Features that make N-dimentional-Matrix work awesome
.*
)