That's a lot of hoops to call source('setup.R') that itself source() the other files, which gives a cheap version of a package.
We should probably :
move most of the R code in a proper R package, which essentially is a simplified IRkernel i.e. IRkernel minus the transport/zmq code.
only keep here the code that .Call()s back into the C++, i.e. the routines.cpp file. Those are systematic, so could definitely be generated, this does not necessarily need to be an .R file. The decor 📦 could help.
We could take inspiration from what IRdisplay does with options, e.g.
Currently the supporting R code is loaded, in
interpreter::configure_impl()
from a directory based on wherexr
is:That's a lot of hoops to call
source('setup.R')
that itselfsource()
the other files, which gives a cheap version of a package.We should probably :
IRkernel
i.e.IRkernel
minus the transport/zmq code..Call()
s back into the C++, i.e. theroutines.cpp
file. Those are systematic, so could definitely be generated, this does not necessarily need to be an.R
file. The decor 📦 could help.We could take inspiration from what
IRdisplay
does with options, e.g.The package would have functions such as
execute()
,complete()
etc ... and the C++ code would:.Call()
compatible C++ functionsThe win is that the package does not have to deal with C++ code, the option serves as a sort of pimpl.