Thread: LISP programming

  1. #1
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,732

    LISP programming

    Hi, Just started my new AI module at uni. And they started teaching LISP ( God i am confused with all those brackets everywhere in the code lol). Its totally different compared to other programming language. It looks like that I need to forget all my other programming exp and start fresh with this one lol.

    Any way, has anyone else worked with LISP before. How do u feel about it. Any advice please, since i am just a beginner. Any link for good compiler, IDE and book reference.

    I was looking for a good compile and i came up with this CLISP. Has any one used that before?

    Thanks

    ssharish

  2. #2
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    I've worked with it before in an AI class (also Prolog I think). I hated it. Too many parenthesis everywhere. It was just so different from everything else I'd done before. I did OK, but I never felt comfortable with it. Maybe I could get used to it, but not for just a one semester class.

    Advice? Not really... sorry. I try to avoid it and not think about it (traumatic experience and all )
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  3. #3
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,732
    lol if your expereince was like that, thinking of me in am just a beginner. So which compiler did u use? And more over my teacher is more confused as well on LISP lol. I wonder what is he going to do.

    ssharish

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Lisp is generally not a compiled language, but uses an interpeter.

    Many years ago, I wrote my own lisp interpreter (not quite a "full" version, but it works).

    Perhaps this one:
    http://directory.fsf.org/project/gcl/

    More LISP-related here:
    http://directory.fsf.org/category/lisplang/

    --
    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.

  5. #5
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,401
    Aye, Lisp looks terrible when you're used to looking at C or C++, but after you learn what you're looking at, it's not so bad. CLISP is the interpreter I usually use; it's not too bad. If you're looking for a book, I'd recommend ANSI Common LISP by Paul Graham. It did a pretty good job of translating me from C++ to Lisp; granted, the chapters on closures and macros took a few times.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

  6. #6
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    I have only done a little bit of true Lisp, but I have done quite a lot of Scheme (which is virtually the same thing).

    I use DrScheme as my interpreter.

    I don't think Lisp/Scheme is that bad though....but that may be because I was exposed to it very early. Although I am taking a Scheme class right now in uni, and this is the first time they have exposed it to us (being a junior), I had a good high school computer science teacher who exposed me to Lisp during my first year of learning C++, so I already had an idea of the parentheses and prefix notation.
    My Website

    "Circular logic is good because it is."

  7. #7
    aoeuhtns
    Join Date
    Jul 2005
    Posts
    581
    Common Lisp is a fine language, and Scheme is ok too. SBCL is a good free Common Lisp compiler. Lisp is a lot different than languages like C++, since everything that C++ adds to C is a lame attempt to add some ability that Lisp provides with no effort at all.
    There are 10 types of people in this world, those who cringed when reading the beginning of this sentence and those who salivated to how superior they are for understanding something as simple as binary.

  8. #8
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by Rashakil Fol View Post
    Lisp is a lot different than languages like C++, since everything that C++ adds to C is a lame attempt to add some ability that Lisp provides with no effort at all.
    I've really got to disagree with that. C++ allows you to easily break into a pseudo-functional or Lisp'ish style of coding when it makes sense, and go right back to procedural and traditional object oriented techniques when it doesn't make sense. Yeah, you could probably write more "elegant" code in pure Lisp, or Haskell or Prolog for that matter but good luck finding a seasoned development team for anything large-scale.

    I do not denigrate Lisp whatsoever -- I love it. But I had to respond to the claim that everything in C++ is just a lame imitation of something else. C++ is deliberately required to be interoperable to a large degree with existing C code. That really constrains how certain things have to be implemented in the language.

  9. #9
    aoeuhtns
    Join Date
    Jul 2005
    Posts
    581
    I don't see why you perceive that as an attack on C++, when it's just an explanation of how Common Lisp doesn't suck. And CL is not an elegant language. It's a big, monstrous language.
    There are 10 types of people in this world, those who cringed when reading the beginning of this sentence and those who salivated to how superior they are for understanding something as simple as binary.

  10. #10
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by Rashakil Fol View Post
    I don't see why you perceive that as an attack on C++, when it's just an explanation of how Common Lisp doesn't suck.
    You said: "everything that C++ adds to C is a lame attempt ."

    And CL is not an elegant language. It's a big, monstrous language.
    I didn't say anything about the elegance of the language. I was talking about the elegance of solutions written in the language. If you don't like the inelegant parts of the language, don't use them.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help on LISP please?
    By ssharish2005 in forum Tech Board
    Replies: 1
    Last Post: 02-08-2008, 10:12 AM
  2. Help with with Lisp Reader Technique
    By tuxinator in forum C Programming
    Replies: 15
    Last Post: 05-07-2006, 05:30 PM
  3. LISP (DrScheme) any one?
    By Jeremy G in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 03-31-2004, 12:52 PM
  4. Lisp
    By Silvercord in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 08-26-2003, 12:41 PM
  5. IDEA: LISP Interpreter
    By ygfperson in forum Contests Board
    Replies: 4
    Last Post: 09-13-2002, 08:48 PM