scicloj / wolframite

An interface between Clojure and Wolfram Language (the language of Mathematica)
https://scicloj.github.io/wolframite/
Mozilla Public License 2.0
56 stars 2 forks source link

Generate wolfram.clj with vars for Wolfram symbols #55

Closed holyjak closed 4 months ago

holyjak commented 5 months ago

Fixes #33, #45, #53

holyjak commented 5 months ago

FIXME Lambdas don't work

(wl/eval (w/Map (fn [x] (w/+ x 1)) [1 2 3])) and rewriting (wl/eval '(Function [x] (StringJoin "Hello, " x "! This is a Mathematica function's output."))) to use fn and w/StringJoin does not work. The lambda fn does not correctly translate its body back to symbols, so in the first wecase we end up with a vector of 3 lambda fn names instead of nums.

holyjak commented 4 months ago

TODO

light-matters commented 4 months ago

Thoughts on kernel-info!

As far as I can see it's not side-affecting and so shouldn't have an exclamation mark? Since it's just returning data on the system then it goes well with similar functions in runtime.system (rather than in core)?

light-matters commented 4 months ago
light-matters commented 4 months ago

I really like that I can now do things like

 (-> 'x
    (w/Integrate 'x)
    wl/eval)

i.e. don't have to deal with macros and symbols not playing well with functions.