Inside 206-105

Existential Pontification and Generalized Abstract Digressions

Safety first: FFI and threading

Attention conservation notice. Don’t use unsafe in your FFI imports! We really mean it! Consider the following example in from an old version of Haskellwiki’s FFI introduction: {-# INCLUDE <math.h> #-} {-# LANGUAGE ForeignFunctionInterface #-} module FfiExample where import Foreign.C -- get the C types -- pure function -- "unsafe" means it's slightly faster but […]

  • July 9, 2010