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

Windows Support #60

Open
cdhunt opened this issue Nov 6, 2017 · 5 comments
Open

Windows Support #60

cdhunt opened this issue Nov 6, 2017 · 5 comments

Comments

@cdhunt
Copy link

cdhunt commented Nov 6, 2017

I'm going to start this as a placeholder. In my brief searching, I don't see a suitable package to replace pkg/term for Windows terminal support.

See pkg/term/#8

go get -u neugram.io/ng
# neugram.io/ng/eval/shell
C:\go\src\neugram.io\ng\eval\shell\job.go:48:10: undefined: syscall.Termios
@crawshaw
Copy link
Member

crawshaw commented Nov 7, 2017

Thanks. We should have a basic stdio mode for general portability.

There is another significant Windows issue, which is Go plugin support. It doesn't work on Windows yet, which means all Neugram can do is import a few builtin std lib packages.

@cdhunt
Copy link
Author

cdhunt commented Nov 7, 2017

Is that in reference to go/#19282?

@sbinet
Copy link
Collaborator

sbinet commented Dec 5, 2017

wrt the plugin support and importing Go packages.
perhaps we could have a RPC/IPC plugin mode (like hashicorp's plugin or Nate Finch's pie) ?

it would be slower, but more robust (the usual dilemma) and would work on all platforms.
(also, one could reload an imported package. not sure how that would mesh with Go/ng, though)

@crawshaw
Copy link
Member

crawshaw commented Dec 5, 2017

When I'm asked if someone should use -buildmode=plugin or an RPC/IPC-based process solution, I almost always recommend the latter. It is far more robust to break your code up into processes if you can.

However I think a general interpreter like Neugram is one place where -buildmode=plugin does make sense. Consider this example:

package ingo

var X *int

func Inc() { *X++ }

and the neugram session:

var x int
import "ingo"
ingo.X = &x
ingo.Inc()
print(x)

How does neugram make this work with RPC/IPC? One possibility is moving all value declarations into the plugin, but this requires constant recompilation on variable declaration, and doesn't solve serializing the state for reloading. The whole machine comes out far more complex than using shared objects, and with lots of quirky failure modes. (Consider the above example only with pointers in structures, or slices.)

I think it would be far less work to get -buildmode=plugin working on windows. There has already been some good work on -buildmode=cshared, and .dll files are well defined. It would probably be a 6-week project for me. I don't know when I can get to it, my current leave is too short and windows support doesn't fit into my day job, but it is entirely possible.

@sbinet
Copy link
Collaborator

sbinet commented Dec 5, 2017

there is also the issue of:

package ingo
func Get() chan int { ... }

which would probably break channels' basic assumptions.

ok. let's find some time to get "brainman" to work on plugin :)

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

3 participants