10
$\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$
1
  • 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
    Commented May 23, 2019 at 11:56

2 Answers 2

5
$\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.

EDIT: Linux users might prefer https://github.com/Ludwiggle/JWLX

$\endgroup$
4
  • 1
    $\begingroup$ I could not get iwolfram working on macOS. It just hangs when I try to set it up. $\endgroup$
    – Szabolcs
    Commented May 26, 2019 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
    Commented May 26, 2019 at 16:46
  • $\begingroup$ @Fortsaint: Is the JWLX version also compatible with macOS? $\endgroup$
    – Wizard
    Commented Apr 28, 2020 at 15:18
  • $\begingroup$ It is not insofar it relies on ramdisk /dev/shm. You would need to you replace that device with the corresponding one on macOS. $\endgroup$
    – Fortsaint
    Commented Apr 28, 2020 at 15:21
13
$\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$
2
  • $\begingroup$ Thanks for your hint. I am considering it. Maybe I can have a try after I graduate after next month. 囧rz. $\endgroup$
    – PureLine
    Commented May 23, 2019 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
    Commented May 23, 2019 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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