{"author_name":"JackDegree","cat":"LD #33","comments":[],"epoch":1440059160,"likes":1,"metadata":{"p_key":"16545","p_author":"JackDegree","p_authorkey":"38813","p_urlkey":"51834","p_title":"Don\u2019t have to stray from the right path after all","p_cat":"LD #33","p_event":"LD33","p_time":"1440059160","p_likes":"1","p_comments":"0","p_status":"UPD5","us_key":"38813","us_name":"JackDegree","us_username":"jackdegree","event_start":"1440115200","event_key":"29","event_name":"LD33"},"text":"<p>So something interesting happened while I started warming up :D.<\/p>\n <p>This came out:<a href=\"https:\/\/github.com\/dparis\/phzr\">\u00a0https:\/\/github.com\/dparis\/phzr<\/a><\/p>\n <p>So yeah, no javascript for meeeeee.<\/p>\n <p>It&#8217;s crazy because while warming up I was actually pulling my hair out trying to get back into a js thinking mode. I&#8217;ve been <del>worshipping<\/del> learning Clojure for the past 6 months now, so I&#8217;ve come to expect a few things from a language which aren&#8217;t exactly there in JS.<\/p>\n <p>For example, I started trying to implement a feature I&#8217;d thought of, using sets. Yeah&#8230; for those who don&#8217;t know, well, implementing sets in javascript is a bit shady. I&#8217;m sure there&#8217;s <a href=\"https:\/\/github.com\/mauriciosantos\/Buckets-JS\">third party libraries<\/a> somewhere but the basic advice I found was:<\/p>\n <blockquote><p>var mySet = {&#8216;a&#8217; : true, &#8216;b&#8217; : true};<\/p>\n <p>if (&#8216;a&#8217; in mySet) {something}; etc etc&#8230;. sure, that&#8217;s not too bad but&#8230; this isn&#8217;t a set, I don&#8217;t have native support for unions and stuff.<\/p><\/blockquote>\n <p>yeaaaaaah nooooooo&#8230;<\/p>\n <blockquote><p>(def mySet #{:a :b}) =&gt; #&#8217;user\/mySet<\/p>\n <p>(mySet :a) =&gt; returns :a \u2013 and all the clojure.set functions come with it. union and intersections, etc, etc<\/p><\/blockquote>\n <p>Also, this allows me to develop using a repl, just having my changes instantly appear in my game\u00a0without even having to refresh my browser.<\/p>\n <p>Anyways. I&#8217;m even more motivated now \ud83d\ude00<\/p>\n <p>&nbsp;<\/p>","time":"August 20th, 2015 3:26 am","title":"Don\u2019t have to stray from the right path after all"}