bug-recutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-recutils] GSoC 2013 : Python support


From: Jose E. Marchesi
Subject: Re: [bug-recutils] GSoC 2013 : Python support
Date: Tue, 09 Apr 2013 20:15:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Hi Adam.
    
     I am Adam, FLOSS enthusiast from Poland with strong open source
    background ( KDE, Tux4Kids, ... ) currently working on GNU
    Gnutrition.  An idea of empowering Python with Recutils sounds
    great. I've just cloned a repository and I am browsing the
    sources. There is a file Python/recmodule.c written by you. This
    file seem to be a stub, a good beginning. Is there anything more
    describing your vision of that module?

What I think is important for any high-level wrapper is to perform a
proper translation between the C abstractions and the high-level
language abstractions.  So, for example, the best incarnation of a
record in python could be an opaque object, whereas the best option for
lisp would probably be a list.

So you see, the main work to be done in the SOC project is to decide
_how_ to export the functionality provided by librec to python, and not
the mere development of the wrapper.  A direct mapping from the C
functions to python/whatever methods/whatever would not be very useful
IMO.  That is why I am skeptical with respect SWIG and similars.

rec.h is a big file.  It provides two kind of interfaces:

- A big set of low-level functions to manipulate fields, records, types,
  selection expressions, field expressions, etc.

- A small set of high-level functions providing the same functionality
  than the command-line recutils: rec_db_query, rec_db_insert,
  rec_db_delete, rec_db_set.
    
We have to determine how to tackle with both interfaces.

Welcome, btw :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]