Archived

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

bishop_pass

Lisp is King

Recommended Posts

bishop_pass    109
Lisp is King. Is that enough to start a thread? (setf fruits '(apples oranges pears bananas)) Lisp is outrageously fun. Why do we need this thread? Well, all of us Lounge Lisp Lizards apparently like to discuss and promote Lisp. Sometimes our discussions get too specific in the General Programming Forum, or overwhelmed by all of the C++ class and vector discussions. Why don't we just rename that forum the C++ Forum? I'd like to discuss (and debate) Lisp here. Everything. Not just Arc. Not just XML. Not just AI. All of it. I want people who disagree with Lisp or despise it to participate. I want people who advocate it to participate. I want people to share Lisp snippets of code. I need this. I am no Lisp expert myself when it comes to programming in Lisp. But I'm an expert with regard to much of what has been accomplished with Lisp. I also wrote a mini Lisp interpreter ten years ago. A good thread to raise Lisp awareness would be great. But not specific to any particular problem domain or contentious topic. Yes, we can encompass all of that, and go off on topics with regard to those subjects, but let's not limit ourselves to one domain. [edited by - bishop_pass on March 6, 2003 6:19:52 PM]

Share this post


Link to post
Share on other sites
kill    146
You and SabreMan raised so much fuss about Lisp that I decided to free my mind. I bought "ANSI Common Lisp" yesterday night. Once the book gets here we''ll see where I''ll lean

Talk about freeing ones mind, I also bought "Modern C++ Design". Heard it''s supposed to blow my mind, but that''s a descussion for a different thread.

Share this post


Link to post
Share on other sites
bishop_pass    109
One tactic I was describing in another thread that you can adopt with Lisp is the idea of having the runtime program add to its own capabilities through interfacing with the user. The user enters data (or knowledge), and the Lisp program converts this into Lisp code and adds it into its core set of usable code.

Share this post


Link to post
Share on other sites
bishop_pass    109
One of the things I''ve always advocated is to get familiar with the big projects that have been done in Lisp in academic circles. This might run counter to the idea of learning Lisp for more mundane tasks, but by seeking out those academic projects, one gets a flavor of the different programming paradigm one can implement with Lisp.

Learning how to do a Quicksort, or a vector library in Lisp is all well and good, but it''s nor very imaginative. The problem with, say, implementing a vector library in Lisp as a learning process, is it teaches how to convert a standard programming solution into a Lisp solution. This is good and bad, in my opinion. It''s good, because it''s necessary and helps you convert your standard programming methodology to Lisp, but it''s bad, because it doesn''t let you see the possibilities with Lisp.

The best way to really see the possibility with Lisp is to seek out a program written in Lisp, and then realize that to implement that program using another programming language would actually require you to write a Lisp interpreter. That''s where the real power and paradigm shift evident in Lisp becomes apparent.

Unfortunately, two programs that illustrate that potential better than any other that I have come across are AM and EURISKO, whose papers are not available online. They are available in the Artificial Intelligence journal likely available at your local university library.

If someone else is aware of the type of programming paradigm that I am speaking of (the one that would require one using another language to actually implement a Lisp interpreter before the program could effectively be written) then state what those example Lisp programs are. I''m sure there are many out there. Another example might be Karl Sims'' genetic programming example which creates graphic images. I''ll probably have more to say about that program later. I already mentioned it in another thread.

Another example where Lisp likely has great potential is with L-systems.

Share this post


Link to post
Share on other sites
DerekSaw    243
I''ll going to the book stores *hint* *hint* this weekends.
I read few chapters on "A Gentle Introduction" (free download) to Lisp... I could feel that Lisp contains the most basic form of elements in programming.

Share this post


Link to post
Share on other sites
bishop_pass    109
Out of Control discusses Karl Sims' program. In another thread, I mentioned the significance of this, and here's what I believe it is: Each of the works created by Sims' program have a unique style. Traditional languages tend to produce work which is undeniably stamped with a fixed style that doesn't seem to change. Yes, we change the parameters, and the output changes, but in the end, it bores us, because we can see it's very monotone with respect to its style.

We see the same in the behavior or NPCs, or CRPG worlds. In the end, the product suffers from what I would call inflexible growth. The problem is that although the parameters can be adjusted, the underlying functionality can't be. This dovetails with what I was saying in an earlier post in this thread where I said that Lisp allows the user to update and add to the functionality of the program at runtime, not necessarily through programming in Lisp, but in using the interface that the program provides.

[edited by - bishop_pass on March 6, 2003 8:11:19 PM]

Share this post


Link to post
Share on other sites
Extrarius    1412
I reccomend the book "ANSI Common Lisp" if you want a book. I find it to be a lot better than the free books on the internet, and it explains things in a way that(imo) help move to the different way of thinking needed to use Lisp effectively. It also has a function reference in the back, and it has lots of examples of real Lisp code (like token parsing, pathfinding, etc). It also shows how almost every Lisp function could be implemented using other Lisp functions and gives a lot of examples of doing so (though the examples aren''t full implementations of the functions, they do the basics. they just don''t support all the extra options).

Share this post


Link to post
Share on other sites
CpMan    532
I think it would be interesting to see some debate from the other side. The people who have used and do not like lisp. Since there don''t seem to be many lisp users here in the first place, I don''t think the chances of getting a counterargument are very likely. The only thing I have heard counter to it is that it is a broken implementation of lambda calculus.



Gamedev for learning.
libGDN for putting it all together.
An opensource, cross platform, cross API game development library.

Share this post


Link to post
Share on other sites
Tron3k    660
Yes, I would also like a good recommendation on a free Lisp implementation for Win32. There are so many, it is hard to choose! Preferably one that can compile (if that''s even possible!), and can link to external libraries so you could maybe use OpenGL and stuff. I might really get into this Lisp stuff - it sounds exciting.

Firebird Entertainment

Share this post


Link to post
Share on other sites
Naaga    208
Lisp looks really interesting. I''d like to learn more about it. What programming paradigms does it support? How does it work? What is it good for?
quote:
Out of Control discusses Karl Sims'' program.

That is the most interesting bit of reading I''ve done in a long time. If anyone has more links on Lisp and what it can do, I''d love to see them.


500x9

Share this post


Link to post
Share on other sites
Extrarius    1412
quote:
Original post by Naaga
[...]If anyone has more links on Lisp and what it can do, I''d love to see them.[...]


Check out my profile, I''ve started several posts about Lisp that have gotten many replies (particularly the "What is so great about Lisp?" thread)

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

Share this post


Link to post
Share on other sites
bishop_pass    109
quote:
Original post by Tron3k
Preferably one that can compile (if that''s even possible!)

Don''t they all pretty much compile? Lisp is a compiled language, you know. It benchmarks close to C and C++.

Share this post


Link to post
Share on other sites
bishop_pass    109
quote:
Original post by Tron3k
You could do the same thing in PERL.

I wouldn't be so quick to say that you can do the same things in Perl. While you can create Perl expressions with your Perl program at runtime, and evaluate them, you don't have at your fingertips the parse tree of the expression, giving you the ability to instantly and easily dissect and substitute functions within the evolving program. By the time you got around to coding the correct string substitution code, it would get less and less elegant, and it certainly wouldn't be anywhere as fast as the Lisp version.

But more to the point, if you really think Perl does compare to how it's done in Lisp, then you're definitely missing the differences in the paradigms between the two languages.

[edited by - bishop_pass on March 7, 2003 3:47:52 AM]

Share this post


Link to post
Share on other sites
SabreMan    504
quote:
Original post by smart_idiot
Any tips and/or recommendations for anyone who would like to try it?

Yeah. Do it.
quote:
Original post by DerekSaw
I could feel that Lisp contains the most basic form of elements in programming.

Programming with Lisp is like programming directly with Abstract Syntax Trees. Lisp macros are used for performing automated transformations on the trees, and there is some amount of manual manipulation too. You can build whatever abstractions you choose around the structure, just to prevent any claims of "that sounds really primitive". The CL Standard defines a fairly hefty set of abstractions for general purpose programming. When those don''t suit your domain-specific needs, you get to define the constructs which map very closely with the domain concepts, and they fit seamlessly into the language.
quote:
Original post by evil sausage
Yeah the "what''s so great lisp?" thread only lasted 7 pages.

Gee, that was constructive.
quote:
Original post by CpMan
The only thing I have heard counter to it is that it is a broken implementation of lambda calculus.

It''s not meant to be an implementation of lambda calculus, it''s merely inspired by it. Lambda calculus is insufficient for real-world large-scale programming, and Lisp makes concessions to the real-world.
quote:
Original post by Tron3k
Yes, I would also like a good recommendation on a free Lisp implementation for Win32. There are so many, it is hard to choose! Preferably one that can compile (if that''s even possible!), and can link to external libraries so you could maybe use OpenGL and stuff.

Start here. There are links which will take you to various downloads.
quote:

I might really get into this Lisp stuff - it sounds exciting.

It is. Although Lisp has been around in one incarnation or other for a long time, it still stands as the most modern of programming languages.

Share this post


Link to post
Share on other sites
SabreMan    504
The most commonly repeated criticism of Lisp on these boards, and elsewhere is that Lisp cannot be much good because it has not been an astounding commercial success. To answer that concern, I'd like to quote one of my favourite Usenet contributors, the inimitable genius that is Mr. Erik Naggum...

quote:
Original here
| Bottom line: The proof of which is better (C++ or Lisp) is to look at
| the commercially successful applications.

this is obviously a convenient argument as long as what you already think is better is also commercially successful. however, is your taste in music or entertainment equally likely to argue for "commercially successful" over other qualities? when does "commercially successful" break down as _the_ argument to support something? my take: when what you think is best is not the most commercially successful thing around, or when what you think is commercially successful is bad for some reason or another, like drugs.

it is extremely interesting to watch people who argue for the choice of the "people" or the "market" through whatever is "commercially successful", and see their arguments against things they don't like (popular music), think are immoral (pornography), or otherwise find reasons to consider exceptions
to their sure-fire rule of quality.

in other words, the "commercially successful" argument is a statement of shallowness on the part of he who uses that argument.

| If Lisp is such a hot language, how come most applications are all
| written in C and C++?

I have news for you: they are not written in C or C++, either.

| Is that that Lisp is not used because it's difficult to read and
| maintain? Is Lisp's problem lack of performance, portability, what?
| Must be some major weaknesses.

yes, there are major weaknesses, but as with everything else in our market society, perception is more important than facts. for instance, the negative attitude among programmers to languages they were taught by people who didn't know them, and perpetuated myths about Lisp instead of teaching. include in this "attitude problem" such articles as your own that display no interest in learning facts about Lisp, but instead insist on finding mostly invalid reasons not to look at it. no matter how good the language is, the kind of marketing that would be necessary to convince you to look at Lisp has nothing to do with your actual arguments against it.

if C and C++ are so hot, how come they haven't always been? how did they become hot? how did they overcome the "how come most applications are all written in Fortran and Cobol" argument? how does Java face the same argument?

I hope you see that your line of argumentation is utterly without merit and relevance -- the sorry fact is that it is only useful as long as your audience already agrees with you before you started to argue. since your audience is largely made up of people who have never looked seriously at any other programming languages, they won't even stop to think that your invalid argument is invalid. and _that's_ how C and C++ manage to live on, regardless of their obvious costs and problems.


[edited by - SabreMan on March 7, 2003 5:28:26 AM]

Share this post


Link to post
Share on other sites
Advanced Bug    122
quote:
Original post by bishop_pass
I want people to share Lisp snippets of code.


My first Lisp program (I downloaded CLISP an hour ago).

(defun brain-damage (x)
(if (eql x 1)
1
(+ (brain-damage (- x 1)) 1)
)
)

Share this post


Link to post
Share on other sites