{"id":1053,"date":"2017-06-21T10:56:03","date_gmt":"2017-06-21T09:56:03","guid":{"rendered":"http:\/\/michael-edwards.org\/wp\/?p=1053"},"modified":"2017-06-21T12:47:59","modified_gmt":"2017-06-21T11:47:59","slug":"porting-slippery-chicken","status":"publish","type":"post","link":"https:\/\/michael-edwards.org\/wp\/?p=1053","title":{"rendered":"Porting slippery chicken"},"content":{"rendered":"<p>First of all I should say that there are no current plans to port\u00a0<em><a href=\"http:\/\/michael-edwards.org\/sc\" target=\"_blank\" rel=\"noopener\">slippery chicken.\u00a0<\/a><\/em>But<em>:\u00a0<\/em><\/p>\n<p>A humourously intended (though sarcastic: you know who you are!) post on my Facebook page asked me why my<em>\u00a0<\/em>algorithmic composition software is written in Common Lisp and not something more modern (and Lisp-inspired) like Python. My first response might be something dismissive like &#8220;would you entrust your life&#8217;s work to a child?&#8221; (Python was nine years old when I started working on\u00a0<em>slippery chicken.)\u00a0<\/em>But that would be churlish. Python is now a well-respected and widely-used programming language. Back in 2000 however, a mature language like Lisp was perfect for me and for music projects, especially given that longevity was key to my decision of which language to use. In any case, as a proper response to the Facebook comment I reach for some presentation notes written for a talk at Goldsmiths College at the\u00a0<em>slippery chicken<\/em> symposium there in 2016. My talk went through the issue of porting and considered several alternative languages. I include the considerations below, in all their bullet-pointy glory.<\/p>\n<h2>why port?<\/h2>\n<div id=\"outline-container-sec-15\" class=\"outline-2\">\n<div id=\"text-15\" class=\"outline-text-2\">\n<ul class=\"org-ul\">\n<li>because Lisp is not (currently) the world\u2019s favourite language\n<ul class=\"org-ul\">\n<li>(((((and people say hurtful things about all those parentheses)))))<\/li>\n<\/ul>\n<\/li>\n<li>it\u2019s not easy to release as a self-contained application\n<ul class=\"org-ul\">\n<li>though implementations like LispWorks and Allegro CL make it possible<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div id=\"outline-container-sec-16\" class=\"outline-2\">\n<h2 id=\"sec-16\">possible languages<\/h2>\n<h3>Scheme<\/h3>\n<div id=\"text-16\" class=\"outline-text-2\">\n<ul class=\"org-ul\">\n<li>Scheme is a dialect of Lisp<\/li>\n<li>would allow embedding\n<ul class=\"org-ul\">\n<li>and perhaps integration with Common Music \/ Grace<\/li>\n<\/ul>\n<\/li>\n<li>but no (easy\/flexible) looping\n<ul class=\"org-ul\">\n<li>and isn\u2019t object-oriented<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div id=\"outline-container-sec-17\" class=\"outline-2\">\n<h3 id=\"sec-17\">Clojure<\/h3>\n<div id=\"text-17\" class=\"outline-text-2\">\n<ul class=\"org-ul\">\n<li>Clojure is very &#8220;Lispy&#8221;<\/li>\n<li>is great at concurrency and therefore multi-core, multi-threaded applications<\/li>\n<li>but slippery chicken is not CPU intensive and not multi-threaded\n<ul class=\"org-ul\">\n<li>nor does it need to be<\/li>\n<li>(plus clojure spits in the face of object-orientation)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div id=\"outline-container-sec-18\" class=\"outline-2\">\n<h3 id=\"sec-18\">Haskell<\/h3>\n<div id=\"text-18\" class=\"outline-text-2\">\n<ul class=\"org-ul\">\n<li>Haskell co-designer Paul Hudak is also one of the founders of the Computing and the Arts program at Yale\n<ul class=\"org-ul\">\n<li>and author of the book <i>The Haskell School of Music \u2013 From Signals to Symphonies<\/i><\/li>\n<\/ul>\n<\/li>\n<li>lots of packages online<\/li>\n<li>but it\u2019s statically typed\n<ul class=\"org-ul\">\n<li>and purely functional (not object-oriented)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div id=\"outline-container-sec-19\" class=\"outline-2\">\n<h3 id=\"sec-19\">C\/C++\/Objective C<\/h3>\n<div id=\"text-19\" class=\"outline-text-2\">\n<ul class=\"org-ul\">\n<li>all of these and others (e.g. Java) are essentially compiled languages<\/li>\n<li>so they don\u2019t have\n<ul class=\"org-ul\">\n<li>an intepreter<\/li>\n<li>dynamic typing<\/li>\n<li>native lists<\/li>\n<\/ul>\n<\/li>\n<li>but are extremely popular \/ supported<\/li>\n<li>and integrate well into applications<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div id=\"outline-container-sec-20\" class=\"outline-2\">\n<h3 id=\"sec-20\">Python<\/h3>\n<div id=\"text-20\" class=\"outline-text-2\">\n<ul class=\"org-ul\">\n<li>python is\n<ul class=\"org-ul\">\n<li>a dialect of Lisp<\/li>\n<li>interpreted<\/li>\n<li>object-oriented<\/li>\n<li>dynamically typed<\/li>\n<\/ul>\n<\/li>\n<li>python lacks the macro support of Lisp\n<ul class=\"org-ul\">\n<li>though SC hardly takes advantage of macros<\/li>\n<\/ul>\n<\/li>\n<li>but python is much slower than Lisp (sometimes by a factor of 100, according to some)\n<ul class=\"org-ul\">\n<li>then again speed isn\u2019t a real issue in SC<\/li>\n<\/ul>\n<\/li>\n<li>so this would be the language of choice were I to port<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div id=\"outline-container-sec-21\" class=\"outline-2\">\n<h2 id=\"sec-21\">so why not port (to anything other than python)?<\/h2>\n<div id=\"text-21\" class=\"outline-text-2\">\n<ul class=\"org-ul\">\n<li>First and foremost: 84,000 lines of code<\/li>\n<li>Again: 84,000 lines of code<\/li>\n<li>we love our objects\n<ul class=\"org-ul\">\n<li>slippery chicken\u2019s fundamental design is object-oriented<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div id=\"outline-container-sec-22\" class=\"outline-2\">\n<div id=\"text-22\" class=\"outline-text-2\">\n<ul class=\"org-ul\">\n<li>we love our interpreter\n<ul class=\"org-ul\">\n<li>querying and manipulating object slots and other data is part of our musical workflow<\/li>\n<\/ul>\n<\/li>\n<li>we love our lists\n<ul class=\"org-ul\">\n<li>not having to think about memory management and how many pitches or dynamics or rhythms we\u2019ll need speeds up workflow<\/li>\n<\/ul>\n<\/li>\n<li>or more simply\n<ul class=\"org-ul\">\n<li>Lisp rules<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>First of all I should say that there are no current plans to port\u00a0slippery chicken.\u00a0But:\u00a0 A humourously intended (though sarcastic: you know who you are!) post on my Facebook page asked me why my\u00a0algorithmic composition software is written in Common Lisp and not something more modern (and Lisp-inspired) like Python. My first response might be [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1055,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,8,152,108],"tags":[],"class_list":["post-1053","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-algorithmic-composition","category-facebook","category-programming","category-slippery-chicken"],"_links":{"self":[{"href":"https:\/\/michael-edwards.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1053","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michael-edwards.org\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michael-edwards.org\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michael-edwards.org\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michael-edwards.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1053"}],"version-history":[{"count":7,"href":"https:\/\/michael-edwards.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1053\/revisions"}],"predecessor-version":[{"id":1061,"href":"https:\/\/michael-edwards.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1053\/revisions\/1061"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/michael-edwards.org\/wp\/index.php?rest_route=\/wp\/v2\/media\/1055"}],"wp:attachment":[{"href":"https:\/\/michael-edwards.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michael-edwards.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1053"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michael-edwards.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}