Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better support for output formatting used by external WL packages #323

Open
LoganJFisher opened this issue Dec 27, 2024 · 6 comments
Open

Comments

@LoganJFisher
Copy link

I've been asked by my advisor to make use of the xAct suite of packages for our research, and I'd love to use WLJS if I can, rather than use some of our rather limited funding for a Wolfram license. Is this currently supported?

If packages are supported, do you have a quick guide anywhere for using packages with WLJS?

@JerryI
Copy link
Owner

JerryI commented Dec 27, 2024

Yes, it is the same as for normal Wolfram Kernel.

I checked your package, it seems it does not take advantage of a standard paclets, which can be installed from a single file (using PacletInstall) or URL.

However, I located Applications directory using (as it was written in installation manual)

$UserBaseDirectory // SystemOpen 

and copied xAct folder to Wolfram/Applications.

Then after a restart I checked

Screenshot 2024-12-27 at 20 58 12

it hanged, it aborted and evaluated again. After that it seems is is working, however, not all options for the formatting are supported in WLJS

Screenshot 2024-12-27 at 21 04 10

We need to check it more carefully. But in general the answer is yes, all WL packages can be loaded as usual.

@LoganJFisher
Copy link
Author

Okay, I believe I did as you said. When I ran "<<xActxTensor", I got two messages:

  1. System Too many print messages. The output was suppressed
  2. Warning Dummy::shdw: Symbol Dummy appears in multiple contexts {xActxTensor,JerrylWLX}; definitions in context xActxTensor may shadow or be shadowed by other definitions.

The following printed:
XVItQKq

Then upon trying to run "DefTensor[U[-a,-b],M4,Antisymmetric[{-a,-b}]]" as you did, I received the following message:

  1. Warning DefTensor::invalid: -a is not a valid index at definition.

And nothing printed.

@JerryI
Copy link
Owner

JerryI commented Dec 30, 2024

Warning DefTensor::invalid: -a is not a valid index at definition.

If I am not mistaken, you need to run more functions from the package to define some rules on U, a and etc. I skipped this part on the screenshot.

There is a documentation in a form of presentation, you can try to follow it.

And nothing printed.

It looks like it is a feature of this package. It quite often returns nothing, and sometimes prints the results. A bit unusual.

Warning Dummy::shdw: Symbol Dummy appears in multiple contexts

Hope it won't clash. This is a common problem in Mathematica/Wolfram, where some symbols can be shadowed. At least, when I was trying out some things with xTensor, it seemed it did not introduce any troubles.

@LoganJFisher
Copy link
Author

Well, ultimately my goal was to use the HiGGS package (as a dependent on the aforementioned xACT), and I'm confident that I got everything installed correctly, but as you said — it seems WLJS isn't yet at a point where it supports all of the formatting for different packages.

I hope you're able to add universal formatting support in the future, but for now it seems I'll have to look into just getting a Wolfram license for this. Thank you for the support in the meantime.

@JerryI
Copy link
Owner

JerryI commented Dec 31, 2024

Well, ultimately my goal was to use the HiGGS package (as a dependent on the aforementioned xACT), and I'm confident that I got everything installed correctly, but as you said — it seems WLJS isn't yet at a point where it supports all of the formatting for different packages.

I hope you're able to add universal formatting support in the future, but for now it seems I'll have to look into just getting a Wolfram license for this. Thank you for the support in the meantime.

You are welcome :)

I will try to experiment with HiGGS, it might be not a big issue to support necessary symbols for formatting. Unfortunately, I can't predict when it might be ready. It is better for your research to use more reliable tools in this sense.

PS: In principle Jupyter Notebook (or VSCode extension) should also output print messages, but in a form of images. I don't know, but it might suit your goals...

@JerryI JerryI changed the title Is there support for packages? Better support for output formatting used by external WL packages Dec 31, 2024
@LoganJFisher
Copy link
Author

I just gave Jupyter Labs (via Anaconda) a try with the Wolfram 14.1 kernel. Just like WLJS, though, the output from the test code given on the HiGGS repository just isn't really human readable. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants