Closed entropy43 closed 5 years ago
Thanks @dickmao
I have already successfully installed the Kernel and it is already accessible (and usable) as per those links via a regular jupyter notebook:
It is also visible to EIN:
But when I try to start a new notebook, I get the error
ein: [error] ein:ml-lang-setup: kernelspec language ’Wolfram-Language’ unsupported
My issue is how can we add Wolfram Language to the "quiver" of supported languages in EIN (given EIN can already see the installed Wolfram Kernel)
In terms of language support, emacs already has wolfram-mode to assist with syntax highlighting, ac etc.
It's really just a case of how we support the kernel inside EIN. Thoughts @millejoh ?
Also ccing Wolfram engineer @arnoudbuzing who often keeps a helpful eye on such efforts
Good, now you need to turn on polymode as explained in the README.
Thanks -- this permits opening a notebook
but then get this error:
Warning (ein): pm:get-span: no major mode for kernelspec language 'Wolfram-Language
And, irrespective of whether any input is entered, the Kernel then dies
We're in partially charted waters at this point. The kernel requiring reconnect looks bad.
If you haven't installed kawabata/wolfram-mode, that's required for this to work.
We've gotten julia notebooks to work under polymode without having to hardcode anything. Wolfram may have quirks that require tweaking. It's doable by someone like me, but could be quite painful for you.
A fellow @fedeinthemix hardcoded wolfram in #545 . I frown upon such hardcoding, but that may be the only viable route as polymode may require expert fiddling.
Ok, the good news is that this "works"
The bad news is that it throws a language kernelspec warning every character you type:
I'm assuming that there's probably a relatively simple fix to link wolfram-mode
to be the major mode in this case?
I really appreciate your help on this, @dickmao !
Yes, try adding this to your .emacs
or init.el
:
(add-to-list 'auto-mode-alist '("\\.Wolfram-Language$" . wolfram-mode))
Ahh, perfect.... this works a treat:
Thank you so much, @dickmao ! Super helpful. I will mark this as closed for now.
@entropy43 Would you mind if I ask how you got the inline image shown properly in the wolfram mode?
PS: I've followed the instructions to turn on ein:output-area-inlined-images and setup mailcap-user-mime-data. I've also tried an example plot in Python and R kernel, respectively, and they both worked.
Wolfram has recently made a pretty cool Jupyter integration which permits a user to have a fairly full-featured interface with the Wolfram Language via Jupyter notebook.
The typical use case here is that this solution allows one to host their Wolfram / Mathematica kernels on a remote machine (ie on AWS / GCP etc) and then connect a Jupyter notebook via the usual methods instead of a "regular" Wolfram notebook.
As this is a live feature for regular Jupyter notebooks (though not lab -- yet) it would be great to have support for WolfLang / Mathematica in EIN.
I'd love to be able to contribute to this effort but not sure where to start?
How can we get this going?