[racket] Behaviour of gen:custom-write method

2014-05-17 Thread Hamish Ivey-Law
Dear Racket-users I am trying to understand the behaviour of the `gen:custom-write` method. What I find confusing is that the `write-proc` function is called twice for explicit calls to `write`, `display` or `print` and three times when display happens in the (x)repl. For example: -> (struct thi

[racket] FFI

2014-05-13 Thread Hamish Ivey-Law
Dear Racket users, I am writing an FFI binding for the C library we develop at work as a "my first Racket project". I have encountered a problem that I haven't been able to resolve regarding the functions SCHEME-TO-C and C-TO-SCHEME which are parameters to DEFINE-CPOINTER-TYPE. The simplified ve