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

Function definition not working in tutorial namespace #127

Open light-matters opened 1 month ago

light-matters commented 1 month ago

Discovered in the fact that ListPlot3D doesn't display properly in cavity_physics.clj tutorial.

Not sure how long this has existed for (it definitely did display at some point in the past).

Inspection shows that the 'f' in

(defn Efield
  "For convenience, we build a clojure function over the Wolfram expression created earlier."
  [t1 t2 l1 l2 phi]
  (wl/eval (w/Clear 'f))
  (wl/eval (w/_= (list 'f
                       (w/Pattern t1 (w/Blank))
                       (w/Pattern t2 (w/Blank))
                       (w/Pattern l1 (w/Blank))
                       (w/Pattern l2 (w/Blank))
                       (w/Pattern phi (w/Blank)))
                 I4--approx))
  (wl/eval (list 'f t1 t2 l1 l2 phi)))

is never evaluated as a function and simply remains as a symbol in the plot numbers. The code above itself looks strange and should probably be rewritten.

light-matters commented 2 days ago

Possibly fixed now. Rebuild the website to check.