Re: [Pharo-users] NativeBoost and variadic functions

2015-07-27 Thread Ben Coman
On Mon, Jul 27, 2015 at 9:56 PM, Igor Stasenko wrote: > >>> >>> And let me remind you that despite that NB implements FFI to speak with >>> C, it is not obliged to implement features of C language itself. It lets >>> you speak with C programs, but not lets you write programs like in C (see >>> the

Re: [Pharo-users] NativeBoost and variadic functions

2015-07-27 Thread Igor Stasenko
> > > > And let me remind you that despite that NB implements FFI to speak with > C, > > it is not obliged to implement features of C language itself. It lets you > > speak with C programs, but not lets you write programs like in C (see the > > difference? :) > > I wasn't implying that implicit typ

Re: [Pharo-users] NativeBoost and variadic functions

2015-07-16 Thread Ben Coman
On Fri, Jul 17, 2015 at 12:23 AM, Igor Stasenko wrote: > > > On 15 July 2015 at 16:35, Ben Coman wrote: >> >> On Wed, Jul 15, 2015 at 5:16 PM, Matthieu Lacaton >> wrote: >> > Hello Igor, >> > >> > Thanks for your answer. >> > >> > I implemented something like that for the printf function: >> > B

Re: [Pharo-users] NativeBoost and variadic functions

2015-07-16 Thread Matthieu Lacaton
> > Oh man... > and why would anyone may want to use this? :) > > Sure you can do whatever it takes to implement a feature you want so badly, > but hey.. > If something that takes so much effort and so inefficient as result, would > you consider abandon the idea and use something else instead? :) >

Re: [Pharo-users] NativeBoost and variadic functions

2015-07-16 Thread Igor Stasenko
On 15 July 2015 at 11:16, Matthieu Lacaton wrote: > Hello Igor, > > Thanks for your answer. > > I implemented something like that for the printf function: > Basically, it generates a method with matching arguments and executes it. > > *printf:* stringFormat *args:* tab >> >> | argNumber funct

Re: [Pharo-users] NativeBoost and variadic functions

2015-07-16 Thread Igor Stasenko
On 15 July 2015 at 16:35, Ben Coman wrote: > On Wed, Jul 15, 2015 at 5:16 PM, Matthieu Lacaton > wrote: > > Hello Igor, > > > > Thanks for your answer. > > > > I implemented something like that for the printf function: > > Basically, it generates a method with matching arguments and executes it.

Re: [Pharo-users] NativeBoost and variadic functions

2015-07-15 Thread Ben Coman
On Wed, Jul 15, 2015 at 5:16 PM, Matthieu Lacaton wrote: > Hello Igor, > > Thanks for your answer. > > I implemented something like that for the printf function: > Basically, it generates a method with matching arguments and executes it. > >> printf: stringFormat args: tab >> >> | argNumber fu

Re: [Pharo-users] NativeBoost and variadic functions

2015-07-15 Thread Matthieu Lacaton
Hello Igor, Thanks for your answer. I implemented something like that for the printf function: Basically, it generates a method with matching arguments and executes it. *printf:* stringFormat *args:* tab > > | argNumber functionArgs functionPrototype methodCorpse methodSelector > argsArray |

Re: [Pharo-users] NativeBoost and variadic functions

2015-07-13 Thread Igor Stasenko
On 10 July 2015 at 10:18, Matthieu Lacaton wrote: > Hello, > > Is it possible with NativeBoost to create a binding for a variadic > function ? > > I've seen the printf example in NBCPrinter but this implementation is kind > of cheating since it always pass just a %s as format and one already > fo

[Pharo-users] NativeBoost and variadic functions

2015-07-10 Thread Matthieu Lacaton
Hello, Is it possible with NativeBoost to create a binding for a variadic function ? I've seen the printf example in NBCPrinter but this implementation is kind of cheating since it always pass just a %s as format and one already formatted string to the C function. I've written a simple variadic