<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: perl</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/perl.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2026-02-25T03:30:32+00:00</updated><author><name>Simon Willison</name></author><entry><title>Quoting Kellan Elliott-McCrea</title><link href="https://simonwillison.net/2026/Feb/25/kellan-elliott-mccrea/#atom-tag" rel="alternate"/><published>2026-02-25T03:30:32+00:00</published><updated>2026-02-25T03:30:32+00:00</updated><id>https://simonwillison.net/2026/Feb/25/kellan-elliott-mccrea/#atom-tag</id><summary type="html">
    &lt;blockquote cite="https://laughingmeme.org/2026/02/09/code-has-always-been-the-easy-part.html"&gt;&lt;p&gt;It’s also reasonable for people who entered technology in the last couple of decades because it was good job, or because they enjoyed coding to look at this moment with a real feeling of loss. That feeling of loss though can be hard to understand emotionally for people my age who entered tech because we were addicted to feeling of agency it gave us. The web was objectively awful as a technology, and genuinely amazing, and nobody got into it because programming in Perl was somehow aesthetically delightful.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="https://laughingmeme.org/2026/02/09/code-has-always-been-the-easy-part.html"&gt;Kellan Elliott-McCrea&lt;/a&gt;, Code has &lt;em&gt;always&lt;/em&gt; been the easy part&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/kellan-elliott-mccrea"&gt;kellan-elliott-mccrea&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/agentic-engineering"&gt;agentic-engineering&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/deep-blue"&gt;deep-blue&lt;/a&gt;&lt;/p&gt;



</summary><category term="kellan-elliott-mccrea"/><category term="perl"/><category term="ai"/><category term="generative-ai"/><category term="llms"/><category term="agentic-engineering"/><category term="deep-blue"/></entry><entry><title>SLOCCount in WebAssembly</title><link href="https://simonwillison.net/2025/Oct/22/sloccount-in-webassembly/#atom-tag" rel="alternate"/><published>2025-10-22T06:12:25+00:00</published><updated>2025-10-22T06:12:25+00:00</updated><id>https://simonwillison.net/2025/Oct/22/sloccount-in-webassembly/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://tools.simonwillison.net/sloccount"&gt;SLOCCount in WebAssembly&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
This project/side-quest got a little bit out of hand.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screenshot of SLOCCount web application showing code analysis interface. The page header reads &amp;quot;SLOCCount - Count Lines of Code&amp;quot; with subtitle &amp;quot;Analyze source code to count physical Source Lines of Code (SLOC) using Perl and C programs running via WebAssembly&amp;quot; and &amp;quot;Based on SLOCCount by David A. Wheeler&amp;quot;. Three tabs are shown: &amp;quot;Paste Code&amp;quot;, &amp;quot;GitHub Repository&amp;quot; (selected), and &amp;quot;Upload ZIP&amp;quot;. Below is a text input field labeled &amp;quot;GitHub Repository URL:&amp;quot; containing &amp;quot;simonw/llm&amp;quot; and a blue &amp;quot;Analyze Repository&amp;quot; button. The Analysis Results section displays five statistics: Total Lines: 13,490, Languages: 2, Files: 40, Est. Cost (USD)*: $415,101, and Est. Person-Years*: 3.07." src="https://static.simonwillison.net/static/2025/sloccount.jpg" class="blogmark-image" style="max-width: 95%;"&gt;&lt;/p&gt;
&lt;p&gt;I remembered an old tool called SLOCCount which could count lines of code and produce an estimate for how much they would cost to develop. I thought it would be fun to play around with it again, especially given how cheap it is to generate code using LLMs these days.&lt;/p&gt;
&lt;p&gt;Here's &lt;a href="https://dwheeler.com/sloccount/"&gt;the homepage for SLOCCount&lt;/a&gt; by David A. Wheeler. It dates back to 2001!&lt;/p&gt;
&lt;p&gt;I figured it might be fun to try and get it running on the web. Surely someone had compiled Perl to WebAssembly...?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://webperl.zero-g.net"&gt;WebPerl&lt;/a&gt; by Hauke Dämpfling is exactly that, even adding a neat &lt;code&gt;&amp;lt;script type="text/perl"&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;
&lt;p&gt;I told Claude Code for web on my iPhone to figure it out and build something, giving it some hints from my initial research:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Build sloccount.html - a mobile friendly UI for running the Perl sloccount tool against pasted code or against a GitHub repository that is provided in a form field&lt;/p&gt;
&lt;p&gt;It works using the webperl webassembly build of Perl, plus it loads Perl code from this exact commit of this GitHub repository https://github.com/licquia/sloccount/tree/7220ff627334a8f646617fe0fa542d401fb5287e - I guess via the GitHub API, maybe using the https://github.com/licquia/sloccount/archive/7220ff627334a8f646617fe0fa542d401fb5287e.zip URL if that works via CORS&lt;/p&gt;
&lt;p&gt;Test it with playwright Python - don’t edit any file other than sloccount.html and a tests/test_sloccount.py file&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Since I was working on my phone I didn't review the results at all. It seemed to work so I deployed it to static hosting... and then when I went to look at it properly later on found that Claude had given up, cheated and reimplemented it in JavaScript instead!&lt;/p&gt;
&lt;p&gt;So I switched to Claude Code on my laptop where I have more control and coached Claude through implementing the project for real. This took &lt;em&gt;way longer&lt;/em&gt; than the project deserved - probably a solid hour of my active time, spread out across the morning.&lt;/p&gt;
&lt;p&gt;I've shared some of the transcripts - &lt;a href="https://gistpreview.github.io/?0fc406a18e14a1f7d28bfff02a18eaaf#simonw/0fc406a18e14a1f7d28bfff02a18eaaf"&gt;one&lt;/a&gt;, &lt;a href="https://gistpreview.github.io/?56ecae45cf2e1baca798a83deea50939"&gt;two&lt;/a&gt;, and &lt;a href="https://gistpreview.github.io/?79ca231e801fe1188268a54d30aa67ed"&gt;three&lt;/a&gt; - as terminal sessions rendered to HTML using my &lt;a href="https://tools.simonwillison.net/rtf-to-html"&gt;rtf-to-html&lt;/a&gt; tool.&lt;/p&gt;
&lt;p&gt;At one point I realized that the original SLOCCount project wasn't even entirely Perl as I had assumed, it included several C utilities! So I had Claude Code figure out how to compile those to WebAssembly (it used Emscripten) and incorporate those into the project (with &lt;a href="https://github.com/simonw/tools/blob/473e89edfebc27781b434430f2e8a76adfbe3b16/lib/README.md#webassembly-compilation-of-c-programs"&gt;notes on what it did&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;The end result (&lt;a href="https://github.com/simonw/tools/blob/main/sloccount.html"&gt;source code here&lt;/a&gt;) is actually pretty cool. It's a web UI with three tabs - one for pasting in code, a second for loading code from a GitHub repository and a third that lets you open a Zip file full of code that you want to analyze. Here's an animated demo:&lt;/p&gt;
&lt;p&gt;&lt;img alt="I enter simonw/llm in the GitHub repository field. It loads 41 files from GitHub and displays a report showing the number of lines and estimated cost." src="https://static.simonwillison.net/static/2025/sloccount-optimized.gif" /&gt;&lt;/p&gt;
&lt;p&gt;The cost estimates it produces are of very little value. By default it uses the original method from 2001. You can also twiddle the factors - bumping up the expected US software engineer's annual salary from its 2000 estimate of $56,286 is a good start! &lt;/p&gt;
&lt;p&gt;I had ChatGPT &lt;a href="https://chatgpt.com/share/68f7e0ac-00c4-8006-979e-64d1f0162283"&gt;take a guess&lt;/a&gt; at what those figures should be for today and included those in the tool, with a &lt;strong&gt;very&lt;/strong&gt; prominent warning not to trust them in the slightest.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/projects"&gt;projects&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/tools"&gt;tools&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/webassembly"&gt;webassembly&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai-assisted-programming"&gt;ai-assisted-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vibe-coding"&gt;vibe-coding&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/claude-code"&gt;claude-code&lt;/a&gt;&lt;/p&gt;



