unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Guile and GSL
@ 2010-03-07 12:38 Jason R. Green
  2010-03-07 17:16 ` Ludovic Courtès
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jason R. Green @ 2010-03-07 12:38 UTC (permalink / raw)
  To: guile-devel

Guile and GSL are two great GNU packages for building scientific
computing software. In my own work I need support for GSL data types
(e.g., vectors, matrices) and my own types built from them. I know
this has come up in the past:

(1) http://www.gnu.org/software/guile/manual/html_node/Starting-and-controlling-the-interpreter.html
(2) http://sources.redhat.com/ml/guile/1998-10/msg00332.html
(3) http://sources.redhat.com/ml/guile/1998-10/msg00431.html

I also read about a similar project
(http://community.schemewiki.org/?GEE-Guile-GSL) being withdrawn from
Gna! but I can't find the thread now. What is the current consensus in
the guile-devel community? Is there interest in this line of
development?

I'm a user of GSL and new to Guile, but I've tried to make some
progress in this direction with the scm_ interface. What I've done
rather closely follows the Guile manual and the available tutorials,
like Michael Gran's book ``How to extend C programs with Guile''.
Though it isn't much, I'd be happy to share what I have so far.

I have gsl_matrix and gsl_vector smobs, their make, mark, free, and
print functions, as well as wrapper functions that zero each. I also
have functions for converting between GSL and SCM vectors.
Unfortunately, as discussed in the threads at (2) above, defining new
smobs may not be the best approach.

I'm willing to learn and contribute to future development, would
appreciate any advice on how to best proceed, and welcome any thoughts
or suggestions.

Thanks,
Jason Green




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Guile and GSL
  2010-03-07 12:38 Guile and GSL Jason R. Green
@ 2010-03-07 17:16 ` Ludovic Courtès
  2010-03-07 18:50   ` Jason R. Green
  2010-03-07 19:41 ` Mike Gran
  2010-03-10 15:21 ` Jason R. Green
  2 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2010-03-07 17:16 UTC (permalink / raw)
  To: Jason R. Green; +Cc: guile-devel

Hello,

"Jason R. Green" <jg525@cam.ac.uk> writes:

> Guile and GSL are two great GNU packages for building scientific
> computing software. In my own work I need support for GSL data types
> (e.g., vectors, matrices) and my own types built from them. I know
> this has come up in the past:
>
> (1) http://www.gnu.org/software/guile/manual/html_node/Starting-and-controlling-the-interpreter.html
> (2) http://sources.redhat.com/ml/guile/1998-10/msg00332.html
> (3) http://sources.redhat.com/ml/guile/1998-10/msg00431.html
>
> I also read about a similar project
> (http://community.schemewiki.org/?GEE-Guile-GSL) being withdrawn from
> Gna! but I can't find the thread now. What is the current consensus in
> the guile-devel community? Is there interest in this line of
> development?

I think having Guile bindings to GSL would be great.  Which line of
development are you referring to?

FWIW, I think it would be great if these bindings were eventually
integrated in the GSL package proper.  To that end, you should make sure
to follow the GNU Coding Standards, to provide good test coverage and
documentation, and to make sure copyright can be assigned to the FSF.

[...]

> I have gsl_matrix and gsl_vector smobs, their make, mark, free, and
> print functions, as well as wrapper functions that zero each. I also
> have functions for converting between GSL and SCM vectors.
> Unfortunately, as discussed in the threads at (2) above, defining new
> smobs may not be the best approach.

I suppose SRFI-4 homogeneous numeric vectors[*] would be a good fit for
GSL vectors and matrices, and you wouldn’t need to create any new SMOB
type.  That said, I’m sure you know GSL much better than me.  :-)

Thanks,
Ludo’.

[*] Note that in 1.9 the ‘(srfi srfi-4 gnu)’ module provides vectors of
    complex numbers in addition to those defined by SRFI-4.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Guile and GSL
  2010-03-07 17:16 ` Ludovic Courtès
