Skip to the Main Content

Note:These pages make extensive use of the latest XHTML and CSS Standards. They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in Mozilla. My best suggestion (and you will thank me when surfing an ever-increasing number of sites on the web which have been crafted to use the new standards) is to upgrade to the latest version of your browser. If that's not possible, consider moving to the Standards-compliant and open-source Mozilla browser.

September 2, 2005

New itexToMML Plugins for MovableType and ecto

For several hours, this evening, the previous entry was truncated, mangled, ill-formed poo. Both the itexToMML plugin for MovableType, and the corresponding plugins for ecto were misbehaving.

They were both written to use Perl’s bidirectional pipes (IPC::Open2) to filter the posts through itex2MML.

my $pid = open2(*Reader,*Writer, "itex2MML -");
print Writer $_";
close Writer;
my @out = <Reader>;
waitpid $pid, 0;
my $html = join('',@out);
This works well, as long as the data does not exceed some critical size. However, at least on MacOSX, with longer data the process just hangs, waiting to read back the filtered output.

For some reason, none of my hundreds of previous posts ever triggered this bug. Nor, indeed, had the, slightly shorter, original version of that post. Urs had reported problems with some of his posts, but I could never track down the problem. But here was a real-live instance, where merely adding a paragraph of text caused both ecto and MovableType to act up.

So, there I was, tearing my hair out in frustration, until I finally decided to rewrite these plugins to use temporary files instead of bidirectional pipes. Maybe a little less elegant and efficient, but a lot more stable.

If you use ecto as a blogging tool, you definitely want the new version of the itexToMML text filter plugins. If you are running MovableType on MacOSX (and possibly other operating systems), you may want the new version of the MovableType plugin as well.

Posted by distler at September 2, 2005 1:17 AM

TrackBack URL for this Entry:   http://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/640

1 Comment & 0 Trackbacks

Re: New itexToMML Plugins for MovableType and ecto

Great. Thanks for fixing this!

there I was, tearing my hair out in frustration

I think I know how you felt. ;-)

Posted by: Urs Schreiber on September 2, 2005 1:37 AM | Permalink | Reply to this

Post a New Comment