-
Notifications
You must be signed in to change notification settings - Fork 46
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
use Inline Pdlpp
fails in autoloaded scripts specifically in perldl
due to unsuppressable NiceSlicing
#497
Comments
Thank you for the report! Are you saying this is true in the latest PDL? I'm surprised because |
Please could you post a script here so I can have some chance of repro-ing this? |
I think it may be an interaction between the autocompiler and inline scripts. Here's a script that should, but does not, compile. Save as mandel.pdl in your PDL path and tell perldl "mandel()". |
Note: mandel.pdl (correctly) says "no PDL::NiceSlice" before the "use Inline Pdlpp" call, which switches off NiceSlice parsing as the file is executed. I haven't looked, but I suspect that the AutoLoader may be NiceSlice processing the entire eval string before executing it, which would override the "no PDL::NiceSlice" in the script itself (thereby corrupting the string being sent to Pdlpp). |
I just ran it with |
I have a repro case, added to |
@drzowie I was wrong and I didn't, but that's for a very good reason. It's a bug in That's because |
use Inline Pdlpp
fails in autoloaded scripts specifically in perl
due to unsuppressable NiceSlicing
use Inline Pdlpp
fails in autoloaded scripts specifically in perl
due to unsuppressable NiceSlicinguse Inline Pdlpp
fails in autoloaded scripts specifically in perldl
due to unsuppressable NiceSlicing
By the way, a bit of digging in the history suggests this particular treat has lain in wait since at least 2015. Please try with an older PDL and see if it worked there. |
Interesting. Thank you! Yeah, this code worked as recently as 2022, but I could have had an out-of-date perldl at that time. |
I tried 2.019 and it seemed to work fine, so it looks most like one of the changes I made to NiceSlice will have subtly changed what those parameters mean. Sorry for the inconvenience. By the way, I've been working on PDL::Graphics::Simple and making it able to do the graphics in the various PDL demos - I've had to add Speaking of which, the PDL website recently got the whole PDL Book on there as one web page. Comments on all the above welcome! p.s. Please could you fix the spelling of "autolaod" in your script? :-) |
Pdlpp code uses a lot of macros of the form $MACRO(params), which get turned by the NiceSlice filter into $MACRO->slice(params). That prevents the Pdlpp code from compiling. I recently updated PDL to the latest, and all my scripts with inline Pdlpp suddenly failed. I traced it to this issue. Even saying "no PDL::NiceSlice" in the code (which should suppress NiceSlice-ing below the "no" line) does not suppress the filtering.
I believe that anyone with inline Pdlpp code is currently unable to compile it.
The text was updated successfully, but these errors were encountered: