Search Results: "Peter Makholm"

10 April 2013

Peter Makholm: Reviewing my own regular expressions

Regular expressions are a wonderful tool, but as many other powerful tools they tend to be misused. If I had a penny for everytime I recommended against using regular expressions for parsing HTML fragments . yeah you know what I mean. This time made me think a bit about my own use of regular expressions. Do I ever fall in the trap of misusing regular expressions myself? Looking at my current code base I couldn t find any glaring misuses, if I could only get a list of all the regular expressions in my current project. Regular expressions to the rescue? No, that would probably be quite an horrible adventure. Luckily I have tools to parse Perl: PPI to the rescue: <script src="https://gist.github.com/pmakholm/5354001.js"></script> A few hundred regular expressions. Most of them just matching simple substrings (in some cases case insensitive) or just short hand for testing a handful of equalities in one go. The only zero-width assertions we are using are the word boundary and quantifiers are mostly used on simple character classes like \d, \s, [0-9a-f] and a few anything but this one or two characters ([^>]). Lessons learned: 1) PPI is cool. 2) I really do use regular expressions as I preach.

22 January 2013

Peter Makholm: Installing Linux on MyAudio Tablet Series9

Recently I recieved a MyAudio Tablet Series9 as a gift. From the factory it runs some version of Android, but I already got enough Android devices. Instead I wanted to play a bit with a basic Linux install. This tablet is based on the AllWinner A10 System on a Chip. Some of these instructions might work for other systems based on the same chip set: Step 1: Install the rescue system from http://forum.doozan.com/read.php?6,9396 on a SD-card. You can configure network settings in rescue/interfaces and rescue/wpa_supplicant.conf. Step 2: Boot the rescue system. The MyAudio table will boot from the SD-card if it contains a bootable system, so this is quite easy. The first time you boot the rescue system tries to locate a system.bin file from the tablet. this file contains the hardware configuration and is needed for initializing all the hardware. This means that the screen can t be initialized the first time you boot and will just appear off. Unless the system automatically boots again you need to locate the system.bin yourself from the tablet. It is usually located on /dev/nanda and have names like system.bin, script.bin, or evb.bin. To find the file you can use the log the rescue system places in log/deviceinfo.log on the SD-card during boot. You should now have console access to the tablet and using a USB keyboard you should be able to work in the console. Step 3: Setting up the network Having configured rescue/interfaces and rescue/wpa_supplicant.conf the network ought to work. I am experiencing some problems getting it to connect to my Access Point (using WPA2). Patience works, but you might need to monitor the status with wpa_cli(8) and then run udhcp -i wlan0 when it succeeds. Step 4: Install Debian using the installer at http://forum.doozan.com/read.php?6,8906 This just worked fine Step 5: Getting the touch screen to work. The system.bin file can be decoded with the fexc utility either available on the rescue system (compiled for arm) of from https://github.com/linux-sunxi/sunxi-tools. Finding the ctp_para section we can see that this tablet uses a ft5x touch screen. Adding ft5x_ts to /etc/modules on our installed system will make sure that the correct kernel module gets loaded on boot time. But for some reason the kernel driver and the X11 evdev driver will not talk together. So we need to compile our own kernel patched as described on https://www.miniand.com/forums/forums/development/topics/how-do-i-get-the-lcd-display-and-touch-screen-working-on-an-a10-tablet#post-1225. I have made kernel packages for Debian available at http://hacking.dk/files/linux-image-3.0.57-sun4i+_1.0+nomultitouch_armhf.deb or http://hacking.dk/files/linux-image-3.4.24-sun4i+_1.0+nomultitouch_armhf.deb. Install the kernel package you want and run this as root:
# KERNEL_VERSION=3.4.24-sun4i+
# /usr/bin/mkimage -A arm -O linux -T kernel  -C none -a 0x40008000 -e 0x40008000 -n Linux-$KERNEL_VERSION -d /boot/vmlinuz-$KERNEL_VERSION /boot/uImage
# /usr/bin/mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-$KERNEL_VERSION -d /boot/initrd.img-$KERNEL_VERSION /boot/uInitrd
After a reboot X11 will respond to the touch screen, but Step 6: Configure the touch screen the pointer does not point where I touch the screen. The transformation between the points are wrong. This is fixed by adding this to your xorg.conf:
Section "InputClass"
    Identifier     "touchscreen"
    MatchProduct   "ft5x_ts"
    Option    "TransformationMatrix" "0 1 0 1 0 0 0 0 1"
    Option    "Calibration" "0 768 0 1024"
