Search Results: "js"

9 February 2006

Erich Schubert: Anyone knows of a nice XML-based blog software?

Dear Lazyweb, Anyone aware of a nice blog software that And I bet I forgot some additional restrictions... Thanks for any suggestions..

7 February 2006

Mike Hommey: xulrunner 1.8.0.1-1

Checking Signature on .changes
(…)
Good signature on /home/mh/pbuilder/sid/result/xulrunner_1.8.0.1-1_i386.changes.
Checking Signature on .dsc
(…)
Good signature on /home/mh/pbuilder/sid/result/xulrunner_1.8.0.1-1.dsc.
Uploading via ftp xulrunner_1.8.0.1-1.dsc: done.
Uploading via ftp xulrunner_1.8.0.1.orig.tar.gz: done.
Uploading via ftp xulrunner_1.8.0.1-1.diff.gz: done.
Uploading via ftp libnspr4-dev_1.8.0.1-1_all.deb: done.
Uploading via ftp libmozjs-dev_1.8.0.1-1_all.deb: done.
Uploading via ftp libsmjs1_1.8.0.1-1_all.deb: done.
Uploading via ftp libsmjs1-dev_1.8.0.1-1_all.deb: done.
Uploading via ftp libxul-dev_1.8.0.1-1_all.deb: done.
Uploading via ftp libnss3-dev_1.8.0.1-1_all.deb: done.
Uploading via ftp xulrunner_1.8.0.1-1_i386.deb: done.
Uploading via ftp xulrunner-gnome-support_1.8.0.1-1_i386.deb: done.
Uploading via ftp libnspr4-0d_1.8.0.1-1_i386.deb: done.
Uploading via ftp libmozjs0d_1.8.0.1-1_i386.deb: done.
Uploading via ftp spidermonkey-bin_1.8.0.1-1_i386.deb: done.
Uploading via ftp libxul0d_1.8.0.1-1_i386.deb: done.
Uploading via ftp libnss3-0d_1.8.0.1-1_i386.deb: done.
Uploading via ftp xulrunner_1.8.0.1-1_i386.changes: done.
Successfully uploaded packages. I wonder how long it will take to the ftp-masters to accept it. It seems the NEW queue is not as fast as it used to be. It’s been a week I’ve been waiting for libxml2 and libxslt to get through, and they still haven’t made it. If enough people is interested in the package before it comes out of NEW, I’ll probably upload it in my repository. I have a patch for epiphany-browser that I’ll send soon to the BTS. I’ll come up with a patch for yelp as well. Then, bye bye mozilla-browser. I’m also going to build an unofficial firefox on top of xulrunner, and maybe upload it to experimental, so that we can have some feedback about that. I’ll see with Eric about that.

27 January 2006

David Moreno Garza: Yes

I just told my boss. I'm moving to Venezuela. It's now official. Everybody knew, except for my boss and he supports me completely: He rocks. Well, it somewhat depends on the definition of 'moving', but I'll be there for more than a couple of months, call it whatever you want.

I'm pretty excited. Time to get tickets. And time to plan actually, again, going to DebConf, which is, from an specific point of view, quite funny Laughing.

For all of them who have asked me for some spare space at my place in Mexico City, it'll be available from May 4th to 24th. But feel free to mail me or drop a line on IRC if you need some space somewhere before or after that period, I have plenty of friends (both geeky and not Tongue out) who would like to host people for a few days.

Now, should I start a petition online in order to abrotman gets decided and come to DebConf?  Wink

25 January 2006

MJ Ray: Tour de France 2007 in London

