lilstevey's Journal lilstevey's use Perl Journal en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T02:21:41+00:00 pudge Technology hourly 1 1970-01-01T00:00+00:00 lilstevey's Journal Is Avatar Just Smurf Porn? Not a great deal perly of late - winter solstice, xmas and the upcoming new year has absorbed much of my free time. <br> <br> I thought it might be worth blogging some of my tv watchings though. Saw Avatar 3d in the cinema which was quite an emersive experience - not sure the story could have carried it without the amazing effects though. Highlight of tv thus far has been "The gruffolo" on bbc 1, closely followed by top gear - which despite what I perceive to be increasing friction between May and the others was still an amazing piece of television. If they do End it, I hope they manage to do a few one off specials such as the south america trip - It was up there with the asian trip ( was it korea or vietnam? ) and the african venture a couple of series ago or so. <br> <br> Anticlimax of the "holiday" was Dr Who on chrimblemas day. I'm dissapointed in some ways that Tennant is leaving, but very thankfull that Russell T Davies is moving onto new projects. I don't think that I could write as well as him, but thats because I'm a developer. How's this for an alternative last episode arc: <ul> <li>Corrupted by the events on Bowie Base, Who tries in vain to redeem himself, falling more and more into a spiral of self destructive behavour</li><li> His "Daughter" returns - remember her from that cloning episode - and becomes companion for some of the adventure before realising that something very wrong is afoot. </li><li> She then tricks the doctor into leaving her in charge of the tardis key. </li><li> Who realises his mistake, and in something of a battle, takes an all or nothing gambit and gambles on his daughter not being able to re-generate, plunging them both into a certain death situation. </li><li> But... Who is wrong - Daughter regenerates into new doctor, scapering off with the key<nobr> <wbr></nobr>... Who, corrupted by his own power regenerates into The master, played by Mr Simm. </li></ul><p> And with that brief blog I'll trundle off to bed and prepare myself for the end of 2009.</p> lilstevey 2009-12-30T01:02:54+00:00 journal dynamically attaching a method to a class in perl6 <p> In case you've just tuned in, I'm trying to learn a bit of perl6 by attempting to create a simple RMI system. And with that, once more into the breach... </p><p> Since my last petty fiddling there has been another release of rakudo, so I feel like I should begin with a swift re-installation of rakudo - using the "git clone gen-parrot technique" </p><p> Whilst thats running I'll make a few notes. After I looked at the server side of things, I began to have a look at the client. In perl5 I'd tend to use AUTOLOAD to fullfill a variety of object calls on a method, so I thought it worth a punt to have a play in that direction. I didn't get very far, but wasn't that motivated as given the processing needed to generate a method proxy, and also the perl6 Type-checked idium, it seems to me to be more of a composition rather than on call issue? </p><p> Whilst I've been doing other things, perl6 has marched forward. I was particulary interested in a use post from Jonathan Worthington, which pointed to a lovely doc on <a href="">The Rakudo Metamodel</a>. </p><p> Of particular interest was this item in the "Package meta-object API (aka HOW API)" section: </p><blockquote><div><dl> <dt> <code>add_method($meta, $name, &amp;code_ref)</code> </dt><dd> Adds a method to the methods table of <code>$meta</code> under the given <code>$name</code> and with the given implementation. </dd></dl></div> </blockquote><p> Could I use this to generate a proxying class to fullfill a role? If so, the prospect is quite exciting. </p><p> Lets have a play-then-think go with it, starting off with TestRole as used in <a href="">my Nov. 11 use.perl post</a>. </p><p> And then I think... Maybe I'm getting ahead of myself. Maybe I should start off where the Nov 11th post left off. </p><p> From this post, I'll modify it a little using perl6's very funky iteration syntax, and start off with: </p><blockquote><div><p> <code> use v6;<br> <br> use TestRole;<br> <br> my $r = TestRole;<br> <br> my $c = class{};<br> <br> my $code = { say "bloot bloot I am not a newt" };<br> <br> for $r.^methods(:local) -&gt; $m<br> {<br> &nbsp;&nbsp;&nbsp;my $mn = $;<br> &nbsp;&nbsp;&nbsp;say "$mn";<br> &nbsp;&nbsp;&nbsp;# Do something to add $code to class $c with method $mn<br> }<br> </code></p></div> </blockquote><p> Sometime, between multiple distractions, and blogging $this, the compilation and <code>make</code> has finished. It's now all done, and I'm left contemplating the contents of the "<code># Do something...</code>" </p><p> Much playing follows. Needless to say - its not as simple as <code>add_method($c, $mn, $code)</code>, though the output is mildly curious: </p><blockquote><div><p> <code> C:\<nobr> <wbr></nobr>... &gt;perl6<br> randomWWWRRRChars<br> Could not find non-existent sub add_method in Main (file src\, line 295)<br> </code></p></div> </blockquote><p> Which seems odd, because it's not the first method in the Role. note - In case anyone is interested, thats a <a href="">metaphorical thursday</a>, from police squad... ( 6:00 minutes if anyone is interested ). All these years I thought it was tuesday... </p><p> I wasn't expecting that to work, but aren't sure as to how I get this command working. The temptation is to try #perl6, which is perhaps the friendliest IRC channel I've ever seen, and it's the common sense place to be, but much to my shame, I didn't spend enough time on IRC in the mid 90's - instead I was writting HTML templating systems in perl and playing with POV. That and down the pub. Well, mostly down the pub. Since then, having not gained experience, I've found IRC to be an intimidating place. Even though #perl6 appears to be one of the most welcoming places on earth, there still seems to be a bit of crypticalness to some of the syntax shown when I've been lurking. Some of the behavour suggests bots and I'm not too sure if "thanks" carries the same weight as a ++ postfix. Added to that, the people on their are doing great things, and I'm not sure I want to distract them with my petty problems, given that my free time is rapidly evapourating... </p><p> OK, I'm being pathetic. Very very pathetic. Better see if anyone is online, and can help. Off to <a href=";nick=">#perl6</a> after checking the <a href="">#perl6 logs</a> in order to retrolurk. </p><p> Once again #perl6 were very very nice. I should declare that I googled up <a href="">IRC etiquette</a> before venturing forth ( though it's not the most useful document on the internet ). masak and diakopter were very helpfull (and friendly), Apparently the code that will provide the one liner I require is apparently being worked upon by jnthn++, but, for now, eval may give the solution I need. </p><p> for now, however, bed calleth... goodnight world... </p><p> And wakey-wakey post worky. Top Gear is on. BBC iplayer is great. May has been flying a caravan and Clarkson and Hammond are covering the Lancia. </p><p> Earlier today, on the borderline of yesterday, masak provided the following example during our IRC conversation, whilst taking part in other discussions. I'm slightly in awe of the multitasking: </p><blockquote><div><p> <code>class A { if rand &lt;<nobr> <wbr></nobr>.5 { eval("method foo() \{ say q[foo] }") } else { eval("method bar() \{ say q[bar] }") } };; </code></p></div> </blockquote><p> After a little hammering at the keyboard I come up with the following: </p><blockquote><div><p> <code> use v6;<br> <br> use TestRole;<br> <br> my $r = TestRole;<br> <br> my &amp;code = { say "bloot bloot I am not a newt" };<br> <br> class proxy<br> {<br> &nbsp;&nbsp;&nbsp;for $r.^methods(:local) -&gt; $m<br> &nbsp;&nbsp;&nbsp;{<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my $mn = $;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eval "method $mn () \{ &amp;code() }";<br> &nbsp;&nbsp;&nbsp;}<br> }<br> <br> my $i =;<br> $i.method1();<br> </code></p></div> </blockquote><p> Running it does the following: </p><blockquote><div><p> <code> C:\<nobr> <wbr></nobr>... &gt;perl6<br> bloot bloot I am not a newt<br> <br> </code></p></div> </blockquote><p> Woot! Enthused, I fire up the the server from my <a href="">November 24 use perl journal</a>, copy the RmiClient class from my November 09, 2009 post, and type furiously: </p><blockquote><div><p> <code> use v6;<br> <br> use TestRole;<br> use RmiClient;<br> <br> my $p = =&gt; "http://localhost:8888/");<br> <br> my $r = TestRole;<br> <br> my &amp;code = { $p.proxy( $_ ) };<br> <br> class proxy<br> {<br> &nbsp;&nbsp;&nbsp;for $r.^methods(:local) -&gt; $m<br> &nbsp;&nbsp;&nbsp;{<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my $mn = $;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eval "method $mn () \{ return &amp;code( \"$mn\" ) }";<br> &nbsp;&nbsp;&nbsp;}<br> }<br> <br> my $i =;<br> say $i.method1();<br> </code> </p><p> And, joy of joys: </p><p> <code> C:\<nobr> <wbr></nobr>.. &gt;perl6<br> 1 - method one </code></p></div> </blockquote><p> It needs a heavy dose of refactoring, but its a start, and being a start, a suitable end to this post... I might start the next one by ensuring my environmental variables are pointing to the rakudo I started building at the start of this post. </p> lilstevey 2009-11-30T22:21:22+00:00 journal tweetscale progress <p>I started having a play over a week ago but haven't had the time to do much - I'll blog this and see if I get any time to go further.</p><p> This entry is brought to you by <tt>use v6;</tt> - a delightful experience. </p><p> <tt>Perl v6.0.0 required--this is only v5.8.9, stopped at line 1.</tt></p><p> I've been doing statically typed<i>ish</i> language for too long. Theres me leaping into introspection, when, for now, for the serverside of things, a simple bit of dynamic programming will suffice. Lets quickly knock out a simple server. </p><dl> <dt></dt><dd> <tt>use v6;</tt> <br> <tt>use Server;</tt> <br> <tt>use TestClass;</tt> <br> <tt>use TestRole;</tt> <br> <br> <tt>my $tc =;</tt> <br> <tt>my $r = TestRole;</tt> <br> <tt>my $a = clzz =&gt; $tc, rle =&gt; $r );</tt> <br> <br> <tt>$a.startServer();</tt></dd><dt></dt><dd> <tt>use v6;</tt> <br> <tt>use HTTP::Daemon;</tt> <br> <br> <tt>class Server</tt> <br> <tt>{</tt> <br> <tt>&nbsp;&nbsp;&nbsp;has $clzz;</tt> <br> <tt>&nbsp;&nbsp;&nbsp;has $rle;</tt> <br> <br> <tt>&nbsp;&nbsp;&nbsp;method startServer() {</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my HTTP::Daemon $d<nobr> <wbr></nobr>.= new;</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;say "see {$d.url}";</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while my HTTP::Daemon::ClientConn $c = $d.accept {</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while my HTTP::Request $r = $c.get_request {</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my $p = $r.url.path;</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my @p = split "\/",$p;</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my $m = pop @p;</tt> <br> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ( $r.method eq 'GET' &amp;&amp; $rle.can( $m ) ) {</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$c.send_response($clzz."$m"());</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$c.send_error('RC_FORBIDDEN');</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;warn "{$r.method} {$r.url.path}";</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</tt> <br> <tt>&nbsp;&nbsp;&nbsp;}</tt> <br> <tt>}</tt></dd></dl><p> Thats as simple as <tt>$rle.can( $m ) &amp;&amp; $c.send_response($clzz."$m"())</tt> - though my first attempt was <tt>$clzz.$m()</tt> - which resulted in "<tt>invoke() not implemented in class 'Perl6Str'</tt>" </p><p> Now to see what can be done on the client... </p> lilstevey 2009-11-24T19:49:18+00:00 journal More perl6 babysteps - finding the methods of a role <p> Lets start here: </p><p> </p><p> So I code, tentativly.... </p><dl> <dt></dt><dd> <tt>use v6;</tt> <br> <br> <tt>use TestRole;</tt> <br> <br> <tt>my $r = TestRole;</tt> <br> <tt>say $r;</tt> <br> <br> <tt>my @m = $r.methods();</tt> <br> <br> <tt>say @m;</tt> <br> </dd><dt></dt><dd> <tt>role TestRole</tt> <br> <tt>{</tt> <br> <br> <tt>&nbsp;&nbsp;&nbsp;method method1 ( ) { }</tt> <br> <tt>&nbsp;&nbsp;&nbsp;method wildcard ( ) { }</tt> <br> <tt>&nbsp;&nbsp;&nbsp;method randomWWWRRRChars () { }</tt> <br> <tt>&nbsp;&nbsp;&nbsp;method SPLEEEERRRGGGG () { }</tt> <br> <tt>}</tt></dd></dl><p> Results: </p><p> <tt>C:\<nobr> <wbr></nobr>... \ex6&gt;perl6</tt> <br> <tt>TestRole()</tt> <br> <tt>Method 'methods' not found for invocant of class ''</tt> <br> <tt>in Main (file src\, line 295)</tt></p><p> And there lie the daemons... The perl6 ghost docs. Lets try to find something more up to date... </p><p> One of the memories of potentially relevant browsing I have is this fella - <a href="">Jonathan Worthingtons fine work on Signature Introspection</a> And here is a funny thing - anchors are wonderfull, wonderfull things - and delightfully cross discipline. I now recall meta... meta class... </p><p> Pause to contemplate. maybe google "rakudo<nobr> <wbr></nobr>..." would be a better starting point for future searches. </p><p> And back to meta... <a href="">Apocalypse 12 is about objects</a> and contains some examples: </p><p> <tt>&nbsp;&nbsp;&nbsp;MyClass.meta.getmethods() # get the method list of MyClass</tt> </p><p> It may well be that my rakudo does not yet have the features. Lets get a more recent version. </p><p> I start by cloning git:// - and trying to install with the --gen-parrot option - unfortunately as I didn't get around to installing subversion - a visit to <a href=""></a> should fix that - I end up pumping for <a href="">Silk Svn - an svn client for windows</a>. </p><p> Now I should have tested this before but the signature introspection is now working, unfortunately it looks like meta isn't ( as yet )... </p><p> <tt>C:\<nobr> <wbr></nobr>... &gt;perl6</tt> <br> <tt>Name: $x, Type: Int(), Optional: 0</tt> <br> <tt>Name: $y, Type: Str(), Optional: 1</tt></p><p> Now lets not give up there - a quick visit of the test suite for <a href="">perl6 introspection</a> provides an interesting syntax: </p><p> <tt>@methods = B.^methods(:local);</tt></p><p> Lets give that a go... A slight change to is all that is needed. </p><dl> <dt></dt><dd> <tt>use v6;</tt> <br> <br> <tt>use TestRole;</tt> <br> <br> <tt>my $r = TestRole;</tt> <br> <tt>say "$r Has the following methods:"<nobr> <wbr></nobr>;</tt> <br> <tt>my @m = $r.^methods(:local)<nobr> <wbr></nobr>;</tt> <br> <tt>say join "\n", @m;</tt></dd></dl><p> And a short <tt>perl6</tt> later.... </p><p> <tt>C:\<nobr> <wbr></nobr>... &gt;perl6</tt> <br> <tt>TestRole() Has the following methods:</tt> <br> <tt>method1</tt> <br> <tt>wildcard</tt> <br> <tt>randomWWWRRRChars</tt> <br> <tt>SPLEEEERRRGGGG</tt></p><p> A small, small step. This elephant is going to take a while nibbling at this pace. </p> lilstevey 2009-11-11T23:44:02+00:00 journal more tentative perl6 hacking <p> A little more work. Following some <a href="">wise words in masak's journal</a> about starting simple, I decided to take further tentative tiptoes further towards my target of a transparent Role-As-Interface based RMI system by first of all just hacking together a call from client to server. Following a visit to the lovely people on #perl6 I got a pointer to the <a href="">perl6 test suite</a> which, when read with the <a href="">synopsis &amp; apocalypse</a> documents, seems to give a reasonable set of reference documents. </p><p> Anyway, squeezing this around other commitments, I hacked LWP::Simple and HTTP::Daemon around a little, and created the following files: </p><dl> <dt> </dt><dd> <tt>use v6;</tt> <br> <tt>use RmiClient;</tt> <br> <br> <tt>my $r = =&gt; "http://localhost:8888/");</tt> <br> <br> <tt>say $r.proxy("Greet");</tt></dd><dt> </dt><dd> <tt>use v6;</tt> <br> <tt>use LWP::Simple;</tt> <br> <br> <tt>class RmiClient</tt> <br> <tt>{</tt> <br> <tt>&nbsp;&nbsp;&nbsp;has $url;</tt> <br> <br> <tt>&nbsp;&nbsp;&nbsp;method proxy( $method )</tt> <br> <tt>&nbsp;&nbsp;&nbsp;{</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my $s = LWP::Simple.get($url~$method); # "http://localhost:8080/"</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my ($r1,@r2) = split(/\n\n/,$s);</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my $r2 = join '\n\n',@r2;</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return $r2;</tt> <br> <tt>&nbsp;&nbsp;&nbsp;}</tt> <br> <tt>}</tt> <br> <br> <tt>1;</tt></dd></dl><p> Thats the client side of this simple test, now onto the server side. </p><dl> <dt></dt><dd> <tt>use v6;</tt> <br> <tt>use Adapter;</tt> <br> <tt>use TestClass;</tt> <br> <br> <tt>my $tc =;</tt> <br> <tt>my $a = clzz =&gt; $tc );</tt> <br> <br> <tt>$a.startServer();</tt> <br> </dd><dt> </dt><dd> <tt>use v6;</tt> <br> <tt>use HTTP::Daemon;</tt> <br> <tt>use TestClass;</tt> <br> <br> <tt>class Adapter</tt> <br> <tt>{</tt> <br> <tt>&nbsp;&nbsp;&nbsp;has TestClass $clzz;</tt> <br> <br> <tt>&nbsp;&nbsp;&nbsp;method startServer()</tt> <br> <tt>&nbsp;&nbsp;&nbsp;{</tt> <br> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my HTTP::Daemon $d<nobr> <wbr></nobr>.= new;</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;say "see {$d.url}";</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while my HTTP::Daemon::ClientConn $c = $d.accept {</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while my HTTP::Request $r = $c.get_request {</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if $r.method eq 'GET' {</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$c.send_response($clzz.Greet());</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else {</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$c.send_error('RC_FORBIDDEN');</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;warn "{$r.method} {$r.url.path}";</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</tt> <br> <br> <tt>&nbsp;&nbsp;&nbsp;}</tt> <br> <br> <tt>}</tt></dd><dt> </dt><dd> <tt>use v6;</tt> <br> <br> <tt>class TestClass</tt> <br> <tt>{</tt> <br> <br> <tt>&nbsp;&nbsp;&nbsp;method Greet()</tt> <br> <tt>&nbsp;&nbsp;&nbsp;{</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return "Hello World";</tt> <br> <tt>&nbsp;&nbsp;&nbsp;}</tt> <br> <br> <tt>}</tt></dd></dl><p> That is quite filthy, but a start. Next up is one of two things: </p><ol> <li> trying to make implementing a client as simple as passing a Role-As-Interface into some manner of magical constructor/repository.</li><li> Passing a Role-As-Interface and implementing class into some manner of thingy on the server that exposes methods defined in the Role-As-Interface and implements them using said class. </li></ol><p> These &quot;simple&quot; steps may possibly include a tour round some other areas, including a look at serialisation, dependency injections, singletons... Still only one way to eat an elephant... </p> lilstevey 2009-11-09T23:28:57+00:00 journal Fighting with perl6 HTTP::Daemon install <p> I found this useful <a href="">Installation howto</a> draft ( note to self - must spend more time studying the site and documentation and rely less on google ). </p><p> An important consideration is that some of the scripts are perl 5 - I guess self hosting is some way off now. Unfortanately, the second run of proto doesn't look like it produces the desired result: </p><p> <tt>C:\perl6\development\proto&gt;perl proto</tt> <br> <tt>'git' is not recognized as an internal or external command,</tt> <br> <tt>operable program or batch file.</tt> <br> <tt>'svn' is not recognized as an internal or external command,</tt> <br> <tt>operable program or batch file.</tt> <br> <tt>If you want rakudo in parrot it has to be in &lt;PARROT_DIR&gt;/languages/rakudo at proto line 94.</tt></p><p> Curses. Maybe I should have added windows command line support when installing git. The directories probably need sorting sooner rather than later. Probably worth drawing up a todo list: </p><ol> <li>re-install parrot and rakudo to conform with rakudo in parrot ( ie in &lt;PARROT_DIR&gt;/languages/rakudo )</li><li>install svn command line client</li><li>install git with command line support</li></ol><p> Maybe time to momentarily chill and tolerate some more of battlefield earth. </p><p> Some sleep later. I start off the day by contemplating alternatives - Microsofts Virtual PC 2007 does not appear to run on windows, and "vmware player"'s download page appears to be down for maintenance. Arse. </p><p> I have a linux box (not connected to a monitor - I use it for svn and as a printer server) I'll pump for <a href="">VNC Free edition</a>. There appear to be a large set of instructions for <a href="">configuring remote access to an ubuntu desktop</a> at howto forge. This is where I run into problems - the linuxbox uses the tv as a monitor, and there is no way on this earth that the missus is going to let me disturb the Abu Dhabi grand prix. </p><p> In the mean time I'll re-install parrot and rakudo in a more standard layout. I have a <tt>c:/perl6</tt> dir from my proto excursion, so I'll make a <tt>c:/perl6/install</tt> for the sources, and copy parrot to there, make a sub dir <tt>c:/perl6/install/parrot/languages</tt> and copy rakudo in there. I've renamed the source directories to parrot and rakudo - loosing date and version information </p><p> I already have strawberry perl and ICU installed so this should be straightforward. I won't go into detail as I would just be repeating myself. </p><p> A little while later and I have a more traditional layout. A quick perl6 <tt></tt> and a <tt>mingw32-make</tt> gives us the same nasty error: </p><p> <tt>C:\<nobr> <wbr></nobr>... \httpd&gt;mingw32-make</tt> <br> <tt>mingw32-make: *** No rule to make target `lib/HTTP/Daemon.pir', needed by `all'.</tt> <br> <tt> Stop.</tt></p><p> Lamb Rogan on the sunday special at the local curry house. Was particulary pleasant. Relaxed and watched telly before trying to find out what stupid something was blocking my path. It looks like, for some reason, the Daemon.pir file had a trailing single quote after the<nobr> <wbr></nobr>.pir extension - I remove it and retry. </p><p> <tt> is preparing to make your Makefile.</tt> <br> <br> <tt>PERL6 C:/perl6/install/parrot/languages/rakudo/perl6</tt> <br> <tt>Use of uninitialized value</tt> <br> <tt>PERL6LIB<nobr> <wbr></nobr>/lib</tt> <br> <tt>PERL6BIN<nobr> <wbr></nobr>/bin</tt> <br> <tt>RAKUDO_DIR C:/perl6/install/parrot/languages/rakudo</tt> <br> <br> <tt>Makefile is ready, running 'make' on it.</tt> <br> <tt>Use of uninitialized value</tt> <br> <tt>'make' is not recognized as an internal or external command,</tt> <br> <tt>operable program or batch file.</tt> <br> <tt>Configure and 'make' have finished. Use 'make help' to view other options.</tt> <br> <br> <br> <tt>C:\<nobr> <wbr></nobr>... \httpd&gt;mingw32-make</tt> <br> <tt>cc C:/perl6/install/parrot/languages/rakudo/perl6.o -o C:/perl6/install/parrot/languages/rakudo/perl6</tt> <br> <tt>process_begin: CreateProcess(NULL, cc C:/perl6/install/parrot/languages/rakudo/perl6.o -o C:/perl6/install/parrot/languages/rakudo/perl6,<nobr> <wbr></nobr>...) failed. make (e=2): The system cannot find the file specified.</tt> <br> <tt>mingw32-make: *** [C:/perl6/install/parrot/languages/rakudo/perl6] Error 2</tt></p><p> Largely out of frustration, I copy the file into a subdir of my test dir, and knock up the test script in the docs. </p><p> The output of the script is: </p><p> <tt>C:<nobr> <wbr></nobr>... \ex3&gt;perl6</tt> <br> <tt>see http://localhost:8888/</tt></p><p>Browsing to the url mentioned gives:</p><p> This is root.<br> Go to pub </p><p> So thats a small step forwards. Leaves me wondering though - howcome there needs to be a perl6 step if this runs on a virtual machine - whats wrong with distributing either zipped up bytecode or perl6 sources? No doubt there is a good reason for this - I just need to find what it is... Unfortunately it's to late to "Go to pub". Perhaps Bed is more appropriatte. </p><p> I have to blog this. I've just been watching cable telly, and the host of a late night interactive gameshow reckons we are all going to get it in, in apocalyptic terms, in december 2012. Apparently a lot of things have been written about it and its all cyclic. Bizarre. </p> lilstevey 2009-11-02T00:16:54+00:00 journal first steps in coding in rakudo <p> Ok. So I've managed to install perl 6. And Rakudo. And run "hello world". Clever me. Not. </p><p> Anyway. Having installed parrot I'd like to have a play, and try to do something marginally less trivial. Whilst not a popular view in certain circles, I enjoyed developing software in java until recently. In particular, I found the remoting capabilities and ease of such in Spring quite delightful to work with. To me, a <a href=";cid=70866">comment on Ovids Blog by Dominus</a> summed up what I perceived to be the underlying principal that gave rise to the aforemention sentiment. </p><blockquote><div><p>I realized after a couple of years that architects have the same distinction. They have "structural" and "functional" elements. The simplest example is a tent. It has a functional element, which is the cloth; the cloth is the whole point of the tent, which keeps the rain off of you. But it also has a structural element, the tent pole, whose purpose is to hold up the cloth. The pole is a pure liability. If you could get the cloth to stay up with no pole, you would, but you can't. </p><p> So instead of "natural" and "synthetic" I now discuss it in terms of "functional" and "structural" code, which I think makes the point better. </p></div> </blockquote><p> From memory, the way this was approached was that remoting was treated as a configuration - in code, an interface was written, and a configuration file was used to expose this as a service. The plumbing ( structural elements? ) was hidden from the code, and I didn't need to care about it. If I wanted, I could test the implementation of the service, without having to start up http deamons or such like. </p><p> So, what I would like to do is create an interface in perl 6, and write some external code to allow a remote client to access this service. For starters I'll make a bloated service, rather than delegating the functionality to some manner of model or domain layer - just to keep it simple. </p><p> My first task is to figure out how I'm going to accomplish this. In stumbling about on t'interweb, I found a comment and subsequent thread on perl monks interesting <a href="">Re: Open to debate on mixins and traits.</a>. </p><p> So I assume that I need a role to specify the behavour of the underlying class, and a trait to provide the glue between server and client? Or do I need to use <a href="">signatures?</a>. </p><p> I guess I'll have to wait and see. I'll start off with something simple - trying to define a role describing a greeting method on a class, and some other code which will implement said role. </p><p> Firstly, I'll try to get a simple example together: </p><dl> <dt></dt><dd> <tt>use TestInterface;</tt> <br> <tt>use TestImplementation;</tt> <br> <br> <tt>my TestInterface $a =;</tt> <br> <tt>$a.Greet();</tt></dd><dt></dt><dd> <tt># TestInterface</tt> <br> <tt>role TestInterface</tt> <br> <tt>{</tt> <br> <tt>&nbsp;&nbsp;&nbsp;method Greet(){}</tt> <br> <tt>}</tt></dd><dt></dt><dd> <tt>use TestInterface;</tt> <br> <tt>class TestImplementation does TestInterface</tt> <br> <tt>{</tt> <br> <tt>&nbsp;&nbsp;&nbsp;method Greet()</tt> <br> <tt>&nbsp;&nbsp;&nbsp;{</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;say "Hello World";</tt> <br> <tt>&nbsp;&nbsp;&nbsp;}</tt> <br> <tt>}</tt></dd><dd><p> Executing the above code snippets results in the following: </p><p> <tt>C:\<nobr> <wbr></nobr>... &gt;perl6</tt> <br> <tt>Hello World</tt> <br> </p><p> What I like about using an interface is it seperates an agreement of function to the performance of said function. IF the above code is valid, it seems to acheive that. The next stage I want to go onto is to squeeze into the tidy little arrangement, and make the client ( ) Less dependenant on the specifics of the implementation. I'll do this for the time being by introducing a factory class - the modified examples look like: </p></dd><dt></dt><dd> <tt>use TestInterface;</tt> <br> <tt>use TestFactory;</tt> <br> <br> <tt>my TestInterface $a =;</tt> <br> <tt>say $a.Greet();</tt></dd><dt></dt><dd> <tt>use TestInterface;</tt> <br> <tt>use TestImplementation;</tt> <br> <br> <tt>class TestFactory</tt> <br> <tt>{</tt> <br> <tt>&nbsp;&nbsp;&nbsp;method TestInstance() returns TestInterface</tt> <br> <tt>&nbsp;&nbsp;&nbsp;{</tt> <br> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;</tt> <br> <tt>&nbsp;&nbsp;&nbsp;}</tt> <br> <tt>}</tt> </dd></dl><p> The only other change is the alteration of the method <tt>Greet</tt> in <tt></tt> to return rather than say the greeting. Now at the moment, this might seem like a lot of unecessary waffle. However, in practice, the TestFactory class becomes part of the framework, reducing this additional step. </p><p> Running this code results in the same result as earlier. </p><p> So. Whats next? For me at the moment, bed calls. And a day at work. More to come after. I guess the next step is to find some socket code in perl 6 and try to knock up some remoting, before trying to see what kinda bindings can be done automajically. </p><p> Returning to it after a couple of evenings off. Once again, watching tv simultaneosuly. This night, "Jumper" and Coraline are on the cards... </p><p> The path now diverges.... In order to construct a simple RPC "layer" I need a means of communication - perhaps using a simple httpd for starters. I also need some means of reading the "interface" role, and "somehow" tieing it to said client and server. I'll start by trying to make a simple server. </p><p> So, to start with I need a server, fortunately http-daemon has been ported to perl6. </p><p> <tt></tt> </p><p> I don't have GIT so I need to get it. I google up - a site which appears to have one of the coolest looking logos going. finding <a href="">the git on windows mysys varient</a>. I'll give it a blast. </p><p> <tt>C:<nobr> <wbr></nobr>.. \httpd&gt;perl6</tt> <br> <br> <tt> is preparing to make your Makefile.</tt> <br> <br> <tt>Found a PARROT_DIR to be C:/install/parrot-1.7.0</tt> <br> <tt>but there is no Rakudo nearby. Please contact the proto people.</tt></p><p> drat! </p><p> It turns out RAKUDO_DIR environmental problem is not set. I try, but no luck - still fails. I try the RAKUDO_DIR argument to Configure - same message. </p><p> Have a browse of the configure code. It loks like its expecting rakudo-in-parrot or parrot-in-rakudo. My setup looks a little unconventional. I made a new folder "languages" in PARROT_DIR, create a rakudo subdir, and copy the contents of the rakudo install DIR. The output of now looks a little more promising: </p><p> <tt>C:<nobr> <wbr></nobr>... \httpd&gt;perl6</tt> <br> <br> <tt> is preparing to make your Makefile.</tt> <br> <br> <tt>PERL6 C:/install/parrot-1.7.0/languages/rakudo/perl6Use of uninitialized value</tt> <br> <tt>PERL6LIB<nobr> <wbr></nobr>/lib</tt> <br> <tt>PERL6BIN<nobr> <wbr></nobr>/bin</tt> <br> <tt>RAKUDO_DIR C:/install/parrot-1.7.0/languages/rakudo</tt> <br> <br> <tt>Makefile is ready, running 'make' on it.</tt> <br> <tt>Use of uninitialized value</tt> <br> <tt>'make' is not recognized as an internal or external command,</tt> <br> <tt>operable program or batch file.</tt> <br> <tt>Configure and 'make' have finished. Use 'make help' to view other options.</tt></p><p> However, the "make" errors look worrying. </p><p> <tt>C:\<nobr> <wbr></nobr>... \httpd&gt;mingw32-make</tt> <br> <tt>mingw32-make: *** No rule to make target `lib/HTTP/Daemon.pir', needed by `all'.</tt> <br> <tt> Stop.</tt></p><p> A little digging later and I stumble across <a href="">proto</a> - this looks well worth a look - though perhaps tommorow as it's time for bed. Perhaps it might also be pragmatic to at least rerun configure and make on rakudo in its new location - or just re-install things in what appears to be a more normal layout? </p> lilstevey 2009-11-01T12:53:12+00:00 journal perl 6 - a "re-dip" <p> In response to my last Rakudu/Parrot post, daxim responded with a clear and concise answer, of which I am very greatful. </p><blockquote><div><p>parrot_config is an executable, installed by default in $PREFIX/bin/parrot_config. Run parrot_config --dump to see interesting stuff.</p></div> </blockquote><p> I'm now watching Britains Best Dish - a fascinating show in which predominantly amateur cooks cook a single dish - either a starter, main or a dessert. This week is the finals, and today 6 or 7 main courses get whittled down to the final two. Its very british - game dishes and pies. </p><p> Anyway, I digress. </p><p> I now run: </p><p> <tt> perl --parrot_config=c:\Parrot-1.7.0\bin\parrot_config.exe </tt> </p><p> and </p><p> <tt> mingw32-make </tt> </p><p> and again have the previous error: </p><p> <tt> In file included from perl6_group.c:17:<br><nobr> <wbr></nobr>/Parrot-1.7.0/include/parrot/parrot/parrot.h:235:23: libintl.h: No such file or directory<br> mingw32-make: *** [src\pmc\perl6_group.dll] Error 1<br> </tt> </p><p> That appears to be "libintl.h." perhaps it's related to the dependency on the ICU library mentioned at: </p><p> Breaking now for the pub quiz. </p><p> Ok. back from pub quiz. </p><dl> <dt>I have:</dt><dd>A win32 platform</dd><dd>Downloaded Parrot win32 installer</dd><dd>Downloaded Rakudo</dd></dl><p> I attempted to install them by downloading the parrot win32 installer, and downloading the rakudo tar.gz installer. Then I got a little lost. </p><p> I believe I messed it up by not concentrating on the task in hand, and instead doing it in the background whilst watching a rather excellent film ( the Last King of Scotland ) for the first time. </p><p> So I think I have missed a dependency - the <a href="">ICU library.</a> </p><p> I visit the site and try ICU4C, downloading "Windows (win32 x86 32-bit) Visual Studio 9". </p><p> After a snooze and day at work I have another bash. </p><p> Rakudo docs at suggest:</p><blockquote><div><p> In order to fully support Unicode, you'll also want to have the </p><p> ICU library installed (L&lt;;). Rakudo can run without ICU, but some Unicode-related features may not work properly. </p></div> </blockquote><p> which seems odd if the lack of ICU is causing the problem, and maybe I'm reading the following wrong, but to me the site seems to be contradictory:</p><blockquote><div><p>Building Rakudo from the sources requires Perl 5.8 or newer, a C compiler, a make utility, subversion, and the ICU library.</p></div> </blockquote><p> Turning to google again, this page turns up: with some nice instructions on installing ICU - I install it and add it to path as it suggests. I download parrot 1.6 from </p><p> <tt>\parrot-1.6.0&gt;mingw32-make</tt> <br> <tt>"Compiling with:"</tt> <br> <tt>xx.c</tt> <br> <tt>Can't spawn "cmd.exe": No such file or directory at tools\dev\ line 152, &lt;$F&gt; line 37.</tt> <br> <tt>mingw32-make: *** [flags_dummy] Error 255</tt></p><p> The "Current developer release" on the parrot download page seems to point to 1.60, so I download 1.7 instead. I'll have a play with that. </p><p> <tt>C:\install\parrot-1.7.0&gt;mingw32-make</tt> <br> <tt>"Compiling with:"</tt> <br> <tt>xx.c</tt> <br> <tt>Can't spawn "cmd.exe": No such file or directory at tools\dev\ line 152, &lt;$F&gt; line 37.</tt> <br> <tt>mingw32-make: *** [flags_dummy] Error 255</tt></p><p> So I try to run cmd - it fails - so lets try setting the appropriatte path and starting again: </p><p> <tt>set PATH=%PATH%;C:\WINDOWS\system32</tt> </p><p> Misconfigured system perhaps? Lets run configure again... </p><p> It was going so well...<br> <tt>Invoking Parrot to generate runtime\parrot\include\config.fpmc --cross your fing ers</tt> <br><nobr> <wbr></nobr><tt>.\miniparrot.exe config_lib.pasm &gt; runtime\parrot\include\config.fpmc</tt> <br> <tt>mingw32-make: *** [runtime\parrot\include\config.fpmc] Error -1073741515</tt></p><p> with the popup:</p><blockquote><div><p>miniparrot.exe - Unable to Locate Component<br> This application has failed to start because icuuc42.dll was not found. Re-installing the application may fix this problem.</p></div> </blockquote><p> Maybe I used the wrong arguments to configure - I'll try again </p><p> <tt> perl --icushared="C:\usr\lib\icu\lib\icudt.lib C:\usr\lib\icu\lib\icuuc.lib" --icuheaders="C:\usr\lib\icu\include" </tt> </p><p> Did I say I was watching Heston at the moment? He's back at Little Chef. This may be slightly lost to readers out of the UK. Right. Advert break. Time to grab some stilton and biscuits. </p><p> hmm. nice stilton. Goes suprisingly well with this glass of white. Anyway - back to it. that resulted in the same error. I'll do a sanity check on the arguments. Look ok, now I noticed I had installed ICU4C - i'll try the "ICU 4.2" download instead. Ahh. notice I am trying to use 4.2.1 rather than 4.2 - I'll try installing that instead. damn. I've run out of stilton. </p><p> Ahhhh! Me being an eeedjit! Configured the environmental variables after opening the window - re added set <tt>C:\usr\lib\icu\bin</tt> to <tt>%PATH%</tt> and bingo! </p><p> And lets see...<br> <tt>C:\install\rakudo-2009-10&gt;perl --parrot-config=c:\Parrot\bin\parrot _config.exe</tt> <br> <br> <tt>Reading configuration information from c:\Parrot\bin\parrot_config.exe<nobr> <wbr></nobr>...</tt> <br> <tt>Verifying Parrot installation...</tt> <br> <br> <tt>===SORRY!===</tt> <br> <tt>I'm missing some needed files from the Parrot installation:</tt> <br> <tt> C:/Parrot/lib/parrot/1.7.0/languages/nqp/nqp.pbc</tt> <br> <tt> C:/Parrot/lib/parrot/1.7.0/tools/build/</tt> <br> <tt> C:/Parrot/lib/parrot/1.7.0/tools/build/</tt> <br> <tt> C:/Parrot/src/parrot/1.7.0</tt> <br> <tt> C:/Parrot/src/parrot/1.7.0/pmc</tt> <br> <tt> C:/Parrot/include/parrot/1.7.0/pmc</tt> <br> <tt>(Perhaps you need to use Parrot's "make install-dev" or</tt> <br> <tt>install the "parrot-devel" package for your system?)</tt></p><p> DOH! very nice error message though. I'll try install-dev. </p><p> That slipped in, and Configure.PL ran ok in the rakudo dir. </p><p> make ( well the mingw variant ) worked.... now running $make test </p><p> <tt>All tests successful.</tt> <br> <tt>Files=29, Tests=236, 146 wallclock secs ( 0.81 usr + 0.16 sys = 0.97 CPU)</tt> <br> <tt>Result: PASS</tt></p><p> yay. </p><p> So it seems install. One thing left then. </p><p> I create a file,, with the following content:<br> <tt>say "Hello world";</tt> <br> and lets try to run it ( making sure that perl6 is added to path this time<nobr> <wbr></nobr>... ) and<nobr> <wbr></nobr>..... </p><p> Agggh! our friend the icuuc42.dll alert!. I hadn't added C:\usr\lib\icu\bin; to the global %PATH%! Easily fixed. </p><p> And, finally, largely due to my distracted state!:<br> <tt>C:<nobr> <wbr></nobr>... \perl6&gt;perl6</tt> <br> <tt>Hello world</tt> <br> yay! </p><p> Conclusions: </p><ul> <li>Focus on what you are doing - watching telly simultaneously isn't great</li><li>Follow the instructions in the parrot distro.</li><li>ICU seems important.</li><li>Be carefull about your environment variables.</li></ul> lilstevey 2009-10-28T23:59:38+00:00 journal Attempted dip into perl 6 <p>Win 32 again. I am tempted to get a proper posix laptop of some kind or description but until then...</p><p>I sat down this afternoon to watch "The Last King of Scotland". As I have difficulty single-tasking I thought I might have another look at perl6 whilst it was on. Heres some of the notes I made.</p><p>Effective starting point:</p><p></p><p>points to:</p><p></p><p>Download parrot &amp; install win32 - straightfoward.</p><p>Download Rakudo from:</p><p></p><p>Back then to the perlfoundation guide - it says "To build the Rakudo Perl 6 compiler,<br> &nbsp; first get a working copy of Parrot and build Parrot. Then, once Parrot is built,<br>change to the languages/ subdirectory and obtain your copy of Rakudo there:"</p><p>I used the win32 installer, and upon changing into the parrot directory there doesn't<br>seem to be a languages subdir!</p><p>Ahhhhhh</p><p>Nothing quite like RTFM! -</p><p></p><p>That mentions the --gen-parrot method - however, i've just installed parrot so I'll<br>try to find another. The README file in the downloaded Rakudo directory seems to provide the answer:</p><p>--parrot-config=/path/to/parrot_config</p><p>Not too sure what "parrot_config" is though. I'll start with the "C:\Parrot-1.7.0" directory.</p><p>Doesn't work - try another - nope - should be more scientific. do some googling. Nope.</p><p>I'll try perl followed by dmake - nope. switch to suggested mingw32-make.</p><p>issues. maybe I should have stuck with the "perl --gen-parrot" varient.</p><p>I google: "parrot win32 rakudo --parrot-config"</p><p></p><p>hmmm. maybe I'll try --gen-parrot...</p><p>In file included from perl6_group.c:17:<nobr> <wbr></nobr>/Parrot-1.7.0/include/parrot/parrot/parrot.h:235:23: libintl.h: No such file or<br>directory<br>mingw32-make: *** [src\pmc\perl6_group.dll] Error 1</p><p>Hmm. maybe its worth returning to the Last King Of Scotland for its conclusion - next time maybe I'll try to build parrot devel locally and go from there...</p> lilstevey 2009-10-27T00:02:14+00:00 journal The definitive Guide to Catalyst After playing with catalyst for a little while, it has interested/excited me sufficiently to make a time/finance trade and invest in a book rather than relying on the power of the internet for guidence. <br> <br> I've been "out of perl" for a few years now, and there appears to be two books aimed at catalyst out there now. After a little googling and swotting up on amazon, I stumbled across a review of <a href="">"the definitive guide to catalyst" from the illustrious Dave Cross</a> ( To stress - Dave reviewed the book - as far as I'm aware he didn't write it ) <br> <br> I've now owned this book for a whole 24 hours, so thought it worth sharing my first thoughts - I am very impressed. One of the features Dave mentioned was the books coverage/use of "Modern (or Enlightened) Perl" - I think its fair to say that all platforms have moved forward recently - I can't imagine people coding in java, for example, using the same techniques as was prevalent 10 years ago, so I was keen to see what has gone on in the perl world. <br> <br> Little parts of the book - such as the page on minicpan are a godsend for me, the explanation of moose looks interesting, and whilst I haven't begun to digest the huge wealth of information contained within this tome, the style and depth of what I have gleamed thus far gives me a great deal of faith in my investment. If I had to choose a single feature about the book that appeals thus far, its that the authors appear to have managed to cover a massive subject area in a concise, well written manner that doesn't treat the reader as a fool or simpleton. Good levelling chaps! <br> <br> I'll try to make some more notes after a couple of weeks or so when I've had the opportunity to study this work further. lilstevey 2009-10-16T09:07:21+00:00 journal James Martin I suspect he isn't a fan of "my Family"<blockquote><div><p> <a href=""></a></p></div> </blockquote><p> I thought I'd outsource my opinions to this chap though - good column:</p><blockquote><div><p> <a href=""><nobr>a<wbr></nobr> mes-martin/</a></p></div> </blockquote><p> Not the first time he has found himself in a contraversal situtation though:</p><blockquote><div><p> <a href=""><nobr>M<wbr></nobr> artins-stepmother-wins-damages-over-ugliest-woman-ever-met-jibe.html</a></p></div> </blockquote> lilstevey 2009-09-20T21:54:00+00:00 journal Ebay usability Its now been a while since I took temporary possesion of me mates laptop. <br> <br> Today I looked at ebay. It said "Hello lilsteveysmate ( Friend of Lilstevey ). Not you? sign in." <br> <br> Maybe I'm being stupid but I can't see log out. That's not right? Is it? lilstevey 2009-09-15T19:26:20+00:00 journal Installing catalyst on MS platform I've decided to have a play with catalyst... <br> <br> On windows... <br> <br> So first I install active perl. I read a couple of blogs, then decide perhaps strawberry perl would be more appropriatte. <br> <br> So I download <br> <br> I read a little more. Apparently it's not recommended. <br> <br> So then I install perl number 3. <br> <br> And try to install catalyst. then I get a bug on Catalyst::Devel.<blockquote><div><p> <tt>Result: PASS<br>&nbsp; FLORA/Catalyst-Devel-1.20.tar.gz<br>Tests succeeded but 2 dependencies missing (Win32::Process,Proc::Background)<br>&nbsp; FLORA/Catalyst-Devel-1.20.tar.gz<br>&nbsp; [dependencies] -- NA<br>Running make install<br>&nbsp; make test had returned bad status, won't install without force</tt></p></div> </blockquote><p>So I thought I'd try to install Win32::Process but it didn't like that:</p><blockquote><div><p> <tt>dmake.EXE:&nbsp; Error code 129, while making 'Process.o'<br>&nbsp; JDB/Win32-Process-0.14.tar.gz<br>&nbsp; C:\strawberry\c\bin\dmake.EXE -- NOT OK<br>Running make test<br>&nbsp; Can't test without successful make<br>Running make install<br>&nbsp; Make had returned bad status, install seems impossible</tt></p></div> </blockquote><p>But I found this on the perl,org faq: <a href="">cpan doesn't set compiler path in portable version</a> which suggest setting paths thusly:</p><blockquote><div><p> <tt> P:\dev\aliasperl-b3\perl\bin&gt; set PATH=%PATH%;p:\dev\aliasperl-b3\c\bin<br> P:\dev\aliasperl-b3\perl\bin&gt; set PATH=%PATH%;p:\dev\aliasperl-b3\c\mingw32\bin</tt></p></div> </blockquote><p>Meanwhile the other me who wasn't quite as determined to install 3 different perls to try to see what catalyst is like these days has gone down the pub for a beer and opted to use another framework. <br> <br> Anyway - that didn't work, so I again resort to google and find another thread: CPAN build fails in Strawberry Perl <br> <br> This contains the following gem from DAGOLDEN:</p><blockquote><div><p>I've released 2.20_04 to CPAN as 2.200401. That looks like it should more stable than 2.20_05 and contains the const char * fix.</p></div> </blockquote><p> So next I install this version of extutils make::maker. I'm now starting to worry if I'm going to be able to make this work should I decide to try it on a real project. <br> <br> Fortunately that does it, and it appears to be installed. Now to find a "hello world" howto showing me how to configure it with apache...</p> lilstevey 2009-09-15T15:56:19+00:00 journal Sun offering Perl training I've only just noticed this: <br> <br> <a href=""></a> lilstevey 2008-04-18T09:58:47+00:00 journal Another slashdot Gem Generally I think of slashdot as over-opinionated noise. Occasionally something good comes up: <br> <br>;cid=22571238 <br> <br> Clothes are just a communication protocol: Learn the spec and use it when appropriate. lilstevey 2008-02-27T16:29:43+00:00 journal Change and Power Regardless of your views on Global warming, energy is becoming a more expensive commodity - if you believe in the power of supply and demand, an expanding, more demanding global population should see to that. <br> <br> I think therefore, that unless people have money to pass as liquid indirectly into a sewage processing system, energy conservation needs to be on everyones minds in the next few years. <br> <br> The thing is, If I can make an observation, as a species we are lazy, easily distracted and quick to jump onto a bangwagon. Witness the sale of wind turbines in suburban areas, where chances are they are never going to provide a return on investment. Is it saving the planet, a way of dispersing guilt, or a status symbol? <br> <br> Regardless of that, though, I think its fair to say that the argument that change is fairly inevitable. Personally, I'm dissapointed with the governments approach to nuclear power, as it seems pretty short sighted - and fails to address the true, inevitable issue of consumption. At the end of the day, these things seem to need to be both near the coast, and protected from erosion for many centuries. With predicted rising sea levels, building these extremely delicate devices this close to a known danger seems pretty reckless... Especially on an island where land changes hands at the level it does at the moment. <br> <br> So rather than trying to subsidise supply with future income, why can't the other half of the equation be dealt with? A Solar panel may well not be able to power your refridgerator but it can charge your mobile phone - and lets not take cold maths to the economics of it in terms of power consumption to charge a phone - many, many people leave the chargers plugged in 24/7. <br> <br> "Zero Carbon" sounds very cool, but it's more niche than mainstream, so whats wrong with aiming for low carbon? Look at the electrical devices in every room - how many are left on standby, and how many need to be - sure, your alarm clock, fridge, freezer, video recording are at least significantly more easy to be left on, but your TV, Hifi, Laptop? Why only one circuit per room (<nobr> <wbr></nobr>/rooms ) - from a user perspective wouldn't it be easy to switch the green switch to send a room into power saving mode - that is leave the video on and turn the telly, chocolate fountain, and lava lamp off? And does a microwave need a clock - what on earth is that all about? - in some cases the damn things don't even work unless you set the effing time! Which idiot decided to try to make you keep a machine on for 24 hours that can cook your dinner in 3 minutes and 45 seconds? <br> <br> I feel it worthwhile noting that it's not just some green crusade I'm on. As a "victim" of a prepayment meter the cost between standby and off is very very visible - going away for a week costs such a tiny fraction of being here - and I'm convinced a significant proportion of that is ate up by me not pulling the plug. <br> <br> The point I'm trying to make is that we don't have to make a massive change in order to reduce our energy dependency. We just need to demand more thought, and sensible changes to legislation. Theres enough clever people out there to make a low power lifestyle convenient, after all, regardless of anyones beliefs on the future of our environment, using less should make sense to anyone? lilstevey 2008-01-11T23:36:11+00:00 journal jack daniels in home made burgers &amp; hitchhikers Over the last few days, mesin, n me fine missus have bin watchin the bbc 1981 hitchhikers guide to the galaxy. Its been a thoroughly enjoyable series. We tried to find series two. We couldn't. It felt a bit odd that it finished in episode 6. Is that just our faulty memory and imagination playing tricks with each other? <br> <br> We are trying to watch the filmy cinemary version. <br> <br> deep thought. <br> <br> So Very Very Wrong. <br> <br> Relation ship between Arthur and Trillian. <br> <br> Wrong. Why does it drag on so? <br> <br> What I really really can't get over is that I thought there was more than six episodes in the tv series - were the rest in my imaginanation? <br> <br> Me missus is just asking where slarty bardfast is. <br> <br> Help me. Tell me they filmed series two in the eighties... please...<br> <br> Oh yes. The jack daniels bit. Just tried adding it to my burgers, which generally tasted just plenty fine as I had em. Turned out they weren't any better, maybe a tad worse. Next time I'll stick to how they were. lilstevey 2008-01-06T00:53:48+00:00 journal Unhealthy Hinge fixation in low cost laptops I like portable computers. I like the convenience of being able to take a portable machine with me. <br> <br> However, I have a small issue with the design. There doesn't seem to be a great deal of creativity applied to it, and they all seem to need this breakable hinge to connect the keyboard unit to the screen part. <br> <br> Why? Wouldn't it be cheaper to have a screen with a thicker base so it would self support, with a socket for a keyboard and mouse - they are mass produced low cost components anyway. <br> <br> And why am I saying this - because I had a hinge break on one of my laptops, and also because I view the complexity as a cost - the hinge may only be a small component, but when you add some of the other mechanical parts (keyboard and pointer for example ) there starts to be a lot of moving parts, which in my simple rule book means more bits to go wrong and hence more things to test. <br> <br> And the simple all in one box form should lend its self to a kit form, potential reducing construction cost, increasing the ability to customise and making it simpler to fix things that go wrong. <br> <br> There are downsides - the traditional laptop is quite portable - however I feel that a lot of Portability issues are easily met using the age old device called "A Bag". lilstevey 2008-01-05T11:57:34+00:00 journal Swearing in comments - what's the opinion now? I've seen various articles on the web in the past expressing the opinion that placing swear words in comments should not be a reflection of the programmers profesionalism. <br> <br> I haven't seen these sort of articles released recently, though have on occasion heard opinions stressed that its ok. <br> <br> As a general case, I'm of the opinion that as a programmer you are responsible for quality of the entirity of your conribution, which you perform in exchange for your salary. <br> <br> What the customer/employer decides to do with that code, unless expressed otherwise in the contract is totaly their business - not that of the employees. <br> <br> Therefore, should the business decide to release the source code for the product, the comments become as public as the user interface. <br> <br> This leads me to suspect that if I am right in suspecting that "cussing in comments" is passe, the commercialisation of open source could be a contributory factor - or perhaps its just a reflection of the maturity of the industry? <br> <br> Or maybe I'm wrong, and there is still a belief that delivery of code is limtied to user experience. <br> <br> Either way I'd be interested in the prevailing attitude towards what people percieve is a professional attide to software development. I'd also be interested if people have the same attitude to code released personally to that developed under contract? lilstevey 2007-12-08T19:40:39+00:00 journal Coca Cola with Orange I noticed this beverage at my local jacket potato stall, and decided to purchase and sample this interesting varient on a popular brand of fizzy drink. <br> <br> I have to admit, at first It struck me that it had never occured to me to mix coca-cola and orange, then I realised I had a few muddy ducks in my time - I don't think I've ever considered it to be a marketable beverage however. After tasting the contents of said can, I came to the conclusion that who-ever concocted this varient probably did as good a job of combining coke and a hint of orange as could be done. I doubt I'll buy another. <br> <br> <i>Summary: Probably not a mistake to have tasted</i> lilstevey 2007-11-02T11:59:59+00:00 journal Ban The Bog Troll <p> Hi, </p><p> I've been running a little campaign that may interest some UK based Perl Mongers. Its about Bog Trolls - those chaps who sit in the 'bathroom' in pubs and clubs with a tray of aftershaves and lollies. </p><p> Unfortunately for the customer, the presence of the Troll isn't advertised, and the first time you hear of it is when you stumble into the toilet afting paying the pub in question for a few jars of ale. </p><p> Unsuprisingly, many toilet visitors do not require to buy food stuffs stored in a pub bathroom, and aren't that bothered by the sprays. Many Trolls then try to secure funds by offering an enhanced service - such as turning on a tap for you, or passing you a paper towel. </p><p> I have heard people tell of occasions when the troll has removed towels, or soap from the pub, forcing customers to pay for a service that should be complimentary. A search of the internet will yield tales of abuse and intimidation </p><p> I think it's time to call time on this behavour, and to preserve an important part of British Culture. Lets stamp this practise out before it spreads to every pub in the country. Demand your traditional right to pee in peace. Please sign the petition at <a href=""></a>, and visit the site at <a href=""></a>. The websites primary purpose is to act as an easy to remember URL to pass onto friends should you encounter this whilst Drinking - I don't make any cash out of the ads. </p> lilstevey 2007-06-17T18:44:22+00:00 journal Bargain Perl6 and Parrot Essentials Not content with having "Higher Order Perl", and a highly recommended "Domain Driven Design" by Evans on my book shelf in a to read state ( together with GOFs "Design Patterns" which requires work ), I have just recieved my copy of "Perl 6 and Parrot essentials" from Price Cut Books ltd via for &#163;4.09 which I consider to be a bargain. Whether I get time to read it before perl 6 is production ready and the equivalent of camel is out I don't know. lilstevey 2007-03-07T12:18:59+00:00 journal Resolution Review and java certification Firstly, I passed my sun certified java programmer exam today. Yay! The exam, for those who are unaware is generally considered difficult, and I went into it anticipating failure. I developed the philosophy that each question was testing one thing, it just may not be the one thing that is immediately apparent. I don't know if thats true or not, but as a coping strategy it certainly helped. <br> As a result of passing the scjp exam being on my 2007 targets, It's probably a good time to revisit my new years resolutions:<blockquote><div><p>2007 Resolutions: </p><dl> <dt>Resolution: Sort out finances</dt> <dd> <i>Nope - not by a long shot</i></dd> <dt>Resolution: Learn French</dt> <dd> <i>Yup - I am still attending classes</i></dd> <dt>Resolution: Technical Self Development</dt> <dd> <ul> <li>* Pass Java Programmers Certification</li><li><p> <i>woohoo - done!</i> </p></li><li> * Register for Java Developers certification</li><li><p> <i>I think I'll sort out my finances before I pay any money to sun for further testing</i></p></li> </ul></dd> <dt>Resolution: Get Fit</dt> <dd> <ul> <li> Reduce Weight to below 13.5 stone by New Years Eve 2007/08</li><li><p> <i>Still a bit of work to do - just stepped on the scales and was 14.5.</i> </p></li><li> Have cycled, on average 50 miles a week for each week in 2007</li><li><p> <i>err, managed 30 I think in total so far...</i></p></li> </ul></dd> </dl></div> </blockquote><p> I think its fair to say there is still someway to go - fortunately I have ten more months to acheive them in. I think there will have to be an awfull lot of cycling if I'm to achieve that goal though...</p> lilstevey 2007-02-28T13:37:06+00:00 journal New Rule I have recieved this excellent wisdom via email:<blockquote><div><p> <strong>New rule:</strong> <br> <br> <i>If you do not know how to achieve a task then you have no right to set the deadline for when it will be done.</i></p></div> </blockquote> lilstevey 2007-02-23T11:21:45+00:00 journal Magic Magic Java I do like a lot of things about the java language, however occasionally it does things that I do consider counter intuitive. Consider the following line of code: <br> <br> <code>BigDecimal result = new BigDecimal(10).divide(new BigDecimal(3));</code> <br> <br> Given appropriatte imports, by looking at the code I would not be at all suprised to see any of the following values stored in result: <ul> <li>4</li><li>3</li><li>3.33</li><li>3.33334</li><li>3.333333</li></ul><p> I find the actual output slightly outside of my predicted pool of predicted behavour: <br> <br> <code>Exception in thread "main" java.lang.ArithmeticException : Non-terminating decimal expansion; no exact representable decimal result.</code> The logic thing to me given the operation would be to use defaults ( preferably controllable ones ), not to produce occasional errors that can confuse hell out of a beginner.</p> lilstevey 2007-02-20T12:03:44+00:00 journal cum reed this Bumped into this online. Interesting theory - Makes as much sense as dumping the pint and adopting the litre*. <br> <br> <a href=""></a> <br> <br> <small>* I'm all for it - when you are really thirsty there are few things in life as satisfying as a litre of cool crisp Czech Lager, however, despite the aforementioned beverages qualities, I do respect and hold our heritage in high regard, and perhaps a pint would be best preserved as an oversized glass in which beer is served, with a lined 500ml, thus accomodating a healthy flavoursome head above the metric half litre.</small> lilstevey 2007-02-20T01:26:18+00:00 journal RIP New Media I've been sorting through my worldy possesions of late on a kinda "mother of all spring cleans". I have a stack of old floppy disks ( some dating back as far as my atari ST, having parted with my atari 800 stuff some years ago ), and a cd case full of discs containing opensource software and data. <br> <br> A lot of the material is now pretty obsolete - I don't need suse from 10 years ago, debian cds from 2 years ago, and to be honest would be better using a pen drive to do the ubuntu install I'm embarking on, rather than adding another soon to be obsolete cd to the collection. <br> <br> Now aside from backups, which I should probably use rewritable cds for, I'm starting to see that in my life, electronic/optical media is starting to become quite irrelevant, as the small collection of audio tapes I seem to keep but never listen to testify. <br> <br> I like books, and don't envisage that they are going to go anywhere soon ( short of a Blair enacting a Farenheit 451 trick as a leaving present ). I still have audio cds and film DVDs, but increasingly use on demand services for movie watching, and coupled with a hardrive tv recorder I feel less inclined to buy something that I know will be on within 6 months or so. <br> <br> I think what I'm trying to say is that in this digital age, with increasing storage and bandwidth, not to mention DRM, physical digital media can't have long left in it. I don't think thats particulary revolutionary. <br> <br> What is interesting though, is the rise of hosted services for the consumer. Once content is freed from media is there any reason why all of our digital content can't be fed over a pipe, making the home computer of the future more like a gas boiler, to be ripped out and changed on a whim without effecting the delivery or consumption of services. <br> <br> What I do find interesting is the rate of change of how fast this is happening and how far advanced this movement already is. lilstevey 2007-02-16T18:20:21+00:00 journal Yarp I watched Hot Fuzz last night. If you're a fan of Shaun of the Dead, Spaced etc you've probably already decided to go.<br> My only regret is that they had sold out of the couches with waiter service at my local indepenent so I had to watch it in cineworld. lilstevey 2007-02-16T15:05:54+00:00 journal Birmingham to Vienna (x2)(x2) I've booked one trip to Vienna, and am now planning another one for later in the year. <br> <br> For the later trip, I've started off with a flight to Prague. The plan is to spend the weekend there with the missus, and then find our way to vienna, before returning, possibly by another city the folowing weekend. <br> <br> I'm now trying to link up the journies. It looks like the best option for <a href="">Prague to Vienna might be the train</a> ( &#163;49 for first class ) as I don't seem to be able to find reasonably priced flights. <br> <br> For the return trip I am contemplating a trip on <a href="">hydrofoil down the danube</a> ( though it looks pricey ) to Budapest and spending the night there before flying back ( maybe via <a href="">wizz air</a> ). <br> <br> Another option would be to fly back from vienna to an interim destination nearer blighty on the saturday ( maybe using <a href="">airberlin</a> ), before making the last bit of the journey on the sunday ( perhaps direct to BHX would be a good thing ). lilstevey 2007-01-14T17:13:31+00:00 journal New years resolutions As good a place to list them as any.<br> <br> In the past I've been a little vague, but at least partially successfull. This Year I am going to set clear assessable targets which I can measure myself against. <br> <br> 2007 Resolutions: <dl> <dt> Resolution: Sort out finances</dt><dd> <ul> <li> After doubling current savings be in credit instantly before pay day.</li><li> Be in credit at end of year</li><li> Long term savings to have increased by at least anticipated current levels.</li></ul></dd><dt> Resolution: Learn French</dt><dd> <ul> <li> Continue to Attend Classes.</li><li> Re-inroll for 2007/2008.</li></ul></dd> <dt>Resolution: Technical Self Development</dt><dd> <ul> <li> Pass Java Programmers Certification</li><li> Register for Java Developers certification</li></ul></dd><dt> Resolution: Get Fit</dt><dd> <ul> <li> Reduce Weight to below 13.5 stone by New Years Eve 2007/08</li><li> Have cycled, on average 50 miles a week for each week in 2007</li></ul></dd></dl><p> What would be nice is a program which would let me record various metrics ( weight, financial balances, miles cycled etc ), and send me weekly reports based upon it. Anyone know of a nice web site?</p> lilstevey 2007-01-03T18:10:27+00:00 journal