[racket] Bindings for libgsl (GNU Scientific Library)

From: Marco Maggi (marco.maggi-ipsu at poste.it)
Date: Fri May 25 01:36:13 EDT 2012

Jens Axel Søgaard wrote:

> I am  attempting to get Noels bindings  for libgsl working
> on my machine (OS X 64 bit).
>     https://github.com/noelwelsh/mzgsl

> My  problem  is  that  it  crashes DrRacket  and  I  can't
> pinpoint where it happens.

Cannot help with  OS X, but on my  GNU+Linux 32-bit with GSL
1.15 and Racket 5.1.2 the following works fine:

  $ git clone http://github.com/noelwelsh/mzgsl.git
  $ export PLTCOLLECTS=$PLTCOLLECTS:$PWD
  $ cat proof.sps
  #!r6rs
  (import (rnrs)
    (mzgsl gslvector))
  (define p (make-gslvector 3))
  (gslvector-fill! p 2)
  (display (gslvector->vector p))
  (newline)
  (gslvector-set! p 1 3.0)
  (do ((i 0 (+ 1 i)))
      ((= i 3))
    (display (gslvector-ref p i))
    (newline))

  $ plt-r6rs proof.sps
  #(2.0 2.0 2.0)
  2.0
  3.0
  2.0

HTH
-- 
Marco Maggi

Posted on the users mailing list.