Continuing the exploration @tealeg sparked yesterday: lazy-ffi in Chicken Scheme is nice.

$ csi
CHICKEN
(c) 2008-2021, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 5.3.0 (rev e31bbee5)
linux-unix-gnu-x86-64 [ 64bit dload ptables ]

Type ,? for help.
#;1> (import lazy-ffi)
; loading /var/lib//chicken/11/lazy-ffi.import.so ...
; loading /var/lib//chicken/11/lazy-ffi.so ...
; loading /var/lib//chicken/11/srfi-1.so ...
; loading /var/lib//chicken/11/srfi-69.so ...
; loading /var/lib//chicken/11/bind.so ...
#;2> (begin #~"libc.so.6")
(libc.so.6)
#;3> (#~printf "Hello, world. Mom is #%d! We %s her!\n" 1 "love")
Hello, world. Mom is #1! We love her!

https://wiki.call-cc.org/eggref/5/lazy-ffi

#chicken #scheme #ffi

lazy-ffi - The CHICKEN Scheme wiki

@mason I do like the way lazy-ffi uses read syntax, though you could of course do something similar with normal macros. I’m slowly exploring the forces on the Haiku API and I’m tempted to make a syntactic shortcut for this stuff. I won’t go too early though. Premature macroisation can really spoil things.