EndSection
or more dynamically by running:
$ xinput set-prop ft5x_ts "Coordinate Transformation Matrix" 0 1 0 1 0 0 0 0 1
$ xinput set-prop ft5x_ts "Evdev Axis Calibration" 0 768 0 1024
For more information about the Transformation Matrix, see the X.Org Wiki Step 7: Install a on-screen keyboard. I have not found the perfect keyboard application yet. Currently I am using matchbox-keyboard

15 November 2012

Peter Makholm: Deploying Half of CPAN on Debian using Carton

As systems developer I like just being able to pick the most useful Perl modules from CPAN and preferably use quite recent versions of the modules I need. On the other hand our systems administrators prefer running Debian Stable and deploy software using .deb packages. I do not want to maintain hundred small packages by hand. I just want a single package with all needed the Perl dependencies for a given project. After looking at different possibilities for bundling Perl dependencies I finally found Carton written by Tatsuhiko Miyagawa. Given a list of your direct Perl dependencies, Carton can maintain the full dependency chain and manage which versions of each module you deploy. One of the nice features is that you get a reproducible set of versions each time and not just the latest, greatest, and recently broken versions. The initial step is to set Carton up to install the dependencies for my project. This part is done just like the Carton documentation describes. To ensure independence from whatever is available on CPAN I end by calling carton bundle. The next step is to write a small Perl module making sure you load modules from the right place. I end up with installing modules in /usr/lib/projectname. My module looks like this:
package My::Bundle::ProjectName;
=head1 NAME
My::Bundle::ProjectName - Bundle of CPAN modules used by ProjectName
=cut
our $VERSION = 1.0;
use Config;
use Carp;
use Carp::Heavy;  # Ensure that all parts of Carp are loaded before @INC mangling
use File::Spec;
our $BASE = '/usr/lib/projectname';
sub import  
    carp (__PACKAGE__ . " bundle not installed")
        unless -d $BASE;
    unshift @INC, 
        File::Spec->catdir( $BASE, 'lib', 'perl5' ),
        File::Spec->catdir( $BASE, 'lib', 'perl5', $Config archname );
 
1;
Now I need to install this module and all the modules maintained by Carton. I do this by a enhanced Module::Build script:
use v5.10.0;
use strict;
use warnings;
use Module::Build;
my $class = Module::Build->subclass(
    class => "My::Builder",
    code  => q 
        sub ACTION_build  
            my $self = shift;
            $self->SUPER::ACTION_build;
            !system 'carton', 'install', '--cached';
         
        sub ACTION_install  
            my $self = shift;
            $self->SUPER::ACTION_install;
            
            my $installdir = $self->destdir . "/usr/lib/projectname";
            system 'install', '-d', $installdir;
            !system 'cp', '-a', 'local/lib', $installdir;
         
     ,
);
$class->new(
    module_name       => 'My::Bundle::ProjectName',
    dist_author       => 'Peter Makholm <peter>',
    dist_version_from => 'lib/My/Bundle/ProjectName.pm',
    add_to_cleanup    => [ 'local/lib', 'local/bin' ],
)->create_build_script;
The last step is to create a .deb package. This is mostly just a standard debian/ directory using debhelper. You just need to override the dh_perl to pick up the correct binary dependencies. So this is my debian/rules:
#!/usr/bin/make -f
%:
        dh $@
override_dh_perl:
        dh_perl /usr/lib/projectname/lib
