peknet :: an eddy in the bit stream         
about peknet


peknet is Peter E Karman musing on technology, politics, religion, books, beer and frequent references to my beautiful sons.

navigate

credits

Brighter Planet's 350 Challenge

Blog Directory for Saint Paul, MN

Powered by Swish-e

Valid CSS!

proud member of the
Open Source Community

© 2005 peknet dot com

syndicate this site

projects

In this area you'll find other things I'm working on and/or interested in.

But have I mentioned my beautiful boys lately?

File under projects/ Mon Jun 29 19:54:17 CT 2009

make test

Invoking
make test
in a project and watching as 1000s of successful tests scroll by, culminating in the
All tests successful.
message, gives me the same thrill of satisfaction as when I used to paint houses, and having finished a long day of sweaty labor at sanding and chipping old paint off, I could stand back and survey the structure, primed and ready for a fresh coat of paint. It's the anticipation that thrills, in the same way that a trip to the grocery store and a full fridge, or several loads of clean laundry folded and stowed safely away in drawers, thrills me. The knowing that I am prepared, belt cinched tight, all tests successful.

File under projects/ Wed Mar 3 21:56:14 CT 2010

Frozen Perl 2010

It's been a long week, culminating today in Frozen Perl 2010, a Perl conference for and by Perl hackers, here in the Twin Cities. I gave two talks at today's conference, one on Swish3 and the other on Devel::NYTProf and Search::Tools. Both talks seemed well-received.

In the process of preparing the talks I also released a few new, related modules to CPAN this week:
Search::OpenSearch
OpenSearch server glue for KinoSearch and Swish-e 2.x via SWISH::Prog. There's a demo Plack app and ExtJS, using both search engines as part of the slides for my Swish3 talk.

I think OpenSearch is very cool and look forward to doing more with that spec, including adding more features (e.g. facets) to Search::OpenSearch.
Search::Query
Search::Query now has support for SQL and SWISH Dialects. I hope to add KinoSearch and Xapian dialects soon. The Search::Query::Parser now has (undocumented and experimental) support for range queries, so that you can say:
foo=( 1..4 )
and that'll be expanded to
foo=( 1 OR 2 OR 3 OR 4 )
when the Dialect query object is stringified. Handy for things like ranges of dates, which is how I am using it as $work.
Search::Tools, SWISH::API::*
New releases of these older modules as well, with some bug fixes and refactoring to support the Search::Query.
So, yes. A busy week.

I enjoyed hearing other folks' talks today at Frozen Perl. There was a good variety: pack/unpack, Unicode, i18n and best practice-related presentations. I met some new people, renewed friendships with folks I already knew, and drank lots of free coffee. The cookies were good too.

File under projects/swish Sat Feb 6 23:27:19 CT 2010

The Vendor-Client Relationship

So I don't surf youtube very much. Or rather, only when my kids are wanting to watch Wallace and Gromit trailers. So I'm always waaaay behind the times. That said, this video is a riot.

File under projects/ Sat Jan 30 21:42:00 CT 2010

Terminal Color

For the last ten years I have used the color #E3BF70#fddc8e (hex) as my terminal background color. It's a darkish amber color that is very easy on the eyes. I'm recording it here because every year or so I have to set up a new system and always have to eyeball the settings till I get something close to what I am used to.

Update: 26 Jan 2009 Here's my .Xdefaults file for my xterm under X11 on OS X.
XTerm*background: #fddc8e
XTerm*foreground: black
XTerm*faceName: monaco
XTerm*faceSize: 10
XTerm*saveLines: 10000
XTerm*scrollBar: true
XTerm*rightScrollBar: true
XTerm*jumpScroll: true
XTerm*geometry:100x40+0+0

File under projects/ Tue Jan 26 20:13:41 CT 2010

I like Plack

Plack is a Perl Web Server written by miyagawa.

File under projects/ Tue Jan 19 10:56:20 CT 2010

CQL

Contextual Query Language is defined by the Library of Congress. I discovered it via CQL::Parser. Brian Cassidy is involved, so it must be good.

