Common Plisp: List Processing in Perl

I was recently talking on the phone with a person who lives at least 2,200 miles away and whom I'd never met or spoken to before. This is a surprisingly common occurrence in this day and age. I was explaining some of the things that I like about Perl. When I got to the part about how I love writing 4 or 5 lines of code where programmers of other languages have to write 20 or 30, my new friend hinted that he thought I was talking about completely unreadable Perl code.

Hacking XQuery Into Emacs With Berkeley DB XML

I often need to query an XML document without having to load it into a native XML database. In a perfect world, I would simply load the document into my editor, sprinkle some XQuery into the document, highlight the portions I want to evaluate, then hit a key combination to view a new window with the results. The whole operation should take all of a few seconds for a large class of XML documents and queries.

Thankfully, this is indeed a perfect world. And, I'm an Emacs user.

Quicksort Performance: Comparing Some Lisps And Perl

A few days ago, I wrote a simple Quicksort implementation in Common Lisp. After that, I started to wonder how other lisps and Perl compared for sorting numbers.

Perl Sockets Swimming in a Thread Pool

I've written a simple multithreaded TCP server that uses sockets and a thread pool to handle client requests. This server is packaged into a class (DcServer) that can be trivial to use.

Unattended Git-Based Backups à la MooseX::Declare

Warning: This MooseX::Declare program, which my server was calling as a cron job, stopped working. I'm not sure what caused the program to fail suddenly and I didn't have the time to investigate the issue thoroughly. I did, however, rewrite the program in classic Perl, which solved the problem for now. I plan to make the "classic" version available to everyone and I also plan to investigate why the MooseX::Declare program stopped working.

English and TIMTOWDI

I'm at the point where my body stops functioning well if I don't run 3.8 miles at least a few times a week. That seems like a lot, but I actually walk about 0.5 files of that, so the run is really more like 3.3 miles. Still a fair bit. But I'm wearing expensive earphones ($30) connected to an inexpensive MP3 player ($12) and I'm listening to female vocal trance, mostly. I'm also furiously processing random thoughts, much like when one dreams. So the time goes by quickly for me when I'm running.

128-Character Perl Prime Number Finder

Falicon told me about people that were posting programs of less than 140 characters to Twitter. I found this fascinating for some reason and I've created my own such program, a Prime Number Finder, in Perl. This program will spit out all the prime numbers in a given range. Plus, it's rather efficient for such a small Perl program.

Concise Programming and Super General Functions

Some time ago, I started to develop programs using tiny, super general, higher-order functions and I began to borrow a little from functional programming. I noticed interesting things about these new programs. They called for special language features that I had until then heard of but never really needed. I'm referring to language features like support for first-class functions, closures, and lexical binding. The programs I produced were smaller and easier to debug than programs written in a traditional procedural style.

On Perl's Learning Curve And Its Relative Capabilities

The big problem with Perl is that it’s easy to learn, but difficult to learn right. It has a tough learning curve and it can take years to master, even if you already know many other programming languages.

However, I’ve never met a person that uses the advanced features of Perl (closures in an OO context, hash dispatchers, higher-order methods, super general functions, and so on) that didn’t write beautiful, concise, fast, and bug-free code. People that really grok Perl (and there are precious few of those because of the learning curve) don’t bash Perl.

Syndicate content