Thread: is it possible to convert LISP to C?

  1. #1
    Registered User fsx's Avatar
    Join Date
    Apr 2009

    is it possible to convert LISP to C?

    Hello everyone,

    I would like to convert some Common LISP into C language. Is there a
    consolidated way to do that?
    I am not an experienced programmer in both languages, but I know more C
    than LISP.
    Thanks in advance


  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Farncombe, Surrey, England
    Since it is possible to write a Lisp Interpreter/compiler in C, yes.

    Some of the things done in Lisp can be HARD to implement in C, but most of it shouldn't be very hard.

    If you are not good in Lisp, it may be a challenge, as it is not the easiest language to learn.

    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Complete Beginner
    Join Date
    Feb 2009
    Quote Originally Posted by fsx View Post
    I would like to convert some Common LISP into C language. Is there a
    consolidated way to do that?
    As matsp already exemplified, Lisp and C are both Turing-complete, which roughly means that both can compute any function that is considered to be computable. Hence for every Lisp program, there is a C program which does exactly the same thing and vice versa.

    But it's a bit like translating Chinese to English. There is an exact translation, but it will be hard to find in the general case. If you just have a couple of Lisp programs, it will probably be easiest to understand what they do and then re-implement the functionality in C, without looking at the Lisp code again.

    All things begin as source code.
    Source code begins with an empty file.
    -- Tao Te Chip

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  2. Lisp
    By Silvercord in forum A Brief History of
    Replies: 4
    Last Post: 08-26-2003, 12:41 PM
  3. Convert Char to Int Function
    By drdroid in forum C++ Programming
    Replies: 9
    Last Post: 02-19-2003, 12:53 PM
  4. IDEA: LISP Interpreter
    By ygfperson in forum Contests Board
    Replies: 4
    Last Post: 09-13-2002, 08:48 PM
  5. please help ... to convert date to string
    By mel in forum C Programming
    Replies: 1
    Last Post: 06-12-2002, 10:26 AM