5
$\begingroup$

I would like to be able to interact with Mathematica command line interface from within Sublime Text.

Sublime Text has a package called Sublime REPL that provides an interface for different programming environments interactively. Unfortunately Mathematica is not one of them and I started to see if I can tweak the package and add Mathematica REPL too.

The general way to proceed is to call the program we want to interact with through a command and the rest is mostly taken care of by the REPL package. For example to call R REPL, the package runs "cmd": ["Rterm.exe", "--ess", "--encoding=$win_cmd_encoding"] or for Matlab it is "cmd": ["matlab", "-nodesktop","-nosplash"] Now I know that the command line interface of mma is wolfram.exe which I added to my path and it works from the cmd or powershell but I am not able to get it to work from within sublime.

What worked though is to do it indirectly through a system shell by which I mean to open either shell or powershell repls and from there type wolfram and then I can have a repl but not directly.

My question is whether there is special switch or argument that I need to pass that I am not aware of? Or is it a fundamental issue going on here that I am not aware of?

I make this disclaimer here that I am not a programmer and a newbie in mathematica so I might have not been aware of relevant keywords in my previous searches for similar questions or possible solutions. I looked at two implementation of a repl for Mathematica (mathematica mode for emacs and a REPL for IntelliJ) to see how they do it but I could not figure it out in the end.

$\endgroup$
  • 1
    $\begingroup$ blog.wolfram.com/2017/05/17/… $\endgroup$ – Alan Sep 8 '18 at 15:06
  • $\begingroup$ Thanks @Alan for the reference. I had seen this but the article is referring to a REPL provided by mathematica and does not give much info how to access it from other apps. Also I am using Mma 10, do you happen to know whether there is a significant difference in the functionality of CLI between the two version? $\endgroup$ – Nima Sep 12 '18 at 16:50

Your Answer

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

Browse other questions tagged or ask your own question.