TdF Blog mentioned the announcement that the 2007 Grand Depart will be in London, England (official announcement at Red Ken's site, official London site, VeloNews coverage) . I've been watching cycle racing for years, most recently via satellite, and it will be interesting to see whether another visit to England and the new itv 4 means that there will be better coverage in the UK. The last few years, I think there's been a one-hour highlights show on itv2 repeated late night on most itv1s and live coverage of weekend stages. Not great, but even that beat the half-hour we used to get. Sadly, no other cycle races get much coverage, not even the Tour of Britain. Frustrating.

21 January 2006

Ian Murdock: The celestial jukebox

Fred Wilson: “I will not buy music that I cannot remove the DRM from.” I agree wholeheartedly, though the strategy I use is the one Fred dismisses in the first paragraph, namely burning the music to CD and ripping it back, sans DRM, to MP3 format. Yes, it’s a pain, but it beats having to jump through all the digital hoops at some indeterminate point in the future when all I want to do is queue up a song I’ve legitimately purchased and have probably forgotten where I bought the thing, let alone what magic pixie dust I need to decode it. Sure, the MP3 format has issues too, but at least I know my music will play anywhere. (Since I’m on the subject, I’m looking for some sort of a virtual CD burner, which the operating system thinks is a CD burner but which is actually a piece of software that converts the tracks it “burns” to MP3 format. Anyone know if such a beast exists? That would certainly do wonders to curtail my contribution to the world’s coaster supply.) In practice, DRM isn’t as much as a problem for me as it seems to be for other people. Personally speaking, I don’t want to be in the music storage business—I’d much rather stream music on demand from some digital jukebox in the sky, which is why I’ve been a Rhapsody customer since 2003. (Greg Papadopoulos sums up my thinking pretty well exactly here: “I’ll bet that we will look back of this era of quasi-networking and wince, ‘How did we ever live that way?’ And the idea of wanting to carry all of your content with you will seem both old-fashioned and rather ridiculous.”) In my case, DRM is normally a non-issue—I simply route around it. Rhapsody has come a long way since I first started using it in 2003: They added a Rhapsody To Go service, which more or less solves the “disconnected operation” problem (though I still tangle with DRM issues from time to time if I go for too many days untethered), and they finally embraced the web, though the current web offering leaves much to be desired—the Linux plugin still doesn’t support Firefox 1.5 nearly two months after its release, the web interface has huge gaps compared to the jukebox software (you can’t access your music library on the web, among other things?!), and they don’t seem to be taking advantage of the new web platform at all (where, oh where, are the RSS feeds of my favorites, recommendations, etc, so I can mash them up with other stuff?). At the end of the day, I suspect the “economic boycott” James Governor calls for is the right way to fix the DRM problem. For my part, I’m voting with my wallet by supporting the model I want to win out in the end (that your music library will live on the web, not on your PC or in your pocket) and by buying music, in those rare cases when I do want to manage my own music library rather than letting someone else do it for me, from legitimate music services but opting out of the silos the platform providers are trying to build around me as a byproduct. Above all, I resist the temptation to climb into the big, beautiful lockbox Apple is building for us. As Clayton Christensen recently told BusinessWeek, I’m firmly convinced open standards will win out in the end:
Look at any industry — not just computers and MP3 players. You also see it in aircrafts and software, and medical devices, and over and over. During the early stages of an industry, when the functionality and reliability of a product isn’t yet adequate to meet customer’s needs, a proprietary solution is almost always the right solution — because it allows you to knit all the pieces together in an optimized way. But once the technology matures and becomes good enough, industry standards emerge. That leads to the standardization of interfaces, which lets companies specialize on pieces of the overall system, and the product becomes modular. At that point, the competitive advantage of the early leader dissipates, and the ability to make money migrates to whoever controls the performance-defining subsystem.
I don’t know about the rest of you, but that day can’t arrive soon enough for me.

20 January 2006

MJ Ray: Blog moves: Calling progenitors of interplanetary spam

It's been over a day and still all the livejournal users are spamming planet debian.
  1. Livejournal: you are nuts. Is it really so difficult to leave feeds and non-login-required content on the old addresses until it expires? Breaking links is really annoying. You're even changing the guid contents instead of setting isPermalink='false' on older entries, which rather defeats the purpose of guid. That's so braindead that you deserve a fork in the head! (and RSS 2.0 is silly anyway - let's use RDF Site Summary instead...)
  2. Planets: Why is it taking so long to get over this? Are livejournal moving users over slowly?
  3. Livejournal users: going to move to a stabler system yet? At least if you screw up wordpress or a blosxom-like system, you do it one user at a time.
NP: Carpenters

11 January 2006

David Moreno Garza: Fucking asshole

Just as lots of people I know, in December I bought a PowerBook (yes, I know, don't bitch me about the new MacBook Pro). It's a 5,6 actually.
 
The day I bought it, I brought it to work and installed Sarge on it. After a while, I installed MacOS when, from the inside, it started to make a slightly hearable beep on random intervals. Suddenly, I figgured out that the installation went completely slow (it took about 4 hours to install MacOS). It was a Monday. I thought that wouldn't be a permanent problem since it used to be quiet for some times. On thursday that beep and the slowness became nuts. On Friday morning I had tons of work so I wasn't able to take it to the Apple service, besides I thought I could have it with me on the weekend since I was doing some work on Wikipedia.
 
On the weekend, I checked the Apple forums and found out that some people used to have the same problem and it was the hard disk drive the one causing troubles. "Alright, I can take it to the Apple center on Monday".
 
Monday. December 12nd, Our Lady of Guadalupe holiday, the fucking lazy bastards went on half-day off on the Apple service center. Motherfuckers, one more day.
 
Tuesday. "Here it is, it has these problems, and I found that it is the hard disk drive". "Right, we'll check it, give us a call on Thrusday".
 
Thrusday. "Yeah? This is David Moreno, I took my PowerBook with you guys, my reference ID is X". "Ah... The PowerBook?". "Yeah?". "A 15-inch G4 PowerBook?". "Yes". "Ah... well... Uhm... We're still on it". Fucking assholes, lazy bastards, hijos de la chingada,  they haven't even checked it. "Give us a call tomorrow, please". Bastards.
 
I was too busy on Friday, since Ana was in Mexico City, to remember (or even care, being with Ana Tongue out ) calling them. So, it was until Monday 19th.
 
"Hello? Remember me? I want to know the status of my PowerBook, my reference ID is X". "Yeah, we have already checked it, and the problem is not on the hard disk drive, the thing causing problems is the Super Drive". "Huh?". "Yeah, we will request a new Super Drive to the Monterrey office and change it, please give us a call in a couple of days". Fucking assholes!
 
They stopped working half week because of Christmas. I called them on Wednesday 4th. "Sure! You can come and pick it up, it's ready since before New Years". Stupid.
 
I started playing with my computer again and apparently, it was fixed! No problems any more that I could try to reproduce before. Last Friday, 6th, my buddies and I went to Guadalajara for a nice weekend. Yesterday, Monday, the computer started to fail again, with the same bloody problem. Today, I took it to the Apple service, again, with the same stupid fucking asshole shitty technic (my bullocks) guy. The MacOS Disk Utility now was warning about possible data loss and the hard disk drive going into shit. At least, that stupid couldn't say it was anything else.
 
Wearing a nice-person mask, I arrive today to the Apple service: "Hello, remember me? My PowerBook is still with problems". "What did we do to it?". Asshole. "You changed the Super Drive apparently since it was the one causing problems". Now his face changed like saying "Geez, what am I gonna do now...". "I want you to change my hard disk drive since now the installer is complaining since the partitions are all shit and cannot be recognized and...". "Right, I will ask for the hard disk drive to the local office now and your computer should be OK by tomorrow noon". How fucking things can change, can't they? Fucking asshole. "Thanks, I'll be here tomorrow noon".
 
 Yell I want my computer back!
 

5 January 2006

Ian Murdock: Standards and innovation

Bob Sutor: “Standards can allow innovation by providing a strong underlying foundation on which to build the new ideas. Do standards themselves need to be innovative? No, but they can lead to innovation downstream. Can waiting too long to create open standards hinder innovation? Absolutely, if de facto standards force or convince people not to try to innovate in certain areas. So please don’t simply say ’standards might hinder innovation.’ That’s overly simplistic and doesn’t take into account how things evolve over time.”

31 December 2005

Dirk Eddelbuettel: Quantian in VMWare Player: Create a virtual disk with qemu

A few days ago, I blogged about booting/running the Quantian iso via VMware Player, a 'free as in beer' virtualization tool. Over the last few days, I have experimented a little more, perused the VMware Player Forum and googled a bit. It turns out that you can employ the 'free as in speech' virtualization tool qemu (using version 0.7.2 from Debian unstable is fine, looks like a newer 0.8.0 it out upstream) to create a virtual disk image in vmdk format suitable for VMware. For example, the command
qemu-img create -f vmdk Quantian.vmdk 512M
creates a 512mb file of the given name in the in required vmdb format. By the way, qemu is smart and creates a much smaller file -- an 'empty' 512mb partition occupies only 12mb. It is then only a matter of updating the previously posted Quantian.vmx file to add the 'new disk'. I.e. instead of defining just one ide device, we now use two as per
# CDROM Info
ide0:0.present = "TRUE"
ide0:0.fileName = "quantian_0.7.9.1.iso"
ide0:0.deviceType = "cdrom-image"

# edd 31 Dec 2005 adding a virtual disk file
ide1:0.present = "TRUE"
ide1:0.filename = "Quantian.vmdk"
ide1:0.redo = ""
ide1:0.deviceType = "ata-hardDisk"
On the next reboot, Quantian will display a disk symbol for hdc. It it then a matter of starting a root shell in Quantian, running cfdisk or fdisk to partition the new "empty" disk drive and to add a /dev/hdc1 partition (or more), running mke2fs -j dev/hdc1 to add a filesystem --- and on a subsequent reboot, the disk is ready for use. It should thus be possible to create a suitable disk file of, say, ten or so gigabytes (given that Quantian expands to around seven gigs), create a filesystem and then run knx2hd to install Quantian onto the new virtual disk, make the disk bootable and, presto!, have a virtual instance of Quantian on stateful read/write media. While my tests have been limited to using a Linux host, this procedure should work just the same way in Windows. Oh, and as it's still early afternoon here: Best wishes for 2006 to everyone!

21 December 2005

Joerg Jaspert: No Job? Good start in a new year. :)

Well, following my resign at my current workplace for end of this year (only about 2 days of work left) I had some not so nice weeks in the past, but now it’s so near to the end that I’m happy that I did it. Ok, I will be without a job from January on, as the stuff I tried all didn’t work out (or maybe will, but much later than expected, but for now I just don’t count on it), but the last few weeks at work did make it clear that I would have resigned even without hoping for them. The only unfortunate thing is that I don’t get any money from the “job center”, but I never had any good experience with them, so well - nothing much lost. I just dont have money. :) Hrm, maybe I should start a “market”? But looking at AJs there isn’t much money out there. :)

