Archived

This topic is now archived and is closed to further replies.

Recommended Posts

Well, I see alot of arguments about how great/horrible Lisp is. However, most of these posts don''t go too far into details. Can anyone post some links about Lisp for beginners (beginners to Lisp that is), or else explain any underlying concepts that makes the language so unique and worthwhile. Please, don''t flame away saying "Language xx is so much better than Lisp" ... I am just curious.

Share this post


Link to post
Share on other sites
bishop_pass    109
Lisp lets you meld with the problem you are solving easily and fluidly, rather than forcing you to fit the problem to the limitations of the programming language.

Share this post


Link to post
Share on other sites
TerranFury    142
quote:
Original post by bishop_pass
Lisp lets you meld with the problem you are solving easily and fluidly, rather than forcing you to fit the problem to the limitations of the programming language.

That sounds like something a Yoga instructor would say...

Share this post


Link to post
Share on other sites
Extrarius    1412
What is so great about Lisp?

I bought "ANSI Common Lisp" by Paul Graham, and so far its really good. The entire thing is about as big as an ANSI C reference book I have, but only about 1/4 of the "ANSI Common Lisp" book is a Language Reference [the rest being an intro to lisp {not just the basic stuff tho]). That alone tells me Lisp is a higher level lanuage.
I really like the infix syntax so far, and "code is data" seems nice. I still have a hard time reading the infix notation for ''long functions'' (say 7+ lines), but I can understand it with a little effort and about 10 seconds a line (about the same time per function it would take to read all the 100 lines it would take to do in C).

----------
Almost typo-ified using Extrarius'' AUTOMATIC Typo Generator, but I decided to be nice =-)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
I really, really recommend the following link: http://mitpress.mit.edu/sicp/full-text/book/book.html

It is the online version of "Structure and Interpretation of Computer Programs". This is one of the great books of computer science. It deals with scheme, a dialect of lisp which has some significant advantages over lisp, like lexical or dynamic scoping.

It is really worth reading it, if you want to get into lisp, scheme or functional programming in general.

Share this post


Link to post
Share on other sites
Colin Jeanne    1114
quote:
Original post by Extrarius
The entire thing is about as big as an ANSI C reference book I have, but only about 1/4 of the "ANSI Common Lisp" book is a Language Reference [the rest being an intro to lisp {not just the basic stuff tho]). That alone tells me Lisp is a higher level lanuage.



Why? If I wrote a book on BF most of the book would be an intro into BF and the language reference would only be a small portion of the book itself.



Qui fut tout, et qui ne fut rien
Invader''s Realm

Share this post


Link to post
Share on other sites
Extrarius    1412
Ok, so maybe not alone =-) but that plus the text I've read so far definitely show it is a higher-level language. It has several example functions(that are practical functions like token parsing, a breadth-first node search, etc) that would take 10+ times as much code to implement in C, and 5+ times as much code to implement in C++ {using the STL}.

From what I've read about other functional language, it seems like Lisp is the most practical and versatile of them all. Some supposedly more 'pure' functional languages (like Haskell) make some thing very difficult, but so far I haven't found much(I don't like the names of some functions) I don't like about Lisp other than the fact that I don't know it yet =-)

----------
Almost typo-ified using Extrarius' AUTOMATIC Typo Generator, but I decided to be nice =-)

[edited by - Extrarius on March 5, 2003 9:05:42 PM]

Share this post


Link to post
Share on other sites
bishop_pass    109
Extrarius, how come you don''t participate in the other Lisp thread you created? I added a lot of content there (not exactly what you''re looking for, I realize) but the thread is worth discussion.

The thread in question is the one about easy Lisp stuff that is hard in C/C++.

Share this post


Link to post
Share on other sites
bishop_pass    109
One thing I notice when I''m tinkering with Lisp is this:

1) First I''ll hardcode a subset of the solution just to see how it works. I get instant feedback while doing this.

2) Then, I see how the hardcoded sections can be migrated to a data set, where the code operates on the data. Nothing new here; we do this with most languages.

