SLIME for Golang?

Is there an Golang interpreter/incremental compiler with a REPL which is (or could be) integrated into Emacs like SLIME for Common Lisp?

I don’t know about slime, but motemen/gore and d4l3k/go-pry are the first two Google hits for “go repl”. Maybe those can work.

gore and go-pry are note real REPL. (IIRC!)

they take advantage of the very quick compilation speed of Go to recompile the snippets you enter and re-run those parts.

real REPLs are:

there are also Jupyter backends for Go:

(they do have to use/implement a real REPL for Jupyter to work correctly)

e.g. a Jupyter backend with Neugram:

direct examples:


1 Like

Thanks I’ll check out gomacro.

I see what you mean, it looks like cheating if the REPL simply calls the standard compiler.
However, as long as the REPL looks and feels like a REPL, I would not care about whether the code is compiled or interpreted.

it kind of makes all the difference in the world when you do:

$> sat, err := launchSatellite()

and then:

$> err = analyze(sat.Data)

you don’t want another satellite to be launched when you enter the second command in the REPL.
something that the REPLs-yet-not-quite try hard not to do, of course, but fail in some situations.

1 Like

Valid point. On the other hand, not all one-liners launch a satellite.

^---- Sorry. The above line sat in the editor for 16 days, unnoticed by me.

Looks like there is a new REPL that is able to interpret Go source code line-by-line:

(Announcement on golang-nuts:

Yes, Jason’s interpreter is interesting in the sense that it’s, to my knowledge, the first non-toy JIT interpreter for Go.
The one thing that I don’t like very much is that it’s relying on installing a C-based third party library to work.
So no easy ‘go get’ experience, no AppEngine and no painless cross compilation :slight_smile:
I still prefer ‘my’ neugram interpreter :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.