Code Monkey home page Code Monkey logo

Comments (9)

vouillon avatar vouillon commented on July 25, 2024

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.

gasche avatar gasche commented on July 25, 2024

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.

avsm avatar avsm commented on July 25, 2024

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.

dbuenzli avatar dbuenzli commented on July 25, 2024

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.

gasche avatar gasche commented on July 25, 2024

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.

kit-ty-kate avatar kit-ty-kate commented on July 25, 2024

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.

hhugo avatar hhugo commented on July 25, 2024

@dbuenzli, @gasche, @avsm, other Bigarray user,
any pro/cons(/test) regarding the full bigarray support #132 wrt perfs ?

from js_of_ocaml.

dbuenzli avatar dbuenzli commented on July 25, 2024

Sorry have nothing to test against at the moment.

from js_of_ocaml.

avsm avatar avsm commented on July 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.