9
$\begingroup$

I just noticed that we could use Wolfram Language from How to add front-end to the free Wolfram Engine?.

After a while of playing with Wolfram Language in Jupyter notebook, I noticed I could not auto-complete the code with Tab.

I wonder how I can auto-complete the code.

Thanks.

$\endgroup$
  • 2
    $\begingroup$ The Jupyter integration is open source, and in this case, I think it is actually reasonable to say that you could implement this feature yourself (assuming you have 2 days to work on it). $\endgroup$ – Szabolcs May 23 at 11:56
4
$\begingroup$

https://github.com/Ludwiggle/JWLS

and

https://github.com/mmatera/iwolfram

have autocompletion. I think they are still better alternatives to the official WRI jupyter Kernel which is not mature yet. IWolfram must be tweaked a little to work with the new Wolfram Engine but JWLS works out of the box insofar it has been designed to run exclusively through wolframscript; as such, it works independently of what type of wolfram product you have installed.

$\endgroup$
  • 1
    $\begingroup$ I could not get iwolfram working on macOS. It just hangs when I try to set it up. $\endgroup$ – Szabolcs May 26 at 15:21
  • $\begingroup$ I think IWolfram set-up needs to be cleaned up by getting rid of its attempt to include Mathics and its checks on the initial response of the REPL. Then it might get installed. Did you try JWLS on Mac? $\endgroup$ – Fortsaint May 26 at 16:46
12
$\begingroup$

Currently, this feature is not included.

If you are considering implementing it, you would need to start here:

https://jupyter-client.readthedocs.io/en/stable/kernels.html#handling-messages

You would need to implement handling the relevant messages. As far as I can tell, that would be complete_request. In Mathematica, you can use Names["something*"] to retrieve possible matches, which then can be returned to Jupyter.

$\endgroup$
  • $\begingroup$ Thanks for your hint. I am considering it. Maybe I can have a try after I graduate after next month. 囧rz. $\endgroup$ – PureLine May 23 at 12:10
  • 4
    $\begingroup$ @PureLine You do not need to accept the answer so soon. Maybe someone will actually implement it in an answer ... while asking for that would be too much for StackExchange, I can imagine that someone would get sufficiently interested. $\endgroup$ – Szabolcs May 23 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.