Archive for the ‘Tech’ Category

Fun with PostScript and PDF

Thursday, May 26th, 2005

A couple of weeks ago, I needed to make a big PostScript file (4×3m, more on this later), and it seems like InkScape won’t let me use an arbitrary format. So I went ahead, googled for a PostScript tutorial, got the BlueBook as the first result and downloaded the reference manual for PostScript level 3 from Adobe.

I must say that PostScript is really a fun language to play with, and I had quite some fun doing something that would have been pretty boring otherwise. Enjoy the power of a complete programing language to automatise a couple of things while you’re at it.

I eventually had a look at the DSC and EPS specifications too, and ended up reading the PDF reference for PDF 1.6. I’m quite disappointed they scrapped the “PostScript is a complete programing language” part. I’m also quite disappointed by the “let’s use byte offsets in the xref table”, which is really painful to manage when writing a PDF file with a text editor, but I admit that it’s probably the best solution.

So, it was time for a cool hack using what I gathered about PS and PDF. Here it is, I added EPS and PDF as output formats for the screenshot in TiLP; the screenshot is written as a raw RGB (or black & white) inline image, compressed with zlib and encoded in ASCII85.

I wish I had learned all of this a year ago, when I had to debug a printing problem with CUPS. Now I can tell what the bug was; CUPS wasn’t honoring the DSC indicating the next page was to be printed on A3 paper with landscape orientation. Instead, the stupid thing added a DSC telling the page was to be printed on A4 paper. If this bug still exists, I’m going to send them a dead-tree copy of the DSC specs, so they can bang their heads against it :-P

Looking for HP C4137A

Saturday, May 21st, 2005

I’ve been looking at getting some more RAM for my HP LaserJet 1100 (C4224A, not a 1100A) for some time now, but it seems I just can’t find that in France at a decent price. Not even a clone.

An original HP part (16 MB, C4137A) costs about 100-400 USD depending on your vendor. I could find 2 or 3 resellers in France at about 150-200 Euros, but that’s a lot more than what I’m prepared to spend for this printer. Might as well put in the extra 300 Euros it’d cost to get a faster printer (and it would be a color LaserJet, even).

Alternatives are:

  • Smart Modular Technologies: known to work, about 50 USD
  • MemoryX: known to work, about 30 USD, plus 19 USD international shipping
  • Viking: sold on Amazon, known to be incompatible with the LJ1100

I’m >that< close to go and order a module from MemoryX, but the shipping would be 2/3 of the hardware price... which is a bit too much.

The memory needed is a 100-pin EDO DRAM module, which isn't exactly widespread (read: I don't have that lying around in my office).

Hints welcome :-)

IBM/Hitachi HDD reliability … or lack thereof

Sunday, May 8th, 2005


May 7 14:36:11 arrakis kernel: hde: dma_timer_expiry: dma status == 0x20
May 7 14:36:11 arrakis kernel: hde: DMA timeout retry
May 7 14:36:11 arrakis kernel: PDC202XX: Primary channel reset.
May 7 14:36:11 arrakis kernel: hde: status timeout: status=0xd0 { Busy }

This is the second Hitachi HDD that breaks this year. The first one was a 6-month old 120 GB SATA drive, this one is a 2-year old 120 GB PATA drive.

Oddly enough, I have a couple of 60GXP and 75GXP drives that are still running fine with the updated firmware.

This drive should still be under warranty, but the Hitachi website tells me the warranty expired in Feb. 2004… given that the disk was manufactured on Dec. 2002 and that there’s a 3-year warranty, I’m going to phone them and get my RMA.

If only they could focus a little bit more on reliability instead of capacity … my 10-year old 342 MB IBM drive, my very first hard drive, is still running happily. That really doesn’t match the definition of evolution in my book :-(

Thanks to the Linux software RAID for keeping the server running.