</summary><category term="javascript"/><category term="perl"/><category term="projects"/><category term="tools"/><category term="ai"/><category term="webassembly"/><category term="generative-ai"/><category term="llms"/><category term="ai-assisted-programming"/><category term="vibe-coding"/><category term="claude-code"/></entry><entry><title>Things I've Learned Serving on the Board of The Perl Foundation</title><link href="https://simonwillison.net/2024/Sep/24/the-board-of-the-perl-foundation/#atom-tag" rel="alternate"/><published>2024-09-24T01:42:14+00:00</published><updated>2024-09-24T01:42:14+00:00</updated><id>https://simonwillison.net/2024/Sep/24/the-board-of-the-perl-foundation/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://blogs.perl.org/users/makoto_nozaki/2024/09/things-ive-learned-serving-on-the-board-of-the-perl-foundation.html"&gt;Things I&amp;#x27;ve Learned Serving on the Board of The Perl Foundation&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
My &lt;a href="https://simonwillison.net/2024/Sep/18/board-of-the-python-software-foundation/"&gt;post about the PSF board&lt;/a&gt; inspired Perl Foundation secretary Makoto Nozaki to publish similar notes about how TPF (also known since 2019 as TPRF, for The Perl and Raku Foundation) operates.&lt;/p&gt;
&lt;p&gt;Seeing this level of explanation about other open source foundations is fascinating. I’d love to see more of these.&lt;/p&gt;
&lt;p&gt;Along those lines, I found the &lt;a href="https://ziglang.org/news/2024-financials/"&gt;2024 Financial Report&lt;/a&gt; from the Zig foundation really interesting too.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://twitter.com/heismakoto/status/1838389539204641143"&gt;@ heismakoto&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/open-source"&gt;open-source&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/zig"&gt;zig&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/psf"&gt;psf&lt;/a&gt;&lt;/p&gt;



</summary><category term="open-source"/><category term="perl"/><category term="zig"/><category term="psf"/></entry><entry><title>Object models</title><link href="https://simonwillison.net/2017/Nov/29/object-models/#atom-tag" rel="alternate"/><published>2017-11-29T14:59:12+00:00</published><updated>2017-11-29T14:59:12+00:00</updated><id>https://simonwillison.net/2017/Nov/29/object-models/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://eev.ee/blog/2017/11/28/object-models/"&gt;Object models&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Extremely comprehensive and readable discussion of the object models of Python, JavaScript, Lua and Perl 5. I learned something new about every one of those languages.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://twitter.com/eevee/status/935747003077840897"&gt;eevee&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/lua"&gt;lua&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/object-oriented-programming"&gt;object-oriented-programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="javascript"/><category term="lua"/><category term="object-oriented-programming"/><category term="perl"/><category term="python"/></entry><entry><title>LWPx::ParanoidAgent</title><link href="https://simonwillison.net/2010/Aug/31/paranoidagent/#atom-tag" rel="alternate"/><published>2010-08-31T02:30:00+00:00</published><updated>2010-08-31T02:30:00+00:00</updated><id>https://simonwillison.net/2010/Aug/31/paranoidagent/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://search.cpan.org/dist/LWPx-ParanoidAgent/lib/LWPx/ParanoidAgent.pm"&gt;LWPx::ParanoidAgent&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Every programming language needs an equivalent of this library—a robust, secure way to make HTTP requests against URLs from untrusted sources without risk of tarpits, internal network access, socket starvation, weird server errors, or other nastiness.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/http"&gt;http&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/recovered"&gt;recovered&lt;/a&gt;&lt;/p&gt;