20 December 2005

Joerg Jaspert: No Job? Good start in a new year. :)

Well, following my resign at my current workplace for end of this year (only about 2 days of work left) I had some not so nice weeks in the past, but now its so near to the end that I’m happy that I did it. Ok, I will be without a job from January on, as the stuff I tried all didn’t work out (or maybe will, but much later than expected, but for now I just dont count on it), but the last few weeks at work did make it clear that I would have resigned even without hoping for them. The only unfortunate thing is that I dont get any money from the “job center”, but I never had any good experience with them, so well - nothing much lost. I just dont have money. :) Hrm, maybe I should start a “market”? But looking at AJs there isnt much money out there. :)

15 November 2005

Jonathan McDowell: No more hardware today, please.

So, today has been a day of hardware. Some good, some bad. First, the good. Take one Via EPIA-M motherboard, add a helping of LinuxBIOS and Etherboot and let simmer for a few hours on a low heat. Then add a sprinkling of Phil Hands' d-i preseeding for the final garnish. Tweak to suit your tastes and lo and behold. A neat little motherboard that does proper serial console, boots d-i over the network via tftp and does a completely automated Debian install. Of course, it's not quite that easy. LinuxBIOS requires a few out of tree patches that are still under discussion. The latest version of Etherboot (5.4.1) doesn't seem to work (lots of rubbish on the serial console and no boot), but the version that does (5.2.6) requires a backport of the latest via-rhine driver to avoid leaving the network card in a state that Linux isn't happy with. And Phil's documentation could do with some updating (which I should really email him about). Oh, and add to that the fact that numerous things seem to assume that there is a PC BIOS and that it will support standard interrupts. Yeah, like that's going to happen. Still, I seem to have almost got there and it's quite funky to watch it all happen automatically. Kudos to the d-i team for the ease with which you can preseed. Flush with success I moved on to the next challenge; scanning some forms before posting them off. Nice and easy, normally. If it weren't for the fact that the machine with the SCSI card for the scanner just happens to be the one I stole for the above, and that the new case it's in doesn't allow any PCI cards. Bah. So, find a spare machine, get it into a state where I can actually drive the scanner, scan away. Took far too long. I really need to get it hooked up to my main machine, but there isn't enough desk space to have it close enough for the cables I've got. Perhaps I should crack and buy a USB scanner. I don't really need high quality, just something as an alternative to photocopying. After that trial I've moved on to upgrading my PVR box; I got a new 320GB HD today to replace the 40GB that I'd been using - it was getting to annoying to have to either watch or syphon off various series that I'm recording. While I had the box open I decided to upgrade the motherboard to something that might support wake-on-lan, so this turned into a bigger job than it should have been. :( I'm currently waiting for the data to copy across before trying to stick it back together. Bah. Don't suppose anyone has an S370 P-III better than 667MHz and no better than 1GHz they want to part with cheaply? I'm currently running a Celeron 800MHz (which I think is a slight step up from the previous PIII-667), but a little more oompfh would help with streaming over the network. I'd just upgrade to something modern, but I suspect the extra cost of silent cooling would be a killer.

6 November 2005

Andrew Pollock: [code] Obfuscating email addresses with JavaScript

So I got pet peeved by Carlos Laviola in relation to by recent pondering about how MacOS X's SSH agent starts up on login. Perfectly reasonable grounds for complaint. I have had people contact me in relation to blog posts in the past, so it's obviously not impossible. People know I'm a Debian developer and can put two and two together and wind up at db.debian.org. Anyway, I'm the first to admit that my blog probably has too many of the Weblog Usability Top Ten Design Mistakes (something for me to work on). To date, I've been avoiding plastering my email address on my website because I didn't want to get it harvested. I try and use a per-list email address for this reason as well, and I haven't enabled blog comments because of comment spam, and because I haven't been clever enough to implement comments with Blosxom full stop. So I started getting an idea for reversibly encrypting my email address on my blog after reading about Hashcash for Wordpress the other day. I first started playing around with the Vernam cipher in High School, when I wanted to easily reversibly obfuscate some data for something. I'd read about this cipher in a magazine or something and seen it implemented in Pascal (it's not exactly hard). So I happened upon the idea of encrypting my email address with the Vernam cipher. Turns out another chap's already got a page for encrypting and decrypting on the fly with JavaScript. It even generates the JavaScript for putting in your own web pages. I had to use a different key to avoid getting dollar signs in the encrypted string, as this confused the tripe out of Blosxom (and me for a while when I tried to figure out what was going wrong). Then I thought it'd be nice to explain to people who had JavaScript disabled what they might be missing out on, so I fiddled around with some DOM stuff, and had some text get displayed if JavaScript was disabled. When JavaScript is enabled, this text is replaced by the decrypted text. So of course, like the Wordpress Hashcash, this is largely relying on the inability of spam bots to grok JavaScript. Once they can, this obfuscation technique is all for naught. Meanwhile, you can email me bit more easily now if you get the urge. View the source of my blog for an example of the implementation.

