Domain: gigamonkeys.com
Stories and comments across the archive that link to gigamonkeys.com.
Comments · 71
-
Re:Donald Knuth
Or the dead sexy "Practical Common Lisp". It is free and good. http://www.gigamonkeys.com/boo...
-
Practical Common Lisp
Practical Common Lisp by Peter Seibel is available online for free.
-
DIY
http://www.gigamonkeys.com/book/practical-a-spam-filter.html has the nuts and bolts. CL-PPCRE does perl regex matching faster than perl.
-
Re:There is no third option
There is at least one other method, which is available natively in Common Lisp. It's known as conditions, and involves registering a condition handler which, unlike an exception handler, runs in the context where the error occurs. The handler has access to zero or more dynamically-scoped restarts, which allow the computation to be resumed at well-defined points without unwinding the entire stack up to where the condition handler was established. The default condition handler is an interactive debugger, which allows the user to examine the state of the program and choose one of the available restarts.
-
Programming for fun? Lisp and Smalltalk
You say you want to "code for personal reasons", which I take to mean because you find programming enjoyable and want to write programs for fun.
Then I would absolutely recommend Lisp and Smalltalk. For Lisp, you can get started with Lisp In A Box and Peter Siebels' "Practical Common Lisp". For Smalltalk, try Squeak accompanied by Squeak by Example. It's all free.
No, you are probably not going to get a job writing in either of these languages, but learning them may indeed help you get a job, as they are both conceptually deep, and their influences are broader than many realize: JavaScript borrows heavily from Lisp, and Ruby and Objective C from Smalltalk. Even Python and Perl have some Lisp concepts in them. In fact it seems that every new dynamic language to come out in the last twenty years owes something to these two languages. They are like the Greek and Latin of programming languages.
-
Re:Reinvention of LISP
I know you're just joking, but for anyone just following along, please don't be scared off by the parentheses.
A good editor will keep track of the parentheses, and indent for you.
Knowing LISP or Scheme is a huge brain training exercise. If you want to sing (as a programmer), you have to train your voice.
Great Scheme implementation
http://racket-lang.org/How to Design Programs
http://www.htdp.org/Free LISP book
http://www.gigamonkeys.com/book/ -
Re:Pffft.
There are a few problems with functional programming languages that have prevented their true adoption anywhere.
1. Limited paradigms - I always prefer languages that let me write my code the way I want, a la C++, than a language that requires a strict paradigm from academia like Lisp. If I want to use the inherent hardware property based side effects of certain code structures, let me. Programming languages =/= mothers.
Common Lisp (and Scheme, even more so, although the community is more oriented toward impure functional style) enforces no fixed paradigm. It can be used functionally (conses happen to be a pretty good data structure for functional algorithms), but is more often used in an object-oriented manner. It was even one of the first OO languages, and AFAIK the first to implement multiple dispatch. It even has a powerful imperative operators.
Thanks to macros and the metaobject protocol you can even add new paradigms to the language. Paternalistic, Lisp is not.
3. Most functional languages except Ocaml are like Ruby and Python in that they have tremendous performance overhead. For a consumer application, that overhead usually doesnt impede adoption (its more like the software is poorly written than the applications environment is too inefficient). But when talking about server programming the costs of running something under Ruby vs C are astronomical, and the same problem arises with functional programming. It might not hurt the consumer that the Python implementation of their music player consuming 30% more clock cycles than the exact same program written in C, but it does cause huge scaling issues with popular resources like Twitter.
4. In extension of 3, functional programming is getting away from how the hardware actually works. It is good for a novice that doesnt want to get into the details of pointers and caching and disk IO, but professionals should enter the game knowing how the underlying system runs and that making tradeoffs for readability by someone who doesnt know the language anyway vs performance benefits falls to the wayside. Developer time is important, but when you factor in the massive overhead trying to get 20+ year professional developers in C to try to think functionally you are never justifying the upfront cost of using the languages.
Languages like SML and OCaml are actually more optimizable than C. Thanks to providing more type information &c they can take advantage of fancy whole program optimization and whatnot.
The "way hardware works" is an artifact of C being the dominant language. There's no reason hardware couldn't (and it has before) have GC assistance, type checking, capabilities, etc. It's really not appropriate and scalable to view the computer as something that flips bits around a gigantic linear array... it was reasonable to deal with that when you had 4000 words, but not when you have 400000000 words.
Software is nice because you can abstract! Writing programs to a model of an infinite store that Just Works (tm) is beneficial to everyone -- it frees source code from a particular hardware implementation, is easier to reason with, and separates the concern of hardware resource management.
-
Re:haskell for the masses? sure, but only...
"My recollection of functional programming from university was that it was kind cute, seemed to be geared to solving a problem domain I never found a use for, but that ultimately I hated the syntax and structure of it. I never really "got it", or really understood what it was supposed to be useful for."
Holy shit - you just described my experience with functional languages *exactly*. GET OUT OF MY HEAD!
I can't believe it... I'm not alone!!
My cure was this. The 3rd chapter in particular. After reading few chapters I have finally realized that there was, after all, a programming language invented which is much more powerful than the assembler. Not that I need it - but definitely cleared my head off the overdoze of Haskell learning material which failed even to explain how to write/compile a program in it.
-
Re:haskell for the masses? sure, but only...
"My recollection of functional programming from university was that it was kind cute, seemed to be geared to solving a problem domain I never found a use for, but that ultimately I hated the syntax and structure of it. I never really "got it", or really understood what it was supposed to be useful for."
Holy shit - you just described my experience with functional languages *exactly*. GET OUT OF MY HEAD!
I can't believe it... I'm not alone!!
My cure was this. The 3rd chapter in particular. After reading few chapters I have finally realized that there was, after all, a programming language invented which is much more powerful than the assembler. Not that I need it - but definitely cleared my head off the overdoze of Haskell learning material which failed even to explain how to write/compile a program in it.
-
Re:Go Java Go
Macros in Lisp were introduced in the mid-1960s and are a powerful way to extend that language. However, the syntax of Lisp is very regular, so adapting the power of the prefix notation of Lisp into a language with a procedural syntax like Java is not going to be too easy.
I'm a little surprised that there isn't more mention of Lisp in this thread, considering that the lambda calculus that it was built on is the source of the name for one of the language projects.
Being able to transparently extend your language is a powerful tool that Lisp exploits to full advantage, provided the programmer knows when to use them. The regular syntax, functions as first-class objects (treated the same way as variables), and the macro system are the three features that build upon each other to make it such a flexible language.
See footnote #5 for some elucidation, although I certainly didn't learn Lisp on my first try: http://gigamonkeys.com/book/macros-standard-control-constructs.html
-
Re:Give Scala or Clojure a shot
Definitely write some code. When you are done with that, though, give a look at Common Lisp: http://www.cs.cmu.edu/~dst/LispBook/ Common Lisp: A Gentle Introduction to Symbolic Computation by David S. Touretzky, or http://www.gigamonkeys.com/book/ Practical Common Lisp by Peter Seibel. Then, learn to use Clojure to tie the two (functional programming and JVM bytecode + platform) together.
-
Young programmers should consider Common Lisp
As modern programming languages (Python, Ruby, and Scala) are implementing Common Lisp features (closures, variable capturing) and the online availability of Practical Common Lisp, it seems now is a good time for younger people to learn CL. The icing on the cake here is that there are alternatives for Vim users to develop Lisp without using SLIME.
-
Re:i like the idea of the kindle
You'll be waiting 5 years at least. I'm probably getting an iliad DR1000SW or PlasticLogic's model next year because they finally got the screen size up to snuff.
The economic analysis in the summary at least is a bit shortsighted. You can save a little on newspaper subscriptions since they don't have to deliver to you or you don't have to waste gas getting one and there are a lot of good free (legally) books online to learn languages/programming/anything but don't want to sit on the computer for. Like this one:
http://www.cs.cmu.edu/~dst/LispBook/
or
http://www.gigamonkeys.com/book/When I sat down years ago to read those or other books on the computer, it just was a pain. I couldn't use my computer for other things as easily and the eyestrain of a backlighted screen all day. Years back, without a second monitor, it was kinda a pain to follow some programming examples and keep switching back and forth.
Add to that the convenience of having all your books in a memory card or single harddrive. It was a factor driving mp3 music players vs CDs and CDs are much easier to carry around than books.
What is wrong with the current set of books is this:
-screen size (recently solved with the iRex DR1000S - now they have models out big and small good for newspaper/technical_reading/textbooks vs fiction)
-screen refresh rate (too slow on all models)
-only 4 (16 iliad) shades right now
-klutzy software (Apple could exploit this market sooner or later)
-battery life in some models (e-Ink doesn't use any energy once screen is rendered - yet some manufacturers build these things to be recharged almost daily instead of weekly), turn the page and switch it off
-no colorFor me, battery life and software and screen size is what I'm not going to compromise on, all others I'm flexible. It probably will be different for everyone. The potential benefits are tremendous though.
-
Re:Lisp Syntax
Well your other post said basically Lisp is for interesting people, all the other who cares about syntax doesn't matter, what do you expect me to answer to this??
Fair enough. I didn't mean to imply anything like that but perhaps I went to far when I mentioned 80s perms.
;-)Lisp is probably very good for research as it free the researcher from syntax, but for the other 99% of developpers who don't do language research but who maintain existing programs in C, C++ or Java, I doubt that you would convince them that syntax doesn't matter.. That's why the next big programming language may be one of those: D, Scala, Ruby or Python but not Lisp.
Well, I am one of the bulk of those programmers maintaining an existing system. At least, that's what I do for my day job. And I doubt that is likely to change anytime even within the next decade, if I continue to stay with the same company. Our system is simply not going to be rewritten in any new language unless it is the first to introduce something amazing like a DWIM feature. In fact, if you listen to some of the pundits, the next big programming language just might be COBOL. Legacy inertia can often be the immovable object standing in the way of the unresistable force of the Next Big Thing. And I've personally gotten so sick of the YASL family breeding like rabits that I won't bother looking at another one unless it does something significantly different from all of its cousins.
But it seems I am guilty of having thrown another shovel full on the steaming pile of myth that Lisp is only good for research. Practical Common Lisp is full of excellent examples of using Lisp for "normal" problems. My personal favorite exmaple is the way he uses macros to help with the task of parsing ID3 tags in MP3 files. Having had to deal with things like ASN.1 compilers in the past, I immediately fell in love with the way he basically did the same thing as is done with ASN.1 but without ever leaving Lisp.
I currently use Common Lisp (mostly SBCL and sometimes Clisp) everyday for the kinds of tasks for which I would have reached for Perl in the past. An Emacs user, I'm merely a "M-x slime" away from wherever in Lisp I may want to be, including the entire mush of elisp floating out there in the tubes of the internets. CL-PPCRE already gives me in Lisp most of what I might have missed from Perl. Implemented entirely in Common Lisp, it even out performs Perl's regular expression engine for some benchmarks. But what I love about using Lisp for these kinds of "write once" "scripting" tasks is that I have full access to all of Lisp's features if I find it useful. For example, I've been able to use Allegro Prolog for an install script of somewhat limited intelligence. (I'll try posting code after this because I'm having problems with
/. formatting rules.)As for AOP, personnaly I've never liked it (seems like a mess for anything but logging), [...]
Okay, but the point wasn't so much AOP as it was how unnecessary it is introduce a whole new programming language tool to get the same functionality from Lisp. To introduce AOP into Java required mucking about with the core of the Java language. In Lisp, "all" one needs to do is crank out some macros and perhaps a few new meta-objects.
And so much of all of this is made possible by Lisp's macros which are, in turn, so useful because of the very syntax which is what so many people love to hate.
-
Re:Lisp Syntax
Well your other post said basically Lisp is for interesting people, all the other who cares about syntax doesn't matter, what do you expect me to answer to this??
Fair enough. I didn't mean to imply anything like that but perhaps I went to far when I mentioned 80s perms.
;-)Lisp is probably very good for research as it free the researcher from syntax, but for the other 99% of developpers who don't do language research but who maintain existing programs in C, C++ or Java, I doubt that you would convince them that syntax doesn't matter.. That's why the next big programming language may be one of those: D, Scala, Ruby or Python but not Lisp.
Well, I am one of the bulk of those programmers maintaining an existing system. At least, that's what I do for my day job. And I doubt that is likely to change anytime even within the next decade, if I continue to stay with the same company. Our system is simply not going to be rewritten in any new language unless it is the first to introduce something amazing like a DWIM feature. In fact, if you listen to some of the pundits, the next big programming language just might be COBOL. Legacy inertia can often be the immovable object standing in the way of the unresistable force of the Next Big Thing. And I've personally gotten so sick of the YASL family breeding like rabits that I won't bother looking at another one unless it does something significantly different from all of its cousins.
But it seems I am guilty of having thrown another shovel full on the steaming pile of myth that Lisp is only good for research. Practical Common Lisp is full of excellent examples of using Lisp for "normal" problems. My personal favorite exmaple is the way he uses macros to help with the task of parsing ID3 tags in MP3 files. Having had to deal with things like ASN.1 compilers in the past, I immediately fell in love with the way he basically did the same thing as is done with ASN.1 but without ever leaving Lisp.
I currently use Common Lisp (mostly SBCL and sometimes Clisp) everyday for the kinds of tasks for which I would have reached for Perl in the past. An Emacs user, I'm merely a "M-x slime" away from wherever in Lisp I may want to be, including the entire mush of elisp floating out there in the tubes of the internets. CL-PPCRE already gives me in Lisp most of what I might have missed from Perl. Implemented entirely in Common Lisp, it even out performs Perl's regular expression engine for some benchmarks. But what I love about using Lisp for these kinds of "write once" "scripting" tasks is that I have full access to all of Lisp's features if I find it useful. For example, I've been able to use Allegro Prolog for an install script of somewhat limited intelligence. (I'll try posting code after this because I'm having problems with
/. formatting rules.)As for AOP, personnaly I've never liked it (seems like a mess for anything but logging), [...]
Okay, but the point wasn't so much AOP as it was how unnecessary it is introduce a whole new programming language tool to get the same functionality from Lisp. To introduce AOP into Java required mucking about with the core of the Java language. In Lisp, "all" one needs to do is crank out some macros and perhaps a few new meta-objects.
And so much of all of this is made possible by Lisp's macros which are, in turn, so useful because of the very syntax which is what so many people love to hate.
-
Re:How do people learn it?
No idea about COBOL but for LISP there always is Practical Common Lisp.
-
Common Lisp
For Common Lisp, the Common Lisp HyperSpec is hard to beat, though at times a book like Practical Common Lisp can be a little more useful.
-
Free made a buyer out of me...
I didn't read any of the articles linked but I can say from person experience that, even though Practical Common Lisp is available for free on-line (HTML, PDF) I still bought my copy. It is worth every penny. Had it not been available on-line, it probably would've taken me even longer to convince myself to buy it.
-
Re:C++ has issues
Common Lisp has the most powerful OO system this side of Smalltalk, including Metaobject Protocol and so on. At least I think so, everyone seems to understand the term object orientation differently, so it might not do exactly what you want. (see: http://www.gigamonkeys.com/book/object-reorientation-classes.html http://www.gigamonkeys.com/book/object-reorientation-generic-functions.html )
Note that LISP usually refers to older dialects of Lisp. There are several dialects of Lisp with varying capabilities. I prefer Common Lisp, although for many it lacks sufficient theorethical purity and suchlike of Scheme... -
Re:C++ has issues
Common Lisp has the most powerful OO system this side of Smalltalk, including Metaobject Protocol and so on. At least I think so, everyone seems to understand the term object orientation differently, so it might not do exactly what you want. (see: http://www.gigamonkeys.com/book/object-reorientation-classes.html http://www.gigamonkeys.com/book/object-reorientation-generic-functions.html )
Note that LISP usually refers to older dialects of Lisp. There are several dialects of Lisp with varying capabilities. I prefer Common Lisp, although for many it lacks sufficient theorethical purity and suchlike of Scheme... -
Re:Going from C to others is a matter of right boo
> Thank goodness for the relatively modern Practical Common Lisp by Seibel
PCL is also free at http://gigamonkeys.com/book -- I hate to deprive the authors of their royalties, but hey, it's their choice, and helps in making lisp more popular.
Unfortunately, I really can't stand CL's OBNOXIOUSLY-LONG-IDENTIFIERS that other languages often do with syntax. The purported lack of syntax is not a feature when you end up looking like COBOL with more parenthesis (yes that's hyperbole). There are CLOS workalikes available for most Scheme implementations that have all the features you'll ever use from the real deal (and it's not like most CL's have a 100% perfect CLOS). About the only really unique thing that CL brings to the table these days is conditions and restarts. -
Re:That joke was old when I was in school
Short answer: pick up or print out a copy of PCL. It's the best general-purpose Common Lisp book of the past 5 or 10 years.
Long answer: it depends on what you're a beginner at.
If you're a beginner at Lisp, but know how to program, then SLIME is not bad. At the very least, it adds handy things like syntax highlighting and completion to SBCL. Get a good book (like PCL) and you're all set.
If you're also a complete beginner at using Emacs, or at programming, it may be too much. Learning two (or more) deep subjects at once is often a recipe for frustration.
But PCL uses Lisp-in-a-Box, which includes Emacs and SLIME, so it can't be *that* hard, and the book steps you through the easy things you need to know. -
Re:Switch statements are syntactic sugar
I should learn lisp, one of these days, I just never seem to get around to it...
Yes you should :)
Practical Common Lisp -
common lisp
;TODO (defmacro play-vb (vb-like-code)
.... ;Learn VB first, need keywords?
common lisp (clisp is a good app to start with, linux has all the good free lisp compilers) -
Re:Performance, anyone?
I suggest you forget about Lambda calculus and learn Lisp just like you'd learn any other programming language. Peter Seibel has made his excellent, non-migraine-inducing book "Practical Common Lisp" available for free on like at http://www.gigamonkeys.com/book/ He leads you through building a streaming MP3 server in Lisp, which is quite fun.
-
Re:Perl 6 might be great... not.
-> becomes
-> is the infix dereference operator, btw. ., like the rest of the world uses.
And no, not all the world uses . or -> to access object members. I'm using generic functions with method specialization. Dispatch on more than one argument, baby! -
Re:Languages continue to evolve into ... Lisp
A know the answers for some of your questions:
1. What is Lisp, and where to find the community web sites
Cliki is a good start:
http://www.cliki.net/index
2. How to locate, download, and install all the major Lisps on Linux, Mac, and Windows
On Debian: apt-get install sbcl
For windows try Lispbox:
http://www.gigamonkeys.com/lispbox/
3. Basic language grammar, including CLOS
The best text is "Practical Common Lisp":
http://www.gigamonkeys.com/book/
4. How to use ASDF (including complex examples)
5. How to fully interface with the operating system, including implementation-specific functions for file i/o, network i/o, command-line arguments, the environment, threads, and more
6. How to package a standalone Lisp application to deliver to customers
7. How to use UFFI
CFFI seens to be a better option:
http://common-lisp.net/project/cffi/
With a good manual:
http://common-lisp.net/project/cffi/manual/index.h tml
8. How to set up a Lisp web application server (modlisp or Araneida or ...)
9. How to use the most common libraries: CLSQL, OpenGL, SDL
Common lisp community is growing, and the OS integration, libraries and documention is improving. -
Re:Languages continue to evolve into ... Lisp
A know the answers for some of your questions:
1. What is Lisp, and where to find the community web sites
Cliki is a good start:
http://www.cliki.net/index
2. How to locate, download, and install all the major Lisps on Linux, Mac, and Windows
On Debian: apt-get install sbcl
For windows try Lispbox:
http://www.gigamonkeys.com/lispbox/
3. Basic language grammar, including CLOS
The best text is "Practical Common Lisp":
http://www.gigamonkeys.com/book/
4. How to use ASDF (including complex examples)
5. How to fully interface with the operating system, including implementation-specific functions for file i/o, network i/o, command-line arguments, the environment, threads, and more
6. How to package a standalone Lisp application to deliver to customers
7. How to use UFFI
CFFI seens to be a better option:
http://common-lisp.net/project/cffi/
With a good manual:
http://common-lisp.net/project/cffi/manual/index.h tml
8. How to set up a Lisp web application server (modlisp or Araneida or ...)
9. How to use the most common libraries: CLSQL, OpenGL, SDL
Common lisp community is growing, and the OS integration, libraries and documention is improving. -
Re:LISP, BASIC, FORTH, P-Code, Java+Netscape
How about taking a look at the more practical side then? http://gigamonkeys.com/book/
-
More suggestions
Good suggestion! I would supplement it with the following as well:
1. Episodic Learner Model/An online Lisp tutorial
2. Common Lisp: A Gentle Introduction to Symbolic Computation
3. How to Design Programs
4. Practical Common Lisp
5a. The book - Structure and Interpretation of Computer Programs
5b. The movies - Structure and Interpretation of Computer Programs
6. Loving Lisp - the Savvy Programmer's Secret Weapon
7. Common Lisp the Language, 2nd Edition
8. On Lisp
9. common lisp: a web application tutorial for beginners
10. JavaScript: The World's Most Misunderstood Programming Language
11. Free JavaScript Learning Center
12. JavaScript for Scared People
13. JavaScript Closures
14. Why's (Poignant) Guide to Ruby
= 9J = -
Re:Wow
Perhaps Web 2.0 is tired?
No, PHP is tired. It's now all about Ruby, Python, LISP, and the more obscure but no less interesting Lua, Scala, Qi, OCaml, among others, and various derivatives and frameworks. -
Re:yes, they do!"I failed to really learn the language for my AI class because I could not figure out a way to format the code such that it was readily apparent what was going on."
That may well be a problem for a newcomer who doesn't understand the natural structure of the language or hasn't been taught the simple indentation rules but it takes 10 minutes to get the hang of it if you are shown how. If you weren't shown how, that is quite unforgiveable.
'However, I do not want to hear any garbage about a "Lisp aware editor."'
It isn't garbage. You weren't meant to infer that the editor is either necessary or is required to do anything sophisticated.
"If your code requires machine assistance to read"
It doesn't.
"My experience with LISP was that it fell into the latter [it can't be written clearly in the first place] category since there's frequently no good place to break the code up into subunits or blocks within the definition of a function."
Of course it can be written clearly, it is just easier and faster to do so with - you guessed it - a Lisp aware editor. All languages need to be written with structured and consistent formatting in order to be readable and I wouldn't choose to write any code in any language without the assistance of a decent editor.
While code formatting is, strictly speaking, neither a syntactic nor a semantic matter, proper formatting is important to reading and writing code fluently and idiomatically. The key to formatting Lisp code is to indent it properly. The indentation should reflect the structure of the code so that you don't need to count parentheses to see what goes with what. In general, each new level of nesting gets indented a bit more, and, if line breaks are necessary, items at the same level of nesting are lined up...
However, you don't need to worry too much about these rules because a proper Lisp environment such as SLIME will take care of it for you. In fact, one of the advantages of Lisp's regular syntax is that it's fairly easy for software such as editors to know how to indent it. Since the indentation is supposed to reflect the structure of the code and the structure is marked by parentheses, it's easy to let the editor indent your code for you.
http://www.gigamonkeys.com/book/syntax-and-semant
i cs.htmlI'm sorry your experience of Lisp has been so poor but I think you should blame whoever it was that took that AI class, not the language itself
;-) -
.NET vs LISP
Why do AI in
.NET when you can do it in the language designed specifically for AI in the first place? -
2 Chapters Needed
Chapter 1. How to poorly implement Common Lisp
Chapter 2. Please See http://www.gigamonkeys.com/book/ -
Lisp not accessible?
Lisp isn't accessible? Is that because of the parens or some other reason? If it's the parens, then obviously people are too superficial to look past the syntax (which is minimalistic to say the least). I've coded (and continue to code) in PHP, which has C-like syntax. When I first saw Lisp it was a bit different, but that's all it was: different. In fact, because there is so little syntax to worry about it makes the language even MORE accessible than C-like languages.
I've been reading Practical Common Lisp, and I have to say I love Lisp so far. I'm down to the practical examples and continue to enjoy the experience of reading, learning and coding lisp. It's certainly an excellent book and it shows, since it is a finalist in the Jolt awards.
Paul Graham is a big advocate of Lisp. He made big bucks selling is 3 year-old company to Yahoo, a company that was built off of software coded in Lisp.
Of course, one can't forgot the quote from Eric Raymond's 'How To Become A Hacker': LISP is worth learning for a different reason -- the profound enlightenment experience you will have when you finally get it. That experience will make you a better programmer for the rest of your days, even if you never actually use LISP itself a lot. I especially like these quotes from the blurbs section of the PCL website:
"This book shows the power of Lisp not only in the areas that it has traditionally been noted for--such as developing a complete unit test framework in only 26 lines of code--but also in new areas such as parsing binary MP3 files, building a web application for browsing a collection of songs, and streaming audio over the web. Many readers will be surprised that Lisp allows you to do all this with conciseness similar to scripting languages such as Python, efficiency similar to C++, and unparalleled flexibility in designing your own language extensions." --Peter Norvig, Director of Search Quality, Google Inc; author of Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp
"Please don't assume Common Lisp is only useful for Databases, Unit Test Frameworks, Spam Filters, ID3 Parsers, Web Programming, Shoutcast Servers, HTML Generation Interpreters, and HTML Generation Compilers just because these are the only things happened to be implemented in the book Practical Common Lisp.--Tobias C. Rittweiler, Lisp Programmer
Lisp was once in the same position C, C++ and now Java were/is in. It was one of those languages you had to know if you were going to get a job in programming. The only reason why it isn't still in that position is because it was ahead of its time. It was once thought to be slow, but Lisp compilers can compile to machine code and run as fast or even faster than C/C++. Lisp gives you the flexibility to code quickly to get features working and it also allows you to go back and optimize your code to perform at C levels.
So don't make the mistake of thinking Lisp is simply a worthless, academic language. Just check out Practical Common Lisp and see for yourself! -
Lisp
I have been thinking that 'Lisp is not accessible' for years. I regret all these years beyond expression. Don't believe it. It's horrible lie. Here's the proof.
-
Re:My short experience with perl...
The mind-bending thing of Haskell's list comprehension is mostly that they're evaluated lazily, and can be of infinite length. A famous examples is of course the implementation of the Fibonacci function in Haskell as an infinite list:
fibo = 1 : 1 : zipWith (+) fibo (tail fibo)Python's list comprehensions are rather neat, but they lack those features, so they don't come near Haskell's level of mindbendingness. They're mostly a cool shorthand for writing down lists that would have been ugly with map() and filter(). I wish the dict comprehension PEP had made it...
(I'm a Python fan, but nowadays I program Perl for a living and play with the book Practical Common Lisp in my spare time... give Lisp a try!)
-
Re:Totally fresh in programming
Though I might be modded down or flamed to hell, I'd recommend looking at http://www.gigamonkeys.com/book/ and check out Common Lisp. I'm just getting into it after playing around with PHP, and I am very excited to be learning a language so powerful but so simple to use and look at. The tools for coding in Lisp might not be the greatest (Emacs is the only editor that can be realistically used to code in it at this point), if you've got the patience that it takes to be a good programmer, you can do it. From what I've heard, Lisp can be used for simple scripting or hardcore programming. I believe it.
-
Re:Widely used languages don't die quickly
Lisp is actually seeing an upsurge in use recently. With books like this Lisp may rise like the Pheonix! It's definitely got this newbie interested
:) -
Re:Welcome To Hell
If you're interested, take a gander at Practical Common Lisp, by Peter Seibel. It's an excellent introduction to the language.
-
Re:The real 90s versus outdated 00s software
Yes, some Lisp users give Lisp a bad name, and Lisp in general has been far less welcoming to new users than newer languages. Python, for example, is very welcoming and friendly to newbies. That's unfortunate, but it's far from universal, and there are indications that things are changing in the Lisp world, with the release of a new book last year (Practical Common Lisp, available free online as well as in dead tree format), and the Lisp in a Box project (download, install, and have a great (Free as in beer and freedom) Lisp environment set up in minutes).
-
Marketing
I spent $50 for a book a few weeks ago. Practical Common Lisp, by Peter Seibel. I had been looking for a good, basic Lisp book for a while, and I found the entire text available on-line at http://www.gigamonkeys.com/book/ . After reading about a chapter and a half, I decided that this was exactly what I was looking for, and I bought the dead-tree version.
It's not the first time, either, for me.
It works for fiction, too. If you're a science fiction reader, you probably noticed that Baen Books was doing some similar things, and I bought some of them that I might not have, otherwise.
Perhaps the copyright holders should notice that we are in the 21st Century, and things are changing, mostly for the better.
-
Re:Recursive main()
-
CLiki, ll-discuss, Bugtraq, Practical Common Lisp
While not magazines, I've found these resources to be useful in becoming a better programmer:
CLiki, a programming language blog. Contains lots of stuff on programming languages and paradigms, including debates on merits and disadvantages.
ll-discuss, a mailing list related to programming language concepts. Perhaps most interesting if you're into language implementation, but it's the closest thing to a magazine that I can recommend.
Bugtraq, a (the?) security list. This will teach you what things to avoid; at least, the 3 most common errors.
Practical Common Lisp, a book that basically provides a crash course on Common Lisp. It shows you how things are done in Common Lisp, why they are done that way, and occasionally draws comparisons with other languages, everything including practical examples. It is said that, even if you don't program in Lisp, knowing it makes you a better programmer.
How to Design Programs, a fairly extensive book on program design. I haven't read the whole book, but it seems to both solidly and concisely cover many fundamentals. It uses Scheme for explaining things, but the material applies to other languages just as well. -
Re:Why design a new language?
This means that if you can find a macro that reduces the amount of syntax I need to use to do something by a large factor, or by an order of magnitude, you win. If you can't, macros are unnecessary.
This is tiresome and unprofessional. What kind of computer "science" is this where technical matters win/lose based on slashdot discussions?A very good recent book explains Lisp macros in readable detail. http://www.gigamonkeys.com/book/
-
Re:Why design a new language?
Also, many find this a great intro to Common Lisp. With examples of building
.mp3 servers and unit test frameworks.
http://www.gigamonkeys.com/book/ -
Try Aquamacs Emacs on Mac OS X
And the lack of consistency with Meta keys is frustrating (on my Mac, Carbon Emacs uses command, the terminal uses option, but on other machines I have to fall back on Esc).
Aquamacs (Carbon Emacs with settings to make it more Mac-like) cleans up a lot of that stuff. If you map meta to option, you can even use standard Mac keystrokes (command-S -> C-X C-S, command-Q -> C-X C-C, etc.). And SLIME works well under it - Aquamacs + Lisp-in-a-box without Emacs worked for me right out of the box (so to speak).
And, its default font is so much prettier... -
Re:"even new packages for Common Lisp" - hey!
I've so far failed to get any of the GUI toolkits to work with SBCL or CLISP under Gentoo.
Me neither. CLX, CLIM, cl-gtk, Lambda-gtk, cl-sdl - none of them worked properly for me. They installed perfectly because the Gentoo maintainer for dev-lisp really knows what he's doing, but I couldn't get any compiled or working.
It's been very disappointing because I'm really enjoying Lisp the language, having worked my way through Practical Common Lisp and now reading the classic PAIP which must be the finest book on programming I have ever read anywhere for any language. Lisp the language has unbelievable power but all the free implementations suffer from immature interfaces to the rest of the world. That's fine if you want to use Lisp as a "glorified Logo" as yet another frustrated person on the Web put it, but for writing GUI apps with SDL, I've now chosen Lush which is a Common Lisp-based variant with a plethora of add-on libraries that actually work out of the box.
I'll keep holding thumbs that CL attracts enough people to make it as trivial to extend as Python and Ruby are now. I just remembered, cl-ltk did work for me - check it out. Peter has also added support for the new Tile widgets which have themes and advanced widgets. -
Re:What makes a good Comment?
``If only we could have compiled the comments...''
Which reminds me of the Story of Mac. One of the best ways to make your code understandable is to write it understandably in the first place. Use sensible names, ADTs, simple functions, etc. etc. This doesn't completely obviate the need for comments, but it makes understanding the code itself a lot easier. -
Re:As mentioned by Paul Graham
Speaking from personal experience I can do things in Comman Lisp faster than in any of those languages, but perhaps this http://www.gigamonkeys.com/book/ gives more practical examples than that.