Top
Best
New

Posted by adius 7 hours ago

Show HN: Woxi - Open-source Mathematica / Wolfram Language reimplementation(woxi.ad-si.com)
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

201 points | 29 comments
ethanc8 31 minutes ago|
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.
peterus 2 hours ago||
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...

Either way, I'll probably be using this after I graduate and no longer have the site license, since I cannot imagine using a different CAS, so thanks for developing this

xvilka 45 minutes ago||
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.

alex7o 6 hours ago||
This was also posted 6 months ago: https://news.ycombinator.com/item?id=47155526
adius 4 hours ago|
Since then, we've made more than 7,000 commits and massively expanded Woxi's feature set. So it's well worth another try for anyone who tried it back then!
pama 4 hours ago|||
You now fully support version 1.0. IIRC, the first version of Mathematica I used back in early 1993 was 2.1 soon followed by 2.2, which was useful for a couple of years. How much extra work is it to reach full compatibility with that version? (I had used MathLink at the time.)
adius 3 hours ago||
We currently support almost everything up to version 6.0. Here is a detailed comparison with all Mathematica versions: https://woxi.ad-si.com/docs/comparison/mathematica/

However, MathLink is one of the few exceptions as it is deprecated by now.

aleph_minus_one 1 hour ago|||
> However, MathLink is one of the few exceptions as it is deprecated by now.

As far as I know WSTP (Wolfram Symbolic Transfer Protocol) is the replacement for MathLink. Is it supported?

pama 3 hours ago|||
Thanks
alex7o 1 hour ago|||
That is great work guys, for me turning that into an mcp for agents and assistants has been an amazing experience
bobajeff 3 hours ago||
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.

Edit: just checked my pc and the variables are called $VersionNumber and $InputFileName which is incorrect if the file is evaluated via Get["filepath"].

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

yaroslavvb 2 hours ago||
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...
adius 2 hours ago|
Thanks! I’m interested as well … I’ll check it out and report back!
philzook 2 hours ago||
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
petrokitty 2 hours ago||
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.
zhixingheyi2023 4 hours ago||
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.
physicsguy 3 hours ago|
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.

adius 2 hours ago|
Performance is pretty good for most stuff by now. However, there are functions which not optimized yet or implemented in a very basic way and if you use them in non-trivial ways the performance might be quite slow. We're happy about any reports of such issues at https://github.com/ad-si/Woxi/issues!
More comments...