<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Tinybox</title>
	
	<link>http://www.tinybox.net</link>
	<description>Un fourre-tout perdu sur le net ...</description>
	<lastBuildDate>Fri, 27 Aug 2010 15:33:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/TinyboxDotNet" /><feedburner:info uri="tinyboxdotnet" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>wb to blogohell …</title>
		<link>http://feedproxy.google.com/~r/TinyboxDotNet/~3/anHDSpIiZXs/</link>
		<comments>http://www.tinybox.net/2010/08/27/wb-to-blogohell/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 15:33:37 +0000</pubDate>
		<dc:creator>mc</dc:creator>
				<category><![CDATA[Humeur]]></category>
		<category><![CDATA[Informatique]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.tinybox.net/?p=578</guid>
		<description><![CDATA[bad mood last weeks so i escaped from blogosphere &#8230; I came back today and read a clever solution of the pascal&#8217;s triangle on Masak&#8217;s blog (http://use.perl.org/~masak/journal/40516?from=rss). I wrote code for years now, tried a lot of langages, stuck to perl5 because it&#8217;s the most featured one&#8230; and really wanted something better. Perl6 is really [...]]]></description>
			<content:encoded><![CDATA[<p>bad mood last weeks so i escaped from blogosphere &#8230; I came back today and read a clever solution of the pascal&#8217;s triangle on Masak&#8217;s blog (http://use.perl.org/~masak/journal/40516?from=rss). I wrote code for years now, tried a lot of langages, stuck to perl5 because it&#8217;s the most featured one&#8230; and really wanted something better. Perl6 is really the kind of thing i expected for years (while coming to haskell).</p>
<p>So i read comments: &laquo;&nbsp;unreadable&nbsp;&raquo;, &laquo;&nbsp;research language&nbsp;&raquo;, &laquo;&nbsp;not for production&nbsp;&raquo; &#8230; comments close from those made by php or python users discovering $_ or the HOP &#8230;</p>
<p>bad mood again. log off &#8230;</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.tinybox.net/2010/08/27/wb-to-blogohell/&amp;t=wb+to+blogohell+..." rel="nofollow" class="external" title="Partagez-le sur Facebook">Partagez-le sur Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=wb+to+blogohell+...+-+http://b2l.me/amfr7s&amp;source=shareaholic" rel="nofollow" class="external" title="Tweetez-le !">Tweetez-le !</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

<img src="http://feeds.feedburner.com/~r/TinyboxDotNet/~4/anHDSpIiZXs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tinybox.net/2010/08/27/wb-to-blogohell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tinybox.net/2010/08/27/wb-to-blogohell/</feedburner:origLink></item>
		<item>
		<title>navigate into koha code with vim</title>
		<link>http://feedproxy.google.com/~r/TinyboxDotNet/~3/CjHkpNDQy10/</link>
		<comments>http://www.tinybox.net/2010/07/13/koha_and_vim/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 08:11:29 +0000</pubDate>
		<dc:creator>mc</dc:creator>
				<category><![CDATA[Koha]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://www.tinybox.net/?p=575</guid>
		<description><![CDATA[this is an update for http://www.tinybox.net/2009/06/27/edit-koha-code-with-vim/ " if vim is in a koha root if isdirectory('C4') " Verb: ( n = navigate, o = open ) " Adjective: ( o = opac, i = intranet ) " Noon: ( t = template, n = include ) let g:koha_itmpl='koha-tmpl/intranet-tmpl/prog/en/modules' " intranet templates let g:koha_iinc='koha-tmpl/intranet-tmpl/prog/en/includes' " intranet [...]]]></description>
			<content:encoded><![CDATA[<p>this is an update for http://www.tinybox.net/2009/06/27/edit-koha-code-with-vim/</p>
<p><code><br />
" if vim is in a koha root<br />
if isdirectory('C4')<br />
        " Verb: ( n = navigate, o = open )<br />
        " Adjective: ( o = opac, i = intranet )<br />
        " Noon: ( t = template, n = include ) </p>
<p>        let g:koha_itmpl='koha-tmpl/intranet-tmpl/prog/en/modules' " intranet templates<br />
        let g:koha_iinc='koha-tmpl/intranet-tmpl/prog/en/includes' " intranet includes<br />
        let g:koha_otmpl='koha-tmpl/opac-tmpl/prog/en/modules' " opac templates<br />
        let g:koha_oinc='koha-tmpl/opac-tmpl/prog/en/includes' " opac includes</p>
<p>        " so to open an intranet template, go on it with cursor and type ,oit</p>
<p>        nnoremap ,nit :e <c-r>=g:koha_itmpl<cr><br />
        nmap ,oit ,nit/<c-r><c-f><br />
        nnoremap ,nii :e <c-r>=g:koha_iinc<cr><br />
        nmap ,oii ,nii/<c-r><c-f></p>
<p>        nnoremap ,not :e <c-r>=g:koha_otmpl<cr><br />
        nmap ,oot ,not/<c-r><c-f><br />
        nnoremap ,noo :e <c-r>=g:koha_oinc<cr><br />
        nmap ,ooi ,ooi/<c-r><c-f></p>
<p>        " add include in the path ... so gf works inside templates<br />
        exec 'set path+='.g:koha_iinc</p>
<p>endif<br />
</code></p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.tinybox.net/2010/07/13/koha_and_vim/&amp;t=navigate+into+koha+code+with+vim" rel="nofollow" class="external" title="Partagez-le sur Facebook">Partagez-le sur Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=navigate+into+koha+code+with+vim+-+http://b2l.me/aab433&amp;source=shareaholic" rel="nofollow" class="external" title="Tweetez-le !">Tweetez-le !</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

<img src="http://feeds.feedburner.com/~r/TinyboxDotNet/~4/CjHkpNDQy10" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tinybox.net/2010/07/13/koha_and_vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tinybox.net/2010/07/13/koha_and_vim/</feedburner:origLink></item>
		<item>
		<title>use Lazyness;</title>
		<link>http://feedproxy.google.com/~r/TinyboxDotNet/~3/41s88izRmjA/</link>
		<comments>http://www.tinybox.net/2010/06/20/use-lazyness/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 15:31:21 +0000</pubDate>
		<dc:creator>mc</dc:creator>
				<category><![CDATA[Informatique]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.tinybox.net/?p=572</guid>
		<description><![CDATA[I enjoyed playing with my new Lazyness module. Book found a bug without even running the code afaik. It&#8217;s fixed and i added tests. I also added documentation and and gited it. I can also use TheForce now: based on Modern::Perl, it also exports Lazyness and List::AnyUtils. Partagez-le sur Facebook Tweetez-le !]]></description>
			<content:encoded><![CDATA[<p>I enjoyed playing with my new <a href="http://www.tinybox.net/2010/06/19/lazyness-in-perl-so-easy/">Lazyness module</a>. Book found a bug without even running the code afaik. It&#8217;s fixed and i added tests. I also added documentation and<br />
and <a href="http://github.com/eiro/p5-lazyness">gited it</a>.</p>
<p>I can also use <a href="http://github.com/eiro/p5-theforce">TheForce</a> now: based on Modern::Perl, it also exports Lazyness and List::AnyUtils.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.tinybox.net/2010/06/20/use-lazyness/&amp;t=use+Lazyness%3B" rel="nofollow" class="external" title="Partagez-le sur Facebook">Partagez-le sur Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=use+Lazyness%3B+-+http://b2l.me/47uar&amp;source=shareaholic" rel="nofollow" class="external" title="Tweetez-le !">Tweetez-le !</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

<img src="http://feeds.feedburner.com/~r/TinyboxDotNet/~4/41s88izRmjA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tinybox.net/2010/06/20/use-lazyness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tinybox.net/2010/06/20/use-lazyness/</feedburner:origLink></item>
		<item>
		<title>lazyness in perl: so easy …</title>
		<link>http://feedproxy.google.com/~r/TinyboxDotNet/~3/BdmOuhWXV5A/</link>
		<comments>http://www.tinybox.net/2010/06/19/lazyness-in-perl-so-easy/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 21:32:09 +0000</pubDate>
		<dc:creator>mc</dc:creator>
				<category><![CDATA[Nature]]></category>

		<guid isPermaLink="false">http://www.tinybox.net/?p=570</guid>
		<description><![CDATA[as some of you know, i&#8217;m a very enthousiastic haskell beginner and happy daily perl programmer. What i miss from haskell is: - lazy arrays - some prelude functions like takeWhile, while and filter (a lazy version of grep) tonight, as i have to struggle one more time with very large CSV file, i realized [...]]]></description>
			<content:encoded><![CDATA[<p>as some of you know, i&#8217;m a very enthousiastic haskell beginner and happy daily perl programmer. What i miss from haskell is: </p>
<p>- lazy arrays<br />
- some prelude functions like takeWhile, while and filter (a lazy version of grep)</p>
<p>tonight, as i have to struggle one more time with very large CSV file, i realized how the while loop has become boring for me. I wrote a little haskell code.</p>
<p><code><br />
positives = [0..]<br />
is_even x = x `mod` 2 == 0<br />
evens = filter is_even</p>
<p>main = mapM_ print<br />
    [ ("10 positives", take 10 positives)<br />
    , ("10 evens"    , take 10 (evens positives) )<br />
    , ("evens < 10"  , takeWhile (< 10) (evens positives) )<br />
    ]<br />
</code></p>
<p>and tried to implement all my missings in perl.</p>
<p>  * lazyness behavior can be implemented with closures<br />
  * so the subs take, takeWhile and filter use closures<br />
  * at the end of lazyness chain, i need a collect sub to get a real array</p>
<p>I started to code and it was quiet easy:</p>
<p><code><br />
#! /usr/bin/perl<br />
use 5.10.0;<br />
use utf8;<br />
use strict;<br />
use warnings;</p>
<p>sub to_infinity_from {<br />
    my ($start) = @_;<br />
    sub { $start++ }<br />
}</p>
<p>sub take {<br />
    my ( $want_more, $some ) = @_;<br />
    $want_more++;<br />
    sub { $want_more-- ?  $some->() : undef }<br />
}</p>
<p>sub takeWhile (&#038;$) {<br />
    my ( $test, $list ) = @_;<br />
    sub {<br />
	local $_ = $list->();<br />
	defined or return undef;<br />
	$test->() ? $_ : undef;<br />
    }<br />
}</p>
<p>sub filter (&#038;$) {<br />
    my ( $test, $list ) = @_;<br />
    sub {<br />
	while ( defined ( local $_ = $list->() ) ) {<br />
	    $test->() and return $_<br />
	}<br />
	undef;<br />
    }<br />
}</p>
<p>sub collect ($) {<br />
    my ( $list ) = @_;<br />
    my @r;<br />
    while ( defined ( my $element = $list->() ) ) {<br />
	push @r,$element<br />
    }<br />
    @r;<br />
}</p>
<p>for my $sequence<br />
( [ "ten positives"          => take 10, to_infinity_from(0)                                       ]<br />
, [ "ten evens"              => take 10, filter { not( $_ % 2 ) } to_infinity_from(0)              ]<br />
, [ "evens less than 10"     => takeWhile { $_ < 10 } filter { not( $_ % 2 ) } to_infinity_from(0) ]<br />
) {<br />
    my ( $desc, $iterator ) = @$sequence;<br />
    say $desc;<br />
    while ( defined ( my $_ = $iterator->() ) ) { say $_ }<br />
}</p>
<p>say $_ for "collector", collect take 10, to_infinity_from(0);<br />
</code></p>
<p>It worked! sooo easily! Now, a real live use case: I want a YAML::Dump of the first 10 adults of my csv file:</p>
<p><code><br />
use Text::CSV;<br />
use YAML;<br />
use Lazyness ':all'; # collect, filter, take, takeWhile </p>
<p>( my $csv = Text::CSV->new({qw/ binary /})<br />
	or die Text::CSV->error_diag<br />
)->column_names(qw/firstname lastname birthdate login /);</p>
<p>open my $fh,'users.csv' or die "$!";<br />
say YAML::Dump [<br />
    collect take 10, filter {<br />
	$$_{birthdate} ~~ /(?<year>\d{4})-/<br />
	    and $+{year} < 1992<br />
    } sub { $csv->getline_hr($fh) }<br />
];<br />
</code></p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.tinybox.net/2010/06/19/lazyness-in-perl-so-easy/&amp;t=lazyness+in+perl%3A+so+easy+..." rel="nofollow" class="external" title="Partagez-le sur Facebook">Partagez-le sur Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=lazyness+in+perl%3A+so+easy+...+-+http://b2l.me/4z95b&amp;source=shareaholic" rel="nofollow" class="external" title="Tweetez-le !">Tweetez-le !</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

<img src="http://feeds.feedburner.com/~r/TinyboxDotNet/~4/BdmOuhWXV5A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tinybox.net/2010/06/19/lazyness-in-perl-so-easy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.tinybox.net/2010/06/19/lazyness-in-perl-so-easy/</feedburner:origLink></item>
		<item>
		<title>Template::Declare::Quickly ?</title>
		<link>http://feedproxy.google.com/~r/TinyboxDotNet/~3/ps2InhmGe60/</link>
		<comments>http://www.tinybox.net/2010/06/15/templatedeclarequickly/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 18:54:28 +0000</pubDate>
		<dc:creator>mc</dc:creator>
				<category><![CDATA[Informatique]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.tinybox.net/?p=567</guid>
		<description><![CDATA[Franck Cuny provided an experimental Dancer Template for Template::Declare. I realised that it wasn&#8217;t what i wanted so i spend some time tonight to find my way. I finally wrote Template::Declare::Quickly which isn&#8217;t a Dancer template at all: just a syntaxic suggar on top of Template::Declare. Now i&#8217;m able to write: package html; use Template::Declare::Tags; [...]]]></description>
			<content:encoded><![CDATA[<p>Franck Cuny provided an experimental Dancer Template for Template::Declare. I realised that it wasn&#8217;t what i wanted so i spend some time tonight to find my way. I finally wrote Template::Declare::Quickly which isn&#8217;t a Dancer template at all:<br />
just a syntaxic suggar on top of Template::Declare. Now i&#8217;m able to write:</p>
<p><code><br />
package html;<br />
use Template::Declare::Tags;</p>
<p>template page => sub {<br />
    my ( undef, $arg ) = @_;<br />
    html {<br />
	head {<br />
	    title { "Dancer fart" }<br />
	}<br />
	body {<br />
	    h1 { "prout" }<br />
	    p  { "welcome to $$arg{url}" }<br />
	}<br />
    }<br />
};</p>
<p>package main;<br />
use Template::Declare::Quickly<br />
qw/ strict with dispatch_to / => [qw/ html /];</p>
<p>say html::show('page');<br />
</code></p>
<p>The code of Template::Declare::Quickly itself is very short. I&#8217;ll contact Sartak to be sure it doesn&#8217;t break some advanced use of Template::Declare. </p>
<p><code><br />
package Template::Declare::Quickly;<br />
use strict;<br />
use warnings;</p>
<p>sub import {<br />
    shift;<br />
    my %args = @_;<br />
    if ( $args{dispatch_to} ) {<br />
	no strict 'refs';<br />
	for my $package ( @{ $args{dispatch_to} } ) {<br />
	    push @{$package.'::ISA'}, 'Template::Declare'<br />
	}<br />
    }<br />
    Template::Declare->init(%args);<br />
}</p>
<p>1;<br />
</code></p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.tinybox.net/2010/06/15/templatedeclarequickly/&amp;t=Template%3A%3ADeclare%3A%3AQuickly+%3F" rel="nofollow" class="external" title="Partagez-le sur Facebook">Partagez-le sur Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Template%3A%3ADeclare%3A%3AQuickly+%3F+-+http://b2l.me/3ypax&amp;source=shareaholic" rel="nofollow" class="external" title="Tweetez-le !">Tweetez-le !</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

<img src="http://feeds.feedburner.com/~r/TinyboxDotNet/~4/ps2InhmGe60" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tinybox.net/2010/06/15/templatedeclarequickly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tinybox.net/2010/06/15/templatedeclarequickly/</feedburner:origLink></item>
		<item>
		<title>the dancer meet astaire</title>
		<link>http://feedproxy.google.com/~r/TinyboxDotNet/~3/Bpt1b8IFngc/</link>
		<comments>http://www.tinybox.net/2010/06/15/the-dancer-meet-astaire/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 07:12:10 +0000</pubDate>
		<dc:creator>mc</dc:creator>
				<category><![CDATA[Informatique]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.tinybox.net/?p=565</guid>
		<description><![CDATA[During a perl6 workshop at FPW2010, Sukria and Martin Berends chatted about a perl6 port of Dancer. In my mind, it was already done (masak wrote a port of Rack called Web.pm and a port of Sinatra called Astaire long time ago) so I contacted Masak about the health of those code but masak admited [...]]]></description>
			<content:encoded><![CDATA[<p>During a perl6 workshop at FPW2010, Sukria and Martin Berends chatted about a perl6 port of Dancer. In my mind, it was already done (masak wrote a port of Rack called Web.pm and a port of Sinatra called Astaire long time ago) so I contacted Masak about the health of those code but masak admited Astaire was very experimental and did not gone far.</p>
<p>So masak and Tene joined #dancer, they are both perl6 programmers since 2 years AFAIK and would like to help. So we have 3 perl6 programmers interested by this Dancer port and all of them already played with web related projects. wow &#8230; perhaps it&#8217;s time to contact the mod_parrot author <img src='http://www.tinybox.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  </p>
<p>And yes &#8230; i promissed masak a post on dancer-users but everything was told on the chan yesterday. </p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.tinybox.net/2010/06/15/the-dancer-meet-astaire/&amp;t=the+dancer+meet+astaire" rel="nofollow" class="external" title="Partagez-le sur Facebook">Partagez-le sur Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=the+dancer+meet+astaire+-+http://b2l.me/3uu4q&amp;source=shareaholic" rel="nofollow" class="external" title="Tweetez-le !">Tweetez-le !</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

<img src="http://feeds.feedburner.com/~r/TinyboxDotNet/~4/Bpt1b8IFngc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tinybox.net/2010/06/15/the-dancer-meet-astaire/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tinybox.net/2010/06/15/the-dancer-meet-astaire/</feedburner:origLink></item>
		<item>
		<title>FPW 2010</title>
		<link>http://feedproxy.google.com/~r/TinyboxDotNet/~3/D0qpUflnLCk/</link>
		<comments>http://www.tinybox.net/2010/06/13/fpw-2010/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 20:18:45 +0000</pubDate>
		<dc:creator>mc</dc:creator>
				<category><![CDATA[Informatique]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.tinybox.net/?p=563</guid>
		<description><![CDATA[A chat with Laurent Dami who really helped me to understand some underlaying points of the discution about DBIx::Class::Direct. Thanks to him, i&#8217;m back to my initial idea (make the KiokuDB DBIx::Class backend work for us). Franck Cuny also told me about his satisfation related to the KiokuDB performances. I also enjoy meeting Sukria and [...]]]></description>
			<content:encoded><![CDATA[<p>A chat with <a href="http://ldami.blogspot.com/">Laurent Dami</a> who really helped me to understand some underlaying points of the discution about DBIx::Class::Direct. Thanks to him, i&#8217;m back to my initial idea (make the KiokuDB DBIx::Class backend work for us). Franck Cuny also told me about his satisfation related to the KiokuDB performances. </p>
<p>I also enjoy meeting Sukria and chatting with him. He already reported the Dancer related part on <a href="http://www.sukria.net/fr/archives/2010/06/12/french-perl-workshop-2010-report/" class="broken_link">his blog</a> so i won&#8217;t spoil here: just read it <img src='http://www.tinybox.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Franck Cuny&#8217;s talk on Plack was an enlightened me about the Plack Middlewares. Plack isn&#8217;t just the implementation of PSGI. It also provide a very neat way to add plugins for the HTTP part of your web apps and frameworks. So implementing things at the plack level insteed of the Dancer one is a good way to share works between every perl frameworks. He made slides about<a href="http://search.cpan.org/~miyagawa/Plack-Middleware-Debug-0.09/lib/Plack/Middleware/Debug.pm">Debug</a> and<a href="http://search.cpan.org/~miyagawa/Plack-0.9938/lib/Plack/Middleware/StackTrace.pm">StackTrace</a> which provides very powerfull debugging informations. Definitely: i&#8217;ll use plackup now <img src='http://www.tinybox.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I asked Franck about my Dancer-CGI-Wrapper. It <a href="http://search.cpan.org/~miyagawa/Plack-0.9938/lib/Plack/App/CGIBin.pm">already exists</a> at the Plack level &#8230; i begun to read the code and it seems i can remove my repo <img src='http://www.tinybox.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>also a lot of chat with lot of people about perl6, haskell, the growth of functionnal programming, Calais by night, the rock&#8217;n'roll attitude of <a href="http://en.wikipedia.org/wiki/Welsh_rarebit">welsh</a> eating, the french soccer team, the FPW&#8217;09 T-shirts &#8230; had a lot of fun thanks to all of you guys ( big up to Sebastien, Laurent and the sponsors <a href="http://fr.linkfluence.net/">linkfluence</a>, <a href="http://www.dotandco.net/">dot and co</a>, <a href="http://oreilly.com/">O&#8217;reilly</a>, <a href="http://www.linux-mag.com/">Linux mag</a>, <a href="http://www.univ-littoral.fr/english.htm" class="broken_link">Ulco</a> &#8230; Sebastien? did i missed someone? <img src='http://www.tinybox.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ).</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.tinybox.net/2010/06/13/fpw-2010/&amp;t=FPW+2010" rel="nofollow" class="external" title="Partagez-le sur Facebook">Partagez-le sur Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=FPW+2010+-+http://b2l.me/3g2up&amp;source=shareaholic" rel="nofollow" class="external" title="Tweetez-le !">Tweetez-le !</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

<img src="http://feeds.feedburner.com/~r/TinyboxDotNet/~4/D0qpUflnLCk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tinybox.net/2010/06/13/fpw-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tinybox.net/2010/06/13/fpw-2010/</feedburner:origLink></item>
		<item>
		<title>my bad step with ORMs</title>
		<link>http://feedproxy.google.com/~r/TinyboxDotNet/~3/oGDcD3eKMXQ/</link>
		<comments>http://www.tinybox.net/2010/06/10/my-bad-step-with-orms/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 11:03:34 +0000</pubDate>
		<dc:creator>mc</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.tinybox.net/?p=559</guid>
		<description><![CDATA[I didn’t work on Dancer-CGI this week as i only hacked on interesting things on my spare time. I hope i’ll come back on it when i’ll come back from FPW’10 (i&#8217;m about to go). So what’s up ? First, I rewrote the patch about named routes in dancer: it’s now perl 5.8 crash free, [...]]]></description>
			<content:encoded><![CDATA[<p>I didn’t work on Dancer-CGI this week as i only hacked on interesting things on my spare time. I hope i’ll come back on it when i’ll come back from FPW’10 (i&#8217;m about to go). So what’s up ?</p>
<p>First, I rewrote the patch about <a href="http://lists.perldancer.org/pipermail/dancer-users/2010-June/000152.html" class="broken_link"><br />
named routes in dancer</a>: it’s now perl 5.8 crash free, tested and documented. Sukria started to merge it to his devel branch tonight.</p>
<p>Second, I begun to investigate on writing a business model on top of an ORM. I’m frustrated about that: i feel that the current ORMs failed to mix the ease of activerecord (ruby) and the power and extensibility of DBIx::Class (perl). I tried but it was an epic fail: everybody tried to discourage me to follow this way. As i understand the <a href="http://lists.scsys.co.uk/pipermail/dbix-class/2010-June/009240.html">Laurent Dami’s answer</a>: KiokuDB’s DBIx::Class backend would be a false trail too ?</p>
<p>I also seen <a href="http://www.shadowcat.co.uk/archive/conference-video/yapc-na-2009/dbic/">an interesting talk (shout?)</a> about the future of DBIx::Class. It&#8217;s a very clear review of the DBIx::Class good parts, bad parts and ideas to fix the bad parts. The future of DBIx::Class is awesome too! much closer than what i would like to use now and failed to imagine. Plus, Data::CapabilityBased reminds me the haskell classes which is one of the things love so much in this langage.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.tinybox.net/2010/06/10/my-bad-step-with-orms/&amp;t=my+bad+step+with+ORMs" rel="nofollow" class="external" title="Partagez-le sur Facebook">Partagez-le sur Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=my+bad+step+with+ORMs+-+File: /data/app/webapp/functions.php<br />Line: 66<br />Message: Duplicate entry '2m6t3' for key 'code'&amp;source=shareaholic" rel="nofollow" class="external" title="Tweetez-le !">Tweetez-le !</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

<img src="http://feeds.feedburner.com/~r/TinyboxDotNet/~4/oGDcD3eKMXQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tinybox.net/2010/06/10/my-bad-step-with-orms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tinybox.net/2010/06/10/my-bad-step-with-orms/</feedburner:origLink></item>
		<item>
		<title>Dance, Koha, dance !</title>
		<link>http://feedproxy.google.com/~r/TinyboxDotNet/~3/lMxWLcuLerw/</link>
		<comments>http://www.tinybox.net/2010/06/03/dance-koha-dance/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 05:51:34 +0000</pubDate>
		<dc:creator>mc</dc:creator>
				<category><![CDATA[Koha]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[perl dancer koha cgi]]></category>

		<guid isPermaLink="false">http://www.tinybox.net/?p=551</guid>
		<description><![CDATA[At the last Biblibre&#8216;s CodeRun (beginning of May 2010), i wrote the first lines of a CGI wrapper for Dancer. The initial goal was to be able run legacy CGI.pm scripts written with the OO style on the top of Dancer - with a minimal amount of changes (or even better: no change at all) [...]]]></description>
			<content:encoded><![CDATA[<p>At the last <a href="http://www.biblibre.com">Biblibre</a>&#8216;s CodeRun (beginning of May 2010), i wrote the first lines of a CGI wrapper for <a href="http://www.perldancer.org" class="broken_link">Dancer</a>. The initial goal was to be able run legacy CGI.pm scripts written with the OO style on the top of Dancer</p>
<p>- with a minimal amount of changes (or even better: no change at all)<br />
- every required changes must keep CGI compatibility.<br />
- add the ability to share the bytecoding and the values of the loaded modules between http requests (as mod_perl does) to reduce time response and load average.<br />
- make the CGI applications easier to debug (using dancer standalone server, the debug console and warning catch)</p>
<p>The proof of concept is to make <a href="http://koha-community.org/">Koha ILS</a> run on top of Dancer. I wrote a kohadance.pl script for that.</p>
<p>I spent some time to work on it since, wrote some test files to make sure that i&#8217;m able to use %ENV, return correct http responses, correctly provide access to the http get and post parameters, correctly transmit the $query->header settings to Dancer, handle cookies, &#8230; . All the test suite runs successfully.</p>
<p>The results seems to be better than expected:<br />
- the only code i had to change in koha is to replace the exit call by an safe_exit subroutine</p>
<p><code><br />
   sub psgi_env { any { /^psgi\./ } keys %ENV }<br />
   sub safe_exit {<br />
      if ( psgi_env ) { die 'psgi:exit' }<br />
      else { exit }<br />
   }<br />
</code></p>
<p>   and make the CGI wrapper see the psgi:exit die as a normal termination. If anyone have an idea to trap &#8216;exit&#8217; as it in the code: i&#8217;ll be very pleased to know.</p>
<p>- I&#8217;m now able to mix CGI.pm and Dancer code. So if you choose to break the CGI compatibility, you can port your script to a Dancer app step by step. </p>
<p>But there are still bugs! Speaking about koha: i can now log in and out the intranet, navigate on koha pages without experimenting some weird error or crash but (lot of)? stuff doesn&#8217;t work (for example: the main search doesn&#8217;t work). If you want to try yourself: </p>
<p>* git clone http://github.com/sukria/Dancer.git and git://github.com/eiro/Dancer-CGI-wrapper.git<br />
* go to your koha root<br />
* apply Dancer-CGI-wrapper/koha/0001-add-PSGI-ability.patch<br />
* export KOHA_CONF<br />
* run perl Dancer-CGI-wrapper/koha/kohadance.pl<br />
* connect to http://localhost:3000 and http://localhost:3000/opac with your browser<br />
* enjoy the kohadance &laquo;&nbsp;no search&nbsp;&raquo; opac <img src='http://www.tinybox.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Next steps are: </p>
<p>* use koha to go on debugging by identifying malfunctions, write tests and make them work<br />
* make the package more CPAN ready. It&#8217;s already packaged thanks to module-starter but it is not a real Dancer plugin yet (bad namespaces, no use of Dancer::Plugin mechanics, no real documentation)</p>
<p>Help or feedback are welcome. please <a href="http://github.com/eiro/Dancer-CGI-wrapper">fork me on github</a> <img src='http://www.tinybox.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.tinybox.net/2010/06/03/dance-koha-dance/&amp;t=Dance%2C+Koha%2C+dance+%21" rel="nofollow" class="external" title="Partagez-le sur Facebook">Partagez-le sur Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Dance%2C+Koha%2C+dance+%21+-+http://b2l.me/ysx96&amp;source=shareaholic" rel="nofollow" class="external" title="Tweetez-le !">Tweetez-le !</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

<img src="http://feeds.feedburner.com/~r/TinyboxDotNet/~4/lMxWLcuLerw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tinybox.net/2010/06/03/dance-koha-dance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tinybox.net/2010/06/03/dance-koha-dance/</feedburner:origLink></item>
		<item>
		<title>libellés des erreurs systeme</title>
		<link>http://feedproxy.google.com/~r/TinyboxDotNet/~3/uR2BS5whc3Q/</link>
		<comments>http://www.tinybox.net/2010/05/27/libelles-des-erreurs-systeme/#comments</comments>
		<pubDate>Thu, 27 May 2010 11:28:56 +0000</pubDate>
		<dc:creator>mc</dc:creator>
				<category><![CDATA[Nature]]></category>

		<guid isPermaLink="false">http://www.tinybox.net/2010/05/27/libelles-des-erreurs-systeme/</guid>
		<description><![CDATA[passé sur #perlfr, cognominal++ nous montre comment avoir la liste des libéllés des erreurs systemes. perl -wE &#8216;($!=$_),say &#171;&#160;$_\t$!&#160;&#187; for 1..132&#8242; Partagez-le sur Facebook Tweetez-le !]]></description>
			<content:encoded><![CDATA[<p>passé sur #perlfr, cognominal++ nous montre comment avoir la liste des libéllés des erreurs systemes.</p>
<p>perl -wE &#8216;($!=$_),say &laquo;&nbsp;$_\t$!&nbsp;&raquo; for 1..132&#8242;</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.tinybox.net/2010/05/27/libelles-des-erreurs-systeme/&amp;t=libell%C3%A9s+des+erreurs+systeme" rel="nofollow" class="external" title="Partagez-le sur Facebook">Partagez-le sur Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=libell%C3%A9s+des+erreurs+systeme+-+File: /data/app/webapp/functions.php<br />Line: 7<br />Message: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (11)&amp;source=shareaholic" rel="nofollow" class="external" title="Tweetez-le !">Tweetez-le !</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

<img src="http://feeds.feedburner.com/~r/TinyboxDotNet/~4/uR2BS5whc3Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.tinybox.net/2010/05/27/libelles-des-erreurs-systeme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.tinybox.net/2010/05/27/libelles-des-erreurs-systeme/</feedburner:origLink></item>
	</channel>
</rss>
