[plt-scheme] (lib "foreign.ss") and vararg C functions

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Fri Oct 7 17:50:22 EDT 2005

So one could create an "overloaded" printf library that picks up from 
C? -- Matthias

On Oct 7, 2005, at 5:45 PM, Eli Barzilay wrote:

> On Oct  7, Richard Cobbe wrote:
>> Is it possible to use (lib "foreign.ss") to call vararg C functions
>> (like printf) from within Scheme?  It would be really nice to say,
>> for example,
>>     (c-printf "%04d" n)
>> from time to time.
> One of the limitations of libffi is that each function description is
> fixed (unlike ffcall that was dropped due to its license).  But you
> can define several Scheme-printfs with different arities and types.
> On Oct  7, Robby Findler wrote:
>> I bet there something that does that in swindle. ...
> Surprising, but I never got to it...
> -- 
>           ((lambda (x) (x x)) (lambda (x) (x x)))          Eli 
> Barzilay:
>                   http://www.barzilay.org/                 Maze is 
> Life!
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.