</summary><category term="http"/><category term="perl"/><category term="recovered"/></entry><entry><title>Perl: Love it, or hate it, but don't ignore it.</title><link href="https://simonwillison.net/2009/Nov/27/perl/#atom-tag" rel="alternate"/><published>2009-11-27T07:51:45+00:00</published><updated>2009-11-27T07:51:45+00:00</updated><id>https://simonwillison.net/2009/Nov/27/perl/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://blog.newint.org/tech/2009/11/26/perl-dont-ingore-it/"&gt;Perl: Love it, or hate it, but don&amp;#x27;t ignore it.&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Phillip Smith calls me out for omitting Perl from my list of Node.js event loop alternatives (I only mentioned Twisted and EventMachine). No conspiracy here, I’m just not connected enough to the Perl community to know what the popular event loop libraries are. To Perl’s credit, Perlbal was the first piece of software I saw that showed me how a single threaded, event loop based system could massively outperform a threaded alternative.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/async"&gt;async&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/eventio"&gt;eventio&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/eventloop"&gt;eventloop&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/eventmachine"&gt;eventmachine&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/nodejs"&gt;nodejs&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perlbal"&gt;perlbal&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/twisted"&gt;twisted&lt;/a&gt;&lt;/p&gt;



</summary><category term="async"/><category term="eventio"/><category term="eventloop"/><category term="eventmachine"/><category term="nodejs"/><category term="perl"/><category term="perlbal"/><category term="twisted"/></entry><entry><title>memcache-top</title><link href="https://simonwillison.net/2009/Oct/29/memcachetop/#atom-tag" rel="alternate"/><published>2009-10-29T08:32:18+00:00</published><updated>2009-10-29T08:32:18+00:00</updated><id>https://simonwillison.net/2009/Oct/29/memcachetop/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://code.google.com/p/memcache-top/"&gt;memcache-top&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Useful self-contained perl script for interactively monitoring a group of memcached servers.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/memcached"&gt;memcached&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/monitoring"&gt;monitoring&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;&lt;/p&gt;



</summary><category term="memcached"/><category term="monitoring"/><category term="perl"/></entry><entry><title>Perl 6: The MAIN sub</title><link href="https://simonwillison.net/2009/May/28/perl6/#atom-tag" rel="alternate"/><published>2009-05-28T21:32:24+00:00</published><updated>2009-05-28T21:32:24+00:00</updated><id>https://simonwillison.net/2009/May/28/perl6/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://perlgeek.de/blog-en/perl-5-to-6/14-main-sub.html"&gt;Perl 6: The MAIN sub&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
"Calling subs and running a typical Unix program from the command line is visually very similar: you can have positional, optional and named arguments." - that's exactly what I was thinking when I came up with &lt;a href="https://github.com/simonw/optfunc"&gt;optfunc&lt;/a&gt;.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://simonwillison.net/2009/May/28/optfunc/#c45364"&gt;Keith Devens&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/cli"&gt;cli&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/optfunc"&gt;optfunc&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl6"&gt;perl6&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/unix"&gt;unix&lt;/a&gt;&lt;/p&gt;



</summary><category term="cli"/><category term="optfunc"/><category term="perl"/><category term="perl6"/><category term="python"/><category term="unix"/></entry><entry><title>aws - simple access to Amazon EC2 and S3</title><link href="https://simonwillison.net/2009/May/19/aws/#atom-tag" rel="alternate"/><published>2009-05-19T11:38:40+00:00</published><updated>2009-05-19T11:38:40+00:00</updated><id>https://simonwillison.net/2009/May/19/aws/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://timkay.com/aws/"&gt;aws - simple access to Amazon EC2 and S3&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
The best command line client I’ve found for EC2 and S3. “aws put --progress my-bucket-name/large-file.tar.gz large-file.tar.gz” is particularly useful for uploading large files to S3. Written in Perl (with no dependencies), shelling out to curl to do the heavy lifting.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/amazon-web-services"&gt;amazon-web-services&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/aws"&gt;aws&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/cli"&gt;cli&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/curl"&gt;curl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ec2"&gt;ec2&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/s3"&gt;s3&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/tim-kay"&gt;tim-kay&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/tools"&gt;tools&lt;/a&gt;&lt;/p&gt;



