[ale] LISP to C

Derek Atkins warlord at MIT.EDU
Wed Feb 22 10:08:19 EST 2012


Michael Trausch <mike at trausch.us> writes:

> This would be why you would never maintain the generated code. For example,
> the bulk of AllTray is written and maintained in Vala, which translates to
> C+GObject code. Vala is terribly convenient to use, at least in many cases; it
> is very C#-like. But some of AllTray is written directly in C, for things that
> weren't easy to do (at the time; I believe this has actually changed but I
> haven't looked at it yet).
>
> The thing is that while the Vala source files are in git, the generated C
> files are not. They are generated prior to shipping a tarball, so that users
> can compile the .c files and only need to have Vala installed if they want to
> modify the Vala code. Automake runs the Vala compiler as part of the "make
> dist" process, but doesn't compile the generated .c files, of course.
>
> If you seriously will benefit from time savings, consider something like Vala
> for your project. I believe the use of Vala has saved me a lot of time---more
> than I can even quantify. The important point is simply to maintain the source
> in your VCS and not the generated files. Pretend that the generated .c files
> are like ./configure; you ship it, but you do not craft it by hand nor track
> it in a VCS.

The GnuCash project does the same thing but in the opposite direction,
using swig to wrap the C api in Scheme and Python.  The swig .i files
are in SVN, but the generated wrapper code is not; it is generated with
make dist, so you only need swig if you build from SVN.

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the Ale mailing list