@ 2010-03-07 18:50   ` Jason R. Green
  0 siblings, 0 replies; 7+ messages in thread
From: Jason R. Green @ 2010-03-07 18:50 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-devel

Hi,

> I think having Guile bindings to GSL would be great.  Which line of
> development are you referring to?

Oh, I was referring to the development of Guile bindings for GSL, in general.

> FWIW, I think it would be great if these bindings were eventually
> integrated in the GSL package proper.  To that end, you should make sure
> to follow the GNU Coding Standards, to provide good test coverage and
> documentation, and to make sure copyright can be assigned to the FSF.

Thanks for your suggestions. I will do.

> I suppose SRFI-4 homogeneous numeric vectors[*] would be a good fit for
> GSL vectors and matrices, and you wouldn’t need to create any new SMOB
> type.  That said, I’m sure you know GSL much better than me.  :-)

The SRFI-4 homogeneous numeric vectors do seem to be designed for this
purpose. My SMOB approach was entirely because of my familiarity with
GSL's interface and my unfamiliarity with Guile.

Thanks!
Jason




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Guile and GSL
  2010-03-07 12:38 Guile and GSL Jason R. Green
  2010-03-07 17:16 ` Ludovic Courtès
@ 2010-03-07 19:41 ` Mike Gran
  2010-03-07 20:05   ` Jason R. Green
  2010-03-10 15:21 ` Jason R. Green
  2 siblings, 1 reply; 7+ messages in thread
From: Mike Gran @ 2010-03-07 19:41 UTC (permalink / raw)
  To: Jason R. Green, guile-devel

> From: Jason R. Green jg525@cam.ac.uk

I'm a user of GSL and new to Guile, but I've 
> tried to make some
progress in this direction with the scm_ interface. What 
> I've done
rather closely follows the Guile manual and the available 
> tutorials,
like Michael Gran's book ``How to extend C programs with 
> Guile''.
Though it isn't much, I'd be happy to share what I have so 
> far.

I really need to update or delete that doc.  It is obsolete.
Unfortunately, there isn't really anything out there to 
replace it.

-
Mike Gran




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Guile and GSL
  2010-03-07 19:41 ` Mike Gran
@ 2010-03-07 20:05   ` Jason R. Green
  0 siblings, 0 replies; 7+ messages in thread
From: Jason R. Green @ 2010-03-07 20:05 UTC (permalink / raw)
  To: Mike Gran; +Cc: guile-devel

Hi Mike,

>> [...] Michael Gran's book ``How to extend C programs with Guile''.

> I really need to update or delete that doc.  It is obsolete.
> Unfortunately, there isn't really anything out there to
> replace it.

It's been a tremendous help to me. The conciseness, clarity, and
message still have value, I think. I hope you decide to update it.
I've modified many of your examples to remove the deprecation warnings
under guile-1.8, if you do decide to update. It was in reading your
document, while trying to extend one of my C programs, that I realized
I needed bindings for GSL.

Jason




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Guile and GSL
  2010-03-07 12:38 Guile and GSL Jason R. Green
  2010-03-07 17:16 ` Ludovic Courtès
  2010-03-07 19:41 ` Mike Gran
@ 2010-03-10 15:21 ` Jason R. Green
  2010-03-10 16:25   ` Ludovic Courtès
  2 siblings, 1 reply; 7+ messages in thread
From: Jason R. Green @ 2010-03-10 15:21 UTC (permalink / raw)
  To: guile-devel

Hi,

[...]
> Though it isn't much, I'd be happy to share what I have so far.
>
> I have gsl_matrix and gsl_vector smobs, their make, mark, free, and
> print functions, as well as wrapper functions that zero each. I also
> have functions for converting between GSL and SCM vectors..
[...]

I've made this available via github: http://github.com/jrgreen/guile-gsl

Jason




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Guile and GSL
  2010-03-10 15:21 ` Jason R. Green
@ 2010-03-10 16:25   ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2010-03-10 16:25 UTC (permalink / raw)
  To: Jason R. Green; +Cc: guile-devel

Hello,

"Jason R. Green" <jg525@cam.ac.uk> writes:

> [...]
>> Though it isn't much, I'd be happy to share what I have so far.
>>
>> I have gsl_matrix and gsl_vector smobs, their make, mark, free, and
>> print functions, as well as wrapper functions that zero each. I also
>> have functions for converting between GSL and SCM vectors..
> [...]
>
> I've made this available via github: http://github.com/jrgreen/guile-gsl

Note that if you’re targeting Guile 1.9/2.0, you don’t need SMOB mark
functions here (info "(guile) Smobs") and you don’t need explicit
‘scm_gc_free ()’ calls (info "(guile) Memory Blocks").

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-03-10 16:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-07 12:38 Guile and GSL Jason R. Green
2010-03-07 17:16 ` Ludovic Courtès
2010-03-07 18:50   ` Jason R. Green
2010-03-07 19:41 ` Mike Gran
2010-03-07 20:05   ` Jason R. Green
2010-03-10 15:21 ` Jason R. Green
2010-03-10 16:25   ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).