3 November 2005

Radu Spineanu: Fun projects

Being almost friday and having a little bit of time and all i decided to create a new blog. Since my debian account was created recently i though 'why not' and added it to Planet Debian, among the best of the best.

Reading today the slashdot article about Nokia and opensource i remember about a project i did this summer. Following a question i posted about handling private keys on debian-security sometime in june someone emailed with this reply, which i found very interesting. And i actually wrote that, even though it's pretty rudimentary (authentication using mobile devices and assymetric keys).

Basically when you enter a username at the login prompt, the PAM modules looks up information about that user from a configuration file which contains the hwaddress of his assigned device and a path to a public key (either GPG or SSL). The PAM module then generates a temporary password, encrypts it with the users public key and sends it via bluetooth to the mobile device.

The Symbian part was a little tricky, and my first encounter with java. I implemented only SSL decryption capabilities because it's a faster decryption time (~4 sec on my 6630) , and because BouncyCastle's cryptography support for pgp is impossible to port to j2me with my java knowledge. Anyway i haven't seen assymetric key cryptography (oss) on mobile devices until this. Being in java it doesn't really use anything fancy, and it _should_ work on any mobile device supporting FileConnection API (jsr-75).

If you feel adventurous, you can find the source code here.

31 October 2005

Eric Warmenhoven: Selling options

