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

NotImplementedError #23

Open
PallHaraldsson opened this issue Sep 4, 2022 · 0 comments
Open

NotImplementedError #23

PallHaraldsson opened this issue Sep 4, 2022 · 0 comments

Comments

@PallHaraldsson
Copy link

PallHaraldsson commented Sep 4, 2022

I'm trying to transpile this program:

https://github.com/hanabi1224/Programming-Language-Benchmarks/blob/main/bench/algorithm/coro-prime-sieve/1.py

Assuming I should use python3, and after installing some dependencies, I at least get it started:

$ python3 -m Py2Jl ../../py.py jl.jl
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/pharaldsson/Py2Jl/Py2Jl.jl/Py2Jl/__main__.py", line 14, in <module>
    wise(py2jl)()  # type: ignore
  File "/home/pharaldsson/.local/lib/python3.10/site-packages/wisepy2.py", line 271, in parse_arg
    return handle(cmd_args)
  File "/home/pharaldsson/.local/lib/python3.10/site-packages/wisepy2.py", line 244, in parse_arg
    return fn(*args, **kwargs)
  File "/home/pharaldsson/Py2Jl/Py2Jl.jl/Py2Jl/__main__.py", line 10, in py2jl
    doc = Compiler(code, out).create_module()
  File "/home/pharaldsson/Py2Jl/Py2Jl.jl/Py2Jl/__init__.py", line 349, in create_module
    return pd.vsep([arg.x for arg in self.transform_stmt_list(self.node.body)])
  File "/home/pharaldsson/Py2Jl/Py2Jl.jl/Py2Jl/__init__.py", line 534, in transform_stmt_list
    result.append(self.transform_stmt(x))
  File "/home/pharaldsson/Py2Jl/Py2Jl.jl/Py2Jl/__init__.py", line 517, in transform_stmt
    return f(self, x)
  File "/home/pharaldsson/Py2Jl/Py2Jl.jl/Py2Jl/__init__.py", line 944, in transform_Import
    raise NotImplementedError
NotImplementedError

Neither did https://github.com/hanabi1224/Programming-Language-Benchmarks/blob/main/bench/algorithm/merkletrees/1.py

but I did get their hello world program to work after I simplified it a bit (it did a bit more), to transpile, so I guess I'm doing right. The output was a bit ugly though...

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