Re: [ please ] request for perl machine learning utils development

2019-08-29 Thread Fernando Santagata
I started working on Tensorflow, but I've been sidetracked by another more urgent project, libxml2. I don't know when I will be able to work on Tensorflow again, since libxml2 is quite a large library (and Tensorflow C API, besides being large, is not adequately documented). On Wed, Aug 28, 2019 a

Re: [ please ] request for perl machine learning utils development

2019-08-29 Thread Wesley Peng
Hi on 2019/8/29 15:56, Fernando Santagata wrote: I started working on Tensorflow, but I've been sidetracked by another more urgent project, libxml2. I don't know when I will be able to work on Tensorflow again, since libxml2 is quite a large library (and Tensorflow C API, besides being large,

nativecall and variable argument lists

2019-08-29 Thread Marcel Timmerman
Hi, Is there a way to declare a native sub in such a way that it can handle variable argument lists? For example sprintf()? While I'm at it, another question; I need to define native subs which can receive a function as an argument to be used as a callback. Why do I have to specify the signa

Re: nativecall and variable argument lists

2019-08-29 Thread Vittore Scolari
Hello, Thanks to the amazing job Lizmat did to implement runtime signatures it can be done. You could also probably add some caching of the signatures and the functions. I didn’t benchmark. Here the code: use NativeCall; sub pera-int-f(Str $format, *@args) {     state $ptr = cglob

Re: nativecall and variable argument lists

2019-08-29 Thread Vittore Scolari
In your case, I think that you want something like the following, wish you an enjoyable amount of hacking! sub your_stuff(&callback) { ... like pera-int-f before my @parameters := &callback.signature.params;      my $signature = Signature.new(params => (   Othe

Re: nativecall and variable argument lists

2019-08-29 Thread Marcel Timmerman
On 8/29/19 6:10 PM, Vittore Scolari wrote: Thank you very much for your examples. After your first message, I already had some ideas how to tackle the second question of mine. But your 2nd example came first and helps me a lot. Now busy with first,the variable arguments list... Thanks again.