{"id":66,"date":"2008-02-12T19:15:49","date_gmt":"2008-02-13T01:15:49","guid":{"rendered":"http:\/\/www.philhassey.com\/blog\/2008\/02\/12\/tinypy-64k-now-with-built-in-garbage-collection\/"},"modified":"2008-02-19T01:12:32","modified_gmt":"2008-02-19T07:12:32","slug":"tinypy-64k-now-with-built-in-garbage-collection","status":"publish","type":"post","link":"https:\/\/www.philhassey.com\/blog\/2008\/02\/12\/tinypy-64k-now-with-built-in-garbage-collection\/","title":{"rendered":"tinypy 64k &#8211; now with built in garbage collection"},"content":{"rendered":"<p>Yay &#8211; I got incremental garbage collection added into tinypy.  It took a good deal of troubleshooting, but thanks to <a href=\"http:\/\/valgrind.org\/\">valgrind<\/a> (and thanks to the people who pointed me to it) after some work I got all the memory leaks and crashes worked out.  This is a nice step forward, since it enabled me to eliminate the libgc dependency.<\/p>\n<p>tinypy is slightly larger than 64k, but I have vague hopes that will be remedied* at some point.  In the meantime, I&#8217;m going to take a bit of a break from it.  On Feb. 23rd, the <a href=\"http:\/\/www.imitationpickles.org\/ludum\/\">Ludum Dare<\/a> community is having a &#8220;warm-up&#8221; compo, and I shall give tinypy a real try at that point.  After that I will probably put out the 1.0 release.<\/p>\n<p>All that said, its been quite a learning experience for me.  I learned how to tokenize, parse, generate byte code, build a virtual machine, and do garbage collection.  I&#8217;m hoping this will make looking at the innards of other languages seem less intimidating in the future.<\/p>\n<p>* if you&#8217;re a clever C \/ python coder and feel like taking a look at the tinypy code and give me ideas on how to compact the code a bit, I&#8217;d sure appreciate it.  It&#8217;s 4k too big right now, and I&#8217;d really like to fix that.  I&#8217;m cool with any suggestions though I won&#8217;t implement anything unless it leaves the code just as (if not more) readable.  Please examine the README.txt to find out how I calculate the code size first.<\/p>\n<p>svn:\/\/www.imitationpickles.org\/tinypy\/trunk or <a href=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2008\/02\/tinypy.zip\" title=\"tinypy.zip\">tinypy.zip<\/a> for the brave.  I&#8217;ve managed to compile it under mingw32 (Minimalist GCC for windows) as well as using GCC under MacOSX.  Perhaps for the 1.0 release I&#8217;ll include binaries \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yay &#8211; I got incremental garbage collection added into tinypy. It took a good deal of troubleshooting, but thanks to valgrind (and thanks to the people who pointed me to it) after some work I got all the memory leaks and crashes worked out. This is a nice step forward, since it enabled me to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,6,19,2,32],"tags":[],"class_list":["post-66","post","type-post","status-publish","format-standard","hentry","category-crazy","category-development","category-gamedev","category-python","category-tinypy"],"_links":{"self":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/66","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/comments?post=66"}],"version-history":[{"count":0,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/66\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/media?parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/categories?post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/tags?post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}