nicholas's Journal nicholas'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-25T01:46:23+00:00 pudge Technology hourly 1 1970-01-01T00:00+00:00 nicholas's Journal Will parrot be the last one standing? <p>I'm a bit behind the times here, but I read today that one of the two remaining developers of IronRuby has left Microsoft:</p><blockquote><div><p>Overall, I see a serious lack of commitment to IronRuby, and dynamic language on<nobr> <wbr></nobr>.NET in general. At the time of my leaving Tomas and myself were the only Microsoft employees working on IronRuby.</p></div></blockquote><p> <a href=""><nobr>m<wbr></nobr> l</a>*</p><p>So if Microsoft's interest in dynamic languages is wilting, and Oracle's litigation scares everyone away from Java, will that leave <a href="">Parrot</a> as the last one standing?</p><p> <small>* yep, that's a formatting bug. I assume that it's not worth reporting while the site's future is unclear.</small> </p> nicholas 2010-08-20T09:37:19+00:00 journal Some you win, some you loose <p>So, my attempt to avoid <a href="">3D Secure</a> was successful, but seems to have had the unintended side effect that I <a href="">sold my soul for 3 days</a>.</p><p>I feel that I have to categorically deny that my product roadmap is in doubt, and that the rumours of forking me to regain control are completely unfounded, and unworthy of any further comment.<nobr> <wbr></nobr>:-)</p><p>See you all at <a href="">YAPC::Europe</a> next week. Right now, there's <a href="">another free ticket up for grabs</a>, thanks to <a href="">Shadowcat</a>.</p> nicholas 2010-07-28T19:50:24+00:00 journal Ding Dong! The Witch is Dead! <p> <code>$ git show --stat 75108aefc8b50fcf<br> commit <a href="">75108aefc8b50fcf2f053da2df34756c7b269a1f</a> <br> Author: Nicholas Clark &lt;;<br> Date: Mon Apr 19 20:35:54 2010 +0100<br> <br> Remove Switch from the core distribution. Get it from CPAN now.<br> <br> &nbsp;MANIFEST&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;9&nbsp;-<br> &nbsp;Porting/;&nbsp;|&nbsp;&nbsp;&nbsp;10&nbsp;-<br> &nbsp;dist/Switch/Changes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;121&nbsp;-------<br> &nbsp;dist/Switch/MANIFEST&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;9&nbsp;-<br> &nbsp;dist/Switch/META.yml&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;14&nbsp;-<br> &nbsp;dist/Switch/Makefile.PL&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;7&nbsp;-<br> &nbsp;dist/Switch/README&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;26&nbsp;--<br> &nbsp;dist/Switch/;&nbsp;&nbsp;|&nbsp;&nbsp;875&nbsp;-----------------------------------------------<nobr> <wbr></nobr> <br> &nbsp;dist/Switch/t/given.t&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;272&nbsp;---------------<br> &nbsp;dist/Switch/t/nested.t&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;35&nbsp;--<br> &nbsp;dist/Switch/t/switch.t&nbsp;&nbsp;|&nbsp;&nbsp;272&nbsp;---------------<br> 11 files changed, 0 insertions(+), 1650 deletions(-)<br> </code> </p><p>It's taken about 2 years, from the original idea on how to smoothly migrate modules out, getting agreement from Andreas and Jos in the buffet queue at <a href="">YAPC::Europe 2008</a>, a lot of "fun" re-ordering <code>@INC</code>, coding by Andreas, Jos, BinGOs and David Golden, and Jesse getting a 5.12.0 release out, but finally, now Ding-Dong! The Witch Is Dead.</p><p>Albeit only in <a href="">blead</a>. Not even in a dev release <b>yet</b>, let alone stable. But these things will come...</p> nicholas 2010-04-21T21:10:27+00:00 journal Random thing to phase Dean <p>It seems that I haven't seen <i>The Sound of Music</i> recently enough*. I can't remember more than a couple of lines from any of the songs, despite being confident about the tunes. Hammerstein would be frustrated. Rogers, I assume, happy enough. <a href="">Dean Wilson</a> likely will comment that I have too much time on my hands, as seemingly surreal blog entries like this one seem to perturb him.</p><p> <small>* I don't know whether this is a bug or a feature.</small> </p> nicholas 2010-04-21T20:58:26+00:00 journal Rocket fuel review <p>So, mostly conclusions without much justification. Of the recent consumption:</p><dl> <dt> <a href="">Weston's Vintage Special Reserve</a></dt><dd>I didn't like this as much as the first time I had it. It feels like it's over doing it somehow.</dd><dt> <a href="">Thatchers' Katy</a> </dt><dd>Nicer than the Special Reserve.</dd><dt> <a href="">Weston's Perry</a> </dt><dd>Want more. Seriously drinkable. Seriously dangerous*.</dd><dt>Brother's Festival Cider</dt><dd>I didn't like it that much. It has a slight rough undertone, like there's a trace of scrumpy in it. But I wasn't trying to drink paint stripper (this time).</dd></dl><p>Unfortunately I have run out of Katy and Perry. There will have to be a third place drink-off between the Special Reserve and the Festival Cider. Carefully. And not on a school night.</p><p> <small>* Trumps Apple Hooch in the "danger" category. To me, Apple Hooch tastes like Appletize. Problem is that I know that Appletize is non-alcholic, and don't pace myself. Only Apple Hooch is (well, was) 5% ABV. Weston's Perry is 7.4%.</small></p> nicholas 2010-04-04T20:22:16+00:00 journal svn to mercurial? <p>Dear lazyweb...</p><p>We're using Trac at work. It's made of <a href="">software</a>, but some software is more equal than others. In particular, we're planning to move from subversion to mercurial, because Trac seems to work nicely (enough)* with mercurial, unlike git.</p><p>So, what's the best way to convert a 20000 revision svn repository to mercurial? We have branches, which it would be nice to convert to real branches. I have some idea how to do this for svn to git, including branches and tags, but not for mercurial.</p><p> <small>* svn <i>vs.</i> Trac - which sucks more? The ultimate cagematch.</small> </p> nicholas 2010-04-01T14:14:06+00:00 journal So we're getting Calais back? <blockquote><div><p>The ambitious scheme follows a move by the French to cash in on the London Olympics by rebranding their region &#8216;part of Britain&#8217;.</p></div></blockquote><blockquote><div><p>The ploy has helped them land contracts with a string of foreign teams to train in France ahead of the 2012 Games.</p></div></blockquote><blockquote><div><p>Boulogne and Calais now claim that the Britain no longer stops at the white cliffs of Dover.</p></div></blockquote><blockquote><div><p>&#8216;I consider that we are the south of England,&#8217; said Mr Dupilet. &#8216;And because we're the south of England it's normal that we would associate ourselves with this extraordinary event.&#8217;</p></div></blockquote><p>Eh. This is putting pragmatism ahead of patriotism. Most unusual.</p><blockquote><div><p>Mr Dupilet said people who wanted a comfortable commute to London would be far better off basing themselves in northern France than in other parts of Britain.</p></div></blockquote><p> <b>That</b> is key, and I'm surprised that it's taken <b>this</b> long to get going. As (I think) <a href="">L&#233;on</a> said 5 years ago, it's not 1h15 from Calais to London, and 1h15 back, it's <b>only a 15 minute commute to London</b>, thanks to the timezone difference. Which would really help the lifestyle. And it ties up with something Pierre Denis said. If your job allows you to live anywhere in France, you'll choose the south. Even 3% of the population being able to do this has started to massively skew property prices there. Whereas the south east of England is and has long been desirable as a location for those who commute to London, so there's no new skew as location unconstrained people increase.</p><p>Result - Kent is crowded and expensive. However, the Pas de Calias is much emptier, and much less expensive. All it needs is a commuter service. And of course:</p><blockquote><div><p>&#8216;Who wants to go to Birmingham?&#8217; he said. &#8216;In the Pas-de-Calais the French lifestyle is better. And as for the food over there, well, forget it.&#8217;</p></div></blockquote><p>From the <a href="">Daily Fail</a>, but not the usual fayre. And if you're wondering about my choice of subject:</p><blockquote><div><p>England ruled Calais for more than 200 years after being besieged and captured by Edward III in 1347.</p></div> </blockquote> nicholas 2010-02-17T20:01:43+00:00 journal don't do this <p>It's just occurred to me that <a href="">it might be possible</a> to <code>goto \&amp;sub_ref</code> out of a <code>BEGIN</code> block. After all, they're really subroutines at heart. So, does it work?</p><blockquote><div><p> <tt>$ cat<br>#!perl -w<br>use strict;<br> <br>sub sick {<br>&nbsp; &nbsp; warn "Yuck!";<br>}<br> <br>BEGIN {<br>&nbsp; &nbsp; goto \&amp;sick;<br>}<br> <br>__END__<br>$ perl<br>Yuck! at line 5.</tt></p></div> </blockquote><p>Yep. Sure does.</p><p>Don't do this.</p><p>This is where someone points me at prior art from 10 years ago. There is, after all, nothing new under the sun.</p> nicholas 2010-02-16T18:03:08+00:00 journal Chip and Pin counterfud exposed. <p>So, <a href="">Chip and Pin is broken</a>.</p><p>But the fun part is in the comments. Comment 19 from the anonymous "Scrutineer" includes:</p><blockquote><div><p>The attack was never successfully executed. To be successful it had to be done against a card that was reported lost and stolen. Nowhere in the report do they assert that they reported their cards they tested as lost or stolen! All they have done is prove a genuine card can be processed with odd and inconsistent CVR and TVR settings. Hardly compelling evidence.</p></div></blockquote><p>Which <b>of course</b> misses the point - it's about the interval between theft and discovery of theft - the time that someone else has your card <b>before</b> you're able to successfully report it stolen. This attack changes the game from "the PIN protects you better than a signature - now if someone steals your card they need to guess your PIN" back to "They only need to steal your card" (and actually easier, because they don't need to learn to forge signatures).</p><p>But the best bit is comment 22:</p><blockquote><div><p>The chap &#8220;Scrutineer&#8221; who posted comment 19 seems to have forgotten to sign it!<br> Anyway he&#8217;s not very good at anonymity:<br> <br> $ whois<br> &#8230;.<br> address: APACS (Administration) Ltd<br> address: 14 Finsbury Square<br> address: London<br> address: EC2A 1BR<br> address: England, UK<br> <br> Pity APACS couldn&#8217;t get it together to put up a spokesman for Newsnight</p></div></blockquote><p>Touch&#233;</p><p>Update: It's really someone at APACS. Not an exercising in framing, taking advantage of a proxy:</p><blockquote><div><p>A spokeswoman for UK Card Association said the posts violated staff internet-use guidelines.</p></div></blockquote><p> <a href=""></a> </p> nicholas 2010-02-12T17:31:11+00:00 journal Not Your Father's Von Neumann Machine <p>I really liked this talk - <a href="">This Is Not Your Father's Von Neumann Machine by Cliff Click</a>*</p><p>It's well worth watching. It has really nicely presented explanations of:</p><ol> <li>How and why a modern CPU executes out of order, and why cache misses are king.</li><li>How memory architecture means that two cores can cause writes to be read out of order, and the implications (your code goes boom<code>^W</code>SEGV).</li></ol><p> <small>* Brian Goetz was co-author of the talk, and co-presented it on its first outing, but this presentation of it just has Cliff Click.</small> </p> nicholas 2010-02-08T21:00:35+00:00 journal ... unless you're a Sikh <blockquote><div><p> <a href="">Although Sikhs carrying the Kirpan are exempt from prosecution under the offensive weapons act</a></p></div> </blockquote><p>I didn't know about that one. I knew that a practising member of the Sikh faith is allowed to wear a turban instead of a helmet when riding a motorcycle. I wonder how many other such exemptions are carefully written into UK law. I need a list - Wikipedia you <a href="">fail</a> me!<nobr> <wbr></nobr>:-(</p> nicholas 2010-02-08T11:04:21+00:00 journal Memory usage <p>There were a few things that caught my attention in <a href="">Facebook's presentation on HipHop</a>, their PHP to C++ converter. It sounds like it relies on static analysis of the entire program's source, hence why they can't support <code>eval</code>, <code>create_function</code> <i>etc.</i> (22m25s in). I suspect that that sort of restriction would be, um, "interesting", in a general CPAN using environment, as a lot of modules build on various low level code that encapsulates <code>eval</code>, such as the traditional way <code>h2xs</code> did constants via <code>AUTOLOAD</code>. Also, as it's different runtime from Zend, so extensions need to be ported to it (19m in).</p><p>However, the most interesting part was a an early slide about memory usage, at 6m20. Transcribed:</p><blockquote><div><p>150MB</p><blockquote><div><p> <tt>for ($i = 0; $i &lt; 1000000; $i++ ) {<br>&nbsp; &nbsp; &nbsp; $a[] = $i;<br>}</tt></p></div> </blockquote><p> 700MB</p><blockquote><div><p> <tt>for ($i = 0; $i &lt; 5000000; $i++ ) {<br>&nbsp; &nbsp; &nbsp; $a[] = $i;<br>}</tt></p></div> </blockquote><p> (700M - 150M) / 4,000,000 = 144 BYTES</p></div> </blockquote><p>Does PHP really consume 144 bytes per integer value? Is that on a 32 bit or 64 bit machine?</p><p>For comparison, here is Perl:</p><blockquote><div><p> <tt>$ perl -le 'for ($i = 0; $i &lt; 1000000; $i++ ) { push @a, $i; }; print `cat<nobr> <wbr></nobr>/proc/$$/statm` * 4 / 1024'<br>22.4765625<br>$<nobr> <wbr></nobr>./perl -le 'for ($i = 0; $i &lt; 5000000; $i++ ) { push @a, $i; }; print `cat<nobr> <wbr></nobr>/proc/$$/statm` * 4 / 1024'<br>118.44140625</tt></p></div> </blockquote><p>which works out at 25.155 bytes per integer value, or under 20% of their figure for PHP. The odd number of bytes will be the <code>malloc</code> overhead spread across all the structures allocated from the same arena.</p><p>I have no idea what the usage of Python or Ruby are like, but there's a comment in the <a href="">Unladen Swallow wiki</a>:</p><blockquote><div><p>Here at Red Hat we use Python for a lot of things. What we've observed is that execution performance is not the main issue (although it improving it would be greatly appreciated), rather it's the memory footprint which is the problem we most often encounter. If anything can be done to reduce the massive amount of memory Python uses it would be a huge win. I would encourage you to consider memory usage as just as important a goal as execution speed if you're going to tackle optimizing CPython.</p></div></blockquote> nicholas 2010-02-07T16:20:40+00:00 journal Phished by Visa/3D insecure <p> <a href="">Steven Murdoch and Ross Anderson systematically demolish 3D secure/Verified by Visa</a>. Shame that the banks don't employ the smart people, just the security researchers and the malware authors.</p><p>Meanwhile, at work, we continue to love the banks. Such as a large UK bank who will <b>authorise</b> a Euro transaction on Maestro (which must have been with 3DS/VbV) yet only reject it at settlement time because you can only use (UK) Maestro in sterling. Another authorised a card, but then rejected it at settlement because it was Electron rather than Visa Debit, and that merchant wasn't allowed to accept Electron. I'd love to be big enough to have the clout to tell banks "if you authorise it, the <b>only</b> reason to subsequently refuse to settle it is because it was reported as missing/fraudulent in the meantime. Otherwise, you honour your authorisation", and bear the cost of (fixing) your own bugs.</p><p>And the coda on the second one - said large UK bank then admitted that its own binranges had an error. If the <b>banks</b> can't get that right, what hope has anyone else?</p> nicholas 2010-01-26T16:27:34+00:00 journal spontaneous mysql UTF-8 encoding <p>Dear Lazyweb,</p><p>Has anyone seen the following - perfectly happy MySQL connection, with:</p><blockquote><div><p> <tt>$VAR1 = [<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'character_set_client',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'latin1'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'character_set_connection',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'latin1'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'character_set_database',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'latin1'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'character_set_filesystem',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'binary'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'character_set_results',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'latin1'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'character_set_server',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'latin1'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'character_set_system',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'utf8'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'character_sets_dir',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '/usr/share/mysql/charsets/'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]<br>&nbsp; &nbsp; &nbsp; &nbsp; ];</tt></p></div> </blockquote><p>(<i>i.e.</i> the connection is consistently latin1), and data that is Latin 1. Yet, sometimes the server will return the characters of Latin 1 encoded as UTF-8. Same query. Same table. Nothing changed.</p><p>And, yes, I <b>know</b> that it's the server, or at least the client libraries, because I have "instrumented" my copy of DBD::mysql:</p><blockquote><div><p> <tt>--- dbdimp.c~&nbsp; &nbsp;2008-04-29 00:36:17.000000000 +0100<br>+++ dbdimp.c&nbsp; &nbsp; 2009-12-31 14:30:58.000000000 +0000<br>@@ -3489,6 +3489,18 @@<br>&nbsp; &nbsp; &nbsp;if (DBIc_TRACE_LEVEL(imp_xxh) &gt;= 2)<br>&nbsp; &nbsp; &nbsp; &nbsp;PerlIO_printf(DBILOGFP, "\t&lt;- dbd_st_fetch, %d cols\n", num_fields);<br> <br>+&nbsp; &nbsp; {<br>+&nbsp; &nbsp; &nbsp; char buffer[256];<br>+&nbsp; &nbsp; &nbsp; sprintf(buffer, "/tmp/DBD.%d", getpid());<br>+&nbsp; &nbsp; &nbsp; PerlIO *fh = PerlIO_open(buffer, "a");<br>+&nbsp; &nbsp; &nbsp; if (fh) {<br>+&nbsp; &nbsp; &nbsp; &nbsp;do_sv_dump(0, fh, av, 0, 32, 0, 0);<br>+&nbsp; &nbsp; &nbsp; &nbsp;PerlIO_close(fh);<br>+&nbsp; &nbsp; &nbsp; } else {<br>+&nbsp; &nbsp; &nbsp; &nbsp;croak("open '%s': %d", buffer, errno);<br>+&nbsp; &nbsp; &nbsp; }<br>+&nbsp; &nbsp; }<br>+<br>&nbsp; &nbsp; &nbsp;return av;<br>&nbsp; &nbsp;}<br>&nbsp; &nbsp;else<br>@@ -3601,6 +3613,17 @@<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(void) SvOK_off(sv);&nbsp;<nobr> <wbr></nobr>/*&nbsp; Field is NULL, return undef&nbsp; */<br>&nbsp; &nbsp; &nbsp;}<br> <br>+&nbsp; &nbsp; {<br>+&nbsp; &nbsp; &nbsp; char buffer[256];<br>+&nbsp; &nbsp; &nbsp; sprintf(buffer, "/tmp/DBD.%d", getpid());<br>+&nbsp; &nbsp; &nbsp; PerlIO *fh = PerlIO_open(buffer, "a");<br>+&nbsp; &nbsp; &nbsp; if (fh) {<br>+&nbsp; &nbsp; &nbsp; &nbsp;do_sv_dump(0, fh, av, 0, 32, 0, 0);<br>+&nbsp; &nbsp; &nbsp; &nbsp;PerlIO_close(fh);<br>+&nbsp; &nbsp; &nbsp; } else {<br>+&nbsp; &nbsp; &nbsp; &nbsp;croak("open '%s': %d", buffer, errno);<br>+&nbsp; &nbsp; &nbsp; }<br>+&nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp;if (DBIc_TRACE_LEVEL(imp_xxh) &gt;= 2)<br>&nbsp; &nbsp; &nbsp; &nbsp;PerlIO_printf(DBILOGFP, "\t&lt;- dbd_st_fetch, %d cols\n", num_fields);<br>&nbsp; &nbsp; &nbsp;return av;</tt></p></div> </blockquote><p> <small> <code> "mysql_st_internal_execute MYSQL_VERSION_ID 50134", DBD-mysql-4.007, DBI-1.609, perl 5.8.8, x86_64 GNU/Linux</code> </small> </p> nicholas 2009-12-31T15:38:43+00:00 journal What we should thank the X-Factor for <p>Some people seem sufficiently upset about the X-Factor "always" being Christmas Number 1 <a href="">that they did something about it</a>.</p><p>However, I think that we forget that we should be thankful for X-Factor number 1s - at least it stops <a href="">Cliff getting it</a>. (And the wannaby trendy UK might be ashamed to know that Cliff <b>isn't</b> the hardest working pop act out there - <a href="">it's actually The Quo</a>.)</p> nicholas 2009-12-30T09:49:13+00:00 journal some vehicles serve no purpose <p>So, this morning on the way in, the (4 wheel drive) Suzuki in front of me was trying to pull away from me at some traffic lights, but was having trouble because its right rear wheel was spinning. Me, on a <b>racing bike</b> behind it had no problems.</p><p>Some vehicles serve no purpose.</p><p> <small>Context - It snowed last night. There's a couple of inches* of snow, and unlike last time, none of the roads have been gritted. Grr.</small> </p><p> <small>* For people outside the UK, the correct unit conversion for snow is <b>1 inch</b> == <b>1 metre</b>. This will make everything make sense.</small> </p> nicholas 2009-12-18T09:30:48+00:00 journal Some things are not what they seem or what they say they are <p>So I have a bottle. A green bottle. The label says "Aspall Crisp Draught Suffolk Cyder". Most of that is true. Apart from the <i>Draught</i> part. Clearly it's a bottle. So, um, why use that word?</p><p>But that's not actually the most disconcerting thing about it. The rather confusing thing about it is that it's made of plastic. Yes, this rather nice high-end cider is being sold in a bottle, that at first inspection seems to be rather trog. You pick up a full bottle, and you have to keep checking that it's really 500ml, not 330ml, because it doesn't feel <i>right</i> for a half litre of booze.</p><p>But I can see why they're doing it. This bottle weighs 32g. A glass bottle (admittedly technically a beer bottle, as everything else went with the recycling yesterday morning) weighs 321g. So this bottle is a tenth of the weight, and reduces the container from 40% of the total shipped weight to 6%.</p><p>Hmm, <a href="">I've been here before</a>.</p> nicholas 2009-12-11T19:55:28+00:00 journal Escaping the pantopticon <p>It seems that if moving to Switzerland isn't feasible, another way to escape the prying eyes of Google Street View is to head underground. It seems that the spycars only <a href=";ll=51.501619,0.000122&amp;spn=0,359.948502&amp;z=15&amp;layer=c&amp;cbll=51.501696,0.000015&amp;panoid=2F3Kf42baWGeZkHqSai3bA&amp;cbp=13,141.14,,0,5">go so far down tunnels</a>. (Or one did, and never came back, so the others <a href=";ll=51.502545,-0.049353&amp;spn=0,359.948502&amp;z=15&amp;layer=c&amp;cbll=51.499027,-0.054989&amp;panoid=7-uueAY0EaEJSUJK_yj7QQ&amp;cbp=13,50.44,,0,5">avoid</a> <a href=";ll=53.406846,-2.986221&amp;spn=0,359.948502&amp;z=15&amp;layer=c&amp;cbll=53.409339,-2.982578&amp;panoid=s-G5XhVwCzOiJ7u-sFL2Jw&amp;cbp=13,267.24,,0,5">dark</a> <a href=";ll=53.408867,-3.008065&amp;spn=0,359.948502&amp;z=15&amp;layer=c&amp;cbll=53.408762,-3.030046&amp;panoid=xC8WiVypSggLIwWtsisYeA&amp;cbp=13,81.45,,0,5">places</a>). I wonder who has been waiting in tunnels and mugging black Opels.</p> nicholas 2009-12-11T10:47:27+00:00 journal Random interesting geology link <p> <a href="">A Lake Divided - A History of the Southern Pacific Railroad Causeway and Its Effect on Great Salt Lake, Utah</a> </p><p>Well, <i>I</i> thought that it was interesting. I assume that <a href=";ll=41.221309,-112.750754&amp;spn=0.024274,0.051498&amp;t=h&amp;z=15">this</a> and <a href=";ll=41.214692,-112.533131&amp;spn=0.024277,0.051498&amp;t=h&amp;z=15">this</a> are the ends of the 1950s causeway described in the article.</p> nicholas 2009-12-11T10:33:36+00:00 journal o&#1080;goi&#1080;g busway fu&#1080; <p>The (expensive) farce continues - (temporarily) illiterate workmen managed to get an <a href="">N backwards in some busway signage</a>.</p> nicholas 2009-12-10T13:48:51+00:00 journal rotating MPEGs <p>Dear lazyweb...</p><p>What's the best way to rotate an MPEG movie through 90&#730;?</p><p>My understanding is that JPEGs can be rotated through 90&#730; losslessly, so I assume that this can be done losslessly for MPEGs too, and I hope with a command-line tool.</p> nicholas 2009-12-09T21:30:51+00:00 journal The carbon footprint of code <p>At <a href="">lpw2009</a> <a href="">miyagawa</a> gave a(n award winning) talk about <a href="">Plack</a>.</p><p>During it, he commented "while I was on the plane from San Francisco to Japan I hacked on<nobr> <wbr></nobr>...", and then "while I was on the plane here I hacked on<nobr> <wbr></nobr>...", and I wondered <i>what is the carbon footprint of miyagawa's modules?</i> </p><p>This seemed rather an unfair question to ask in public, but when I told it to him later in <a href="">the pub*</a> he laughed. However the full question is slightly longer:</p><blockquote><div><p>What is the carbon cost of the modules' creation? What is the carbon saving from reduced dev time and reduced server load from using the modules? When is the cross over point?</p></div></blockquote><p>And, I guess, a more general abstract question - is jetting off to all these conferences we like to go to cost effective? Do we save more from what we learn than we pay to get there?</p><p> <small>* Thanks to <a href="">Shadowcat</a>, <a href="">antibodyMX</a> and <a href="">Venda</a> for sponsoring the food and <a href="">beer</a>. I hope they decide to do it again <a href="">next year</a> </small> </p> nicholas 2009-12-08T13:47:26+00:00 journal Sun reinvented Zimki and it still failed <p>I'm a <i>bit</i> slow on reporting this one, but no-one seems to have made the connection...</p><p>In 2005ish, Fotango started developing something that "evolved" into Zimki, a hosted "Software As A Service" offering, allowing you to write applications in server-side Javascript. The plan (or at least, one iteration of the plan) was to trial it as "free", but later on charge for it (or at least, above a low "free" threshold). It never seemed to get that many actual users, and folded when Canon Europe folded Fotango.</p><p>Of course, <b>nothing</b> is left online describing it, other than a <a href="">O'Reilly radar post</a>.</p><p>So, it seems, Sun re-invented the concept, and called it Zembly. It seems to be incredibly similar - <a href="">SaaS, browser-based, server side JavaScript, scaling catered for, two syllable name starting with Z</a>. Curiously, they <b>did</b> find a credible pitch for <b>who</b> might want to use it - people writing applications for social networking sites. This is actually a really sensible target - from what I remember reading, social networking apps can explode into <a href="">resource-devouring monsters</a>, so having all your insane scaling problems handled by someone else with experience seems like a big win. Heck, they even <a href="">even got a Radar pitch</a>.</p><p>Only <a href="">they too are shutting down</a> [that link likely will break soon after 30th November, try <a href="">TechCrunch</a>]. Is there any money in this? Or at least, is there any <b>profit</b>, at this level of abstraction?</p> nicholas 2009-11-27T11:36:11+00:00 journal Pesky spoilsport Viennese authorities <p>I was looking at <a href=";lon=16.44525&amp;zoom=16&amp;layers=B000FTF">Knoten Kaiserm&#252;hlen</a> (as you do), and spotted that there appears to be a <i>second</i> route through it, from the A23 NE to the A22 NW. The official route is 270&#176; clockwise round the tight inner slip road, third exit, but instead it seems to be possible to leave at the second exit, go 180&#176; anti-clockwise round the big loop under the A23, then cross over and turn 90&#176; round onto the A22, which happens to be under the new U2 bridge, and where OpenStreetMap currently has the caption 'Donaustadtbr&#252;ke'.</p><p>However, if one <a href=";ll=48.213271,16.442928&amp;spn=0.002388,0.004361&amp;t=k&amp;z=18">zooms in on the cross over point</a>, it seems that there's a solid white line marked all the way along, to prevent you doing that. Spoilsports<nobr> <wbr></nobr>:-(</p><p> <small>Incidental question - OpenStreetMap shows that the S1 is now open all the way round to Br&#252;nner Bundestra&#223;e, whereas Google Maps thinks that only the first bit (the S2) is open. Which is right? Given that Google gave driving directions along the A6 <b>before</b> it was open, my money would be on OpenStreetMap.</small> </p> nicholas 2009-11-27T10:36:15+00:00 journal Debian testing python version <p>Dear lazyweb...</p><p>How come Debian testing is <a href="">still on Python 2.<b>5</b> </a>? 2.6 seems only to be in <a href="">experimental</a>, which strikes me as strange for something that I thought was mature and stable [even by Debian standards<nobr> <wbr></nobr>:-)]. Similarly, as Debian are quite capable of shipping more than one version of Python (<a href="">2.4 is also in testing</a>), how come <a href="">3.1 is also only in experimental</a>?</p><p>I can't find a clear answer to these perplexing questions. Particularly perplexing given that testing's Perl is <a href="">5.10.1</a> - nice and current.</p> nicholas 2009-11-26T22:16:27+00:00 journal no turkeys for Christmas <p> <a href="">The guided turkeyway is delayed <b>again</b> </a> </p><p>Sigh. Waste of money.</p> nicholas 2009-11-17T13:35:26+00:00 journal desk phone firewall win <p>Some pimp has just e-mailed me at work. He says:</p><blockquote><div><p>I just tried to get hold of you through your switch board but had no luck, hence my email.</p></div></blockquote><p>Firewall win. I have a phone on my desk. (This may or may not be company policy. If it is, then I'm in compliance.) But it's not plugged in. If it has a number allocated, then I don't know it. But I suspect that it doesn't.</p><p>Which all works very well, as anyone who actually needs to contact me is in shouting<code>^W</code>walking distance. Plus there's e-mail and work IRC. Confuses the hell out of the pimps though.<nobr> <wbr></nobr>:-)</p> nicholas 2009-11-17T11:10:52+00:00 journal The return of the quiet time? <p>We were having some fun at work, with TCP not doing what we expected. Strangely, it looks like (not confirmed) the Linux IP filter considers that a connection in <a href=";pg=PA241&amp;lpg=PP1&amp;dq=tcp+illustrated+volume+1"> <code>FIN_WAIT_2</code> </a> isn't covered by "ESTABLISHED" <i>if</i> the connection is going via a router, but <i>is</i> if it's to a machine directly connected. I say "not confirmed" because it wasn't me checking this, and this makes no sense, as what does the IP stack know about routing - that's an Ethernet level thing, surely?</p><p>Anyway, as a side effect, it threw up this rather interesting snippet on <a href=";pg=PA246&amp;lpg=PP1&amp;dq=tcp+illustrated+volume+1">page 246 of <i>TCP/IP Illustrated: The protocols</i> </a> </p><blockquote><div><p>To protect against this scenario, RFC 793 states that TCP should not create any connections for MSL seconds after rebooting. This is called the <i>quiet time</i>.</p><blockquote><div><p>Few implementations abide by this, as most hosts take longer than MSL seconds to reboot after a crash.</p></div> </blockquote></div> </blockquote><p>That's not true any more. Linux developers are working really hard to reduce the boot time. The goal is of the order of 5 seconds. That's much less than the Maximum Segment Lifetime, which the standard says is 120 seconds, but can be reduced.</p><p>So, is it exploitable? I wondered what mischief can one make by taking advantage of this...</p> nicholas 2009-11-06T20:32:53+00:00 journal Perl 5 is Perl 1. And TAP is 22. <p>I was looking at <code>t/op/unshift.t</code>, and it's a bit strange:</p><blockquote><div><p> <tt>#!./perl<br> <br>print "1..2\n";<br> <br>@a = (1,2,3);<br>$cnt1 = unshift(a,0);<br> <br>if (join(' ',@a) eq '0 1 2 3') {print "ok 1\n";} else {print "not ok 1\n";}<br>$cnt2 = unshift(a,3,2,1);<br>if (join(' ',@a) eq '3 2 1 0 1 2 3') {print "ok 2\n";} else {print "not ok 2\n";}</tt></p></div> </blockquote><p>There's no <code>@</code> on the arrays passed to <code>unshift</code>. That's Perl 1 syntax.</p><p>Well, that's because it turns out that every line in that test is <b>verbatim</b> from the Perl 1.0 release test suite. <a href="">Check out the "blame"</a>. I was going to tweak it to use a library for its tests, which would generate nice diagnostics on failure, but given how "1st edition" it is, I don't feel like doing that now.</p> nicholas 2009-10-11T20:24:57+00:00 journal This day all gods die <blockquote><div><p>It has emerged that an al-Qaeda bomber who died last month while trying to blow up a Saudi prince in Jeddah had hidden the explosives inside his body.</p></div></blockquote><blockquote><div><p>Experts say it could have implications for airport security, rendering traditional metal detectors "useless".</p></div></blockquote><p> <a href=""></a> </p><p>So, life imitations science fiction, and we have the first <a href=""> <i>kaze</i><nobr> <wbr></nobr></a>.</p><p>Unlike <a href="">the science fiction in question</a>, this is not good.</p> nicholas 2009-09-26T13:46:47+00:00 journal