Comments (9)
Do you have a use case for that?
I'm wondering whether we should aim for a full implementation of bigarrays, or only focus on a subset that maps well to typed arrays (1 dimension, C layout, no complex numbers nor 64 bit integers).
from js_of_ocaml.
I never actually met a bigarray with dimension bigger than 1 in OCaml source code, while 1-dimensional bigarrays are frequent (though typically for mmap-support and simpler C FFI, use cases which may not apply to js_of_ocaml code).
from js_of_ocaml.
Agreed. I can't imagine anyone is really aiming for FORTRAN compatibility with Bigarrays in JavaScript. My dominant use for them is to handle external memory buffers as 1D char arrays (which works well with typed arrays).
-anil
On 20 Jan 2014, at 13:40, gasche [email protected] wrote:
I never actually met a bigarray with dimension bigger than 1 in OCaml source code, while 1-dimensional bigarrays are frequent (though typically for mmap-support and simpler C FFI, use cases which may not apply to js_of_ocaml code).
—
Reply to this email directly or view it on GitHub.
from js_of_ocaml.
For me it's mainly for graphics purposes, raster and geometrical data. In that context, 1 dimension, C layout is what I use.
from js_of_ocaml.
In case anyone wonders whether that implementation is compatible with the change on Bigarrays in trunk (or with the previous implementation), the answer is yes. Said change preserved the numerical values of existing kinds, and added a new kind value as the next consecutive integer, so using old-or-new kinds to address values in an array will work as long as it has one extra element for the new kind -- which Jérôme was careful enough to do.
from js_of_ocaml.
Maybe it should be installed like unix.js or the other installed javascript files and added to the META file with linkopts(javascript,pkg_bigarray) += "+js_of_ocaml/bigarray.js"
?
from js_of_ocaml.
@dbuenzli, @gasche, @avsm, other Bigarray user,
any pro/cons(/test) regarding the full bigarray support #132 wrt perfs ?
from js_of_ocaml.
Sorry have nothing to test against at the moment.
from js_of_ocaml.
Not had a chance to test it myself, but just having any (slow or fast) support is great...@dbuenzli will probably care more due to his Vz work
from js_of_ocaml.
Related Issues (20)
- [FEATURE REQUEST] rewrite closure compilation inside for loops
- [BUG] Regression between 5.0.1 and 5.1.0+ HOT 4
- [BUG] Regression in generated code: 'There is no containing label named "x"' HOT 7
- [FEATURE REQUEST] Ellipse method for canvas API HOT 3
- [BUG] Regression with `5.6.0` HOT 8
- [BUG] regression causing some definitions in recursive functions to be out of scope HOT 3
- [BUG] bad version reported after opam pin HOT 1
- [BUG] Uncaught TypeError: runtime.caml_thread_initialize is not a function HOT 3
- [FEATURE REQUEST] experiment with let and const bindings.
- [BUG] Menhir internal failure on 5.7 with Dune's release profile HOT 7
- Formatting and linting the runtime with Biome HOT 7
- [BUG] binding properties are incorrectly minified HOT 2
- [BUG] `--enable=effects` may cause incorrect compilation results (TypeError: cont is not a function) HOT 7
- [BUG] Missing primitives on OCaml 5.2 HOT 4
- Assertion fails in lib/parse_bytecode.ml HOT 2
- [BUG] separate compilation cause runtime duplication when using --toplevel or --dynlink
- [BUG] js_of_ocaml is excessively memory hungry HOT 20
- [FEATURE REQUEST] More customization (or documentation) of `--source-map`. HOT 1
- [FEATURE REQUEST] Ability to impede sharing constants HOT 1
- [BUG] Using two Js_of_ocaml compiled libraries in the same runtime causes issues with js stubs HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js_of_ocaml.