gopherdata/gophernotes

"import as" not take effect

clouds56 opened this issue · 4 comments

run this in jupyter notebook

In [1]: import m "math"
In [2]: m.Sin(1)
# command-line-arguments
/var/folders/.../gophernotes_session.go:10: undefined: m in m.Sin

here's the spec

Sorry for the delay here. Yes, this is not supported quite yet, but hoping to get around to it soon.

@clouds56, we have done a major refactor on gophernotes and replaced the interpreter with gomacro. Unfortunately gomacro doesn't support these named imports for now. Hopefully we could merge something upstream at some point.

Gophernotes has recently updated its vendored copy of gomacro, and now it works.

See the screenshot below, that shows the output of:

import m "math"
m.Sin(1)

screenshot_20180405_144321

Awesome, thanks for the update here @cosmos72!