</summary><category term="amazon-web-services"/><category term="aws"/><category term="cli"/><category term="curl"/><category term="ec2"/><category term="perl"/><category term="s3"/><category term="tim-kay"/><category term="tools"/></entry><entry><title>Quoting The Perl Foundation</title><link href="https://simonwillison.net/2008/Dec/22/perl/#atom-tag" rel="alternate"/><published>2008-12-22T18:06:41+00:00</published><updated>2008-12-22T18:06:41+00:00</updated><id>https://simonwillison.net/2008/Dec/22/perl/#atom-tag</id><summary type="html">
    &lt;blockquote cite="http://use.perl.org/articles/08/12/22/0830205.shtml"&gt;&lt;p&gt;Sam Vilain converted Perl's history from Perforce to Git. [..] He spent more than a year building custom tools to transform 21 years of Perl history into the first ever unified repository of every single change to Perl. In addition to changes from Perforce, Sam patched together a comprehensive view of Perl's history incorporating publicly available snapshot releases, changes from historical mailing list archives and patch sets recovered from the hard drives of previous Perl release engineers.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="http://use.perl.org/articles/08/12/22/0830205.shtml"&gt;The Perl Foundation&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/git"&gt;git&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/history"&gt;history&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perforce"&gt;perforce&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sam-vilain"&gt;sam-vilain&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/version-control"&gt;version-control&lt;/a&gt;&lt;/p&gt;



</summary><category term="git"/><category term="history"/><category term="perforce"/><category term="perl"/><category term="sam-vilain"/><category term="version-control"/></entry><entry><title>Spicing Up Embedded JavaScript</title><link href="https://simonwillison.net/2008/Jun/15/john/#atom-tag" rel="alternate"/><published>2008-06-15T11:32:45+00:00</published><updated>2008-06-15T11:32:45+00:00</updated><id>https://simonwillison.net/2008/Jun/15/john/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://ejohn.org/blog/spicing-up-embedded-javascript/"&gt;Spicing Up Embedded JavaScript&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
John Resig collects the various ways in which a JavaScript interpreter can be hosted by Python, PHP, Perl, Ruby and Java. There are full JS implementations in PHP, Perl and Java; Ruby and Python both have modules that use an embedded SpiderMonkey.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/embedding"&gt;embedding&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/java"&gt;java&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/john-resig"&gt;john-resig&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/php"&gt;php&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ruby"&gt;ruby&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/spidermonkey"&gt;spidermonkey&lt;/a&gt;&lt;/p&gt;



</summary><category term="embedding"/><category term="java"/><category term="javascript"/><category term="john-resig"/><category term="perl"/><category term="php"/><category term="python"/><category term="ruby"/><category term="spidermonkey"/></entry><entry><title>Quoting Adam Kennedy</title><link href="https://simonwillison.net/2008/Mar/22/octarine/#atom-tag" rel="alternate"/><published>2008-03-22T00:28:50+00:00</published><updated>2008-03-22T00:28:50+00:00</updated><id>https://simonwillison.net/2008/Mar/22/octarine/#atom-tag</id><summary type="html">
    &lt;blockquote cite="http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-11"&gt;&lt;p&gt;The Perl community has a long-standing love/hate-affair with making changes that impose "spooky action at a distance". They call it "black magic" and it is generally considered it a last resort. Black Magic that makes GLOBAL changes to things like inheritance is often characterised as being "Octarine" (see disk world novels), because it tends to work ok when there's only one person doing it, but start to mix a few together and KABOOM!&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-11"&gt;Adam Kennedy&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/adam-kennedy"&gt;adam-kennedy&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/blackmagic"&gt;blackmagic&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/magic"&gt;magic&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/monkeypatching"&gt;monkeypatching&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ruby"&gt;ruby&lt;/a&gt;&lt;/p&gt;



</summary><category term="adam-kennedy"/><category term="blackmagic"/><category term="magic"/><category term="monkeypatching"/><category term="perl"/><category term="ruby"/></entry><entry><title>Naming twins in Python and Perl</title><link href="https://simonwillison.net/2008/Jan/7/brad/#atom-tag" rel="alternate"/><published>2008-01-07T11:03:22+00:00</published><updated>2008-01-07T11:03:22+00:00</updated><id>https://simonwillison.net/2008/Jan/7/brad/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://brad.livejournal.com/2354680.html"&gt;Naming twins in Python and Perl&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Simple anagram problem solved in Perl and Python, with a bunch more solutions in the comments. The C# solution provides an interesting example of LINQ in action.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/anagrams"&gt;anagrams&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/brad-fitzpatrick"&gt;brad-fitzpatrick&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/csharp"&gt;csharp&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/linq"&gt;linq&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/programming"&gt;programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="anagrams"/><category term="brad-fitzpatrick"/><category term="csharp"/><category term="linq"/><category term="perl"/><category term="programming"/><category term="python"/></entry><entry><title>The future of web standards</title><link href="https://simonwillison.net/2007/Dec/17/blist/#atom-tag" rel="alternate"/><published>2007-12-17T13:16:43+00:00</published><updated>2007-12-17T13:16:43+00:00</updated><id>https://simonwillison.net/2007/Dec/17/blist/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.b-list.org/weblog/2007/dec/17/standards/"&gt;The future of web standards&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Nice analysis from James Bennett, who suggests that successful open source projects (Linux, Python, Perl etc) could be used as the model for a more effective standards process, and points out that Ian Hickson is something of a BDFL for the WHAT-WG.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/bdfl"&gt;bdfl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ian-hickson"&gt;ian-hickson&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/james-bennett"&gt;james-bennett&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/linux"&gt;linux&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/open-source"&gt;open-source&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/standards"&gt;standards&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/w3c"&gt;w3c&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/web-standards"&gt;web-standards&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/whatwg"&gt;whatwg&lt;/a&gt;&lt;/p&gt;



