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

Module for easily using external packages #84

Closed light-matters closed 3 months ago

light-matters commented 4 months ago

It was simpler than I thought. Example package is included in resources and concise example is available in the 'package' namespace comment.

light-matters commented 4 months ago

Should the main function in base.package actually be in wolframite.core?

light-matters commented 4 months ago

Can't seem to use clay in packages.clj, but works fine for cavity_physics.clj on the scientists branch?

holyjak commented 4 months ago

Should the main function in base.package actually be in wolframite.core?

Yes, I think so.

Regarding Clay, what is your issue w/ it?

light-matters commented 3 months ago

Should the main function in base.package actually be in wolframite.core?

Yes, I think so.

Regarding Clay, what is your issue w/ it?

Putting a reference in core might actually be a problem due to cyclical dependencies. Problem for another day maybe.

Edit: I think I'll make this an issue as I wonder if it would actually make sense to make a more explicit API.

light-matters commented 3 months ago

@holyjak Regarding clay, my problem was trying to test ...make-html on files in the notebooks folder while running a normal REPL. I think it was just a dependency/alias issue.

holyjak commented 3 months ago

Should the main function in base.package actually be in wolframite.core?

Yes, I think so. Regarding Clay, what is your issue w/ it?

Putting a reference in core might actually be a problem due to cyclical dependencies. Problem for another day maybe.

I'd suggest the same approach that wolframite.impl.wolfram-syms.wolfram-syms/load-all-symbols does - i.e. take wl-eval as a parameter. Then you don't need to require core and core can require you, and provide fn w/ the same name but w/o the wl-eval argument, passing in core/eval instead.

light-matters commented 3 months ago

Having a look now

light-matters commented 3 months ago

@holyjak I think we're done here?

Theoretically, we should probably add some non-comment tests.

light-matters commented 3 months ago

Okay, now they're not just theoretical!