GithubHelp home page GithubHelp logo

Is there a way to use tuples? about nimpy HOT 4 CLOSED

yglukhov avatar yglukhov commented on May 23, 2024
Is there a way to use tuples?

from nimpy.

Comments (4)

narimiran avatar narimiran commented on May 23, 2024

Thanks for the quick fix, but I need to re-open this.

Now it works with tuples - if you call the Nim proc only once. If you try to call it multiple times, e.g. from the example in tests:

s.tupleDiff((5, 4), (2, 3))
s.tupleDiff((15, 4), (2, 3))

you get either this:

munmap_chunk(): invalid pointer
No stack traceback available
SIGABRT: Abnormal termination.

or if you call it three times:

No stack traceback available
SIGSEGV: Illegal storage access. (Attempt to read from nil?)

from nimpy.

narimiran avatar narimiran commented on May 23, 2024

I tried to narrow it down a bit, but I couldn't find any meaningful conclusion that holds 100% of time.

It seems that procs which return a tuple are not a problem.

The problem rises sometimes with procs which have a tuple (or more than one tuple) as an argument - sometimes it works even on multiple calls, sometime it fails after a random number of calls (both with the same argument values and with different argument values).

from nimpy.

yglukhov avatar yglukhov commented on May 23, 2024

Should be good now.

from nimpy.

narimiran avatar narimiran commented on May 23, 2024

Should be good now.

It seems so.

Thank you once again for your quick fixes! Great customer support! :)

from nimpy.

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.