[ale] LISP to C

Michael Trausch mike at trausch.us
Tue Feb 21 12:10:22 EST 2012


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.

--
Sent from my Ice Cream Sandwich-powered HTC G2
Please excuse any typos.
On Feb 21, 2012 11:18 AM, "Michael Campbell" <michael.campbell at gmail.com>
wrote:

> Beware, down this path lay demons!
>
> One of the problems with language-to-language conversions (unless the
> languages are already very similar, which these 2 are decidedly not =) is
> the complete loss of idioms in the language you convert to.  You *CAN*
> convert them of course, but they generally are, as mentioned below, almost
> totally unmaintainable if even readable at all.  I've been at companies
> that did these sorts of things in the past and they get you over an initial
> "hump" usually, but in the end any such code that had to be looked at later
> was always rewritten from scratch.  Some code of course never IS looked at
> again (standard libraries and such) and can remain, but after the
> institutional knowledge of it has faded, that code has a momentum of
> opacity too, and sometimes remains even when it SHOULD be looked at and
> modified.
>
>
>
>
>
> On Mon, Feb 20, 2012 at 12:25 PM, Watson, Keith <krwatson at cc.gatech.edu>wrote:
>
>> ==== begin quote ====
>>
>> Terry Bailey | 14 Feb 17:05
>> LISP to C
>>
>> Is there a way to convert LISP source code into readable C source code?
>>
>> ==== end quote ====
>>
>>
>> Terry posted the following question and I just happened to get asked the
>> same question today. Here is the answer:
>>
>> Yes sort of. It can be converted to human readable form but it may not be
>> very maintainable.
>>
>> convert lisp to c - I really didn't expect this search to work but it did.
>>
>> http://www.google.com/#hl=en&sclient=psy-ab&q=convert+lisp+to+c&pbx=1&oq=convert+lisp+to+c&aq=f&aqi=g1g-v2&aql=&gs_sm=3&gs_upl=39808l43803l5l44535l17l12l0l4l4l0l104l909l11.1l16l0&bav=on.2,or.r_gc.r_pw.r_qf
>> .,cf.osb&fp=d272a33775ff33c4&biw=1202&bih=750
>>
>> http://preview.tinyurl.com/6of4vok
>>
>>
>> is it possible to convert LISP to C?
>>
>> http://www.velocityreviews.com/forums/t683509-is-it-possible-to-convert-lisp-to-c.html
>>
>> http://preview.tinyurl.com/36vt4dq
>>
>>
>> ECL may do it
>> http://ecls.sourceforge.net/
>>
>>
>> CLiCC: Common Lisp to C Compiler
>>
>> http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/impl/clicc/0.html
>>
>> http://www.cliki.net/CLiCC
>>
>>
>> Chestnut Lisp translator - now defunct
>>
>> http://www.rhinocerus.net/forum/lang-lisp/425655-chestnut-lisp-translator.html
>>
>> http://groups.google.com/group/comp.lang.lisp/msg/88c50739f36e0b7e
>>
>>
>> Thinlisp - a possible successor to Chestnut Lisp translator
>> http://www.thinlisp.org/
>>
>>
>> GCL - an implementation of Common Lisp
>> http://www.gnu.org/software/gcl/
>>
>>
>> >From the LISP FAQ
>> http://www.cs.cmu.edu/Groups/AI/html/faqs/lang/lisp/part4/faq-doc-3.html
>>
>> Subject: [4-1a] Lisp to C translators
>>
>> Lisp-to-C Translator translates Common Lisp into human-readable ANSI
>> C.  Release 3.2 supports such features as CLOS, the condition system,
>> Lisp type declaration heeding, and Mac, Windows, and Alpha
>> compatibility.  (Release 3.0, introduced in 1992, eliminated the old
>> requirement that the garbage collector had to be called explicitly).
>> Works with Lucid, Symbolics, Allegro, Harlequin and MCL.  It costs
>> $11,995.  Write to: Chestnut Software, Inc., 2 Park Plaza, Suite 205,
>> Boston, MA, 02116, call 617-542-9222, fax 617-542-9220, or e-mail Mr.
>> Kenneth J. Koocher <ken at chestnut.com>.
>>
>> Some Lisp compilers (AKCL, Ibuki) and Scheme compilers (Bigloo,
>> Hobbit/SCM, Scheme->C) compile into C.
>>
>>
>> keith
>>
>> --
>>
>> Keith R. Watson                        Georgia Institute of Technology
>> IT Support professional Lead           College of Computing
>> keith.watson at cc.gatech.edu             801 Atlantic Drive NW
>> (404) 385-7401                         Atlanta, GA 30332-0280
>>
>>
>>
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://mail.ale.org/mailman/listinfo/ale
>> See JOBS, ANNOUNCE and SCHOOLS lists at
>> http://mail.ale.org/mailman/listinfo
>>
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20120221/c0de2edd/attachment.html 


More information about the Ale mailing list