| weilawei | Having repeatedly heard the claim that Lisp will make one a better programmer, what's the reasoning behind this? |
| slava | Lisp by itself won't make you a better programmer, but learning and using Lisp can |
| weilawei | slava, i meant why learning it. apologies |
| pjb | Because when you write lisp, you don't have to mind irrelevant details like syntax or operator precedence, so you can concentrate on more important things. |
| oudeis | weilawei, another reason is the staggering number of paradigms and techniques you'll come across when learning and using it. functional-style programming, object system built around generic functions, condition system like you've never seen before, syntactic abstraction (macros), etc etc... it's like learning a dozen different languages which all implement some subset of what common lisp has to offer |
| weilawei | oudeis, sounds neat.. i've learned a lot of languages over the years but never really got around to Lisp. a little scheme here and there, but nothing serious |
| oudeis | point is, buzz is justified :) but to understand why, you need to try, no amount of others' opinions will make you really understand |
| pjb | minion: tell weilawei about sicp |
| minion | weilawei: please look at sicp: Structure and Interpretation of Computer Programs, a CS textbook using Scheme. Available gratis from <http://mitpress.mit.edu/sicp/> (HTML), <http://www.neilvandyke.org/sicp-texi/> (texinfo) and <http://twb.ath.cx/~twb/canon/sicp/> (XHTML, PDF). Accompanying video lectures are available gratis at <http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/> |
| oudeis | minion: tell weilawei about pcl-book |
| minion | weilawei: please see pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005). |
| pjb | lisp concentrate :-) |
| oudeis | minion: tell weilawei about paip |
| minion | weilawei: please see paip: Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp by Peter Norvig. http://www.cliki.net/paip |
| weilawei | aaah so many books!! |
| oudeis | minion: tell weilawei about on-lisp |
| minion | Sorry, I couldn't find anything in the database for ``on-lisp''. |
| oudeis | weilawei, sicp is scheme-concentrate. pcl is easy-going tutorial on cl |
| weilawei | thanks for all the resources. ive got some stuff to do, but ill look through them |
| Modius | In larger CL projects (including deep GUI), what are your thoughts on use of labels/depth vs. global functions/methods? Are they considered analogous, or is there a tendency to try to put functions at top level? |
| kpreid | I would never use labels when the function doesn't use something in the lexical environment. |
| foom | it seems bad if typing quit in ldb instead goes back into ldb |
| Modius | Reasoning? Just wondering. Also, using something directly in the lexical environment vs. passing it out to a global is still part of the stylistic choice I'm inquiring about. |
| kpreid | Well...I know it when I see it! If something can easily be made a global function, it should be. It's the things which are all intertwined with local state that get flet/labels. |
| Modius | I'm asking because in CL you can make a huge function and conceal it or break it down internally. An arbitrary "keep functions under 100 lines" would have a different role in CL than in C |
| lisppaste | foom pasted "yay ldb" at http://paste.lisp.org/display/41448 |
| Modius | You could technically write equivalent of many "global" functions with a labels, just one level in. |
| Riastradh | It is easier to test top-level definitions than local definitions individually. |
| lemonodor | practically, it's more difficult to debug (e.g. trace) local functions |
| Modius | (I did a macro that allows :let () :labels () without having them indent) |
| kpreid | Modius: such macros are not new :-) minion: bind? |
| minion | bind: Bind combines :(CLHS "let*"), :(CLHS "destructuring-bind") and :(CLHS "multiple-value-bind") into a single form. http://www.cliki.net/bind |
| Modius | Yeah, not claiming to have a saleable product here :) |
| kpreid | minion: with macro? |
| minion | with macro: WITH, the 'Bastard Son Of Loop', is a general binding construct allowing simple, special variable, destructuring, multiple-value, flet, labels, and with-open-file bindings in the same form without multiple indendation levels. http://www.cliki.net/with%20macro |
| foom | i think it might be better if ldb got rid of the signal handlers before trying to exit. :) |