Migrating from delicious.com to WordPress

I have been a loyal user of delicious.com since 2006. I have written on this in my post Saving URLs in del.icio.us Still Troublesome. But now enough is enough. Here is a list of annoyances:

  1. You can neither export nor import your data anymore.
  2. The service is generally slow, i.e., it takes a lot of time to just load the site in your browser.
  3. The service is sometimes not available.
  4. You cannot change URLs without deleting the entire post.
  5. The company behind the service does not answer any inquires.
  6. The site is blocked by a number of company firewalls because it is marked as “social”.

Continue reading

No Perl and PHP on Mainframe from IBM

IBM no longer provides Perl for its mainframe machines, see Software withdrawal: Selected IBM System z platform products (a copy is here: IBM-Withdrawal-ENUS913-252. It looks like they have not heard that Perl is the duct tape that holds the internet together. Similarly IBM withdraw PHP from their mainframe platform. So Wikipedia and Facebook will not run on big iron. Not that Wikipedia or Facebook ever wanted to, but now IBM pulled the plug.

In the same vein all IBM has to offer their customers is 32-bit COBOL on their mainframe, so customers can only use less than 2 GB, see Memory Limitations with IBM Enterprise COBOL Compiler.

In earlier times IBM tried to sell their VisualAge products, which where notoriously slow, and never really took off. Now they aggressively sell WebSphere.

Who makes these decisions? And who approves this?

In defense of IBM, there is a company called Rocket Software which provides Perl and PHP. So it’s like going to McDonald’s ordering a hamburger, but the clerk tells you that you should buy the bread separately from the nearby bakery.

Calculating number of seats in parliament using d’Hondt’s method

Wikipedia contains an article on d’Hondt’s method for calculating the number of seats given the number of votes for each party. I wrote a short Perl program for its calculation including the case when d’Hondt’s method by its design leads to drawing the lots. Its input contains a list of party names and its corresponding votes. The number of seats is given as parameter -s. This implementation of d’Hondt uses integer division and rounds the division to the lower integer (floor).

Continue reading

Working with System V IPC queues in Perl and PHP

In continuation of Working with System V IPC queues a month ago this post will show how to access IPC queues with Perl and PHP. A typical scenario is that a web application wants an external application to process data coming from the web application. In that scenario a lot of messages/tasks from the web application can be queued up in an IPC queue for succesive processing by another program independent from the web application and possibly with more access rights.

For using System V queues in PHP you have to make sure that PHP has been compiled with POSIX support. With Red Hat you need php-process, in Ubuntu it is present by default.

Continue reading