March 15, 2009

Using any Windows Printer on Mac OS X by way of VMWare Fusion

Short Version: If your Windows printer is not a postscript printer, use this trick to make a virtual postscript printer from your Windows printer. Then make sure your VM'ed Windows has printer sharing allowed on the firewall, and set up the printer as a network printer on Mac. You might need this guide to do that.

VMWare Fusion just saved me the money to buy a new printer. I was already very happy with VMWare Fusion, since my switch from XP to Mac. Using Fusion I was able to convert my XP machine to a virtual machine on the Mac, so I have lost no functionality at all - now I just have all the convenience of both operating systems. And I get to keep my C# and Visual Studio skills alive even though I'm on a Mac.
One problem, though, was printing.
A while back I bought an HP Laserjet 1018 from Morten, he couldn't use it because it's a Windows printer and he had switched to Mac. I had forgotten all about that, when I switched, so now his problem was mine.
There are some tricks around the net requiring firmware uploads to the printer - and if you turn it off you need to do it again (I think, the instructions were too complicated for my liking). Simply sharing it from my VM seemed better. The only problem, of course, was that it still had no Mac-happy drivers.
Ghostscript thankfully comes with a complete recipe for using any system printer as a Postscript printer (see above). Using this, and circumventing some broken printer discovery in Leopards Windows printer setup (also above) I now have a Postscript printer on Mac OS X which is really a Windows only HP.

The amount of indirection involved here is quite staggering: The physical printer, connects physically by USB to my Mac. The USB interface is virtualized inside my VM, inside which the printer is virtualized once more as a postscript printer. This virtual, virtual printer I can then connect to from the Mac and the deed is done.

Don't have a Windows license? I think this trick could be made to work with Linux as well - there are Linux drivers for this printer, and the rest of the toolchain also runs on Linux. VMWare Player + some hackery could be a Windowless way out (for this particular printer).

Posted by Claus at 12:40 AM | Comments (0)

March 13, 2009

How much abstraction does it take to run Twitter

On Twitter, @tveskov asks, how many layers of abstraction does it take to run Twitter.
This is a really hard question, probably intractable - if you want to include the physics and signalling of lasers through the fiberoptic cables that sends Twitter's data to my home. There are simply too many different places along the route where the platform relies on some level of abstraction and comprehension, to do a full enumeration.
Instead, let's tackle a simpler question: How many technologies/abstractions are directly visible in Twitter's source code. I did a view source and tried to find all the technology that I could see from the source would be in use to run Twitter.
The rule here is that it there has to be text in the source file that does not make sense unless I know the abstraction/standard/software/API I'm referring to below.

Here my best shot at the list (in order of discovery (by me, while reading))

  • xhtml

  • DTD's

  • XML namespaces

  • XML

  • CSS

  • Browser DOM

  • utf8

  • ico file format

  • png file format

  • gif file format

  • jpg file format

  • HTTP

  • RSS

  • ATOM

  • URI scheme

  • HTML4 (I think. Seems the "bookmark" rel attribute comes from there)

  • "nofollow" microformat

  • "hcard" microformat

  • DNS

  • Javascript

  • JQuery API

  • There is some kind of anti-bot posting implementation - but I can't tell what the API for that is like

Notably absent: The email standards. While obviously employed by twitter (as are many other standards if the API is considered), I found no evidence of email in the source of the logged in front page.

Posted by Claus at 5:53 PM | Comments (0)