Rocking the blogosphere

Archive for the 'Perl' Category

Perl->{’5.10′} += (”//” && > Operator[s])? =~ /amusing/

A snippet from the latest freshmeat.net announcement of Perl 5.10 that landed in my email inbox:

This version includes a new smart match operator, a switch statement,
the // defined-or operator, regular expression improvements, and
other language changes…

Funny, I was just thinking that what Perl needs most is more operators… :-)

Popularity: 67% [?]

Perl is evil

What other language would let you do this?

    ''=~(        '(?{'        .('`'        |'%')        .('['        ^'-')
    .('`'        |'!')        .('`'        |',')        .'"'.        '\\$'
    .'=='        .('['        ^'+')        .('`'        |'/')        .('['
    ^'+')        .'||'        .(';'        &'=')        .(';'        &'=')
    .';-'        .'-'.        '\\$'        .'=;'        .('['        ^'(')
    .('['        ^'.')        .('`'        |'"')        .('!'        ^'+')
   .'_\\{'      .'(\\$'      .';=('.      '\\$=|'      ."\|".(      '`'^'.'
  ).(('`')|    '/').').'    .'\\"'.+(    '{'^'[').    ('`'|'"')    .('`'|'/'
 ).('['^'/')  .('['^'/').  ('`'|',').(  '`'|('%')).  '\\".\\"'.(  '['^('(')).
 '\\"'.('['^  '#').'!!--'  .'\\$=.\\"'  .('{'^'[').  ('`'|'/').(  '`'|"\&").(
 '{'^"\[").(  '`'|"\"").(  '`'|"\%").(  '`'|"\%").(  '['^(')')).  '\\").\\"'.
 ('{'^'[').(  '`'|"\/").(  '`'|"\.").(  '{'^"\[").(  '['^"\/").(  '`'|"\(").(
 '`'|"\%").(  '{'^"\[").(  '['^"\,").(  '`'|"\!").(  '`'|"\,").(  '`'|(',')).
 '\\"\\}'.+(  '['^"\+").(  '['^"\)").(  '`'|"\)").(  '`'|"\.").(  '['^('/')).
 '+_,\\",'.(  '{'^('[')).  ('\\$;!').(  '!'^"\+").(  '{'^"\/").(  '`'|"\!").(
 '`'|"\+").(  '`'|"\%").(  '{'^"\[").(  '`'|"\/").(  '`'|"\.").(  '`'|"\%").(
 '{'^"\[").(  '`'|"\$").(  '`'|"\/").(  '['^"\,").(  '`'|('.')).  ','.(('{')^
 '[').("\["^  '+').("\`"|  '!').("\["^  '(').("\["^  '(').("\{"^  '[').("\`"|
 ')').("\["^  '/').("\{"^  '[').("\`"|  '!').("\["^  ')').("\`"|  '/').("\["^
 '.').("\`"|  '.').("\`"|  '$')."\,".(  '!'^('+')).  '\\",_,\\"'  .'!'.("\!"^
 '+').("\!"^  '+').'\\"'.  ('['^',').(  '`'|"\(").(  '`'|"\)").(  '`'|"\,").(
 '`'|('%')).  '++\\$="})'  );$:=('.')^  '~';$~='@'|  '(';$^=')'^  '[';$/='`';

(from 99 Bottles of Beer).

Yes, this is a valid Perl program! Paste it into a text file and run it - don’t worry, it won’t nuke all your files.

A work of art. A completely and utterly unmaintainable work of art.

Sick.

Learning Perl, Fourth Edition

Popularity: 6% [?]

Komodo, a Komodity

ActiveState Komodo is a programmer’s IDE for Linux, Mac OS X, and Windows that is tailored for programming with a number of dynamic languages such as Perl, PHP, Python, Ruby, and Tcl.

I came across this post the other day which gives the promo code kmd3n9-ur8 for getting Komodo Personal Edition for free, but says that the code was supposed to expire Dec. 2005. I gave it a whirl and I was surprised to find that it works.

If you’re interested in Komodo, give it a shot. You’ve got nothing to lose.

Popularity: 11% [?]

Got Zoidberg working

After quite a bit of futzing around, I got Zoidberg working. I had mentioned here that I had installed it, but that the cd command wasn’t working.

Well, here’s what I did…

(Read the article)

Popularity: 8% [?]

Zoidberg - a modular perl shell

I’m playing around a bit with:

Zoidberg - a modular perl shell

The idea of having a shell that allows Perl-syntax is interesting.

The problem I am having right now is that the “cd” command doesn’t work. That one is kind of a biggie for me :-)

I’m talking with the developer over email and we’ll see if we can debug this one.

Popularity: 5% [?]

Perl for TiVo Series 2

It took a while for me to figure out how to build this sucker for TiVo, because [Perl][] has a different build process than most other UNIX programs and I had to manually tell it all the right config settings for the TiVo MIPS. And it kept wanting to run the miniperl and perl binaries that it just built to do tests, but that doesn’t work when you’re cross-compiling so I had to keep renaming the binaries and replacing them with versions from my system. Eventually, I got it to build, but I haven’t done very extensive testing of it - just very, very simple stuff. My hope is that this will open up TiVo hacking to more people - i.e.: people who don’t know or don’t like [Tcl][] and prefer [Perl][].

[Perl]: http://www.perl.com/
[Tcl]: http://www.tcl.tk/

Perl 5.8.5 for TiVo Series 2

Update 2005-01-28: You might also need the following shared libraries if you don’t already have them on your TiVo:

tivo libdl and libnsl.rar

Thanks to dressen who pointed that out here:

dressen’s post on DealDatabase.com forums

Popularity: 9% [?]