{"id":109,"date":"2011-11-03T01:37:00","date_gmt":"2011-11-03T01:37:00","guid":{"rendered":"http:\/\/sdi.thoughtstorms.info\/?p=109"},"modified":"2011-11-03T01:37:00","modified_gmt":"2011-11-03T01:37:00","slug":"coffeescript-and-raphael-js","status":"publish","type":"post","link":"https:\/\/sdi.thoughtstorms.info\/?p=109","title":{"rendered":"CoffeeScript and Raphael.js"},"content":{"rendered":"<div dir=\"ltr\" trbidi=\"on\">I&#8217;ve been working on a project based on some of <a href=\"http:\/\/www.doc.gold.ac.uk\/~ma001pj\/machines\/index.html\">my recent artistic works<\/a>. I thought I&#8217;d do it using a Processing sketch embedded in a web-page. It&#8217;s not that I was particularly happy with Java applets (in 2011!) but I figured I&#8217;d make use of the Processing code I already had.<\/p>\n<p>After a whole lot of faffing around trying to get the applet talking to my server, I&#8217;m realising that this is really NOT going to fly for a whole bunch of reasons. I wasn&#8217;t really seeing Java as my long-term future anyway, but I&#8217;ve realised that it isn&#8217;t even going to be the quick, dirty but workable prototype that I&#8217;d hoped. So, if I have to make a break, I might as well do it now and quickly. And look to the future rather than the past. So I&#8217;ve made a decision to rewrite with <a href=\"http:\/\/jashkenas.github.com\/coffee-script\/\">CoffeeScript<\/a> and <a href=\"http:\/\/raphaeljs.com\/\">Raphael.js<\/a>. (I&#8217;m generating SVG designs anyway, so Raphael is ideal.)<\/p>\n<p>After a spending a couple of hours today, that&#8217;s feeling like good decision. There&#8217;s still the hassle of having to convert a lot of code, and it&#8217;s a bit of a fiddle going backwards and forwards between the editor, the command-line compiler and the browser. But CoffeeScript feels like a good language. Obviously meaningful whitespace indentation is comfortable for a Pythonista like me, and I&#8217;m getting used to the Rubyisms without too much pain.<\/p>\n<p>Not much in the way of debugging information, which hasn&#8217;t bitten me yet, but might. Still, I&#8217;m positive.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been working on a project based on some of my recent artistic works. I thought I&#8217;d do it using a Processing sketch embedded in a web-page. It&#8217;s not that I was particularly happy with Java applets (in 2011!) but I figured I&#8217;d make use of the Processing code I already had. After a whole [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[45,77,350,378],"class_list":["post-109","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-browser","tag-coffeescript","tag-processing","tag-raphael-js"],"_links":{"self":[{"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/posts\/109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=109"}],"version-history":[{"count":0,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/posts\/109\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}