On Mon, Jun 29, 2009 at 11:44 PM, Bjarke Hammersholt
Roune<bjarke.ro...@gmail.com> wrote:
>
> Hi Georg,
>
> I worked on a Cython interface to Frobby a few days ago, and from that
> experience I'll say that your project is a great idea!
>
> Here's one way to do it: I think it would work well to have a hands-on
> guide for how to write an spkg that installs a shared library into
> Sage with some simple function, like the square of an int. It could
> spell out exactly what to do at each step, from writing the C
> function, to building the library and writing the spkg-install, to
> writing the Cython interface, to registering the library and interface
> correctly with Sage, to writing the documentation and doctests, to
> putting an actual Python method into sage.libs.example.example.square
> that can be seamlessly called from within Sage. That is what I wished
> I had had before I started figuring out how to interface Sage with
> Frobby.
>
> There could be various additional information presented along the way
> offset in some typographical way to make it clear that it is
> additional. E.g. one additional piece of information could be why
> library names are doubled as in sage.libs.example.example (I've been
> wondering about that, and I have no idea). You could also attach the
> final spkg product at the end of the guide, tersely commented to say
> what each part is doing and why it is doing it that way.
>
> Cheers
> Bjarke

I have to comment that with the pexpect interfaces for Sage I made a
"template" for making new pexpect interfaces, and nobody would ever
use that.  Instead, they wisely would take an existing interface, and
adapt it to their use.   The advantage of that is nothing should be
broken (whereas templates don't even run, so are more likely broken),
and one has something
working to start with.    This suggests to me that it might be very
valuable to do everything suggested above with an *actual* spkg,
rather than a fake one.  Of the 99 spkg's in Sage, are any
sufficiently like you outline above?    Maybe we could promote one to
be a "model" spkg, and greatly improve its documentation.  Then when
people want to make their own library spkg, or whatever, we can just
say -- check out frobby-*.spkg (say), and it's the perfect
well-documened model of what you should do.

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to