That s it. Then all the scripts and applications making up my project just needes to use My::Bundle::ProjectName and the rest is automatic. I am thinking about enhancing Carton to provide individual .deb packages instead of just installing the modules. This would make it quite easy to maintain the packages in a more The Debian Perl Group-compatible way. That could be cool.

3 September 2012

Peter Makholm: Creating a negative match RegExp object

It is a frequently asked Perl question how to write a regular expression that matches anything but something . The usual answer is that it can t be done or that you need to use the !~ operator instead of the =~ operator. But when you are using API s that passes regular expressions around as objects this might not be entirely helpful answers. By digging a bit around in the scarier parts of the perlre manual page I worked out this quite Perl specific solution: qr/(?:(?:something(*COMMIT)(*FAIL)) .)*/. I am not sure that it works in all possible corner cases and I certainly don t want to write the much needed comment that makes the code using the regexp maintainable. In the end it might be possible, but it is just one of those Now you have two problems scenarios.

17 October 2011

Peter Makholm: Splicing two sockets in Perl (request for help)

A couple of times I have written code which basically does this:
  1. accept() an incoming connection
  2. do some magic to get another socket
  3. start passing bit between the two sockets
  4. perform a correct close down sequence
An example use case of this is a proxy implementing the HTTP CONNECT method, but in for some known hostnames it will log a message and mangle the hostname before proceeding. This has been used as a legacy fall back solution while changing a network setup. But my uses are not restricted to HTTP proxies I have done the same for a few legacy protocols where the magic has been of different complexities. The two final steps are quite general and it would be nice to have a module doing just that. Take two sockets and make it easy (or even automatic) to pass bytes between them. The na ve non-blocking solution would use a scalar string buffer for each direction and perform a select loop while maintaining the write vector depending on which buffers contain data. I have written this code multiple times. In development this is usually quite successful, in production less so. While Perl might be quite suited for the magic in step 2, the na ve way of passing bytes have quite an overhead for the buffer management. A less na ve way would use a array of strings for buffers, but I m not quite sure if this would be a win in all cases. You might be able to get away with some string operations on the read side of the buffer, but it might be more expensive on the write side. I have not benchmarked this. Most of the time I don t care about Perl level IO handles. I know that there is a real C level file descriptor beneath. So an even better POSIX compliant solution might be to use XS to have plain C strings and use readv()/writev() and a iovec structure as buffer. Can we do even better? At least on Linux we can. With the Linux splice() specific system call it is possible to us a pipe as buffer and never to have to copy data from and to user space. I have not been able to find any off the shelf solution on CPAN. So I think I need to write it myself, but what would the nice and general API be? I guess the basic interface would be something like:
    my $chain = IO::Splice->new($fh1, $fh2);
    $chain->pump(); # read and write from both handles if possible and needed
    $chain->read($fh1);  # read to buffer from one specific handle
    $chain->write($fh2); # write from buffer to one specific handle
    $chain->can_write(); # returns the handles it needs to write to
but it might be simpler to have two callbacks for setting a file handle in write or no-write state:
    my $readset  = IO::Select->new( $fh1, $fh2);
    my $writeset = IO::Select->new();
    my $chain = IO::Splice->new( $fh1, $fh2,
        writable => sub    $writeset->add( shift )  ,
        unwritable => sub   $writeset->remove( shift )  
    );
    while ( ... select ... )  
        $chain->pump();
     
As said, I think I have plenty of implementations of the na ve way but before releasing some code it would be nice to get some input on the API. But the best feedback would be a module that already have a usable API but might not implement the Linux specific way. That would allow me to steal the interface

30 November 2010

Peter Makholm: Wrapping mod_perl in Plack

