{"id":203,"date":"2008-03-03T15:34:21","date_gmt":"2008-03-03T21:34:21","guid":{"rendered":"http:\/\/www.pchristensen.com\/blog\/articles\/how-to-learn-lisp\/"},"modified":"2014-04-14T21:45:18","modified_gmt":"2014-04-15T04:45:18","slug":"how-to-learn-lisp","status":"publish","type":"post","link":"http:\/\/pchristensen.com\/blog\/articles\/how-to-learn-lisp\/","title":{"rendered":"How To Learn Lisp"},"content":{"rendered":"<p>In the spirit of my <a href=\"http:\/\/www.pchristensen.com\/blog\/articles\/why-were-not-in-a-startup-bubble\/\" target=\"_blank\">last post<\/a>, I decided to turn one of my favorite long comments on Hacker News into a blog post in the hopes that someone would find it useful. There was a good discussion last week about <a href=\"http:\/\/news.ycombinator.com\/item?id=125766\" target=\"_blank\">how to learn Lisp<\/a>, and since I was a little late to the thread, most of the things I wanted to say had already been said. So, in an effort to pull it all together, I made a <a href=\"http:\/\/news.ycombinator.com\/item?id=126186\" target=\"_blank\">nice long summary comment<\/a>, which is reproduced and cleaned up below.<\/p>\n<p>Before I started learning Lisp, I have (in reverse chronological order) worked with .Net for several years, disliked C++ in college, loved Pascal in high school, dabbled in (Assembly?) programming my TI-82 graphing calculator, and started with Hypercard. Here&#8217;s my advice based on ~1 year of part-time Lisp education.<\/p>\n<ul>\n<li>To learn &#8220;lispiness&#8221;, functional programming, and get a feel for the computational approach to programming, read <a href=\"http:\/\/amazon.com\/o\/ASIN\/0262560992\/pchristense03-20\" target=\"_blank\">The Little Schemer<\/a> and <a href=\"http:\/\/amazon.com\/o\/ASIN\/026256100X\/pchristense03-20\" target=\"_blank\">The Seasoned Schemer<\/a>. Also, use the resources for the MIT Intro course Structure and Interpretation of Computer Programs. <a href=\"http:\/\/www.swiss.ai.mit.edu\/classes\/6.001\/abelson-sussman-lectures\/\" target=\"_blank\">Watch the video lectures<\/a> (30 well spent hours) and if you&#8217;re ambitions, <a href=\"http:\/\/mitpress.mit.edu\/sicp\/\" target=\"_blank\">read the book<\/a> (<a href=\"http:\/\/amazon.com\/o\/ASIN\/0262510871\/pchristense03-20\" target=\"_blank\">Amazon<\/a>). Doing these things will help keep you from writing PHP in Lisp.<\/li>\n<li>To put it into practical perspective and learn the nuts and bolts of modern common Lisp, read <a href=\"http:\/\/www.gigamonkeys.com\/book\" target=\"_blank\">Practical Common Lisp<\/a> (<a href=\"http:\/\/amazon.com\/o\/ASIN\/1590592395\/pchristense03-20\" target=\"_blank\">Amazon<\/a>).<\/li>\n<li>If you read PCL, you will run into Emacs and SLIME (the generally preferred [NO FLAMES, PLEASE. I KNOW VI IS AWESOME TOO] open source way to edit Lisp files). I wrote some resources to help with that:\n<ul>\n<li><a href=\"http:\/\/www.pchristensen.com\/blog\/articles\/public-beta-open-for-ultimate-n00b-slimeemacs-cheat-sheet\/\" target=\"_blank\" rel=\"nofollow\">Emac\/SLIME Cheat Sheet<br \/>\n<\/a><\/li>\n<li><a href=\"http:\/\/www.pchristensen.com\/blog\/articles\/reference-for-the-slimelispemacs-screencast\/\" target=\"_blank\" rel=\"nofollow\">Commentary on the SLIME screencast<\/a><\/li>\n<\/ul>\n<\/li>\n<li>I&#8217;m surprised no one has mentioned <a href=\"http:\/\/amazon.com\/o\/ASIN\/1558601910\/pchristense03-20\" target=\"_blank\">PAIP<\/a> (Peter Norvig&#8217;s <a href=\"http:\/\/amazon.com\/o\/ASIN\/1558601910\/pchristense03-20\" target=\"_blank\">Paradigms of Artificial Intelligence Programming<\/a>). Probably because there&#8217;s no free version online and it&#8217;s a pricey book. I got it for myself for Christmas and it&#8217;s well worth the price. It&#8217;s half AI book, half tutorial on Lisp programming and Lisp style. It&#8217;s a good read with lots of example programs written in good Lisp Style.<\/li>\n<\/ul>\n<p>There are three hurdles people usually run into when learning Lisp:<\/p>\n<ol>\n<li>The language looks different &#8211; this goes away with practice and familiarity. It starts looking normal fast. The parentheses are a bit tough to manage unless you use a capable editor, which leads to:<\/li>\n<li>Emacs is different &#8211; really powerful, fun to use, but it takes investment in learning. It&#8217;s really tempting to quit when starting, but worth getting over the hump. Once you do that:<\/li>\n<li>The way of thinking is different in Lisp &#8211; Lisp seems a little awkward to use until you get (don&#8217;t need to master them, just get the idea) the following ideas: 1) code can be manipulated as data because the syntax is so simple, 2) creating your own syntax (using macros &#8211; code that writes code) means that you can express your program in a way that closely matches the problem you&#8217;re trying to solve. Some good articles to help get these points are:\n<ol>\n<li><a href=\"http:\/\/www.defmacro.org\/ramblings\/lisp.html\" target=\"_blank\" rel=\"nofollow\">The Nature of Lisp<\/a><\/li>\n<li><a href=\"http:\/\/www.defmacro.org\/ramblings\/fp.html\" target=\"_blank\" rel=\"nofollow\">Functional Programming For The Rest of Us<\/a><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>Don&#8217;t worry if you don&#8217;t get these &#8220;big picture&#8221; things at first, they click at some point and everything makes a lot more sense. You can speed that up by putting a lot more Lisp in your head in the meantime.<\/p>\n<p>Does anyone have any more tips on learning Lisp?<\/p>\n<p>Also: read comments on this post at <a href=\"http:\/\/groups.google.com\/group\/comp.lang.lisp\/browse_frm\/thread\/0737bd0b1a7c5d15\/\" target=\"_blank\">comp.lang.lisp<\/a>, <a href=\"http:\/\/reddit.com\/r\/programming\/info\/6as7h\/comments\/\" target=\"_blank\">reddit<\/a>, <a href=\"http:\/\/news.ycombinator.com\/item?id=128805\" target=\"_blank\">Hacker News<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the spirit of my last post, I decided to turn one of my favorite long comments on Hacker News into a blog post in the hopes that someone would find it useful. There was a good discussion last week about how to learn Lisp, and since I was a little late to the thread, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[8,9],"tags":[],"class_list":["post-203","post","type-post","status-publish","format-standard","category-education","category-lisp","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pazgP-3h","_links":{"self":[{"href":"http:\/\/pchristensen.com\/blog\/wp-json\/wp\/v2\/posts\/203","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/pchristensen.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pchristensen.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pchristensen.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/pchristensen.com\/blog\/wp-json\/wp\/v2\/comments?post=203"}],"version-history":[{"count":0,"href":"http:\/\/pchristensen.com\/blog\/wp-json\/wp\/v2\/posts\/203\/revisions"}],"wp:attachment":[{"href":"http:\/\/pchristensen.com\/blog\/wp-json\/wp\/v2\/media?parent=203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pchristensen.com\/blog\/wp-json\/wp\/v2\/categories?post=203"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pchristensen.com\/blog\/wp-json\/wp\/v2\/tags?post=203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}