My Bona fides: I've written my own Mathematica clone at least twice, maybe three times. Each time I get it parsing expressions and doing basic math, getting to basic calculus. Then I look up the sheer cliff face in front of me and think better of the whole thing.
There is an architectural flaw in Woxi that will sink it hard. Looking through the codebase things like polynomials are implemented in the rust code, not in woxilang. This will kill you long term.
The right approach is to have a tiny core interpreter, maybe go to JIT at some point if you can figure that out. Then implement all the functionality in woxilang itself. That means addition and subtraction, calculus, etc are term rewriting rules written in woxilang, not rust code.
This frees you up in the interpreter. Any improvements you make there will immediately show up over the entire language. It's also a better language to implement symbolic math in than rust.
It also means contributors only need to know one language: woxilang.
No need to split between rust and woxilang.
I noticed the same thing, having also written an interpreter for the Wolfram language that focused on the core rule/rewriting/pattern language. At its heart it’s more or less a Lisp-like language where the core can be quite small and a lot of the functionality built via pattern matching and rewriting atop that. Aside from the sheer scale of WL, I ended up setting aside my experiments replicating it when I did performance comparisons and realized how challenging it would be to not just match WL in functionality but performance.
Woxi reminds me of some experiments I did to see how far vibe coding could get me on similar math and symbolic reasoning tools. It seems like unless you explicitly and very actively force a design with a small core, the models tend towards building out a lot of complex, hard-coded logic that ultimately is hard to tune, maintain, or reason about in terms of correctness.
Interesting exercise with woxi in terms of what vibe coding can produce. Not sure about the WL implementation though.
(For context, I write compiler/interpreter tools for a living - have been for a couple decades)
Is it not that Mathematica, and most of the Wolfram innovation, is about a smart way of applying some rule-based inference. I think of it as parametrized PROLOG rules, with large lib. So term rewriting all the way to the end, correct me if I'm wrong.
Mh, I thought about this a little and came actually to exactly the opposite conclusion: Implement as much as possible in Rust to get the fastest code possible. Do you have any more insights why this should not be possible / unsustainable?
I love Rust for mathematical and scientific tasks (I am building the structural bio crate infrastructure), and I love Mathematica and have a personal sub. I should be the audience, but... What makes Mathematica great, IMO, is the polish and overall experience created by consistent work with applications in mind over decades. So, I look at this project with skepticism regarding its utility.
Sure, but you've got to start somewhere! And with the amount of progress I was able to make in just a few weeks, I'm very optimistic that the polish will come sooner rather than later.
Hi, I'm the main developer. We're steadily getting closer to the next release which will support most features of Mathematica 1.0 plus some of the most popular newer functions (> 900 overall!). AMA!
It's a worthwhile effort. If successful, Woxi can enable a large mass of scientists and engineers who don't have access to Mathematica to run legacy code written for it. Also, Woxi would give those scientists and engineers who regularly use Mathematica a non-proprietary, less restrictive alternative, which many of them would welcome.
How does Woxi compare to other "clean-room implementations"[a] of the same language?
--
[a] Please check with a lawyer to make sure you won't run into legal or copyright issues.
There's a mystique around Mathematica's math engine. Is this groundless, or will you eventually run into problems getting correct, identical answers -- especially for answers that Mathematic derives symbolically? The capabilities and results of the computer algebra systems that I've used varied widely.
Interesting, thanks for sharing. Naive question as I'm not familiar with Mathematica much (but aware of it and Wolfram Alpha and related tools), how does it compare to e.g. Jupyter or Julia or maybe another language (with its framework) that might be even closer?
This is cool! I've always wanted a polished kernel on the terminal. I spent a lot of time a few years ago writing my own Wolfram Kernel. It was a blast to understand how a pattern matching (symbolic) language is implemented.
For folks who are considering passing, note that there is a "Jupyter Lite" mode in addition to "Woxi Studio" --- seems very promising and the former addressed my first concern out-the-gate.
I regularly use Mathematica for working with symbolic expressions (for its DSolve and transfer function stuff) and it is way more maintainable and elegant to have fractions, symbols and powers rendered in math mode instead of having to deal with a text only representation. Are there any front ends (either custom or somehow extending jupyter) for this project which recreate this experience?
Have you gotten any nastygrams from Wolfram about this? They're pretty protective of their IP. Not saying I think that it's some violation of it, but I could see them being alarmed.
Have you considered doing property tests with Mathematica as an oracle?
An ai based development workflow with a concrete oracle works very well. You still need the research and planing to solve things in a scalable way, but it solves the "are the tests correct" issue.
What we've done is pull out failing property tests as a unit tests, makes regression testing during the agentic coding loop much more efficient.
Such a massive undertaking would be almost impossible without AI agents, so yeah, they help me. But with around 5000 tests, they are actually helping to improve the software quality!
what's stopping some Mathematica employee from taking the source code and having an agent port it. Or even reconstruction from the manual. Who owns an algorithm?
Grosvenor|1 day ago
There is an architectural flaw in Woxi that will sink it hard. Looking through the codebase things like polynomials are implemented in the rust code, not in woxilang. This will kill you long term.
The right approach is to have a tiny core interpreter, maybe go to JIT at some point if you can figure that out. Then implement all the functionality in woxilang itself. That means addition and subtraction, calculus, etc are term rewriting rules written in woxilang, not rust code.
This frees you up in the interpreter. Any improvements you make there will immediately show up over the entire language. It's also a better language to implement symbolic math in than rust.
It also means contributors only need to know one language: woxilang. No need to split between rust and woxilang.
porcoda|1 day ago
Woxi reminds me of some experiments I did to see how far vibe coding could get me on similar math and symbolic reasoning tools. It seems like unless you explicitly and very actively force a design with a small core, the models tend towards building out a lot of complex, hard-coded logic that ultimately is hard to tune, maintain, or reason about in terms of correctness.
Interesting exercise with woxi in terms of what vibe coding can produce. Not sure about the WL implementation though.
(For context, I write compiler/interpreter tools for a living - have been for a couple decades)
larodi|14 hours ago
Is it not that Mathematica, and most of the Wolfram innovation, is about a smart way of applying some rule-based inference. I think of it as parametrized PROLOG rules, with large lib. So term rewriting all the way to the end, correct me if I'm wrong.
Where does the mini-core+JIT come into this?
Thanks for taking time to answer.
adius|1 day ago
nextaccountic|1 day ago
0x3f|1 day ago
the__alchemist|1 day ago
adius|1 day ago
drnick1|1 day ago
rustyhancock|1 day ago
SPSS is hilariously painful to use. Still it's only losing ground ever so slowly. PSPP remains almost unheard of among SPSS core users.
amelius|1 day ago
adius|4 days ago
cs702|1 day ago
It's a worthwhile effort. If successful, Woxi can enable a large mass of scientists and engineers who don't have access to Mathematica to run legacy code written for it. Also, Woxi would give those scientists and engineers who regularly use Mathematica a non-proprietary, less restrictive alternative, which many of them would welcome.
How does Woxi compare to other "clean-room implementations"[a] of the same language?
--
[a] Please check with a lawyer to make sure you won't run into legal or copyright issues.
egl2020|1 day ago
muizelaar|1 day ago
How close is it to being able to run rubi: https://rulebasedintegration.org/?
utopiah|1 day ago
apetresc|1 day ago
jacquesm|19 hours ago
foobarqux|1 day ago
dist-epoch|1 day ago
Better license? Allowed for commercial operations?
pwdisswordfishy|1 day ago
foobarqux|1 day ago
anandijain|1 day ago
https://github.com/anandijain/cas8.rs
WillAdams|1 day ago
peterus|1 day ago
lejalv|1 day ago
unexpectedtrap|16 hours ago
RagnarD|14 hours ago
qubex|3 hours ago
samwillis|1 day ago
An ai based development workflow with a concrete oracle works very well. You still need the research and planing to solve things in a scalable way, but it solves the "are the tests correct" issue.
What we've done is pull out failing property tests as a unit tests, makes regression testing during the agentic coding loop much more efficient.
singularity2001|1 day ago
evanb|23 hours ago
If you have Mathematica installed you can write CLI scripts and notebooks.
oofbey|1 day ago
adius|1 day ago
asdfe3r343|20 hours ago
LowLevelKernel|1 day ago
unknown|1 day ago
[deleted]
esafak|1 day ago
adius|1 day ago
fnord77|1 day ago
adius|1 day ago
aaron695|1 day ago
[deleted]
downboots|1 day ago
what's stopping some Mathematica employee from taking the source code and having an agent port it. Or even reconstruction from the manual. Who owns an algorithm?
Will everything get copied eventually?
adius|1 day ago
MengerSponge|1 day ago
Laws against theft. Also the same reason employees don't release the code on pastebin or something.
> Who owns an algorithm?
The org or person who was granted the software patent. https://en.wikipedia.org/wiki/Software_patent
> Will everything get copied eventually?
If we're lucky. More likely everything bitrots as technical capabilities are lost. Slowly at first, then quickly.