I immediately thought "oh shit. Now my new Search::Query module feels late-to-the-party." But on further reading, I think a CQL dialect in Search::Query makes some sense.

Search::Query is a SQL::Translator-like module for free-text search. I coded it up this week after brewing the idea for some many months. I'm imagining it now as a next-generation Search::QueryParser::SQL, for contexts beyond SQL. Example: I have a query string that works with Xapian and want to convert it to one that works with Swish-e 2.x or KinoSearch. Just parse it with Search::Query::Parser and assign it a target dialect and then call $query->stringify to get the translated version out.

File under projects/ Thu Jan 14 22:46:01 CT 2010

Perl6 and Perl5

I know the people who read this blog generally do not care about Perl at all (hi Mom!) but I spend a great deal of time writing code in the language and talking with other members of the Perl community about our common projects, and so like anyone who has lived in the Perl world for any length of time, I have an opinion about Perl6. For those not in the know, Perl5 is the current version of Perl and has been around for over 10 years. Perl6 is the next major version evolution, but it has been in development for nearly the same length of time. The problem is that 10 years is a long time for a computer language release to gestate and many folks whose opinions count (i.e. managers) see that lack of a release as a sign that Perl Is Dead and not a good choice for their next programming project. So (the argument goes) Perl6's vaporware status makes it hard for Perl5 programmers to find jobs, because the "if it ain't new it ain't sexy" ethos of technology counts for more than it should with those making the money decisions.

The real problem isn't that Perl6 hasn't been released. The real problem is the name Perl6. Perl6 is not a single executable "thing" like Perl5 is; it's an umbrella for several different projects. Right now I can sit down at just about any modern Unix-like computer and type 'perl' and write some code that runs. Perl6 doesn't work quite that way. It's a whole new language, not just a major revision to an existing language. So the version number 5 vs 6 is misleading. That's the problem. Perl is alive and well. Perl5 continues to be maintained and developed. I get lots of work done every day using it.

Matt Trout writes a nice piece about this topic, aimed at the Perl community. I applaud it.

File under projects/ Mon Dec 7 10:03:13 CT 2009

Question as Patch

Reading through Matt Trout's blog just now I found this wonderful quote:
Because in free software a question in the form of a well thought out patch is one that almost always gets a constructive answer.


Yes. That's just it. A patch -- real, applicable code -- indicates genuine forethought and effort and I will reward that kind of conversation every time with equal effort.

File under projects/ Mon Dec 7 10:01:06 CT 2009

Great American Hackathon

Just found out about this.

File under projects/ Mon Dec 7 10:00:24 CT 2009

SWISH::Prog::KSx and SWISH::Prog::Xapian on CPAN

Uploaded first pass at both implementations this last week. The announcement to the Swish-e list just went out.

File under projects/swish Mon Nov 30 22:19:26 CT 2009

SWISH::3 on CPAN

After 4 years of learning how to glue Perl and C together with XS and many sleepless nights, I have released SWISH::3 to the CPAN.

<cue the sound of scattered applause>

Mostly this is a triumph of longevity rather than quality code. It's taken me this long to get something workable.

File under projects/swish Fri Nov 20 22:02:44 CT 2009

swish_xapian

The Xapian backend for Swish3 has been getting some love lately. The swish_xapian command line tool has most of the features now that swish-e v2.x does.

I've posted about it on the Swish-e wiki.

File under projects/swish Wed Nov 18 23:22:11 CT 2009

Perl websites? As a rule, not attractive.

I'd been keeping an email with a link to Ovid's journal article about reviewing Perl Training websites. Now I've deleted the email. But the link was worth keeping here.

File under projects/ Mon Nov 9 23:07:03 CT 2009

Building Swish3 on OS X 10.6

I just wasted many hours trying to figure out why libswish3 failed to pass all tests on 10.6.

This link explains what I figured out to be true the hard way:
10.6 is now a mainsream 64bit OS !

10.5 a 64bit capable 32bit OS !


If I forced 32bit compile all is well:
CFLAGS="-m32 -O2 -g" ./configure && make test


