{"id":32,"date":"2009-03-05T11:25:54","date_gmt":"2009-03-05T18:25:54","guid":{"rendered":"http:\/\/log.jonriehl.com\/?p=32"},"modified":"2013-07-12T12:56:08","modified_gmt":"2013-07-12T19:56:08","slug":"the-alt-g-bitbucket-repository","status":"publish","type":"post","link":"https:\/\/log.jonriehl.com\/?p=32","title":{"rendered":"The ALT-G Bitbucket Repository"},"content":{"rendered":"<p>If you are not following the <a href=\"http:\/\/groups.google.com\/group\/alt-g\/\">ALT-G group<\/a>, I&#8217;d like to announce that source code for the Camlp5 source-to-source translator is available on <a href=\"http:\/\/bitbucket.org\/\">Bitbucket<\/a> at <a href=\"http:\/\/bitbucket.org\/jriehl\/altg\/\">http:\/\/bitbucket.org\/jriehl\/altg\/<\/a>.\u00c2\u00a0 Specifically, you&#8217;ll find it in the <code>camlp5<\/code> subdirectory.<\/p>\n<p>If you dig the Camlp5 stuff, the <code>viscomp<\/code> subdirectory might also be of interest.\u00c2\u00a0 In there I give an example of taking apart the read-eval-print loop for the SML\/NJ compiler.\u00c2\u00a0 This decomposition draws a line between the front-end (parser) and the back-end (everything else).\u00c2\u00a0 This separation gives me several things: a parser for SML\/NJ (not too hard to get a hold of, but I did have to go digging), and an evaluator that can operate on either strings or SML\/NJ abstract syntax.\u00c2\u00a0 It should come as no surprise that, following my SML\/NJ investigation, my attention has turned to source-to-source translation.<\/p>\n<p>One idea I take from my work on Mython, is applying the evaluator at compile time.\u00c2\u00a0 A lot of other people seem to avoid doing this, and I&#8217;m still a little curious why (other than old reservations about binary size).\u00c2\u00a0 Camlp5 could have incorporated parts of the Ocaml compiler to get parse-time evaluation, and this would make its &#8220;#pragma&#8221; declaration much more useful.\u00c2\u00a0 If I understand correctly, Camlp5 wanted a clean break with the Ocaml code, so they have developed an interpreted evaluator that is not complete (at least for the version I was using).<\/p>\n<p>In conversations I&#8217;ve had with John Reppy, he also seems to prefer not coupling a programmable front-end with a specific evaluator since the front-end would become saddled with limitations of the evaluator (SML\/NJ&#8217;s 31-bit integers were one example given).\u00c2\u00a0 I&#8217;ll certainly have to think more about this design point, and would be interested in hearing more about the pro&#8217;s and con&#8217;s of general purpose compile-time evaluation (other than the obvious limitation that user code can now cause the compiler to not halt).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are not following the ALT-G group, I&#8217;d like to announce that source code for the Camlp5 source-to-source translator is available on Bitbucket at http:\/\/bitbucket.org\/jriehl\/altg\/.\u00c2\u00a0 Specifically, you&#8217;ll find it in the camlp5 subdirectory. If you dig the Camlp5 stuff, the viscomp subdirectory might also be of interest.\u00c2\u00a0 In there I give an example of [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/log.jonriehl.com\/index.php?rest_route=\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/log.jonriehl.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/log.jonriehl.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/log.jonriehl.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/log.jonriehl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=32"}],"version-history":[{"count":6,"href":"https:\/\/log.jonriehl.com\/index.php?rest_route=\/wp\/v2\/posts\/32\/revisions"}],"predecessor-version":[{"id":99,"href":"https:\/\/log.jonriehl.com\/index.php?rest_route=\/wp\/v2\/posts\/32\/revisions\/99"}],"wp:attachment":[{"href":"https:\/\/log.jonriehl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/log.jonriehl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/log.jonriehl.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}