Originally meant as a framework for Python, many other language kernels have been added, to provide an interactive execution environment for script-like execution of code fragments (i.e. Python, R, Ruby, Haskell, Node, Go, Smalltalk and others).
The "stx:goodies/communication/jupyter" package implements such a kernel for Smalltalk/X.
pip install notebook
However there are many other options (see https://jupyter.org/install).
libzmq.so
(or libzmq.dll
) library. /Library/Frameworks/Python.framework/Versions/3.7/share/jupyter/kernels
and per-user specs under: $(HOME)/Library/Jupyter/kernels
A similar structure is used on Windows or Linux.
To see where your Jupyter stores the specs, type:
jupyter kernelspec list
stx --run stx:goodies/communication/jupyterTalk --install
If that fails to find a target folder, perform the following steps:
stx
" (or similar).
kernel.json
" in that "stx" folder.
{
"argv": [
"$(PATH_TO_STX)/stx",
"-I", "--quick", "--run", "stx:goodies/communication/jupyterTalk",
"{connection_file}"
],
"display_name": "Smalltalk/X",
"language": "smalltalk"
}
Replace "$(PATH_TO_STX)/stx" by the folder where the Smalltalk/X
stx-executable is found; typically something like "/opt/smalltalkx/bin"
or "/usr/local/bin" or similar. jupyter notebook
or jupyter lab
After some startup time, a browser window should appear, showing the initial Jupyter notebook.
In Jupyter, press the "New" button at the top right, and choose "Smalltalk/X". In JypyterLab, select "New" from the top menu. If there is no entry for "Smalltalk/X", you might have a problem with your kernel config file (wrong pathname or Jupyter uses a different config folder).
An empty cell into which you can enter a Smalltalk expression should appear.
Try "3+4
" and press "Run" (the right-arrow button in the toolbar).
If all goes well, a result cell containing "7
" should appear (obviously).
Try "Smalltalk openDisplay. NewLauncher open.
".
The standard Smalltalk/X launcher will appear.
Smalltalk loadPackage:'stx:goodies/communication/jupyter'
or: Smalltalk requirePackage:'stx:goodies/communication/jupyter'
Notice:
Jupyter will start a fresh Smalltalk/X binary,
and the kernel configuration will tell it to load the package upon startup.
Thus, if you modify any code, you'll have to save the affected classes back
into the package folder, recompile the package library (in "stx/goodies/communication/jupyter"),
and restart the kernel.
stx/goodies/communication
" folder.
<info@exept.de>