</summary><category term="bdfl"/><category term="ian-hickson"/><category term="james-bennett"/><category term="linux"/><category term="open-source"/><category term="perl"/><category term="python"/><category term="standards"/><category term="w3c"/><category term="web-standards"/><category term="whatwg"/></entry><entry><title>Perl on Rails - Why the BBC Fails at the Internet</title><link href="https://simonwillison.net/2007/Dec/3/perl/#atom-tag" rel="alternate"/><published>2007-12-03T09:43:36+00:00</published><updated>2007-12-03T09:43:36+00:00</updated><id>https://simonwillison.net/2007/Dec/3/perl/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://iamseb.com/seb/2007/12/perl-on-rails-why-the-bbc-fails-at-the-internet/"&gt;Perl on Rails - Why the BBC Fails at the Internet&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Depressing explanation of how the BBC’s decision to outsource its technical infrastructure to Siemens has resulted in severe technology limitations, including the need for everything to run on Perl 5.6 (5.8 came out in 2002).


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/bbc"&gt;bbc&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/siemens"&gt;siemens&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/technology"&gt;technology&lt;/a&gt;&lt;/p&gt;



</summary><category term="bbc"/><category term="perl"/><category term="siemens"/><category term="technology"/></entry><entry><title>BBC Radio Labs: Perl on Rails</title><link href="https://simonwillison.net/2007/Dec/1/bbc/#atom-tag" rel="alternate"/><published>2007-12-01T01:00:48+00:00</published><updated>2007-12-01T01:00:48+00:00</updated><id>https://simonwillison.net/2007/Dec/1/bbc/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.bbc.co.uk/blogs/radiolabs/2007/11/perl_on_rails.shtml"&gt;BBC Radio Labs: Perl on Rails&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
BBC engineered built their own Rails clone in Perl to fit in with the BBC’s engineering infrastructure—it’s already running the new programmes guide.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/bbc"&gt;bbc&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/rails"&gt;rails&lt;/a&gt;&lt;/p&gt;



</summary><category term="bbc"/><category term="perl"/><category term="rails"/></entry><entry><title>wikimarkup</title><link href="https://simonwillison.net/2007/Sep/9/wikimarkup/#atom-tag" rel="alternate"/><published>2007-09-09T00:33:28+00:00</published><updated>2007-09-09T00:33:28+00:00</updated><id>https://simonwillison.net/2007/Sep/9/wikimarkup/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://code.google.com/p/wikimarkup/"&gt;wikimarkup&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
“MediaWiki markup in Python”. I’ve always suspected that MediaWiki was like Perl; the only thing that can parse MediaWiki is MediaWiki. Not sure how faithful this Python port is but I’d love my theory to be proved wrong.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://www.davidcramer.net/code/54/mediawiki-markup-and-sphinxsearch-for-django.html"&gt;David Cramer&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/cursegaming"&gt;cursegaming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/david-cramer"&gt;david-cramer&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mediawiki"&gt;mediawiki&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/wiki"&gt;wiki&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/wikimarkup"&gt;wikimarkup&lt;/a&gt;&lt;/p&gt;



</summary><category term="cursegaming"/><category term="david-cramer"/><category term="mediawiki"/><category term="perl"/><category term="python"/><category term="wiki"/><category term="wikimarkup"/></entry><entry><title>lwqueue</title><link href="https://simonwillison.net/2007/Jul/16/lwqueue/#atom-tag" rel="alternate"/><published>2007-07-16T10:04:31+00:00</published><updated>2007-07-16T10:04:31+00:00</updated><id>https://simonwillison.net/2007/Jul/16/lwqueue/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.petercooper.co.uk/archives/001236.html"&gt;lwqueue&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Lightweight cross-language message queue system, written in Perl with client libraries in Perl, Python and Ruby.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/lightweight"&gt;lightweight&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/lwqueue"&gt;lwqueue&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/peter-cooper"&gt;peter-cooper&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/queue"&gt;queue&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ruby"&gt;ruby&lt;/a&gt;&lt;/p&gt;



</summary><category term="lightweight"/><category term="lwqueue"/><category term="perl"/><category term="peter-cooper"/><category term="python"/><category term="queue"/><category term="ruby"/></entry><entry><title>Mac OS X Leopard: UNIX</title><link href="https://simonwillison.net/2007/Jun/11/unix/#atom-tag" rel="alternate"/><published>2007-06-11T23:05:26+00:00</published><updated>2007-06-11T23:05:26+00:00</updated><id>https://simonwillison.net/2007/Jun/11/unix/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.apple.com/macosx/leopard/technology/unix.html"&gt;Mac OS X Leopard: UNIX&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Leopard ships with DTrace, and it’s been hooked in to Java, Ruby, Python and Perl.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/dtrace"&gt;dtrace&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/java"&gt;java&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/leopard"&gt;leopard&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/macos"&gt;macos&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ruby"&gt;ruby&lt;/a&gt;&lt;/p&gt;



</summary><category term="dtrace"/><category term="java"/><category term="leopard"/><category term="macos"/><category term="perl"/><category term="python"/><category term="ruby"/></entry><entry><title>JavaScript Minifier that doesn't break code</title><link href="https://simonwillison.net/2007/Jun/4/peters/#atom-tag" rel="alternate"/><published>2007-06-04T17:44:46+00:00</published><updated>2007-06-04T17:44:46+00:00</updated><id>https://simonwillison.net/2007/Jun/4/peters/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://peter.michaux.ca/article/2242"&gt;JavaScript Minifier that doesn&amp;#x27;t break code&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Perl re-implementation of Douglas Crockford’s classic JSMin that doesn’t clobber IE’s conditional comments, by Peter Michaux.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://www.b-list.org/links/2007/05/27/javascript-minifier-doesnt-break-code-perl"&gt;James Bennett&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/conditionalcomments"&gt;conditionalcomments&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/douglas-crockford"&gt;douglas-crockford&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/internet-explorer"&gt;internet-explorer&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/james-bennett"&gt;james-bennett&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/jsmin"&gt;jsmin&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pete-michaux"&gt;pete-michaux&lt;/a&gt;&lt;/p&gt;



