sed -i "s|init_file|"$(realpath init.wl)"|g" wolframforjupyter/kernel.json
jupyter kernelspec install wolframforjupyter/ --user
No explicit version implied, it depends on wolfram
execute version in your $PATH
.
For code completion of user defined symbols. (change Wolfram
to Mathematica
if
version under v14.0)
ln -s $(realpath stream.wl) ~/.Wolfram/Applications/stream.wl
- [ ] If not, system symbols completion still work.?
Jupyter Client 8.3 — jupyter_client 8.3.1 documentation
Obviously we should choose option 2 (code execute done in WTSP
)
colored debug message
- Making simple Python wrapper kernels — jupyter_client 8.3.1 documentation
- GitHub - jupyter/echo_kernel: A simple example kernel for Jupyter
- GitHub - takluyver/bash_kernel: A bash kernel for IPython
- GitHub - dsblank/simple_kernel: A small, simple kernel example for IPython
GitHub - jupyter/jupyter_kernel_test: A tool for testing Jupyter kernels
zmq identity
UTF-8 encode string
WSTP Wolfram Language Functions—Wolfram Language Documentation
currently, interrupt in jupyter is implemented by LinkInterrupt
. For signal
interrupt see Linux Signals Help
Notation:
- client
- jupyter front end (i.e. browser tab / vscode / emacs-jupyter)
- kernel
- the monitor process client communicate with
- link
- the wolfram language evaluation take place, monitored by kernel
Currently, codes are input as EnterTextPacket
to link. That makes output
render easily, since output being wrapped inside ReturnTextPacket
. But have
following downside:
- unicode garbled
- further handler difficult (e.g.
Short
) - code completion hard implement (see below)
LocalSubmit
failed inside WSTP link, then there’s no “caveat for asynchronous
output” (mentioned in jupyter client documentation). Anyway, why not launch a
new link (jupyter session)?
Where should completion occurs, in kernel or link? Jupyter’s answer is surely
the later, since the complete_request
being send from shell channel. And the
symbols in link is non-awareable to kernel. (for simple, currently front)
Then, the problem emerge when completion request arrive at link busy status. But
like in jupyter-python
, is ok for link to ignore those requests (check it’s
the case). And for completion inside link, we need ReturnPacket
or
ReturnExpressionPacket
to store matches in List
(not string of lengthy
list), which is not implemented.
Other problem is that execute_count
get increase when handle completion
request, see $Line
variable for maintain it.
- [ ] check completion request after link go from busy to idle
- [ ] code completion
- [ ]
Short
with too long expression - [ ] log evaluation time
- [ ] export
- [X] interrupt
- [X]
%
no content - [X] message stream output
WolframLanguageForJupyter
- GitHub - WolframResearch/WolframLanguageForJupyter: Wolfram Language kernel f…
Jupyter kernel from
WolframResearch
official. Very nice structured code, this project borrows many ideas from there.
wolfram-language-notebook
- GitHub - njpipeorgan/wolfram-language-notebook: Notebook support for Wolfram …
Functional wolfram notebook for vscode.
IWolfram
- GitHub - mmatera/iwolfram: A jupyter kernel for Wolfram Mathematica
Kernel written in python and
So far this is a proof of concept.