torstaina, heinäkuuta 26, 2007

AppleScripted downloads

I find I'm missing a download manager application. As I am a cheap bastard who is not certain he will be running Mac OS X in a few months, I don't want to spend money on the commercial or shareware download managers and I did not find any free ones.

I have a fairly standardized set of files I need to download every now and then and the files are large. It would be nice if the download had a progress indicator. Also, because the files are large and my network connection is kind of flakey, it would be a bonus if the broken downloads could be continued.

One more thing: I noticed that Safari does not allow one to download files to a specified folder, it downloads everything into the download folder and sometimes it fails to name the file with the basename of the URL and uses the host part of the URL instead. (Yes, FireFox does not have these problems. It has other problems, but let's not go into that.)

As I have played around with AppleScript during the last few weeks, I thought I would see if I can get finer-grade control over Safari downloads using AppleScript. It turns out Safari has a fairly small AppleScript dictionary and it does not allow script control over downloads.

Then I discovered there is a standard scripting component called "URL Scripting Access" that can download and upload using HTTP and FTP. The documentation even says it can display an optional progress bar.

This approach was a failure too.

There is no progress bar even when it is requested and the large downloads fail because the script times out. It would seem the download script is talking to another process called "URL Scripting Access", which does the actual downloading. Apparently there is some fixed timeout, a couple of minutes, after which the download script says a timeout has happened and exits with an error. The URL Scripting Access process is still running and still downloading (the file on the disk keeps growing and the System Monitor shows there is activity in the network.)

But I don't want to use this approach because there is no progress bar and no control over the download and it would seem there is no way to continue a broken download.

At the moment I'm considering other alternatives but they all would require more programming, especially UI programming, which I'm not familiar with. The time available for this project is getting short, next Moday my vacation is over.

I think I will use lftp for my downloads. It is available in MacPorts.

maanantaina, heinäkuuta 23, 2007

Mac-elämän loppu häämöttää?

Olin ollut Mac Minin onnellinen omistaja vähän yli 3 kuukautta kun OS X 10.4 Tiger tuli markkinoille. Olin juuri antanut Applelle 1000 euroa ja tuntui siltä, että Tiger ei ollut niin järisyttävä päivitys, etten olisi osannut ilmankin olla.

Sittemmin aikaa on kulunut ja olen huomannut, että monet ovat ne ohjelmat, jotka toimivat ainoastaan Tigerilla. Päätin, että kun OS X 10.5 Leopard tulee, siihen päivitän ja sitten en ole enää toisen luokan kansalainen.

Näin ollen minua kiinnostaa kovasti, mitkä tulevat olemaan Leopardin laitteistovaatimukset. Virallisesti en ole nähnyt muuta kerrottavan kuin että PowerPC on ainakin vielä tuettu prosessori. Netissä on veikkailtu muistivaatimuksiksi 1 gigatavua ja näytönohjaimelle 64 megatavua.

Ikävää... Oma Mac Mini kun on sitä ensimmäistä sukupolvea, jossa on 32 MB muistia näytönohjaimella ja 512 MB RAM-muistia (256 MB oli vakio, tilasin omani jo valmiiksi tuplamuistilla.)

Nämähän ovat toki vain spekulaatioita, tosin Leopardin testiversioita on jaettu jo kahtena kesänä kehittäjäkonferensseissa, joten spekulaattoreilla voi olla ihan oikeaa kokemustakin.

Nyt pitäisi alkaa ehkä suunnitella uuden Mac-koneen hankintaa. Onhän Mac Mini vähän hidas, etenkin kun sillä tekee videon koodausta tai pelaa jotain tai tekee kehitystyötä (koska silloin yleensä tarvitaan paljon ohjelmia yhtä aikaa.) Mutta saattaa olla, että kassassa ei ole tarpeeksi nappulaa ... Pitäisi ostaa ratsastushousut ja saappaat ja maksaa ratsastustunnit ja ...

Saattaakin käydä niin, että jos Leopard ei pyöri tässä Mac Minissä, taidan tyhjentää kovalevyn ja kokeilla miten hyvin Linux tukee Applen rautaa... Siitä siis otsikko: "Mac-elämän loppu häämöttää?" Rasmus on käyttänyt Ubuntua omassa Mac Minissään jo jonkun aikaa ja ollut kai tyytyväinen valintaansa.

maanantaina, heinäkuuta 16, 2007

Good article on font rendering

Lately there's been some buzz in the blogosphere about the differences in font rendering in applications from Microsoft and Apple. The title links to a blog post that goes into a lot of detail. A short summary would be: Microsoft does a really bad job of font rendering and Apple doesn't do it that well either, but at least they've got taste.

torstaina, heinäkuuta 05, 2007

3 autoa pihalla


3 autoa pihalla
Originally uploaded by sti.
Vaikka taloyhtiössä on enemmän parkkipaikkoja kuin asuntoja, on pihalla yleensä aina pari autoa. Etummaiset 2 kulkuneuvoa ovat olleet paikalla ainakin tunnin ilman, että niistä on purettu tai lastattu mitään.