Woxi: Wolfram Mathematica Reimplementation in Rust

(github.com)

101 points | by adamnemecek 2 days ago

8 comments

  • the__alchemist 1 hour ago
    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.
    • rustyhancock 21 minutes ago
      Similarly I'm not sure Octave ever really got that polish to compete with MATLAB.

      SPSS is hilariously painful to use. Still it's only losing ground ever so slowly.

    • adius 50 minutes ago
      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.
      • the__alchemist 42 minutes ago
        Based on the list of contributors to your project, I am not sure this starting location is optimally suited to the task of building a foundation for polished, reliable, expandable software.
        • adius 30 minutes ago
          It's having ~ 5000 tests already. Used correctly, AI agents can help you improve the quality of the code!
          • copperx 21 minutes ago
            [delayed]
          • the__alchemist 28 minutes ago
            Do you see why this perspective is a red flag on its own?
        • s3p 32 minutes ago
          The sneering on HN really has no end. This is a good project! I for one am very excited to see an interpreter born out of rust.
    • amelius 1 hour ago
      Yeah, the Mathematica language is the least interesting aspect of the Mathematica system. Closely followed by the interactive notebooks.
      • stared 24 minutes ago
        The notebooks were THE thing of Mathematica, at least to me. 12 years ago, as I was finishing my PhD in quantum optics, I wanted to migrate to the stack used in industry - and picked Python. Also, that way I was an early adopter of Jupyter Notebook, as it captured what was need + was open.

        Now Mathematica notebooks (still remember, it is .nb) do not have the novelty factor. But they were the first to set a trend, which we now take for granted.

        That said, I rarely use notebooks anymore. In the coding time, it is much easier to create scripts and ask to create a visualization in HTML.

      • aeonik 51 minutes ago
        I disagree, the language itself is one of the more elegant parts of the system, and enables a lot of the rest of the elegance.

        From a purely programming language theory, it's pretty unique.

        I once tried to find a language that had all the same properties, and I failed. The Factor language is probably the closest. But they are still pretty different.

        • zozbot234 34 minutes ago
          The relevant programming paradigm is string/term rewriting, which is featured in other programming languages such as Pure. It seems to have few direct applications outside of symbolic computing itself, compilers and related fields such as PL theory. (Formal calculi and languages are often specified in PL theory as rewrite rules, even though the practical implementation may ultimately differ.)
      • s3p 30 minutes ago
        [delayed]
  • adius 2 days ago
    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!
    • egl2020 29 minutes ago
      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.
      • adius 22 minutes ago
        Hard to tell honestly. So far there was always some surprisingly straight forward solution If had any problems with the math engine. There is actually a lot of public research how equations can be solved/simplified with computer algorithms. So I'm optimistic. I also stumbled upon a few cases where Mathematica itself didn't quite do things correctly itself (rounding errors, missing simplifications, etc.). So maybe it's actually a little overhyped …
    • utopiah 1 hour ago
      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?
    • cs702 2 hours ago
      Thank you for sharing this on HN.

      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.

    • muizelaar 2 hours ago
      How does it compare to mathics?

      How close is it to being able to run rubi: https://rulebasedintegration.org/?

    • apetresc 2 hours ago
      What percentage of the overall code was written primarily by agents?
    • dist-epoch 1 hour ago
      Why would I use this and not Wolfram Script?

      Better license? Allowed for commercial operations?

      • adius 42 minutes ago
        Exactly! And:

        - Faster startup time because of no license check

        - Can run multiple instances of Woxi at the same time

        - Embeddable via WASM

        - Configurable via compile time flags (which features should be included)

        - …

    • foobarqux 56 minutes ago
      How is the popularity/rank in functions.csv determined?
      • adius 45 minutes ago
        That's actually a value that Wolfram determines themselves. Here is the documentation for it: https://reference.wolfram.com/language/ref/WolframLanguageDa...

        Here is e.g. all the values for the Plus[] function:

        $ wolframscript -code 'WolframLanguageData["Plus", "Ranks"]' {All -> 6, StackExchange -> 8, TypicalNotebookInputs -> 5, TypicalProductionCode -> 6, WolframAlphaCodebase -> 6, WolframDemonstrations -> 4, WolframDocumentation -> 4}

  • WillAdams 45 minutes ago
    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.
  • esafak 29 minutes ago
    I wonder if it would make a good Zeppelin interpreter. https://zeppelin.apache.org/
  • downboots 1 hour ago
    Great! Math tools for everyone.

    I was wondering what's stopping some employee from something like Mathematica from taking the source code and having an agent port it to open source. Or even reconstruction from the manual. Who owns an algorithm?

    Will everything get copied eventually?

    • adius 38 minutes ago
      According to https://en.wikipedia.org/wiki/Lotus_Development_Corp._v._Bor...., a software clone does not infringe software copyright. So yeah, I'd guess sooner or later everything is going be cloned …
    • MengerSponge 38 minutes ago
      > what's stopping some employee from something like Mathematica from taking the source code and having an agent port it to open source

      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.

  • fnord77 1 hour ago
    vibe coded?
    • adius 34 minutes ago
      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!
      • throawayonthe 23 minutes ago
        are all the tests hand written or are some agent-contributed? curious
  • aaron695 2 hours ago
    [dead]