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.

Advertisements

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

Good, Fast, Cheap: You Can Only Pick Two!

A recent article “Five Minutes with Alison Barrett” linked to a speech by Alison Barrett on Unit Testing in particular in PHP.

 

The speech almost in passing made a reference to a famous quote on “good fast cheap, pick two”, which I found quite noteworthy. Using Google I found a number of references to this quote, one good example is Good, Fast, Cheap: You Can Only Pick Two! by Jennifer Kes Remington showing below picture:

Good-Fast-Cheap

HipHop Virtual Machine can run WordPress

HipHop Virtual Machine (dead link) says that HHVM can run WordPress.

A more technical description of the HHVM can be found in Speeding up PHP-based development with HipHop VM. One of the main targets was to be as fast as the previous PHP to C++ translater. This goal has been achieved, see graph:

HHVM vs. HPHPc

Unfortunately this also shows that Facebook has bundled all their energy on improving the virtual machine, but failed to improve the PHP to C++ translator.

Addendum 09-Dec-2013: See HipHop for PHP in Wikipedia. Performance has improved again. There still seem to be some issues with WordPress unit-tests.

HHVM Performance

Addendum 20-Dec-2013: HHVM: We are the 98.5% (and the 16%).

Generators are now in PHP 5.5

Generators (and therefore coroutines) are now part of PHP (Wikipedia) 5.5, as of 20-Jun-2013. Here is an example:

function xrange($start,$end) {
    for ($i = $start; $i<=$end; ++$i)
        yield($i);
}

The Icon programming language (Wikipeda) was one of the first computer languages where generators are completely general and may occur in any computation. Icon is goal-directed in the sense that the evaluation mechanism attempts to produce at least one result for all expressions. yield is analogous to Icon’s suspend.

Icon can limit generators, PHP apparently cannot. Icon uses

expr \ i

for this limitation.

The Python programming language also provides generators. A simple example is

def xrange(a,b):
    for i in range(a,b):
        yield i