{"id":1064,"date":"2010-05-08T18:11:40","date_gmt":"2010-05-09T01:11:40","guid":{"rendered":"http:\/\/boost-spirit.com\/home\/2010\/05\/08\/next-week-is-boostcon-week\/"},"modified":"2010-05-10T06:17:53","modified_gmt":"2010-05-10T13:17:53","slug":"next-week-is-boostcon-week","status":"publish","type":"post","link":"http:\/\/boost-spirit.com\/home\/2010\/05\/08\/next-week-is-boostcon-week\/","title":{"rendered":"Next Week is BoostCon Week!"},"content":{"rendered":"<p style=\"text-align: left;\">Finally, the long wait and the preparations for <a href=\"http:\/\/www.boostcon.com\/\">BoostCon 2010<\/a> are over. The last weeks were dominated by writing the code and creating the slides for our talk &#8216;<a href=\"http:\/\/www.boostcon.com\/program\/sessions#de-guzman-kaiser-rad-spirit\">A Framework for RAD Spirit<\/a>&#8216;. Regular readers of this site probably have already wondered why we have been inactive here since mid-March. Well, that is mainly because of preparing for BoostCon turned out to be too time consuming to leave any room for writing posts and articles.<\/p>\n<p><!--more--><\/p>\n<p>Our\u00a0 talk (Joel&#8217;s and mine) is about the current status and the preliminary results we achieved while working on the compiler project <a href=\"http:\/\/boost-spirit.com\/home\/category\/build-a-compiler\/\">announced earlier<\/a>. We settled for applying a Scheme based framework to create a rapid development environment for Spirit parsers. This is a really exciting project which will have long term impact not only on Spirit.<\/p>\n<p>Here is a sneak preview of what we will present at BoostCon.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/boost-spirit.com\/home\/wp-content\/uploads\/2010\/05\/AFrameworkforRADSpirit.png\"><img loading=\"lazy\" class=\"size-full wp-image-1069 aligncenter\" title=\"AFrameworkforRADSpirit\" src=\"http:\/\/boost-spirit.com\/home\/wp-content\/uploads\/2010\/05\/AFrameworkforRADSpirit.png\" alt=\"\" width=\"610\" height=\"355\" srcset=\"http:\/\/boost-spirit.com\/home\/wp-content\/uploads\/2010\/05\/AFrameworkforRADSpirit.png 738w, http:\/\/boost-spirit.com\/home\/wp-content\/uploads\/2010\/05\/AFrameworkforRADSpirit-300x174.png 300w\" sizes=\"(max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p style=\"text-align: left;\">As you can see, we created a kernel consisting out of a cool data structure called U-tree (essentially a discriminated union), capable of storing any\u00a0 S-expression. On top of this Joel developed a Scheme compiler\/interpreter which first constructs a dynamic expression tree from the S-expression (the compiler) conforming to the usual Scheme execution rules. Executing this expression tree yields the result encoded in the Scheme code which has been stored in the S-expression in the first place (the interpreter).<\/p>\n<p>As a byproduct of this we got the beginnings of a new library \u2013 the dynamic counterpart of <a href=\"http:\/\/www.boost.org\/doc\/libs\/1_43_0\/libs\/spirit\/phoenix\/doc\/html\/index.html\">Boost.Phoenix<\/a>. It is aimed at dynamic execution trees based on functional programming paradigms. So the Scheme compiler creates a functional data structure which is indistinguishable from an equivalent data structure created from a C++ expression built on top of this new library.<\/p>\n<p>In order to fill the S-expression from Scheme code we developed a Spirit based parser. OTOH, the Scheme generator (written using Karma &#8211; what else?) takes any S-expression and converts it back to the equivalent Scheme code.<\/p>\n<p>The (currently) top most layer of the framework consists of a Parser for Qi expressions which creates an S-expression and a corresponding generator converting any S-expression holding a Qi parser back into the equivalent Qi (C++) expression. Naturally, the Qi parser is written using Qi and for the Qi Generator we utilized Karma. The Qi compiler mentioned in the figure takes such an S-expression and produces an execution tree, which \u2013 when actually run &#8211; parses any input conforming to the initial Qi grammar.<\/p>\n<p>I don&#8217;t want to spoil the fun and tell too much at this point, but overall this is not only a nice example of how to write more complex Spirit applications, but it gives you a rapid development platform allowing to quickly test Qi parsers. Moreover, as the whole thing is based on a Scheme kernel, you can write your own Scheme code for additional transformations of the handled S-expressions. In the context of the Qi based S-expressions mentioned above this is equivalent to dynamic parser transformations or arbitrary parser analysis modules. That is pretty powerful stuff!<\/p>\n<p>Joel and I plan to write about what we developed and what we learnt while developing this and we hope to get some of you interested to chime in. There is still a lot to do, we are by no means done with this framework. And, as I mentioned already, I believe this will have an impact far beyond its initial target audience.<\/p>\n<p>But BoostCon is not only about Spirit (even if there will be at least 3 talks about it). We will have a full week packed with sessions presented by well known Boost people speaking about a whole set of interesting topics. Just have a look at the <a href=\"http:\/\/www.boostcon.com\/program#schedule\">BoostCon schedule<\/a> to convince yourself. Over the next week I will try to document some of my impressions live from the Physics Center in Aspen (where BoostCon takes place). So stay tuned!<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li><a href=\"#\" class=\"sharing-anchor sd-button share-more\"><span>Share<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><div class=\"sharing-hidden\"><div class=\"inner\" style=\"display: none;\"><ul><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-1064\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/05\/08\/next-week-is-boostcon-week\/?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\" ><span>Facebook<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-1064\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/05\/08\/next-week-is-boostcon-week\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" ><span>Twitter<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-pinterest\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-pinterest-1064\" class=\"share-pinterest sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/05\/08\/next-week-is-boostcon-week\/?share=pinterest\" target=\"_blank\" title=\"Click to share on Pinterest\" ><span>Pinterest<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-1064\" class=\"share-linkedin sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/05\/08\/next-week-is-boostcon-week\/?share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\" ><span>LinkedIn<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-reddit\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-reddit sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/05\/08\/next-week-is-boostcon-week\/?share=reddit\" target=\"_blank\" title=\"Click to share on Reddit\" ><span>Reddit<\/span><\/a><\/li><li class=\"share-tumblr\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-tumblr sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/05\/08\/next-week-is-boostcon-week\/?share=tumblr\" target=\"_blank\" title=\"Click to share on Tumblr\" ><span>Tumblr<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Finally, the long wait and the preparations for BoostCon 2010 are over. The last weeks were dominated by writing the code and creating the slides for our talk &#8216;A Framework for RAD Spirit&#8216;. Regular readers of this site probably have already wondered why we have been inactive here since mid-March. Well, that is mainly because [&hellip;]<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li><a href=\"#\" class=\"sharing-anchor sd-button share-more\"><span>Share<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><div class=\"sharing-hidden\"><div class=\"inner\" style=\"display: none;\"><ul><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-1064\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/05\/08\/next-week-is-boostcon-week\/?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\" ><span>Facebook<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-1064\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/05\/08\/next-week-is-boostcon-week\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" ><span>Twitter<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-pinterest\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-pinterest-1064\" class=\"share-pinterest sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/05\/08\/next-week-is-boostcon-week\/?share=pinterest\" target=\"_blank\" title=\"Click to share on Pinterest\" ><span>Pinterest<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-1064\" class=\"share-linkedin sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/05\/08\/next-week-is-boostcon-week\/?share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\" ><span>LinkedIn<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-reddit\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-reddit sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/05\/08\/next-week-is-boostcon-week\/?share=reddit\" target=\"_blank\" title=\"Click to share on Reddit\" ><span>Reddit<\/span><\/a><\/li><li class=\"share-tumblr\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-tumblr sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/05\/08\/next-week-is-boostcon-week\/?share=tumblr\" target=\"_blank\" title=\"Click to share on Tumblr\" ><span>Tumblr<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div><\/div><\/div>","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"","spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[26,15],"tags":[7,8],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pIHdZ-ha","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/posts\/1064"}],"collection":[{"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/comments?post=1064"}],"version-history":[{"count":4,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/posts\/1064\/revisions"}],"predecessor-version":[{"id":1066,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/posts\/1064\/revisions\/1066"}],"wp:attachment":[{"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/media?parent=1064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/categories?post=1064"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/tags?post=1064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}