</summary><category term="conditionalcomments"/><category term="douglas-crockford"/><category term="internet-explorer"/><category term="james-bennett"/><category term="javascript"/><category term="jsmin"/><category term="perl"/><category term="pete-michaux"/></entry><entry><title>'tie' considered harmful</title><link href="https://simonwillison.net/2007/May/30/tie/#atom-tag" rel="alternate"/><published>2007-05-30T23:11:35+00:00</published><updated>2007-05-30T23:11:35+00:00</updated><id>https://simonwillison.net/2007/May/30/tie/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.skrenta.com/2007/05/tie_considered_harmful.html"&gt;&amp;#x27;tie&amp;#x27; considered harmful&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Rich Skrenta on the disadvantages of abstractions like Perl’s tie, which lets you create hash data structures that aren’t actually hashes. Operator overloading (as seen in Python) suffers the same problems.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://www.skrenta.com/"&gt;Skrentablog&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/operatoroverloading"&gt;operatoroverloading&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/rich-skrenta"&gt;rich-skrenta&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/tie"&gt;tie&lt;/a&gt;&lt;/p&gt;



</summary><category term="operatoroverloading"/><category term="perl"/><category term="python"/><category term="rich-skrenta"/><category term="tie"/></entry><entry><title>Primality regex</title><link href="https://simonwillison.net/2007/Mar/18/perl/#atom-tag" rel="alternate"/><published>2007-03-18T01:17:45+00:00</published><updated>2007-03-18T01:17:45+00:00</updated><id>https://simonwillison.net/2007/Mar/18/perl/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://montreal.pm.org/tech/neil_kandalgaonkar.shtml"&gt;Primality regex&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
A regular expression that can identify prime numbers. Unsurprisingly, this one comes from the Perl community.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/primenumbers"&gt;primenumbers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/regex"&gt;regex&lt;/a&gt;&lt;/p&gt;



</summary><category term="perl"/><category term="primenumbers"/><category term="regex"/></entry><entry><title>Data::ObjectDriver</title><link href="https://simonwillison.net/2007/Feb/25/dataobjectdriver/#atom-tag" rel="alternate"/><published>2007-02-25T00:43:20+00:00</published><updated>2007-02-25T00:43:20+00:00</updated><id>https://simonwillison.net/2007/Feb/25/dataobjectdriver/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://search.cpan.org/dist/Data-ObjectDriver/lib/Data/ObjectDriver.pm"&gt;Data::ObjectDriver&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Benjamin Trott’s Perl ORM, with built in support for both caching and data partitioning. I think this is what Six Apart uses for Vox.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ben-trott"&gt;ben-trott&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/orm"&gt;orm&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/scaling"&gt;scaling&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sixapart"&gt;sixapart&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vox"&gt;vox&lt;/a&gt;&lt;/p&gt;



</summary><category term="ben-trott"/><category term="orm"/><category term="perl"/><category term="scaling"/><category term="sixapart"/><category term="vox"/></entry><entry><title>WWW::Odeon</title><link href="https://simonwillison.net/2004/Jul/21/wwwodeon/#atom-tag" rel="alternate"/><published>2004-07-21T15:27:46+00:00</published><updated>2004-07-21T15:27:46+00:00</updated><id>https://simonwillison.net/2004/Jul/21/wwwodeon/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://search.cpan.org/~iaint/WWW-Odeon-1.03/Odeon.pm"&gt;WWW::Odeon&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
A simple API for screen-scraping the www.odeon.co.uk website.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://www.paranoidfish.org/links/2004/07/21/"&gt;paranoidfish.org/links/&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/scraping"&gt;scraping&lt;/a&gt;&lt;/p&gt;



</summary><category term="perl"/><category term="scraping"/></entry><entry><title>Discovering Berkeley DB</title><link href="https://simonwillison.net/2003/Nov/26/discoveringBerkeleyDB/#atom-tag" rel="alternate"/><published>2003-11-26T02:36:47+00:00</published><updated>2003-11-26T02:36:47+00:00</updated><id>https://simonwillison.net/2003/Nov/26/discoveringBerkeleyDB/#atom-tag</id><summary type="html">
    &lt;p&gt;I'm working on a project at the moment which involves exporting a whole bunch of data out of an existing system. The system is written in Perl and uses Berkeley DB files for most of its storage.&lt;/p&gt;

&lt;p&gt;I'd never done anything with Berkeley DB before, but luckily Python has a &lt;a href="http://www.python.org/doc/current/lib/module-bsddb.html" title="bsddb -- Interface to Berkeley DB library"&gt;module&lt;/a&gt; which seems to do all of the hard work for me:&lt;/p&gt;