Plack is one of these wonderful adventures in the modern Perl world that makes it fun to write Web applications in Perl again. But I have a few applications written with Apache/mod_perl and they are not fun to work with. So what would you do? One option would be to take the long road and port these apps to use Plack instead of messing around with Apache2::RequestRec. For this to work you might need to review the full code base before seeing any signs of progress. Another option is to mock your Apache2::RequestRec object using Plack. This is the road explored by Plack::App::WrapApacheReq. With very little work this enables you to run your mod_perl application with any Plack handler you want. You can run your application as a stand alone server or serve it with nginx trough FastCGI. But the fun doesn t stop here. Debugging and profiling mod_perl have always been a PITA, but with Plack::App::WrapApacheReq it is easy. Just take the generic.psgi example and it enables you to run the Perl debugger easy or just to use NYTProf on your request handling code. The initial ideas for writing Plack::App::WrapApacheRec came from my mocking code to test a legacy mod_perl application. Even this gets more fun by using Plack. I havn t tested it yet, but with Plack::Test and Plack::Test::ExternalServer it should be trivial to run the same set of tests directly in a single process test suite or against your deployed server. Plack::App::WrapApacheRec is still in it s infancy. It only mocks as much of Apache2::RequestRec as I need to run a single legacy application and to run Plack::Handler::Apache2 (as an absurd example, but yes we are self hosting). But I think that with very little work we should be able to run most mod_perl applications. Take it out for a ride, if it complains about a missing method please report it with CPAN s RequestTracker. Patches would be appreciated (or pull requests on github), but just a list of unimplemented method you need would be excellent. Plack is fun, now working with mod_perl applications might become fun too.

18 September 2010

Peter Makholm: Reading Twitter with generic RSS reader

For a long time I have mainly been reading Twitter with a generic RSS reader (newsbeuter). Recently this stopped working when twitter.com disabled HTTP Basic Auth in preference of using OAuth. Now I can say a lot of good and bad things about OAuth, but to keep a short story short: It doesn t work with generic RSS readers. Instead of getting the RSS feed from a URL, my RSS reader can run a script that prints an RSS feed. So if I could just write a script that does the OAuth dance to convince twitter.com to give me an RSS feed? Perl to the rescue! Or rather CPAN to the rescue: Net::Twitter::Lite have a nice simple example for setting up OAuth with a desktop application. It also provides access to most of Twitters REST API, but no method for retrieving generic URLs. Using some Jedi mind tricks and reading the source I found a private and undocumented method _oauth_authenticated_request which does exactly what I need. It is quite simple:
  1. Get my script from gist.github.com/585710 and install the dependencies (Net::Twitter:Lite).
  2. Register you own app at dev.twitter.com to get a Consumer Key and Consumer Secret.
  3. Run the script once to setup access and get an Access Token and Access Token Secret.
  4. Run the script with an RSS feed url as parameter to get the RSS feeds.
Most interesting feed to follow is probably http://api.twitter.com/1/statuses/home_timeline.atom, which show the same as the home page on twitter.com would show you, and http://api.twitter.com/1/statuses/mentions.atom, which shows any tweet that mentions you.

30 October 2009

Peter Makholm: New Module: Benchmark::Serialize

Tim Bunce mentioned my blogpost about Benchmarking serialization modules in a post on the perl5-porters mailing list. He wished that someone would make that benchmark into a distribution on CPAN. How can I refuse. So here it is, Benchmark::Serialize is just uploaded to CPAN. (Might be some time before it appears). Besides making the script into a module I also added a list of the size of the serialized data to the output. A replacement of the original script is available in the examples directory. (I planned on naming the module Benchmark::Serialization, but my fingers slipped. Should I rename it?)

12 December 2008

Peter Makholm: Automatic reporting of worktime

Some time ago I used gtimelog to keep track of my working time. I added an entry when I arrived in the morning and an entry when I left work in the evening. But quite often I forgot to add an entry and after a while I stopped keeping track of how much I worked. Tracking login and logout times could be confusing, but normally I turn my work station off when I m leaving work. So if I keep track of it s uptime during a week I (almost) have my working hours. Fortunately Linux already keeps track of this with the wtmp file. So I just have to parse this and presto my working hours for the last week
makholm@makholm:~$ worktime "00:00 a week ago" "00:00 today"
Fri Dec  5 08:19 - worked 07:36
Mon Dec  8 07:05 - worked 09:03
Tue Dec  9 09:10 - worked 00:01
Tue Dec  9 09:11 - worked 08:40
Wed Dec 10 07:33 - worked 08:33
Thu Dec 11 07:04 - worked 02:51
Thu Dec 11 10:43 - worked 06:12
                          -----
             total worked 43:00
