2002-10-28

Time in Ruby

Just learned a lesson about the Time class in Ruby. If you send for example the message utc to a Time instance, that instance is changed. I thought the method would return a new instance, but apparently this isn't the case.

Time.at(sometime).utc will return a new instance expressing sometime in UTC.

How many files are you using?

On my laptop running Mac OS X there's 67415 files (including directories) in my home directory. During the past 24 hours 648 of these were modified, as reported by find . -mtime 1 | wc -l.

Installing FreeBSD on a large disk

The new machine I ordered some time ago has finally arrived. At last! (don't ask me why it took so long). I finally settled for a P4 1.8 GHz CPU instead of the AMD, and a 40 GB Seagate Barracuda drive. The disk is extremely quiet which is nice cause I want to keep the machine running at home 24/7.

Anyway, I naturally encountered some problems when installing the operating system, FreeBSD 4.7-RELEASE. After the initial slicing and partitioning of the drive, selecting packages etc, I was ready to copy the files to the disk. The disk is full the installer complained and aborted. Darn, what was that all about?!

I searched the web for a document describing the problem. I actually had an idea already: the disk geometry. The BIOS - AMIBIOS 1.50a - reported 19158 cylinders, 16 heads and 255 sectors, while FreeBSD found 4xxx/255/63 or something like that. I'm not at the machine right now so I can't give you the exact numbers.

I tried to force the geometry reported by the BIOS to fdisk but in vain. Then I took a long shot and disabled LBA mode for the drive in the BIOS. I know I've read about it sometime, somewhere, in another context. Don't ask me where. I tried to install again and what do you know, the installation went on smoothly.

Except for booting...

After all kinds of thoughts and experiments I decided to reinstall a different OS. I have an OpenBSD CD at home and I gave it a try. Same problem; the disk geometry reported by the OpenBSD installer was the same as for FreeBSD; the installation went on nicely but the machine couldn't boot from the disk.

I followed my friend Urban's example and downloaded Mandrake Linux. Same problem. The same strange disk geometry reported. The smooth installation process. But no booting (btw, the FreeBSD and OpenBSD developers really should take a look at the installers provided by their Linux brethren - the BSD installers fade in comparison).

This was saturday night. Sunday I decided to give it another try. I found an old Win98 boot floppy, ran the Windows fdisk and created a small, 10 MB primary DOS partition at the beginning of the disk. Then I tried to install FreeBSD again telling it to leave the MBR alone. It worked, booting included. Strangeness.

I installed again (to partition the freebsd slice the way I wanted) this time including the FreeBSD boot manager. It also worked. I don't want nor have the time to investigate the problem further, as it all seems to work now. If there's something with my current setup that is obviously faulty or perhaps even dangerous please let me know, cause I don't have a clue.

Now, it seems I just have to rebuild the kernel to enable the IPDIVERT option so that I can use the NAT daemon (I wonder why it isn't in there by default). But that's another story...

2002-10-18

Parsing iCalendars

Yesterday I wrote a very simple iCalendar parser, as specified in RFC 2445. A lot of work remains, but it's a start at least! You'll find the code and a description here.

As I wrote at my software page: For you iCal users out there: iCal does not seem to follow the standard as it is using LF as content line delimiters instead of CR LF as the standard dictates. Alas, my parser can't read iCal calendars without them being corrected first.

I've submitted a bug report to Apple.

Aaron Swartz: A work of art.

I couldn't agree more to Aaron's opinion. It is a work of art.

It will also be very interesting to see what the outcome of Bernstein's oral agument will be. For information on the case see here.

2002-10-10

Eldred v. Ashcroft: impact of voiding earlier copyright extensions

Someone on slashdot wrote:

From the bench, Justice Sandra Day O'Connor pointed out that, besides 1998, Congress extended copyrights in 1831, 1909 and 1976. If you are right, O'Connor asked, don't we run the risk of upsetting previous extensions of time?

Another slashdotter wrote:

To add to this, I don't see how voiding the retroactive 1976 extensions, or any of the previous retroactive ones, would matter significantly - because all of the copyrights on the works benefitting from those extensions would have already expired by now anyway had the 1998 law not been passed! So declaring those previous retroactive extensions unconstitutional (even if anyone is asking for that, and Eldred certainly isn't) would not in itself affect the present-day copyright status of anything.

All of the copyrights on the works benefitting from those extensions would have already expired. An interesting argument I think.

2002-10-09

Illegal downloads

I quoted Hilary Rosen of RIAA a few days ago (see here) and I just realized I made a mistake. Of course illegally downloading is illegal, no doubt about that. The question is rather what is illegal when it comes to downloading?

I guess hacking into someone's computer systems stealing information could be considered illegal downloading. Buying a CD record, ripping it and sending a copy a friend however, is not illegal. It's considered private use in sweden.

Hilary Rosen and the organizations she represents want to make us believe that this private use is also illegal, an act of stealing. That's how I interpret the ongoing discussions anyway.

If an opinion is advocated repeatedly, over and over again, by enough people, with strong enough voices, that opinion may eventually become the truth, whether it is the truth or not. This is one reason you should raise your voice. If you don't the only opinion heard will be that of the RIAA.

Steven levy: Glitterati vs. Geeks

Reporting on Lessig's upcoming US Supreme Court appearance: Larry Lessig admits it: he's nervous. Who wouldn't be? This week the brainy Stanford law professor makes his first appearance before the U.S. Supreme Court - barely a decade after clerking for Justice Antonin Scalia - to argue a case that could redirect millions of dollars, rejigger the entertainment menu of the entire nation and liberate Mickey Mouse.

2002-10-07

Tools for writing

If someone sends you some information electronically, e.g. a text that you requested or an agenda or a meeting protocol, would you be surprised if that information is sent to you as a Word document attached to an e-mail? It wouldn't surprise me.

So what is it about these tools that make them so good that so many people use them for so many things? The answer is simple. Nothing. These tools are not good. The reason can only be the huge quantity of installations. Or?

Are there no alternatives then?

If you're a scientist and need to write a publication, what do you do if you don't want your research data locked up in a proprietary file format? What do you do if you're tired of spending hours trying to produce a nice looking graph of your data in Excel just to find out that you'll have to spend the rest of the night trying in vain to import it into a Word document or a PowerPoint presentation. Sign up for a course on the Office Suite? I don't think so. There must be alternatives.

Computers have been around for a lot longer than the Office Suite, and they've been used by a lot of scientists, technical writers and... writers. What programs and tools did they use before?

I'll take a look at TeX the next few weeks (or months?) as it seems to be a great tool for writers who like to spend their time on writing and producing content instead of fighting with various word processing programs.

2002-10-02

Mark Pilgrim: there are four ligths

Mark wants me to link to this text. I can't see why I shouldn't, nor why you shouldn't do the same as well.


Hosted by Oops FREE THE MOUSE
This site is powered by Burger; powered by djbdns; powered by lighttpd; powered by FreeBSD; powered by electricity.