3) But here''s where it gets interesting. At the third stage, I notice how I can use Lisp to process the data, and build custom functions dynamically from the data. It''s almost as if I''m adopting an object centric paradigm, but my program is doing the final object oriented programming for me.

4) And then it gets more interesting. Following on using principle #3, stated above, I can add more data, either at programming time or interactively at runtime, and then the principle stated in #3 builds new code for me automatically, modifying and adding code at runtime, or progressively building up more over the full development cycle.

Share this post


Link to post
Share on other sites
Extrarius    1412
Well, I don''t have much to say in response really (and I forgot about the thread and I didn''t see it getting posts =-).
Also, often the subjects that get mentioned are over my head, as I''ve just started learning about academic and higher-level practical computer science. My computer science vocabulary is extremely limited.

Share this post


Link to post
Share on other sites
AndreTheGiant    329
I asked a similar quesion over on the AI forum (because lisp is primarily used for AI stuff, i think).

You should go read what they replied. Be warned though, i think near the end they just got mad at me for not knowing lisp enough...


http://www.gamedev.net/community/forums/topic.asp?topic_id=140658

Share this post


Link to post
Share on other sites
SabreMan    504
quote:
Original post by RedSweater
So does Python

No it doesn''t. Python doesn''t allow you to fit new operators into the language, or to evolve grammars to suit the needs of your problem domain.

Share this post


Link to post
Share on other sites
SabreMan    504
quote:
Original post by The Reindeer Effect
Well, I see alot of arguments about how great/horrible Lisp is. However, most of these posts don''t go too far into details.

You''re kidding, right?

Share this post


Link to post
Share on other sites
flangazor    516
quote:
Original post by SabreMan
You''re kidding, right?


I think he wants some code base to play with. e.g. master examples.

I know I would. I have been reading the lsp files for GCL, but the Tk interaction won''t work. Send is in the tk package; so I am having trouble trying the (send `foo `bar `baz) you mentioned in another thread.

Are you using another distrobution''s ffi when you talk about "send" and other inter-process communicating functions?

Share this post


Link to post
Share on other sites
quote:
Original post by SabreMan
You''re kidding, right?


Why, did I fart and make you giggle? If I was joking around, I would have done it somewhere more appropriate.

Of course that could have been a rhetorical question ...

Share this post


Link to post
Share on other sites
SabreMan    504
quote:
Original post by flangazor
I know I would. I have been reading the lsp files for GCL, but the Tk interaction won''t work. Send is in the tk package; so I am having trouble trying the (send `foo `bar `baz) you mentioned in another thread.

Are you using another distrobution''s ffi when you talk about "send" and other inter-process communicating functions?


I''m not sure what you''re referring to, you''ll have to jog my memory. For the record, I haven''t used Lisp with Tk, so I probably don''t know the answer to your question.
quote:
Original post by RedSweater
Python doesnt compile unless you count byte compiling...

I can''t be sure, but I think that was his sig.

Share this post


Link to post
Share on other sites
SabreMan    504
quote:
Original post by The Reindeer Effect
Why, did I fart and make you giggle? If I was joking around, I would have done it somewhere more appropriate.

I was referring to your suggestion that most Lisp posts "don''t go too far into details". There''s been a few Lisp threads lately, and some of them have been very long. Amongst the petty squabbling, I''ve gone into reasonable detail. Maybe you are really asking for something different?

Share this post


Link to post
Share on other sites
flangazor    516
In the ''Whats the deal with XML'' thread, you mentioned
(setf `(msg (....)))

I confused it with actual code you may or may not have used to pack messages.

Later on, however, you say

quote:
That doesn''t necessarily follow. It could have been any format, it just happened to be XML. For example, I''ve recently written a COM server in C++ which can generate s-expressions. I have a Lisp process which connects as a COM client and grabs s-expressions from the server and puts them into a Lisp read-eval loop. It works *really* well.


I would be /very/ interested in knowing how to do this. -is it Allegro dll''s? Corman ffi? I can''t seem to figure it out using GCL.

Share this post


Link to post
Share on other sites