makholm@makholm:~$
A simple cron script called monday morning should provide me with a weekly mail reporting how much I ve worked the week before. The worktime script is quite simple and uses Sys::Utmp to parse wtmp. Update: improved version

10 March 2008

Peter Makholm: The virtual RMS and GNU-documentation

Debian includes a package called “vrms - virtual Richard M. Stallman” which report the non-free packages you have installed on your Debian system. Running vrms on my workstations gives the following output:
makholm@makholm:~$ vrms
              Non-free packages installed on makholm
gcc-4.2-doc               documentation for the GNU compilers (gcc, gobjc, g++)
gcc-doc-base              several GNU manual pages
sun-java6-bin             Sun Java(TM) Runtime Environment (JRE) 6 (architecture
sun-java6-jre             Sun Java(TM) Runtime Environment (JRE) 6 (architecture
sun-java6-plugin          The Java(TM) Plug-in, Java SE 6
xsnow                     Brings Christmas to your desktop
  6 non-free packages, 0.4% of 1487 installed packages.
makholm@makholm:~$
Sun Java is a know evil and somebody really ought to reimplement xsnow, but having the virtual RMS declare GNU documentation non-free is a nice touch. Yeah, I know about the problems with GFDL. Update: Known problem: #221807, #297506, and #364971

4 March 2008

Peter Makholm: AcmeCal: It even tells you what to do

Finally. With notification implemented I’m able to release the latest and greatest of AcmeCal. At the moment AcmeCal can do notification by either mail or XMPP (aka. Jabber). Still some polishing to do, like having the XMPP plugin test for presence before notifying. Having notification implemeted makes it even more clear that I need to improve the argument handling code. At the moment I’m using this in my crontab: acmecal-notify –type XMPP –from “$(date +”%F %R”)” –to “$(date -d “now + 30 min” +”%F %R”)” This version also brings AcmeCal right at the 1 KLoC-mark and it is now my primary calendar. Download AcmeCal version 0.3 - hey, it works this time

26 February 2008

Peter Makholm: AcmeCal: Even when you got other calendars

Just a minor update on AcmeCal. The new feature is the Import/Export frameworks. At the moment I can export to an YAML stream of the internal representation and import from the same YAML string or from a subset of the iCal standard. At the moment no unfolding of recurrent events take place. Calling it a framework might be a bit of a stretch but support for other formats should be as easi as handling these formats. To prove that everything is to be considered unstable I renamed the scripts from acme-(\w+)cal to acmecal-$1. Download AcmeCal version 0.2

21 February 2008

Peter Makholm: AcmeCal: The world needs a new calendar system

What do you do when you suddenly get a free evening? Writing a calendar system seemed the obvious thing to do. Neither Google Calendar nor flat unstructured text files seemed to fit my needs. So I proudly present: AcmeCal version 0.1. The main novelties includes: And all that in just under 400 lines of code. As of version 0.1 some important features remains to be implemented, for example documentation. Warning: Neither the comand line interface, nor the perl API, nor plutonium is stable. Download AcmeCal -0.1

11 February 2008

Joachim Breitner: Ways to fork privately

A few days ago, I asked how to fork a debian package privately. I got some repsonses by comments, e-Mail and other blog posts, and I want to summarize the tools that were suggested. I have not really tried them, just looked at the webpages, the documentation or the sourcecode. I m only including Debian-specific solutions, as using Gentoo might be nice, but is out of scope here :-)I also deleted half the text before saving it, and I hate rewriting stuff, so it might be a bit terse.debtooEddy Petri or tells me about his three year old project debtoo, which wants to bring a Gentoo-like experience to Debian. While it probably provides what I need, it feels too big in that it has a more general aim than what I m looking for. It is not in Debian and not actively developed in the last two years.srcinstEddy also tells me about srcinst, which is a small haskell program written by jgoerzen in 2005. This is more a proof-of-concept that builds a package and all necessariy build-dependencies without using a binary package, but does not allow for patches to be applied. It is in Debian, actively maintained, but not developed, and barely documented (just an IRC log).apt-buildA similar tool and also in Debian is apt-build. This package is created to compile packages for optimization (as it asks half a dozend compiler-flag-questions with DebConf during the installation). It allows the user to apply a patch to the source, but it has to be passed as a command line option, and patches seem not to be tracked. Not much development in the last year, and not much documentation.debpatchNot to be confused with the program in the debdelta package is the debpatch tool by Victor Hsieh which Carsten Hey told me about. Also written in 2005, this comes closest to what I want. For every package you want to modify, you can configure it to apply patches to the source, to add patches to the debian/patches directory or to statically replace files in the generated binary and puts it in a local apt repository. No code yet to track new versions of the packages and no support for pbuilder though. This perl script is not yet in Debian, but is available as a Debian package and seems to have seen some development in the last years. Quick Googleing does not return any user reports; has any already tried this?customdebSomewhat in this direction goes the script that I wrote two weeks ago for a totally different project, customdeb, but it is aimed at binary debian files exclusively, and debpatch already supports replacing files in the binary package.apt-srcAlso a related tool Carsten Hey told me about is apt-src. This tool wants to provide apt-like features for source packages. It allows you to install sources somewhere, upgrade the source and build binary packages from them. It does not really hide the sources from the user and seems to be created for people who want to work with the source somehow. If you have local changes to the sources, it can try to merge them with the new version, but these changes are not kept as a separate patch but only as implicit changes. If that were different, it would seem be a very nice tool. It s written by Joey Hess he abondonned it in 2004. Since then, not much development has happened.debnestYet another approach is taken by debnest, which Peter Makholm took over. Here, you create a full debian source package with a debian/ directory containing a control and rule file etc., but besides the debian/ directory, it contains just the packed sources (.dsc et al) from another package. In your debian/rules, you can specify your changes. I can see no support for tracking new versions of the inner package, but at least this project is maintained and in Debian.Summary I found a few projects that go in a similar direction, and one that seems to fit my needs quite well. All of them are not widely used and in a very early state of development, and it seems to be something people start to work on and quickly lose interest. I m actually surprised that this is not a itch more people had to scratch! I will have a closer look at debpatch when I find the time and maybe, if found useful, see if it can be included in Debian probably after a name change, since we already have a debpatch binary. Or maybe I should try to add support for what I need to apt-src, which seems to be the most advanced of all these programs, although it s unmaintained longer than the others exist.Update: Added apt-src.Update 2: Added debnest;

15 October 2007

Peter Makholm: Cool svn enabled prompt

Mike Hommey explains how to get VCS information in his bash prompt. Cool idea but not quite the way I like it, so I did a few more iterations… The main problem is that it doesn’t play nice with symlinks. I often find myself making a large checkout of a the full project and then have symlinks to the parts I’m working with. Minor details is that I don’t like having a bold font in my prompt, I don’t care about the URI-part of the prompt, and I’m only using Subversion. So my quick 5 minutes hack: (See Mike’s blog for the explanations)

# Fancy svn enabled PROMPT
__vcs_dir()  
  local vcs base_dir sub_dir ref get_dir
  get_dir()  
      ( cd $1
        echo $ PWD  )
   
  sub_dir()  
    local sub_dir
    sub_dir=$ PWD 
    sub_dir=$ sub_dir#$1 
    echo $ sub_dir#/ 
   
  svn_dir()  
    [ -d ".svn" ]   return 1
    base_dir=$PWD
    while [ -d "$(get_dir $base_dir/..)/.svn" ]; do base_dir=$(get_dir "$base_dir/../"); done
    sub_dir=$(sub_dir "$ base_dir ")
    ref=$(svn info "$(readlink -f $base_dir)"   awk '/^Revision/   sub("[^0-9]*","",$0); print "rev:"$0  ')
    vcs="svn"
   
  svn_dir  
  base_dir="$PWD"
  echo "$ base_dir/$HOME/~ $ vcs:+[$ref] $ sub_dir "
 
PS1='\u@\h:$(__vcs_dir)\$ '

9 October 2007

Peter Makholm: ack-grep uploaded and entering Debian Perl Group

The day before yesterday I uploaded ack to Debian Unstable. Currently it is awaiting the ftp-masters acceptance. Due to a name confilct with an existing package both the package and the util is named ack-grep. Not quite optimal… Instead of maintaining dependencies and some of my other perl modules I have decided to join the Debian Perl Group. So this evening I have spend injecting (and re-injecting) my current perl modules into the subversion repository. Later I might inject my other packages to collab-maint’s subversion repository.

18 September 2007

Peter Makholm: Cool utilities: ack

Working with subversion I’ve had a bit trouble making project wide search and replaces. find -name '*.pm' xargs perl 's/foo/bar/g' breaks a subversion working copy in not so subtle ways and grep’ing returns duplicate results. I gave up making the correct find statement in five minutes and installed ack. What a useful utility. Marc-Andr Lureau has ITP’ed it and it’s dependencies but hasn’t got anything uploaded yet. I offered to sponsor but havn’t recieved a respons yet and I’m impatient so I’ve rolled out my own packages, renaming ack to ack-grep to avoid name clashes with the existing ack package. Either download ack-grep_1.66-1_all.deb and libfile-next-perl_1.00-1_all.deb or use the following in you sources.list:
deb http://hacking.dk/debs sid main
deb-src http://hacking.dk/debs sid main
Still willing to either sponsor or maintaining the package myself.

14 September 2007

Peter Makholm: Just another Pontifex?

Ok, just going to do something scary:
$_=pack"C*",33..86;$o='NRCRIMGZLLLCXZBCVUIOR';$o=~s/./chr((ord($&)-13-&f)%26+97)
/eg;$_=$o;s/r/r /;s/l/l /;sub v $v=ord(substr($_,pop))-32;$v>53?53:$v s/p/P/;sub
f s/U$/U$ /;s/U(.)/$1U/;s/V$/V$ /;s/V(.)/$1V/;s/(.*)V$/V$1/;s/V(.)/$1V/;s/(.*)([
UV].*[UV])(.*)/$3$2$1/x;$c=v 53;s/(. $c )(.*)(.)/$2$1$3/;(v v)>52?&f:v v s/t/t /
;print"\u$_,\n";[substr qr/(.*)([UV].*[UV])(.*)/i,qw(Just another Perl hacker,)]
and now back to the regular schedule….

29 August 2007

Peter Makholm: Best Current Practice for mail forwarding?

While SPF seems to be among the currently used technologies for spam protection, SRS looks rather dead. But forwarding mail breaks SPF without workarounds. So what is the best current practice? The forwarding part of SRS is rather simple, but I havn’t found any clear way to implement the actual handling of bounces. It wouldn’t be hard to hack some usage of Mail::SRS onto postfix but there doesn’t seem to be an off the shelves solution?

23 August 2007

Peter Makholm: New cool Perl packages in Debian

A good read eval print loop for perl has been on my Wanted list for a long time. Matt S Trout’s Devel::REPL has been looking promissing but I didn’t want to fiddle with installing the dependencies. Thanks to Alexis Sukrieh and the Debian Perl Group Devel::REPL will enter unstable. Yeahhh… Another thing on my wanted list was Debian packages of Perl::Critic. Couldn’t find a ITP, but looking around at the Debian Perl Group’s website to find out how to package it I discovered that Joey Hess allready did the work. I’ve been using the morning installing the above from the subversion repository on pkg-perl.alioth.debian.org. Only problem was that I needed a newer package of libppi-perl which wasn’t maintained in subversion. What’s next? Looking at my ~/.perl Perl::Tidy seems to be a candidate.

Next.