This is very hard ! aaaghh !

I am trying to declare a C callback in chicken scheme
that I can pass from scheme to C via a regular C defined
function.

https://wiki.call-cc.org/man/5/Module%20(chicken%20foreign)#callbacks

I am struggling with doing a simple POC.
Module (chicken foreign) - The CHICKEN Scheme wiki

IOW:

I have normal FFI working and now I want to
have the C side of things call something that
is from the scheme side.


[panic] callback invoked in non-safe context - execution terminated
https://wiki.call-cc.org/An%20extended%20FFI%20example

this is helping, also:

"Note that (location X) may be abbreviated as #$X."

So when i see

(g_signal_connect button "clicked" #$hello #f)
I know that #$hello is the same as (location hello)

An extended FFI example - The CHICKEN Scheme wiki

OK this is the move...

I need to make a simple single example of this
w/o any of the other context.

And then if I can't get that to work, I can email the
chicken mailing list and ask with the single example
as a reference.



META: This is almost always the winning move, and
the thing that turns giving up into success.