2

Do you know of any work being done on the idea of bringing in code from other languages like Perl, PHP, Python, etc.? That is, import the code in some way and then convert it to Mathematica code?

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
EdgyTector
  • 147
  • 3
  • 1
    You can load java classes and execute those "within" mathematica using JLink, they actually run in a linked JVM. The same would apply for python code via JYthon. Similarly .Net classes may be run using NetLink and IronPython would also work. – Ymareth Jan 28 '14 at 14:21
  • 1
    I found the question to be confusing, so I rephrased it. Please verify. – Szabolcs Jan 28 '14 at 15:44
  • 2
    No, Mathematica has no built-in ability to do this. I am not aware of any packages either, though there might be some limited ones. What you can do is call code written in other languages from Mathematica. I am aware of interfaces to C/C++, Java (and other JVM-based languages), .NET, R, MATLAB, Clojure, NetLogo, Python (limited). There are probably others. – Szabolcs Jan 28 '14 at 15:51
  • With some probability, I see myself making some code designed to convert a subset of SymbolicC to MMA code, but never finishing it. But who (else) cares about SymbolicC :P? – Jacob Akkerboom Jan 28 '14 at 18:29
  • @Szabolcs The question is stated that your comment could be an answer, please consider posting it. – Kuba Mar 19 '14 at 17:28
  • @Kuba OK, done. – Szabolcs Mar 19 '14 at 17:55
  • f2mma does this for simple FORTRAN programs, but I could only find references to f2mma, not the software itself (and your question doesn't mention FORTRAN, so this might be even more unhelpful). –  May 25 '15 at 16:15

1 Answers1

2

No, Mathematica has no built-in ability to do this. I am not aware of any packages either, though there might be some limited ones.

What you can do is call code written in other languages from Mathematica. I am aware of interfaces to C/C++, Java (and other JVM-based languages), .NET (see all three here), R, MATLAB, Clojure, NetLogo, Python (limited). There are probably several others.

Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263