nim-pymod
nim-pymod copied to clipboard
How to handle sequences?
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
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
@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!