is it possible to convert LISP to C?

This is a discussion on is it possible to convert LISP to C? within the C Programming forums, part of the General Programming Boards category; Hello everyone, I would like to convert some Common LISP into C language. Is there a consolidated way to do ...

  1. #1
    fsx
    fsx is offline
    Registered User fsx's Avatar
    Join Date
    Apr 2009
    Posts
    29

    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

    FSX

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    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.

    --
    Mats
    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
    Posts
    312
    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.

    Greets,
    Philip
    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 Cprogramming.com
    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, 11:53 AM
  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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21