Re: [Pdl-general] [Pdl-devel] naming conventions

2024-02-07 Thread Ingo Schmid via pdl-general
Hi, I guess this is a NiceSlice thing, this one works in the pdl shell: $f=sub{$_[0]**2}; ... Ingo On 07.02.24 01:14, Luis Mochan wrote: On Tue, Jan 30, 2024 at 09:40:59PM -0600, Luis Mochan wrote: ...> On Mon, Jan 29, 2024 at 10:19:56PM -0500, David Mertens wrote: Hello Luis, Ever crafty

Re: [Pdl-general] [Pdl-devel] naming conventions

2024-02-06 Thread David Mertens
Nice find! :-) On Tue, Feb 6, 2024, 7:14 PM Luis Mochan wrote: > On Tue, Jan 30, 2024 at 09:40:59PM -0600, Luis Mochan wrote: > > ...> > > On Mon, Jan 29, 2024 at 10:19:56PM -0500, David Mertens wrote: > > > Hello Luis, > > > > > > Ever crafty, Perl gives you another way to solve this. You could

Re: [Pdl-general] [Pdl-devel] naming conventions

2024-02-06 Thread Luis Mochan
On Tue, Jan 30, 2024 at 09:40:59PM -0600, Luis Mochan wrote: > ...> > On Mon, Jan 29, 2024 at 10:19:56PM -0500, David Mertens wrote: > > Hello Luis, > > > > Ever crafty, Perl gives you another way to solve this. You could put your > > functions under another name space and invoke them by explicitly

Re: [Pdl-general] [Pdl-devel] naming conventions

2024-01-30 Thread Luis Mochan
Nice! I was not aware that Perl allowed calling a method from an unrelated package (if you take the risk). Thanks! Regards, Luis On Mon, Jan 29, 2024 at 10:19:56PM -0500, David Mertens wrote: > Hello Luis, > > Ever crafty, Perl gives you another way to solve this. You could put your > functions

Re: [Pdl-general] [Pdl-devel] naming conventions

2024-01-29 Thread David Mertens
Hello Luis, Ever crafty, Perl gives you another way to solve this. You could put your functions under another name space and invoke them by explicitly naming the package and function. For example, if you have a function "do_it" in package MY, you could invoke it as $pdl->MY::do_it(...args...) Fo

Re: [Pdl-general] [Pdl-devel] naming conventions

2024-01-28 Thread Luis Mochan
Thanks! Regards, Luis On Sun, Jan 28, 2024 at 04:25:27PM +, Ed . wrote: > Hi Luis, > > This is a long-standing issue in PDL. If your code creates a > PDL::somefunction, there is indeed a risk that someone else’s code also makes > a PDL::somefunction, and there will be a problem. Using “warn

Re: [Pdl-general] [Pdl-devel] naming conventions

2024-01-28 Thread Ed .
Hi Luis, This is a long-standing issue in PDL. If your code creates a PDL::somefunction, there is indeed a risk that someone else’s code also makes a PDL::somefunction, and there will be a problem. Using “warnings” in both modules will at least tell you it happened. A way to dodge this is to m