Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle sequences? #4

Open
andreaferretti opened this issue Jul 8, 2016 · 2 comments
Open

How to handle sequences? #4

andreaferretti opened this issue Jul 8, 2016 · 2 comments

Comments

@andreaferretti
Copy link

If I understand correctly, seqs should be supported. Anyway, I tried this example

proc sum*(xs: seq[int]): int {.exportpy.} = 0

and it fails with

stack trace: (most recent call last)
/home/papillon/tools/nim-pymod/pymodpkg/private/includes/realmacrodefs.nim(49) exportpy
/home/papillon/tools/nim-pymod/pymodpkg/private/impls.nim(590) exportpyImpl
/home/papillon/tools/nim-pymod/pymodpkg/private/impls.nim(590) exportpyImpl(483) countNumIdentsToDefine
lib/core/macros.nim(610) expectKind
lib/system.nim(3335)     failedAssertImpl
lib/system.nim(3327)     raiseAssert
lib/system.nim(2527)     sysFatal
/home/papillon/esperimenti/pynim/greeting.nim(17, 30) template/generic instantiation from here
lib/system.nim(2527, 7) Error: unhandled exception: contains(k, kind(n)) Expected one of {nnkEmpty, nnkIdent, nnkPtrTy}, got nnkBracketExpr
        raise e
        ^
Makefile.pmgen-greeting:7: set di istruzioni per l'obiettivo "pmgen" non riuscito
make: *** [pmgen] Errore 1
Traceback (most recent call last):
  File "/home/papillon/tools/nim-pymod/pmgen.py", line 525, in <module>
    main()
  File "/home/papillon/tools/nim-pymod/pmgen.py", line 161, in main
    pmgen_fnames = generate_pmgen_files(nim_modfiles, pminc_basename)
  File "/home/papillon/tools/nim-pymod/pmgen.py", line 334, in generate_pmgen_files
    subprocess.check_call(make_command)
  File "/home/papillon/.bin/miniconda/envs/pynim/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-f', 'Makefile.pmgen-greeting', 'pmgen']' returned non-zero exit status 2

I tried with various nim versions, from 0.13 to devel

@andreaferretti
Copy link
Author

Can I ping you on this? I am interested in Nim-pymod, and any information (even - it doesn't work anymore and we are not interested in keep developing it) would be interesting.

If you know any combination of Nim/Python versions that should work, I can use nim-vm and virtualenv to try it out

@andreaferretti
Copy link
Author

@jboy Hi, can I ping you? Even if the library is not developed anymore, any information (what remains to be done, how it works so that other people can hack on it...) would be useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant