{"id":7468,"date":"2014-05-03T05:02:33","date_gmt":"2014-05-02T19:02:33","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=7468"},"modified":"2024-05-24T18:50:23","modified_gmt":"2024-05-24T08:50:23","slug":"lisp-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/lisp-primer-tutorial\/","title":{"rendered":"Lisp Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Lisp\/\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"Lisp Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Lisp\/Lisp_Primer.jpg\" title=\"Lisp Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Lisp Primer Tutorial<\/p><\/div>\n<p>Have you heard of Lisp, the programming language?  Do you remember how incredible Hewlett Packard calculators were back in the 1970&#8217;s (we did as Land Surveyors &#8230; they were the bee&#8217;s knees, especially to program for those Land Surveying calculations).   And do you (older users) remember the excitement regarding reverse Polish notation?  Well, Lisp, the second oldest high-level language (after Fortran) uses this reverse Polish notation and thinking.<\/p>\n<p>Am no expert with Lisp, as you&#8217;ll see, and we&#8217;ll defer to code available on the net and contributed by others, but have to mention its incredible mathematical scope, for instance, with its functionality for huge numbers (integers).   You will notice with languages like C++ it is not at all easy doing a calculation like the factorial of 1000 &#8230; or 1000! &#8230; or 1000 x 999 x 998 x &#8212;&gt; x 2 x 1 &#8230; but Lisp does it with considerable ease.   As a matter of interest, as far as this type of big integer in Java, you may want to check on the <a target=_blank title='Good link ... thanks ... with advice about Java BigO data type' href='http:\/\/stackoverflow.com\/questions\/17118210\/big-o-simple-explaining-and-use-in-java'>BigO data type<\/a>.<\/p>\n<p>Today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Lisp\/\" title='Click picture.'>tutorial<\/a> introduces you to Lisp we install using LispWorks Personal on a Mac laptop, and execute a Hello World and some large factorial calculations.   Lisp, being the old language it is, is a very functional language, and although global variables are allowed, the Lisp &#8220;way&#8221; is not to resort to such approaches.<\/p>\n<p>Below are some links regarding Lisp you may want to peruse:<\/p>\n<ul>\n<li><a target=_blank href='http:\/\/en.wikipedia.org\/wiki\/Lisp_%28programming_language%29' title='Lisp information from Wikipedia'>Lisp<\/a> information from Wikipedia<\/li>\n<li><a target=_blank href='http:\/\/www.lispworks.com\/downloads\/index.html' title='Download website for Mac'>LispWorks Personal Edition<\/a> for MacBook Pro<\/li>\n<li><a target=_blank href='http:\/\/cs.gmu.edu\/~sean\/lisp\/LispTutorial.html' title='Lisp Quickstart'>Lisp Quickstart<\/a> where factorial code is from &#8230; thanks<\/li>\n<li><a target=_blank href='http:\/\/www.cs.sfu.ca\/CourseCentral\/310\/pwfong\/Lisp\/1\/tutorial1.html' title='Basic Lisp Programming Tutorial'>Basic Lisp Programming Tutorial<\/a><\/li>\n<li><a target=_blank href='http:\/\/www.chemie.fu-berlin.de\/chemnet\/use\/info\/elisp\/elisp_19.html' title='Interactive entry in Lisp'>Interactive entry in Lisp<\/a><\/li>\n<\/ul>\n<p>Will leave you with some downloadable programming Lisp source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Lisp\/helloworld.lisp_GETME\" title='helloworld.lisp'>helloworld.lisp<\/a> and some factorial code called <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Lisp\/factorial.lisp_GETME\" title='factorial.lisp'>factorial.lisp<\/a><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d7468' onclick='var dv=document.getElementById(\"d7468\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=Fortran\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d7468' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Have you heard of Lisp, the programming language? Do you remember how incredible Hewlett Packard calculators were back in the 1970&#8217;s (we did as Land Surveyors &#8230; they were the bee&#8217;s knees, especially to program for those Land Surveying calculations). &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/lisp-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,21,37],"tags":[411,456,558,560,679,709,752,997,1064,1319],"class_list":["post-7468","post","type-post","status-publish","format-standard","hentry","category-elearning","category-land-surveying","category-tutorials","tag-factorial","tag-fortran","tag-hello-world","tag-hewlett-packard-calculators","tag-land-surveying","tag-lisp","tag-mathematics","tag-programming","tag-reverse-polish-notation","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/7468"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=7468"}],"version-history":[{"count":1,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/7468\/revisions"}],"predecessor-version":[{"id":63718,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/7468\/revisions\/63718"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=7468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=7468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=7468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}