3 ms·
I really want a Go REPL that somehow manages to compile the new statements and execute them in an ongoing context (like Python's REPL). Is that technically pos
by dekhn 12y ago
I really want a Go REPL that somehow manages to compile the new statements and execute them in an ongoing context (like Python's REPL).
Is that technically possible? Can you compile Go in Go and dynamically load it? With a shell-out to the compiler?
- slimsag 12y agoIt might be possible to interpret Go using exp/ssa; otherwise you'd probaly want to wait till the compiler is converted to Go in v1.5.
- dekhn 12y agoRight, but a Go program can just shell out to a compiler. The bigger question is whether you can dlopen(LoadLibrary) a go-compiled .so(.dll) or .a(.lib) from a go program and execute functions with it.
- earljwagner 12y agoThat's (partly) provided by running this REPL: https://github.com/rocky/go-fish https://github.com/rocky/go-fish with this eval for Go code: https://github.com/0xfaded/eval https://github.com/0xfaded/eval
- bsg75 12y agoDoes this provide a "different" type of REPL than gore?