There are lots of cases where you can have a positive view of a stock, but still want a bit of investment protection. A fairly typical way of getting some protection against a drop in price is to place a stop-loss order with your broker, so that if a stock hits a certain price that you set, the broker will automatically sell the stock. This limits your loss (known as downside protection), and if the price doesn’t go down, then you keep all the stock, and you get to take full advantage if the price goes up (known as upside participation). Also, it should be free to place a stop-loss order with your broker, unless the price is hit and the stock is sold. So, stop-loss orders have three benefits: downside protection, upside participation, and no up-front cost. Unfortunately, there are a couple downsides (no pun intended) to stop-loss orders. The first is that if a stock is really plummeting (there aren’t any buyers at all), then it may be difficult or impossible for your broker to get the price that you’ve specified. That’s sort of an extreme situation though and only happens about once every thirty years (think October 19, 1987). The other, much more likely, scenario is that the stock goes through a temporary decline (causing your stock to be sold), but then recovers. In that case, you’ve sold for a loss and you miss out on the recovery. So instead of placing a stop-loss order with your broker, you can purchase what’s called a protective put. A “put” is a contract that says the buyer of the put has the right (not an obligation; it’s the buyer’s choice) to sell stock on (or before, in most cases) a predetermined day at a predetermined price to the person who sold (”wrote”) the put. For example, today RHAT closed at $23.22; you can buy an option to sell 100 RHAT shares at $22.50 (the strike price) anytime between today and November 18, 2005 (the option expiration date) for $55 (as reported by Yahoo!). So you get downside protection and full upside participation, for a price. (There’s also a married put, which is the same thing as a protective put, except you buy the stock at the same time as the put; a protective put implies that you already own the stock.) But there is still the annoying up-front cost. If you’re willing to risk missing out on some of the potential upside though, you can offset the costs. A collar is when you buy a protective put and at the same time selling a call option. By selling (writing) a call, you give someone else the right (again, not the obligation) to buy shares on a predetermined date for a predetermined price. For example, say you do buy the protective put above, and at the same time, write a call option for 100 RHAT shares that expires on November 18, 2005 for a strike price of $25. The proceeds from this sale will be $30 (again, minus fees). So for a cost of $25 ($55 to buy the put minus $30 to write the call), you’ve got downside protection, and upside participation up to about 7.7%. All of this assumes that your preference is to keep the stock. But say that your stock has done very well and it’s gotten to be a sizeable part of your portfolio, and you’d like to diversify a bit. That means that you’re serious about selling it, regardless of what you think the price is going to do. (There are lots of good reasons to sell a stock that’s enjoyed nice gains, not the least of which is that nice gains are generally caused by nice growth, and a company can only grow so big.) Selling the stock outright is one technique; another is a variant of dollar-cost averaging, but instead of buying a fixed dollar amount, sell a fixed number of shares. But you can combine either of these with writing call options to potentially achieve even better results. A covered call is when you own a stock and write a call option on it (like a married put, a buy-write is when you buy the stock and write the call at the same time). Instead of selling the stock immediately, you give someone else the option to buy it from you at a predetermined future date. Because the date is in the future, there’s a bit of a premium that buyers will pay (which means more money for you). For example, November 18, 2005 calls for RHAT with a strike price of $22.50 are selling for $120 for 100 shares; that means that if the option is exercised, you make $22.50 from the sale, plus $1.20 per share from the option, for a total of $23.70 as your effective sale price. If the option is not exercised though, then your shares are not sold, but you get to keep the $120, and do the whole thing over again. (Unfortunately for me, Brocade has a company policy prohibiting collars and covered calls. But fortunately for me, I don’t own very much BRCDE stock.)

