<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>kba</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/kba/" />
    <link rel="self" type="application/atom+xml" href="http://blogs.perl.org/users/kba/atom.xml" />
    <id>tag:blogs.perl.org,2009-11-03:/users/kba//1264</id>
    <updated>2012-09-05T23:09:31Z</updated>
    <subtitle>A blog about the Perl programming language</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.38</generator>

<entry>
    <title>Moving to Moose Hackathon roundup</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/kba/2012/09/moving-to-moose-roundup.html" />
    <id>tag:blogs.perl.org,2012:/users/kba//1264.3792</id>

    <published>2012-09-05T21:42:14Z</published>
    <updated>2012-09-05T23:09:31Z</updated>

    <summary>After returning from the Moose/RDF hackathon in Norway and moving to another city this weekend, I finally have the time to tackle two tasks on my TODO list at once, viz finally starting this blog and writing up on the...</summary>
    <author>
        <name>kba</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/kba/">
        <![CDATA[<p>After returning from the Moose/RDF hackathon in Norway and moving to another city this weekend, I finally have the time to tackle two tasks on my TODO list at once, viz finally starting this blog and writing up on the hackathon.</p>

<p>The <a href="http://act.yapc.eu/mtmh2012/">Moving to Moose Hackathon 2012</a>, organized by the <a href="http://oslo.pm.org/">Oslo Perlmongers</a> was a five-day event that catered both to the Metaobject Protocol enthusiasts (who use <a href="http://moose.iinteractive.com/">Moose</a> now and may soon use the new <a href="https://github.com/stevan/p5-mop">p5-mop</a> to be moved to Perl5 Core) and developers interested in using <a href="http://perlrdf.org">Semantic Technologies and RDF with Perl</a>. I was one of the RDF guys.</p>

<p>The venue was extraordinary and beautiful: <a href="https://maps.google.de/maps?q=preikestolen&hl=en&ll=58.966296,6.221008&spn=0.457363,1.663055&hnear=Preikestolen&t=m&z=10"> a remote lodge near Southern Norway's Lysefjorden</a>. The famous <a href="http://en.wikipedia.org/wiki/Preikestolen">Preikestolen cliff</a> was a mere two hour walk (well, <em>mere</em> is a bit optimistic, it's actually quite exhausting and steep, but still great fun) from the lodge and we went there on the first day. The view is wonderful and dangling one's feet from a 600m abyss is the best feet dangling there is. An Oslo.PM affiliate brought his toy helicopters with attached video camera along and filmed our heroic ascent to the delight of the Perl crowd and innocent bystanders alike :)</p>

<p>I discussed possible convergence points of <a href="https://metacpan.org/module/MooseX::Semantic">MooseX::Semantic</a> and <a href="https://metacpan.org/module/KiokuDB">KiokuDB</a> with <a href="http://blog.woobling.org/">Yuval Kogman</a>. Even though we backed away from adding RDF capabilities to KiokuDB, Yuval helped me massively improve the Type Constraint detection and method dispatch system used in MooseX::Semantic by <a href="https://github.com/nothingmuch/data-visitor/commit/0fc71043565f615810a3c1061a9a5eff2bc9eb58">refactoring KiokuDB's dispatch table mechanics out of KiokuDB</a> into <a href="https://metacpan.org/module/Data::Visitor">Data::Visitor</a>. Later that day, <a href="http://www.cs.rpi.edu/~willig4/">Gregory Williams</a>, <a href="http://www.kjetil.kjernsmo.net/">Kjetil Kernsmo</a>, <a href="http://tobyinkster.co.uk/">Toby Inkster</a>, <a href="http://ruben.verborgh.org/">Ruben Verborgh</a> and myself discussed how <a href="https://metacpan.org/release/RDF-Trine">RDF::Trine</a> could be improved by using Moose and how MooseX::Semantic should evolve.</p>

<p><a href="http://sartak.org/">Shawn Moore</a> gave a very helpful talk about <a href="https://speakerdeck.com/u/sartak/p/moose-role-usage-patterns">Role Usage Patterns</a>. While I have been using Moose and Moose roles for several years now, it was enlightening to get a systematic overview of what roles are and what they can be used for beside simple Java-like interfaces.</p>

<p>Greg teamed up with <a href="http://chris.prather.org/">Chris Prather</a> to re-organize the RDF::Trine source code for using Moose. What I learned: Using <code>API</code> as a sub-namespace for roles. That is a convention I will stick to from now on, since I have had trouble organizing my roles in the past.</p>

<p>Ruben rewrote the Turtle parser with astonishing results: DBPedia can now be parsed 100x faster. Yay! Shawn tracked down a bug where a regex was frequently re-computed under certain conditions with the help of <a href="http://dtrace.org/blogs/about/">DTrace</a>, which was so far beyond my skills that it seemed like magic.</p>

<p>I factored the <a href="https://metacpan.org/module/MooseX::Types">MooseX::Types</a> based type constraint library out of MooseX::Semantic and into RDF::Trine. Kjetil and Chris bundled the scattered XML namespace handling functionality into one (of course Moose-based) <a href="https://github.com/kjetilk/URI-NamespaceMap">convenient module</a>.<br />
Greg and Toby Moose-ified many components of RDF::Trine and Toby cleaned up the interface for serializers and parsers to be modeled around formats and not vice versa. RDF::Trine now has the concept of a format registry, which registers formats (such as RDF/XML, Turtle etc.), to which parsers and serializers can register. This allows users to choose from different implentations, e.g. pure Perl parsers and Redland parsers. I rewrote (and am still rewriting) the parsers to use this new interface.</p>

<p>What else? Chris told me about <a href="https://github.com/Tamarou/magpie">Magpie</a>, Tamarou's cool new RESTful web framework, which is proudly <b>not</b> following the MVC pattern and is all about HTTP, resources, states, events and loosely coupled components (there is an <a href="https://github.com/Tamarou/magpie/blob/master/lib/Magpie/Intro.pod">Intro POD</a>). Magpie is heavily based on <a href="https://metacpan.org/release/STEVAN/Bread-Board-0.14">Bread::Board</a>, an inversion of control framework that seems perfect for large applications with lots of components. Another module I embarassingly never looked deeper into is KiokuDB. I always thought that it was just another document database, while it is in fact the perfect solution for persisting Perl objects and not only useful for freezing and thawing (and for some backends even searching) arbitrary data structures, but educational for mapping RDF and Moose semantics.</p>

<p>Having never been on a Perl-related event beyond the very occasional PM meeting, it was a really exciting and fun experience to be at MTMH. Seeing all those CPAN handles like STEVAN, DOY and RAFL resolved into real life-size humans was great -- and sometimes surprising :-) Not only did I improve my hacking skills and got tons of inspiration for my projects, but I feel like I'm part of the community which feels really good and motivates me to keep on programming in Perl, engage in the Perl community and even blog about it from time to time :)</p>]]>
        
    </content>
</entry>

</feed>
