News for hackers. Stuff that matters.
Re:Interactive Go REPL by d4l3k on Thursday July 13, 2017 @01:27PM (#14763229)
Author here.

It's something inbetween. Pretty much the way it works is it dynamically inserts references to all objects/packages/functions in scope at compile time. It then has an in Go interpreter that uses reflection to be able to interact with those references in a transparent way.

The compiled part is just go so that part interacts the same way. The Go interpreter is only partially complete so there may be a few things that don't work as expected, but should be easy enough to add.

I'm also thinking about adding go1.8 plugin support so you can import new packages during the run instead of specifying them on the command line.

Re:Interactive Go REPL by cosmos72 on Friday July 14, 2017 @03:51AM (#14768261)
Hello d4l3k,

I did not try go-pry yet, but I am very curious to compare it with my own attempt at an interactive Go REPL https://github.com/cosmos72/gomacro

They look similar in several aspects, and different in some key ones. For example, mine does not try to instrument compiled code and, among other things, uses exactly go1.8 plugin to import compiled packages at runtime.

Re:Interactive Go REPL by wybiral on Friday July 14, 2017 @01:15AM (#14767664)
Oh wow. You're interpreting right from go/ast? Very cool!
Re:Interactive Go REPL by d4l3k on Friday July 14, 2017 @01:59AM (#14767845)
Yup!