While I would like to figure out how to compile as a native 64bit app, my MacBook has too many libs from before the 10.5 to 10.6 upgrade to trust that all the dep chain is 64bit compat.

The error I was seeing was the noxious BAD_ADDRESS error which traced back to some libxml2 hash features. Red herring. Of course, I had to recompile libxml2 with the -m32 as well so that everything was 32bit compatible. Took me hours before I noticed that the older working version on the same box was about half the size of the new version... which triggered the ol' 32-vs-64-bit thing in my brain.

Update: In the end this was a bug in libswish3 with confusing naming of some variables. But the 64-bit thing was a Good Thing To Realize.

File under projects/swish Mon Oct 5 23:05:50 CT 2009

IE7 + Putty + SOCKS5 Proxy + VirtualBox

I need to test web apps with IE7 for $work. I work from home and use a reverse SSH tunnel into the corporate LAN. I run a SOCKS5 proxy using the -D option to ssh over the reverse tunnel. I use a Mac.

What's a geek to do with these odds and ends?

I run VirtualBox (free VM from Sun) with WinXP for IE7. No problem. I use Putty to open a ssh SOCKS5 proxy over the reverse ssh tunnel. No problem. Problem: IE7 does not route DNS requests over SOCKS so even though I can theoretically get to the remote HTTP server, I can't resolve names inside the corporate LAN using the corporate DNS server.

The Russians to the rescue.

A nice little Windows app that lets any Windows app proxy through it. Now I can test my web apps with IE7 under a VM on a Mac using a reverse SSH tunnel + SOCKS5 proxy.

How's that for jargon overload on a Friday?

File under projects/ Fri Sep 25 12:42:01 CT 2009

Search::Tools 0.26 released

After several weeks of late nights and OCD-tinged hacking, I'm pleased to have uploaded version 0.26 of Search::Tools to CPAN.

I've also started a page just for this module.

The big thing in this release is a rewrite in XS/C for much of the tokenizing and snippet extraction code. That, and lots more test coverage. A big thanks to Henry at zen for prompting this development and release and for providing good bug reports.

I also want to acknowledge how awesome the NYTProf profiling tool is. Helped me find all the bottlenecks.

File under projects/ Thu Sep 24 10:50:04 CT 2009

perl projects

For several years I have developed software projects using Perl, pushing them to the shared Perl repository at CPAN. During that time I have maintained my own Trac install at perl.peknet.com, mostly for the use of the SVN browser, which I find helpful. I've started updating the wiki on that site as a home base for my Perl projects. Google suggest to me that I've not made that URL public before, so here it is, for the collective memory.

File under projects/ Sat Sep 19 20:37:17 CT 2009

Perl Accessors

Thanks to the presence of mind of Marcel Grünauer, the Perl community can easily see benchmarks for common Perl accessor packages with App::Benchmark::Accessors.

Here are the numbers on my MacBook Pro with 10.6:
# class_accessor 719424/s # rubyish_attribute 1176471/s # spiffy 1342282/s # class_spiffy 1388889/s # class_accessor_fast 1428571/s # class_accessor_complex 1449275/s # class_accessor_constructor 1470588/s # class_methodmaker 1550388/s # moose 1612903/s # moose_immutable 1612903/s # accessors 1724138/s # mojo 1785714/s # mouse_immutable 1941748/s # mouse 1960784/s # class_accessor_classy 2000000/s # class_accessor_fast_xs 3333333/s # class_xsaccessor 3508772/s # object_tiny_xs 3508772/s # rose 3571429/s # class_xsaccessor_array 3921569/s
Glad to see Rose::Object (with Class::XSAccessor support) near the top of the list. That's what I chose for Net::LDAP::Class, and I'll be switching to that for the rest of my projects RSN.

File under projects/ Sat Sep 12 10:33:43 CT 2009

Just Enough C

I wish Andy had made this presentation 5 years ago when I was learning C. It would have helped me a lot. It's like C in a nutshell, in a nutshell.

File under projects/ Sun Aug 2 10:35:17 CT 2009


Past entries: 2004 . 2005 . 2006 . 2007 . 2008 . 2009 . 2010 .