First, this is absolutely not referencing a racket bug.   I feel obligated to 
warn anybody that believes the assertion that GO now generates shared libraries 
consumable by no-GO code.

It's true.  Go generates a shared library, and you can call to it from Racket, 
but I can attest to two issues:

1) Expect crashes on OSX.   Go attempts to make its runtime system compatible 
with code anticipating a extern C interface.   There's lots of chatter with 
people running into "runtime/cgo: could not obtain pthread_keys", but none that 
mention Racket that I see.  However, it does crash inside of DrRacket on OSX.  
Googling delivers examples of Python and Node having similar crashes.

2) Dreadful speed.  Even when functioning, i.e. not on OSX, the speed is 
incredibly slow.  I believe that extern "C" style code runs in a separate GO 
routine and performance-hampering context switching is involved.   I'm talking 
about 1/35 of the speed of calling C/C++ from Racket.

So, this is just a warning to lower expectations if you are thinking about 
calling Go code from an FFI such as Racket's, or if you expect it to work on a 
Mac.  I hope the warning saves somebody a few hours of pain.

As always, thanks for Racket.



-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to