A Symbolic CAS that operates directly on Javascript and Python code.
Allows users to highlight blocks of math code and right-click to symbolically
integrate
,diff
,limit
,solve
,series
, and more!
Enables beautiful code-to-LaTeX conversion via the
latex()
and unevaluatedIntegral
andDerivative
functions.
Symplex requires that Python and SymPy
are installed. SymPy
can be installed with pip install SymPy
.
- Javascript parsing is somewhat fragile, this is due for a major refactor to better accomodate for the inconsistences in the nodegraph sourceFile output.
- Only variable assignment and basic arithmetic/trigonometric operations on real numbers are supported. No for-Loops, control-statements, etc.
To add a new language:
- Implement the conversion of a block of that language's code to a SymPy string (
convertToSympy()
) inside a new*LANGUAGE*Support.ts
file. - Throughout
extension.ts
, add a new case for your language's identifier, calling yourconvertToSympy()
function. - In
python/symplex.py
, add a case for your language's conversion (SymPy supports codegen in many languages already, so check to see if it's already there). - Add it to the
package.json
as well and Test it by building the extension withF5
!
Add support for
- Gradients
- Vectors/Matrices
- Algebraic "Functions"
- Wolfram CAS Backend?
Group all Symplex functionality underneath the symplex.Evaluate
command. Add snippets which document a few of the SymPy features that Symplex exposes. Also make Python parsing slightly more robust.
Allow writing of arbitrary SymPy operations, encapsulate adding support for new languages, and add LaTeX output!
Since SymPy
operates natively in Python syntax, it was straight-forward to add basic Python support.
Have proven that the typescript AST tree can be transformed into a SymPy
compatible format, and that Python scripts can be invoked to perform arbitrary work for the editor at low-latencies. The infrastructure is ready for massive expansion in capability, once the right UI affordances are found and the Javascript/Typescript parsing code is improved.