ndbecker0000
ndbecker0000
MModular
Created by ndbecker0000 on 10/5/2023 in #questions
trouble with mandelbrot example
Newb here. I've copied code from the mandelbrot example, placing it into the file mandel.mojo, which I've copied here: https://gist.github.com/nbecker/820a6f740e4bad43bb09a52103d5b19b When I run mojo mandel.mojo I get lots of errors:
mojo: /lib64/libtinfo.so.6: no version information available (required by mojo)
/home/nbecker/mojo/mandel.mojo:59:1: error: TODO: expressions are not yet supported at the file scope level
show_plot(compute_mandelbrot())
^
/home/nbecker/mojo/mandel.mojo:36:23: error: use of unknown declaration 'Tensor'
def show_plot(tensor: Tensor[float_type]):
^~~~~~
/home/nbecker/mojo/mandel.mojo:11:26: error: use of unknown declaration 'ComplexFloat64'
def mandelbrot_kernel(c: ComplexFloat64) -> Int:
... more errors
mojo: error: failed to parse the provided Mojo
mojo: /lib64/libtinfo.so.6: no version information available (required by mojo)
/home/nbecker/mojo/mandel.mojo:59:1: error: TODO: expressions are not yet supported at the file scope level
show_plot(compute_mandelbrot())
^
/home/nbecker/mojo/mandel.mojo:36:23: error: use of unknown declaration 'Tensor'
def show_plot(tensor: Tensor[float_type]):
^~~~~~
/home/nbecker/mojo/mandel.mojo:11:26: error: use of unknown declaration 'ComplexFloat64'
def mandelbrot_kernel(c: ComplexFloat64) -> Int:
... more errors
mojo: error: failed to parse the provided Mojo
This is running on fedora 38 linux, using an ubuntu container. Any ideas?
4 replies
MModular
Created by ndbecker0000 on 9/22/2023 in #questions
support for existing Python c modules?
Can code in mojo call existing Python c modules?
1 replies