Documentation ¶
Overview ¶
The goIPyJoyLoLAdaptor provides the interface from the goIPyKernel (part of the goIPythonKernelToolkit) and the cJoyLoL runtime instance of JoyLoL.
Some of the folowing GoDoc documentation, such as the `Dir`, as well as the `FSXXX` functions, come from our use of Matt Jibson's esc tool (https://github.com/mjibson/esc) to embed the IPyJoyLoL.joy code directly into the IPyJoyLoL kernel executable itself.
Index ¶
- Constants
- func Dir(useLocal bool, name string) http.FileSystem
- func FS(useLocal bool) http.FileSystem
- func FSByte(useLocal bool, name string) ([]byte, error)
- func FSMustByte(useLocal bool, name string) []byte
- func FSMustString(useLocal bool, name string) string
- func FSString(useLocal bool, name string) (string, error)
- type GoAdaptor
- func (adaptor *GoAdaptor) EvaluateCode(execCounter int, execSubCounter int, code string) (rtnData tk.Data, err error)
- func (adaptor *GoAdaptor) EvaluateRemoveSpecialCommands(outErr tk.OutErr, code string) string
- func (adaptor *GoAdaptor) GetCodeWordCompletions(code string, cursorPos int) (int, int, []string)
- func (adaptor *GoAdaptor) GetKernelInfo() tk.KernelInfo
- func (adaptor *GoAdaptor) SetupDisplayCallback(receipt tk.MsgReceipt)
- func (adaptor *GoAdaptor) TeardownDisplayCallback()
Constants ¶
const ( // Version defines the goIPyJoyLoL version. Version string = "1.0.0" )
Variables ¶
This section is empty.
Functions ¶
func Dir ¶
func Dir(useLocal bool, name string) http.FileSystem
Dir returns a http.Filesystem for the embedded assets on a given prefix dir. If useLocal is true, the filesystem's contents are instead used.
func FS ¶
func FS(useLocal bool) http.FileSystem
FS returns a http.Filesystem for the embedded assets. If useLocal is true, the filesystem's contents are instead used.
func FSByte ¶
FSByte returns the named file from the embedded assets. If useLocal is true, the filesystem's contents are instead used.
func FSMustByte ¶
FSMustByte is the same as FSByte, but panics if name is not present.
func FSMustString ¶
FSMustString is the string version of FSMustByte.
Types ¶
type GoAdaptor ¶
type GoAdaptor struct { // AdaptorIdFormat is a string which together with the ExecCounter and // ExecSubCounter forms the ExecName to uniquely identify this kernel for // a human user. // AdaptorIdFormat string // IPyJoyLoLDebugging determines whether or not to send debugging // information to Jupyter via stdout // IPyJoyLoLDebugging bool // The JoyLoL State // JoyLoL *cJoyLoL.JoyLoLState }
GoAdaptor represents any state required by the adaptor. /
func (*GoAdaptor) EvaluateCode ¶
func (adaptor *GoAdaptor) EvaluateCode( execCounter int, execSubCounter int, code string, ) (rtnData tk.Data, err error)
Evaluate the code and return the results as a Data object.
func (*GoAdaptor) EvaluateRemoveSpecialCommands ¶
Evaluate (and remove) any implmenation specific special commands BEFORE the code gets evaluated by the interpreter. The `outErr` variable contains the stdOut and stdErr which can be used to capture the stdOut and stdErr of any external commands run by these special commands.
Not currently implemented for the IPyJoyLoL kernel.
func (*GoAdaptor) GetCodeWordCompletions ¶
func (adaptor *GoAdaptor) GetCodeWordCompletions( code string, cursorPos int, ) (int, int, []string)
Get the possible completions for the word at cursorPos in the code.
Not currently implemented for the IPyJoyLoL kernel.
func (*GoAdaptor) GetKernelInfo ¶
func (adaptor *GoAdaptor) GetKernelInfo() tk.KernelInfo
GetKernelInfo returns the KernelInfo for this kernel implementation.
func (*GoAdaptor) SetupDisplayCallback ¶
func (adaptor *GoAdaptor) SetupDisplayCallback(receipt tk.MsgReceipt)
Setup the Display callback by recording the msgReceipt information for later use by what ever callback implements the "Display" function.
Not currently implemented for the IPyJoyLoL kernel.
func (*GoAdaptor) TeardownDisplayCallback ¶
func (adaptor *GoAdaptor) TeardownDisplayCallback()
Teardown the Display callback by removing the current msgReceipt information and setting things back to what ever default the implementation uses.
Not currently implemented for the IPyJoyLoL kernel.