26 October 2005

Gunnar Wolf: Please describe yourself

Ok, so my brain is right now thinking on how to make Comas (my Conference Management System, which is quite nice, but somewhat unflexible. Sorry for the butt-ugly and incomplete webpage...) more flexible - And I have come accross some quite nice things. First of all, I want the fields for each person (the person table) to be easily modifiable, allowing me to add/remove attributes at will between different instances of Comas. Ok, this is the muscle behind my new idea. Yes, PostgreSQL-specific, as basically everything in Comas:
CREATE OR REPLACE VIEW table_attributes AS
SELECT c.relname AS tablename, a.attname AS attrname, t.typname AS type,
a.attnotnull AS required, d.description AS description FROM pg_class c
JOIN pg_attribute a ON a.attrelid=c.oid JOIN pg_type t ON a.atttypid=t.oid
LEFT OUTER JOIN pg_description d ON d.objoid=c.oid AND d.objsubid=a.attnum
WHERE a.attnum>0 AND a.attisdropped = 'f' AND c.relkind='r' AND c.relname
NOT LIKE 'pg_%' AND c.relname NOT LIKE 'sql_%'
ORDER BY tablename, a.attnum;

Nice, but still not enough - As with any other RDBMS, fields can not only hold data, but -of course- they can be foreign keys, referring to data in other tables. Ok, in order to check those relations and be able to build a map of the relations in my DB, I came up with this:
CREATE OR REPLACE VIEW related_tables AS
SELECT c1.relname AS referrer, c2.relname AS refered, a.attname AS ref_key
FROM pg_constraint con JOIN pg_class c1 ON con.conrelid=c1.oid JOIN pg_class c2
ON con.confrelid=c2.oid JOIN pg_attribute a ON c1.oid=a.attrelid AND
a.attnum=ANY(con.conkey) WHERE contype='f' ORDER BY c1.relname, c2.relname;

