Call Pan 6 procedure from Pan X

There have been a few recent posts lamenting the non-implementation of Pan 6 StatFuncs in Pan X. A simple solution to this problem is to call a Pan 6 procedure from Pan X. I’ve done this to speed up the calculation of a large number of prime numbers because Pan X doesn’t support the chunkfilter statement.

A “simple solution” as long as you are on an old system still capable of running 32 bit apps.

How big is the “large number of prime numbers”?

I’m still on High Sierra so I’d forgotten that so many people are on non-32-bit systems.

And the large number of primes is in the tens of thousands. I could easily generate them without needing chunkfilter - just open a beer and let it run. It was more an intellectual exercise than anything else.

I have an “Sieve of Eratosthenes” file out of the Panorama 6 days, where I tested some code samples from Bill Bush, Jay Schille, and David Thompson. The latter two were using the chunkfilter statement; I think I am now using a slightly modified version of Dave’s code without the chunkfilter statement.

This code in Panorama X finds 13848 primes from 2 to 150,000 in less than 11.2 seconds (running on my 2019 QuadCore i5 MacBook Pro with Big Sur).

It takes less than a couple of seconds in Pan 6 but what am I going to do with that saving? My real point was that calling a Pan 6 procedure may enable you to do something that is impossible in Pan X.

These must have been private messages to you? There are no public posts on this forum mentioning StatFuncs other than this one. Also, what is StatFuncs? I don’t recall ever hearing of it before.

Generating prime numbers is not really what Panorama is intended for. If I wanted to generate prime numbers, I wouldn’t use any version of Panorama.

Bingo. Only about 20% of users that have started Panorama X trials in the last 12 months are using an older version of macOS that would allow them to run a 32 bit app, and of course that percentage will continue to drop.

It’s my clear recollection that there have been a few concerns registered over the non-availablity of some P6 StatFuncs in PX but then the clarity of my recollections is on a steady downhill run.

StatFuncs is my shorthand for statements and/or functions. Anything that reduces the load on my arthritic hands is a benefit.

I’m regretting that I ever mentioned the prime numbers task. I chose it simply because the chunkfilter statement was one of my favourites.

And I apologise to all you 64-bit heroes. I’ll now crawl back into my warren and stay quiet.

Aha - I was thinking maybe it was a custom library that perhaps you had submitted that had slipped my mind.

I assume for tasks like finding prime numbers you are using chunkfilter as a way to process an array of integers that you have encoded into a binary value. I would propose that you might look into Panorama X’s new Data Array feature, which provides an officially supported method for handling an array of numeric values (I say “new” even though Panorama X has had this feature for more than six years). When an array of numbers is stored in a data array, you can use the arrayfilter statement (or function) to process it. I think you will probably find that this is a superior solution for working with arrays of numbers over using the chunkfilter statement.

Please don’t do that!