Mar 27

Strangely enough I had the need to determine if it was possible to create a valid but empty tar file. Turns out it is. The method varies slightly depending on your flavour of tar program, here’s how to do it on three of the big ones:

BSD
tar cvf empty.tar --from-file /dev/null

GNU (Linux)
tar cvf empty.tar --files-from /dev/null

Solaris
tar cvf empty.tar -I /dev/null

Now if you wondering why I would want this, here’s the explanation. I work on a batch processing system that processes files delivered from other systems. In some cases its necessary to wait for a file to arrive but give up after some time. In order to give up we copy and empty file (automatically) so that the processing proceeds normally. Ordinarily this is an empty plain file but for the system I’m working on I’m expecting a tar file, hence the need for an empty one.

Mar 05

An interesting email passed through the webkit-dev mailing list today. In what appears to be a small glimpse into what goes on in preparation for a Stevenote, Geoffrey Garen (Apple) noted in a reply to an email from Akos Kiss (Department of Software Engineering, University of Szeged, Hungary) that one of the reasons WebKit likes to do its own thing and not depend on code it doesn’t own is to be able to fix problems with very short notice. Citing the example of, “12 hours before a keynote address”.

Akos Kiss (Department of Software Engineering, University of Szeged, Hungary):

b) JIT compilation to Java bytecode or ActionScript bytecode.

Comment: Huge work. Currently available compiler implementations do not fit to the architecture of the JS engine.

Geoffrey Garen (Apple):

Right. We’re also reluctant to rely on code that we don’t own. We’ve seen very large performance wins from tightly integrating and customizing all the components of the web stack. We also need the freedom to fix crashes and compatibility problems on very short notice (for example, 12 hours before a keynote address).

Mar 05

I encountered a (Microsoft) site the other day that required Silverlight to be installed. Given I was using my work laptop (running Windows XP) I thought I’d give it a try. The first attempt at running the setup file I downloaded resulted in the following error message (which was opened in a browser window, not displayed by the installer):

The Microsoft Silverlight download was automatically extracted to a virtual drive. You should manually extract the download to a physical drive, and then run it from there. Please follow these steps to complete your installation:

1. Create a new folder on drive C called SilverlightTemp.
2. Save the Silverlight download to this folder.
3. Click Start, click Run, type cmd.exe, and then click OK.
4. In the cmd.exe window, type cd C:\SilverlightTemp\, and then press Enter.
5. This step depends on which version of Silverlight you are installing.
* For Silverlight 1.0 Beta:
In the cmd.exe window, type Silverlight.1.0beta.exe /X, and then press Enter.
* For Silverlight 1.1 Alpha:
6. In the cmd.exe window, type Silverlight.1.1alpha.exe /X, and then press Enter.
7. If you receive a User Account Control (UAC) prompt, click Continue.
8. In the Choose Directory For Extracted Files box, type C:\SilverlightTemp, and then click OK.
9. In the Extraction Complete box, click OK.
10. In the cmd.exe window, type install.exe, and then press Enter.
11. If you receive a UAC prompt, click Continue.
12. In the cmd.exe window, type cd.. and then press Enter.
13. In the cmd.exe window, type rmdir SilverlightTemp /S /Q, and then press Enter.
14. In the cmd.exe window, type exit, and then press Enter.

After recovering from the initial shock of the installation instructions for a very consumer oriented technology requiring use of the command line, I followed the instructions only to be shown another web based error message:

This installation is forbidden by system policy. Contact your system administrator for assistance.

Yes, that’s right I don’t have administrator privileges on my work laptop. Surely the installer could have worked this out at the start of the process.