logoalt Hacker News

Show HN: Woxi - Open-source Mathematica / Wolfram Language reimplementation

204 pointsby adiustoday at 10:06 AM29 commentsview on HN

Woxi is an interpreter for the Wolfram Language written in Rust.

It comes with Woxi Studio, a Mathematica-like GUI built with iced, but you can also use Woxi through a CLI, Jupyter kernel, Python package, npm package, or WASM module.

Compared with wolframscript / Mathematica, the main differences are:

- Free and open source - Very fast startup - Typically milliseconds rather than seconds for the Wolfram kernel, making Woxi practical for shell scripts, one-liners, and other short-lived processes - Embeddable - It can run in a browser via WASM or be embedded into another application as a scripting language

A more detailed comparison with Mathematica is available here: https://woxi.ad-si.com/docs/comparison/mathematica/.

Conformance is ensured with ~26'000 unit tests and ~900 .wls script snapshot tests.

The current focus is on fixing remaining edge cases, improving performance, and growing the community.

If you use the Wolfram Language, I'd be particularly interested in feedback on compatibility and missing functionality. Contributions and bug reports are also very welcome: https://github.com/ad-si/Woxi


Comments

peterustoday at 2:50 PM

I get the reasons for not supporting out of order execution and the % variable, it makes for more readable and usable notebooks. Unfortunately most of the time I use Mathematica it is not to make a readable and repeatable notebook but just to help with uni work, so I do take shortcuts like putting multiple statements in a block and using % frequently.

If you are planning to add another component, I'd like to +1 the control systems module. It's a lot less clunky than Matlab in my opinion and faster to use. I've used the classical analysis, state space model and matrix equation solver features in that module, none of the microcontroller stuff https://reference.wolfram.com/language/guide/ClassicalAnalys...

ethanc8today at 4:44 PM

I tried out the multivariable calculus visualizations from https://nmd.web.illinois.edu/classes/2024/241/schedule.html (search for "visualization") and Woxi Studio seems to be able to display them. I'm not sure if it's entirely correct (there might be a few bugs) since I don't have Mathematica currently to serve as a comparison.

xvilkatoday at 4:31 PM

Wish you luck. Hope one day instead of Sage that is a bunch of Python glue for completely different and disjointed systems like Maxima, SymPy, Octave, GAP, PARI/GP, etc we will get a one well-integrated (and blazingly fast because written in Rust). I am a big supporter of open-source but after struggling with Sage and Co, decided that buying Wolfram Mathematica license is well-worth it (never regretted since). It would be great if we don't need to do that anymore.

As for the "most wanted" features, I would vote for PDEs, since most other systems (apart from Mathematica itself) do not support them well.

alex7otoday at 10:36 AM

This was also posted 6 months ago: https://news.ycombinator.com/item?id=47155526

show 1 reply
bobajefftoday at 1:35 PM

As sometime who's never used Wolfram Languages before this project has gotten me interested.

For sometime now I've been looking into a good CAS for my app. I've tried a few algebra problems with Sympy, Sage, Xcas, Maxima and Woxi. Of these only Sage, Maxima and Woxi were capable of giving the expected answers.

After trying it out I became fascinated by Wolfram language and other term rewriting languages they are pretty interesting even though most have little to do with CAS like WL.

Anyway I've been looking at this project and plan to seriously use it in the future. So, I've noticed a few things when attempting to run wljs (I had to wrap it with a shell script to get wljs to see it as wolframscript executable). First the version number system variable gives a string instead of the expected real number type (As a temporary hack I modified Woxi to give what wljs expects). There also is a variable that tells to the absolute path of the of the current file and it is wrong when it's used in an imported script. After working around that with hard coded paths things became more difficult.

Anyways, I'm interested in helping out don't know if I can.

yaroslavvbtoday at 2:45 PM

I like this project! I've used Wolfram Language since high-school and collected a large number of notebooks that I revisit sometimes. I'm curious, what fraction of cells work under Moxi? 1,275 notebooks, 3GB archive here -- https://drive.google.com/file/d/1RRqHnnCUevm7E0zKsHQvKNKxpzZ...

philzooktoday at 3:15 PM

A suggestion: I think the python api could be more useful if it returned a structured tree and possibly also could accept a structured tree. I'm guessing you're using maturin, there are some nice low energy ways of getting a tree like structure out even if you have to copy internal trees into a new version with nice python bindings. I've done similar things here https://github.com/philzook58/scryerpy https://github.com/philzook58/steelpy https://github.com/philzook58/microeggpy

petrokittytoday at 2:45 PM

I have used Wolfram a before but I mostly use Sympy. Looking forward to trying this out. If it is faster than Sympy then that would be a huge help.

zhixingheyi2023today at 1:13 PM

Open-source reimplementations of mature tools are underrated. The interesting part is often not just feature parity, but making the technology easier to embed into new workflows.

physicsguytoday at 2:10 PM

What is the performance like for symbolic maths?

I always preferred Mathematica for that to SymPy since it's baked in to the language much more. It was also way way faster than SymPy was for anything interesting.

show 1 reply
Y_Ytoday at 12:10 PM

Can it run Rubi?

https://rulebasedintegration.org/

show 1 reply
nickpsecuritytoday at 4:34 PM

Is Wolframe open-sourced and with open patents?

Beware of copyright issues for API's and patent issues about reimplementations. Wolfram seems serious about his I.P.. After the Oracle case, I'm not reimplementing any language unless it's open with no patent trolling possible.

jshaqawtoday at 12:33 PM

I’m going to get hate here but what the heck I have karma points to burn. What I have to say is not a critique of this particular project which seems nicely done but a general statement on open source.

I’d rather see more open source projects making something new than so much “Open Source reimplementation.” If closed proprietary companies are so worthless then why do so many open source projects copy those implementations. Did Wolfram really discover the one true way in its language syntax and presentation layer? If it did, is the idea of open source really just making it unviable for companies to invest in important things like that? To be clear these are of course rhetorical questions. The open source world could experiment (and in defense sometimes does) with truly new approaches and interfaces. I just want to see more of it.

Mathematica exists. Mathematica for free versus Mathematica for money is of course a nice trade. But even better would be to try new ways to interact with mathematics unburdened from legacy concerns.

show 5 replies
jkatariytoday at 4:47 PM

this is lowkey so cool

hn2crljhhytoday at 12:13 PM

[dead]