Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    mmomtchev
    @mmomtchev:matrix.org
    [m]
    it is a known issue
    mmomtchev
    @mmomtchev:matrix.org
    [m]
    in fact you can't install "@stdlib/ndarray" with npm 6 at all... 🤨
    Athan
    @kgryte
    Hmm...I am not sure we have a workaround for that. Invariably a number of top level namespaces end up depending on other top level namespaces as either prod, dev, or both deps.
    Your solution to use npm 7 or 8 is reasonable.
    We do need to release a new version of the top level namespaces. It has been on our todo list. Will need to wait and see if this possibly resolves the issue on npm 6. But if the issue is circular deps, that is not likely.
    mmomtchev
    @mmomtchev:matrix.org
    [m]
    I think this is something that was introduced recently - I would be surprised if no one ever tried to install it with npm 6 - it is not that old - only an year ago it was still the version most people were using
    in fact, I am surprised by the bug itself - there are probably other factors - or otherwise it would have been a very widely known bug 😀
    Athan
    @kgryte

    Yeah, I don’t recall us having issues. Let us prioritize getting a new raft of releases out and we’ll see if this resolves.

    Otherwise, another option is to use individual pkgs rather than the top-level namespace.

    mmomtchev
    @mmomtchev:matrix.org
    [m]
    V8 never stops to amaze me:
    const exprCwise = ndarray_cwise({
      args: ['array', 'array'],
      body: function (r, x) { r = (x * x + 2 * x + 1); }
    });
    look what it produced from that function:
    movaps %xmm1,%xmm3
    mulsd  %xmm1,%xmm3
    addsd  %xmm2,%xmm3
    lea    (%r11,%rax,1),%rdx
    addsd  %xmm0,%xmm3
    impossible to beat
    identical to gcc/clang
    with -O3
    Athan
    @kgryte
    I wonder how that holds up upon providing arrays having different hidden shapes.
    mmomtchev
    @mmomtchev:matrix.org
    [m]
    in this case, the function does not reference the shape at all
    if you do the same with ndarray-ops, the result is still very good, but not as good - as you have the array access intermixed with the function itself
    which led me to believe that V8 does not do register optimization
    it does - but ovbiously not in all cases
    mmomtchev
    @mmomtchev:matrix.org
    [m]
    the day JS gets real multithreading, it won't have any competition for number crunching
    Athan
    @kgryte
    We may be waiting on a while on that. 😅
    mmomtchev
    @mmomtchev:matrix.org
    [m]
    I found the problem in npm: npm/cli#1600 and it is a mighty stupid one but there is nothing that can be done...
    mmomtchev
    @mmomtchev:matrix.org
    [m]
    @kgryte: if you install only @stdlib/types without any other dependencies, it does not trigger the bug, so my package won't be affected
    mmomtchev
    @mmomtchev:matrix.org
    [m]
    ok, the mystry around that bug has been cleared - it is triggered by cyclic dependency involving lots of packages because of a n! complexity in this case
    Athan
    @kgryte
    Thanks for tracking this down and investigating!
    Samartha
    @samartha5611

    I am having issues while installing the @stdlib

    In file included from ../src/addon.c:24:
    ../../../../ndarray/base/unary/include/stdlib/ndarray/base/unary.h:32:10: fatal error: 'unary/b_b_as_u_u.h' file not found
    #include "unary/b_b_as_u_u.h" // TODO

    Athan
    @kgryte
    Hey, @samartha5611! How are you attempting to install stdlib?
    Are you installing from npm or are you trying to clone and install locally?
    Samartha
    @samartha5611
    I am trying to clone and install locally
    Athan
    @kgryte
    You can ignore that error then. It shouldn’t affect your ability to use the project.
    When running make install, encountering this error should simply stop the add-on compilation process and the rest of the local install should succeed.
    We’ve been doing some updates to some of the add-ons and so the current HEAD is likely to have some missing headers, etc.
    mmomtchev
    @mmomtchev:matrix.org
    [m]
    I discovered a new (for me) case where V8 reverts the compilation of a function: https://bugs.chromium.org/p/v8/issues/detail?id=12756#c_ts1648809060
    if you call a function through a reference, the containing function is considered megamorphic and it is not compiled
    *the calling function
    I have started a highly experimental compiler for JS math expressions that supports MP and async operations - https://github.com/mmomtchev/jeetah
    first results are very promising
    Athan
    @kgryte
    Re: V8. That is an interesting one. I am guessing this has to do with how V8 does inline caching?
    Re: jeetah. Looks promising!
    Conrad Buck
    @conartist6
    I just wanted to say hello as I've got a lot of work into a library for iterators, iter-tools! I'm always looking around to see what other people are building in the space, how they've built it, whether they have any ideas I should incorporate, and whether there's a chance to collaborate
    Athan
    @kgryte

    Hey @conartist6 ! Thanks for stopping by. 👋

    And thanks for the link to iter-tools. We’ve been following your work for a while now and certainly appreciate the work you’ve been putting into making iterators and iterables more useful.

    In terms of our work, we’ve mainly focused on prng, math, and stats iterators. And in terms of collaboration, we typically try to keep everything in-house.

    Certainly happy to hop on a call if you’d like to know more. 🙂

    Ozzie Gooen
    @OAGr

    I've been working with a few others on a simple estimation-style programming language that treats probability distributions as a first class citizen. It's meant for quick estimation by non-programmers, using uncertainty. Older version here: https://www.lesswrong.com/posts/i5BWqSzuLbpTSoTc4/squiggle-an-overview

    I've long been frustrated by the lack of good JS numerics tooling. I just recently found stdlib, will definitely be looking to port some functionality over to using it. Really happy to see this.

    No rush at all (and feel free to ignore if annoying), but I have some questions:

    1. Is funding still useful, on your side? Is it a bottleneck for any work?
    2. Have you considered implementing a Metalog distribution? https://en.wikipedia.org/wiki/Metalog_distribution
    3. Have you considered having types/abstractions for generic distribution shapes? For example, converting a set of xy-coordinates into a pdf, then getting statistics and being able to do fast manipulations on that. This is a big deal for us, I'm sure we're making mistakes. Similarly, curious if stdlib could do convolution in order to combine arbitrary probability densities.

    Overall, I'm really interested in work around probability distributions and forecasting using javascript/Rescript. There's a fair amount of interest in this area now, and the tooling is pretty awful.

    Athan
    @kgryte

    Hey @OAGr! Thanks for reaching out! Sorry for the delay.

    Re: your work. Looks neat! Thanks for the links!

    Re: 1. Yes, funding is always useful, as depending on the size, we can allocate developer resources accordingly. Also helps with focusing work if there are particular initiatives which are desired.

    Re: 2. We have primarily stuck to the most common distributions and those distributions which are in SciPy. Not opposed to adding Metalog; however, given the nature of the distribution, need to figure out what an implementation would look like.

    Re: 3. We haven’t invested much in terms of empircal distribution functionality. @Planeshifter has built most of the stats functionality. More recently, we’ve focused on lower level numerics and tooling. Am certainly open to exploring functionality. If you have specific APIs you have in mind from, say, R/Python/MATLAB/Julia, would help make things a bit more concrete.

    Re: tooling. Agreed. We’re hoping to change that. Just a matter of getting enough person hours to drive things forward! 😅

    Ozzie Gooen
    @OAGr
    That's really useful to know, thanks!
    teutara
    @teutara
    Hi there,
    I am bioinformatician/data scientist and would like to use stdlib in my new project.
    I spent some time on docs, browsed this room. There is documentation on installation, individual package usage, but I need a kickstart.
    I think there are some tutorials/videos/courses etc. but I was not able to find any. Can you please share some?
    Thank you!
    Athan
    @kgryte
    Hey, @teutara! Thanks for stopping by. What kind of things are you hoping to do? This may help us in directing you to relevant info.
    teutara
    @teutara
    Hey @kgryte
    I would like to build a web app that utilizes my custom node modules. With your library, I would parse and analyze user data (distribution tests-such as normality tests). Does this make sense?
    Athan
    @kgryte
    The documentation for the statistical tests in stdlib/stats is probably your best bet. We’ve done a few conference workshops which are still available on the web. These are invariably a bit out of date but may still be useful in terms of tutorials. Will post a link later todayZ
    Philipp Burckhardt
    @Planeshifter
    For distribution tests such as testing for normality, the Kolmogorov-Smirnov Goodness-of-Fit Test
    (see: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/kstest and the example code) can be used.
    Athan
    @kgryte
    @teutara See this workshop notebook on Observable for examples of thiings you can do: https://observablehq.com/@kgryte/workshop-notebook-machine-learning-for-hackers-fullstack
    As I mentioned, a tad outdated, but still relevant.