In the first query, note that I am excluding from what I report all the tables starting with pg_ or sql_ - While that's a usual convention in Postgres, there surely is a better way to do it, some attribute signalling it's a system catalog... But, at least for now, this covers my needs.
Anyway, this might come useful for your projects. PostgreSQL introspection is fun! (Yes, those two queries are the result of many lonely hours going through the documentation and a couple of spontaneous questions to several friends - But it's worth it!)

Andrew Pollock: [tech] New toys

We've been stocking up on gadgets for our upcoming trips. Camera Sarah's going to Singapore to catch up with some relatives and then joining me in the US a week or so later. As our digital camera is currently a 1 megapixel afterthought on our Sony DCR-PC100E Handycam of 5 and a bit years, we thought it high time we got something half-decent as a compact camera. I'm moderately keen on getting a digital SLR, and after using Mikal's Canon EOS 350D when we went to San Francisco for our Google interviews, wouldn't mind getting one of those down the track and doing a photography course. So we tossed up whether or not to get a compact now and an SLR later, or scrap the SLR, and get something in the middle like a Canon PowerShot S2 IS. We settled on getting a Nikon CoolPix 5900, partly because apparently all the PowerShots are stuck in Customs at the moment and there's none to be had in the country for love or money. iPaq and GPS There is no way I was going to drive in the US again without some form of satellite navigation in the car. There's just too much going on on the roads over there (not to mention driving on the other side of the road) to have to worry about how to get from A to B. We were just intending to buy a car that had satellite navigation when we got over there, and try our level best to get a hire car with one in the interim. Some friends were saying that we'd probably pay a lot more for a car with it as a built in option, than if we were to buy a handheld/portable GPS. Then Mikal bought a bluetooth GPS for his iPaq, and that convinced me to go that way as well. So I bought an iPaq hx2100, which interestingly seems to have just fallen off HP's website (it was there on the weekend), so it must be approaching obsolescence or something. Today I got the Destinator software with maps for the US, and some evaluation maps for Australia, and tonight Sarah and I went for a spin to try it out. It was pretty cool. One thing that could be better is the differentiation between the directions leading up to a turn and turn itself. For example, it says "Turn right in 300 metres" and then proceeds to count down (e.g. "Turn right in 100 metres". Then it just says "Turn right". It'd be more obvious if you didn't have to listen for whether it was "in x metres" or not and either tacked "now" on the start or end of the final direction. It was also cute how it called roundabouts "circles". Going straight through a typical roundabout was "Take the second exit on the circle". If you ignored directions at some point, it'd plot a new route to still get you to your destination. All in all, I'm pretty happy with that purchase. The bluetooth GPS unit itself is cool. I'm able to talk to it from our PowerBook under MacOS X as a bluetooth serial port, and I'm yet to try the same with Linux on my D610. Hopefully I'll be able to get it work with gpsdrive The one downside with getting an iPaq and running Pocket PC 2003 (or WinCE as I prefer to call it) is it's forcing me to spend more time in Windows on my laptop than I otherwise would, just so I can do syncs and stuff. Hopefully once I've got the iPaq all bedded down, that'll change...

25 October 2005

Martin Michlmayr: Krak w, sightseeing

I spent a few days in Krak w, Poland for the CALIBRE workshop on Quality, Security and Safety and for KKIO 2005 and I used this opportunity to do some sightseeing. After the workshop on Tuesday, Matthijs den Besten and I wandered around the city for a a few hours, then went back to the hotel for a swim, just in time to go for dinner with the CALIBRE people. We went to a restaurant which served traditional food from the 17th century. It was a really amazing place with animal fur and carpets on the wall, big wooden tables and menus which had nice drawings on them. We had a selection of different food which we shared and it was really great. The following day, as part of KKIO, dinner was served in the Wieliczka salt mine after we went on a tour of it. It's pretty amazing what kind of art you can make out of salt. On Thursday, I did some more sightseeing, basically walking around the city center and looking at some of the nice attractions. Which turns out to be churches, given that this is Poland. I particularly liked the basilica of the holy trinity but many other sights, such as Wawel castle, were pretty impressive too.

24 October 2005

Pierre Habouzit: php-json-ext_1.0.7-2_i386.changes ACCEPTED

I took me 3 uploads (no less) to have php-json accepted (ITP: #333805). I just can't believe I was so inattentive and clumsy. Two times was it License issues. Third time a basic packaging error (missing debian/changelog). I've reworked my packages from scratch using cdbs, and it now works well. *phew* My appologies to the ftp-masters again (that lost a big amount of time because of guys like me, so many times that Ganeff even blogged about it) /me hides

Next.

Previous.