&lt;pre&gt;&lt;code class="python"&gt;&amp;gt;&amp;gt;&amp;gt; db = bsddb.btopen('xpand.db')
&amp;gt;&amp;gt;&amp;gt; db.keys()[0:10]
[':archives:index.html', ':art:test.html', ... 
&amp;gt;&amp;gt;&amp;gt; db[':art:test.html']
'template;front.tp\x01\x01'
&amp;gt;&amp;gt;&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The Berkeley DB libraries are maintained by &lt;a href="http://www.sleepycat.com/"&gt;Sleepycat Software&lt;/a&gt;. Unfortunately, their site is completely saturated with marketing jargon. &lt;q cite="http://www.sleepycat.com/"&gt;Our customers rely on Berkeley DB for fast, scalable, reliable and cost-effective data management for their mission-critical applications&lt;/q&gt;. Great - now what does it &lt;em&gt;do&lt;/em&gt; exactly?&lt;/p&gt;

&lt;p&gt;Some digging around turned up the real information: the &lt;a href="http://www.sleepycat.com/docs/reftoc.html"&gt;Berkeley DB Tutorial and Reference Guide&lt;/a&gt;, which contains pretty much everything you could possible want to know about the technology. It turns out that at a basic level Berkeley DB is just a very high performance, reliable way of persisting dictionary style data structures - anything where a piece of data can be stored and looked up using a unique key. The key and the value can each be up to 4 gigabytes in length and can consist of anything that can be crammed in to a string of bytes, so what you do with it is completely up to you. The only operations available are "store this value under this key", "check if this key exists" and "retrieve the value for this key" so conceptually it's pretty simple - the complicated stuff all happens under the hood.&lt;/p&gt;

&lt;p&gt;It seems like a great alternative to a full on relational database for simple applications, although I'm slightly confused by the license which allows free use for open source products but requires a license for commercial applications. Does that mean that if I use the bsddb Python module in a commercial app I need to get a license from Sleepycat?&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/berkeleydb"&gt;berkeleydb&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="berkeleydb"/><category term="perl"/><category term="python"/></entry><entry><title>Perl Slurp-Eaze</title><link href="https://simonwillison.net/2003/Nov/23/perl/#atom-tag" rel="alternate"/><published>2003-11-23T23:51:23+00:00</published><updated>2003-11-23T23:51:23+00:00</updated><id>https://simonwillison.net/2003/Nov/23/perl/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.perl.com/pub/a/2003/11/21/slurp.html"&gt;Perl Slurp-Eaze&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
I once saw an expensive CMS self destruct after $/ was redefined

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://keithdevens.com/weblog/archive/2003/Nov/23/PerlSlurpEaze"&gt;Keith Devens .com - Weblog: Perl Slurp-Eaze - November 23, 2003&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;&lt;/p&gt;



</summary><category term="perl"/></entry><entry><title>Code personalities</title><link href="https://simonwillison.net/2003/Aug/10/personalities/#atom-tag" rel="alternate"/><published>2003-08-10T22:28:17+00:00</published><updated>2003-08-10T22:28:17+00:00</updated><id>https://simonwillison.net/2003/Aug/10/personalities/#atom-tag</id><summary type="html">
    &lt;p&gt;Danny O'Brien &lt;a href="http://www.oblomovka.com/entries/2003/08/09#1060488720" title="py vs pl"&gt;compares Perl with Python&lt;/a&gt;. Best observation: Python code just doesn't have much &lt;em&gt;personality&lt;/em&gt; compared to Perl.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/danny-obrien"&gt;danny-obrien&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="danny-obrien"/><category term="perl"/><category term="python"/></entry><entry><title>Clearout</title><link href="https://simonwillison.net/2003/Jul/10/clearout/#atom-tag" rel="alternate"/><published>2003-07-10T13:52:43+00:00</published><updated>2003-07-10T13:52:43+00:00</updated><id>https://simonwillison.net/2003/Jul/10/clearout/#atom-tag</id><summary type="html">
    &lt;ul&gt;
 &lt;li&gt;Tristan Louis' &lt;a href="http://www.tnl.net/blog/entry/RSS2Necho"&gt;RSS to Necho convertor&lt;/a&gt; puts paid to the idea that the success of one format will be detrimental to the usefulness of the other.&lt;/li&gt;
 &lt;li&gt;O'Reilly's RegExp Power series (&lt;a href="http://www.perl.com/pub/a/2003/06/06/regexps.html" title="Regexp Power"&gt;part one&lt;/a&gt; and &lt;a href="http://www.perl.com/pub/a/2003/07/01/regexps.html" title="Power Regexps, Part II"&gt;part two&lt;/a&gt;) demonstrate some powerful tricks for use with Perl compatible regular expressions.&lt;/li&gt;
 &lt;li&gt;Norman Walsh explains &lt;a href="http://norman.walsh.name/2003/07/02/conneg"&gt;Content Negotiation&lt;/a&gt; and some of the pitfalls with modern browser implementations.&lt;/li&gt;
 &lt;li&gt;So &lt;a href="http://forum.digitalspy.co.uk/board/t/51809/11f30324974ff57f0779a36abf0b7ebdds.html" title="No more Mister Biffo"&gt;that's&lt;/a&gt; what happened to Digitiser. See also a &lt;a href="http://www.lynn3686.freeserve.co.uk/digitiser.html"&gt;Digitiser Tribute&lt;/a&gt; and a &lt;a href="http://www.geocities.com/flyingturduk/biffo.html"&gt;Mr Biffo interview&lt;/a&gt; from 2001 for background information. I cuss you bad.&lt;/li&gt;
 &lt;li&gt;&lt;a href="http://www.resort.com/~prime8/Orwell/patee.html"&gt;George Orwell: Politics and the English Language&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;Clay Shirky: &lt;a href="http://www.shirky.com/writings/group_enemy.html"&gt;A Group Is Its Own Worst Enemy&lt;/a&gt;. The title is misguiding; this is an essay about how online groups behave and how to look after them.&lt;/li&gt;
 &lt;li&gt;A &lt;a href="http://jakarta.apache.org/commons/httpclient/"&gt;Java HttpClient Class&lt;/a&gt;.&lt;/li&gt;
 &lt;li&gt;Some good stuff on Boxes and Arrows: &lt;a href="http://www.boxesandarrows.com/archives/ten_quotable_moments_challenges_and_responses_for_ui_designers.php"&gt;Ten Quotable Moments: Challenges and Responses for UI Designers&lt;/a&gt; and &lt;a href="http://www.boxesandarrows.com/archives/views_and_forms_principles_of_task_flow_for_web_applications_part_1.php"&gt;Views and Forms: Principles of Task Flow for Web Applications (Part 1)&lt;/a&gt;.&lt;/li&gt;
 &lt;li&gt;&lt;a href="http://www.lynnparkplace.org/vot/archives/accessibility/000050.html"&gt;Inside our notions of "document"&lt;/a&gt; and &lt;a href="http://www.lynnparkplace.org/vot/archives/accessibility/000051.html"&gt;Inside our documents II - the Runoff model&lt;/a&gt;.&lt;/li&gt;
 &lt;li&gt;5 days worth of XSLT observations from Simon St. Laurent: &lt;a href="http://www.oreillynet.com/pub/wlg/3339" title="XSLT Training, Day 1"&gt;One&lt;/a&gt;, &lt;a href="http://www.oreillynet.com/pub/wlg/3345" title="XSLT Training, Day 2"&gt;Two&lt;/a&gt;, &lt;a href="http://www.oreillynet.com/pub/wlg/3350" title="Labels vs. Types and Other Culture Clashes"&gt;Three&lt;/a&gt;, &lt;a href="http://www.oreillynet.com/pub/wlg/3356" title="Switching Gears - XSL-FO, Day 1"&gt;Four&lt;/a&gt;, &lt;a href="http://www.oreillynet.com/pub/wlg/3363" title="XSL-FO, Day 2"&gt;Five&lt;/a&gt;.&lt;/li&gt;
 &lt;li&gt;Windows programming with open source tools: &lt;a href="http://www.mingw.org/"&gt;Minimalist GNU For Windows&lt;/a&gt; and &lt;a href="http://webclub.kcom.ne.jp/ma/colinp/win32/"&gt;Win32 Programming with GNU C and C++&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/clay-shirky"&gt;clay-shirky&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/digitiser"&gt;digitiser&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/george-orwell"&gt;george-orwell&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/httpclient"&gt;httpclient&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/java"&gt;java&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/open-source"&gt;open-source&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/regexp"&gt;regexp&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/rss"&gt;rss&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/simon-st-laurent"&gt;simon-st-laurent&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/tristan-louis"&gt;tristan-louis&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/windows"&gt;windows&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/xslt"&gt;xslt&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="clay-shirky"/><category term="digitiser"/><category term="george-orwell"/><category term="httpclient"/><category term="java"/><category term="open-source"/><category term="perl"/><category term="regexp"/><category term="rss"/><category term="simon-st-laurent"/><category term="tristan-louis"/><category term="windows"/><category term="xslt"/></entry><entry><title>Vector search engines</title><link href="https://simonwillison.net/2003/Mar/1/vectorSearchEngines/#atom-tag" rel="alternate"/><published>2003-03-01T13:07:18+00:00</published><updated>2003-03-01T13:07:18+00:00</updated><id>https://simonwillison.net/2003/Mar/1/vectorSearchEngines/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;a href="http://www.perl.com/pub/a/2003/02/19/engine.html"&gt;Building a Vector Space Search Engine in Perl&lt;/a&gt; by Maciej Cegłowski:&lt;/p&gt;

&lt;blockquote cite="http://www.perl.com/pub/a/2003/02/19/engine.html"&gt;
&lt;p&gt;Vector-space search engines use the notion of a &lt;strong&gt;term space&lt;/strong&gt;, where each document is represented as a vector in a high-dimensional space. There are as many dimensions as there are unique words in the entire collection. Because a document's position in the term space is determined by the words it contains, documents with many words in common end up close together, while documents with few shared words end up far apart.&lt;/p&gt;

&lt;p&gt;To search our collection, we project a query into this term space and calculate the distance from the query vector to all the document vectors in turn. Those documents that are within a certain threshold distance get added to our result set. If all this sounds like gobbledygook to you, then don't worry - it will become clearer when we write the code.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Having done a course on Linear Algebra last term, it's interesting to see how it can be applied to the search problem. The technique described lends itself well to finding "similar documents" as well, as documents with similar word content will end up "near" to each other when projected on to the vector space.&lt;/p&gt;

&lt;p&gt;The article is also yet another demonstration of how Perl's modules make it such a powerful tool.  Lingua::Stem is used to find word "stems", providing a free algorithm for eliminating related words like cat and cats. The performance overhead of using Perl arrays to represent large vectors is avoided with the &lt;acronym title="Perl Data Language"&gt;PDL&lt;/acronym&gt; module, which implements a whole set of matrix algebra functions in compiled C for high performance. Without these two modules the technique described would be a great deal less powerful. Of course, neither of them are available for &lt;acronym title="PHP: HyperText Preprocessor"&gt;PHP&lt;/acronym&gt; or Python, my scripting languages of choice.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/maciej-ceglowski"&gt;maciej-ceglowski&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/perl"&gt;perl&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vector-search"&gt;vector-search&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="maciej-ceglowski"/><category term="perl"/><category term="vector-search"/></entry></feed>