Friday, September 30, 2005

data: & RDF/XML - like magic

I can do this, but should I?

It's a data: scheme URI with an RDF/XML document in it. Right click, and copy it. Paste it into a new tab if you like.

Here It Is With Base 64.

A bit shorter :)

Hixie's toy is kind of fun.

I've got GRDDL and the rel attribute, now I've got small chunks of data to use as pointers to more RDF.

The only question I have to ask myself, is... should I?

Thursday, September 29, 2005

Tao

Tao is good.

You Know Things Are A Bit Nutty When...

Bug #88512 is regarded as invalid because the HTML WG authors forgot to explicitly mention that of course readonly would apply to checkboxes and radio buttons.

Hello? Prinicple of least surprise, anyone?

Friday, September 23, 2005

Validating Australian Data In PHP

Services_ABR and
Validate_AU.

Two proposals I just put in today after fooling around at work :)

Have a play and see what you think, suggestions welcomed on further Australian numbers, strings, etc that would fit into Validate_AU!

Thursday, September 22, 2005

Perl: So, anyway...

I finally compiled gaim-1.5.0 with perl support. Holy Fucking Shit.

I even got it to respond to incoming/outgoing message signals. One lunch break soon, I’m going to have something actually working :D




I’m also eying Net::Jabber from a distance to cut out the middleman of gaim and provide a UI-less resource of some kind: daniel.oconnor@gmail.com/search




I don’t know if I should just hijack an instance of gaim for it, compiled so you can run multiple instances, or if I should run with Net::Jabber.




But, it’s early, I just rode my bike in the rain to work and I should probably actually do some!




Tuesday, September 20, 2005

For The Hell Of It

ForStatementΉ

Wonderful, I can use a foreach() type construct. But, how do I get to the Nth statement? Luckily, snippets can help.



function __item(data, n) {
var i = 0;
for (key in data) {
if (i == n) {
return data[key];
}
i++;
}

return false;
}

Monday, September 19, 2005

Useful

http://gaim-extprefs.sourceforge.net/bef.shtml

Friday, September 16, 2005

22 seconds of your life.


SELECT *

FROM tbl_panel_funder
WHERE cl_funder_id IN
(
SELECT cl_funder_id
FROM tbl_funder_accreditation
WHERE valfirm_id = '7'
)
AND
panel_id = '987657441'

LIMIT 1;


VS


SELECT f.*
FROM tbl_panel_funder f

JOIN tbl_funder_accreditation fa
ON f.cl_funder_id = fa.cl_funder_id


WHERE fa.valfirm_id = ?
AND f.panel_id = ?

LIMIT 1

Net_Jabber / Net_XMPP & Nodel

It doesn't exist yet.

It Should.

Other toolkits I'd kill for


Imagine:
Easily being able to query your database, webservices, or more via an instant message. To me, it's bring back the command line to the real time web.


In other news, I've spotted what looks to be a highly interesting thing to play with in python, Nodel.

If I can get past today's workload, I feel some tinkering coming along :)

Thursday, September 15, 2005

ExceptionCollection

What a fantastic idea.

Software by subscription - track unexpected errors and such and make a business out of it.

Wednesday, September 14, 2005

Finally

It's always puzzled me why car media players don't take USB sticks. Finally someone is fixing that.

Tuesday, September 13, 2005

Oops!

Getfridged.

But... actually working.

Trust The Archive Guys

AGLS and DublinCore meets SA government records.

WOW.

Time to extract this into RDF!

Freedom of Information

FOI in Australia.

$30 application fee? Processing fee? Puh-lease. Information was born to be free.

The bits I like:
Remission of fees can be sought having regard to, amongst other factors, financial hardship or public interest.



What FOI decisions can I appeal against?

  • Decisions not letting you see what you want, when you want it, or in the form you want it.
  • Decisions relating to remission of an application fee.
  • Decisions imposing a charge to see what you want.
  • Decisions in respect of the amount of the charge imposed upon you.
  • Decisions refusing to change or annotate documents about you which you think are incomplete, incorrect, out of date or misleading.
  • Decisions letting others see documents which you say would unreasonably disclose:
  1. your personal information;
  2. your lawful business or professional affairs;
  3. lawful business, commercial or financial affairs of your firm.
  • Decisions to give you access to documents about your physical or mental health through a qualified person and not directly to you.


The bits I don't:

Application fees

  • There is an application fee of $30 for FOI requests.
  • There is a separate application fee of $40 for internal review of a decision.

Processing charges

The charge for locating documents is $15 per hour.
  • The charge for agencies' decision-making and consultation time is $20 per hour.
  • There are charges in relation to the provision of access (eg: 10c per photocopy, $6.25 per half hour supervised inspection and special rates for special services such as tape transcription or computer output).
  • Requests for personal information may incur a maximum charge of two hours for locating documents and a further two hours for decision making time.
  • However, full rates for the provision of access apply.



So, we have to find things that are Sodding Interesting to the General Public. Then ask for them in RDF [AGLS in government speak]. Exposed to the web. Free of charge.

Suggestions, people!

Murder Planning

I'm about to kill our database :/

8,100ish INSERT queries.
4000ish SELECT queries.
Needs to execute in around 5 minutes or less.

I'm worried about poor little mysql on our development box - the thing is being held together with rust. If anyone would like to help me hide the body box when I'm done, let me know :)

Sunday, September 11, 2005

A Snake In Redland

Fucked off that I couldn't get the php bindings for reland working under windows, and impressed that I could... you know... use python with a bit of guessing, I'm starting something.

I like the ActiveState installers a lot. Go get Python 2.4 for your windows boxen.
Next, Redland win32 bindings.

Install everything.

Start the Interactive Shell.

Enter the following.

import RDF

model = RDF.Model()
print model

You should then have a nice bit of well formed, but empty RDF/XML. Let's add stuff.



o = RDF.Node(RDF.Uri("http://www.person.com/me/"))
p = RDF.Node(RDF.Uri("http://xmlns.com/foaf/0.1/"))
s = RDF.Node(RDF.Uri("http://www.person.com/you/"))

t = RDF.Statement(o,p,s)

model.append(t)

print model


Holy smokes, batman! We've just added a triple to our RDF. Not exactly what we wanted, though - we'd be better off describing a me knows you relationship in a well known vocabulary - FOAF for instance.

Sadly, crschmidt tells me, "the redland serialiser sucks! Pass it through cwm."

More tinkering, and we come up with the following:

import RDF

rdf = RDF.NS("http://www.w3.org/1999/02/22-rdf-syntax-ns#")
foaf = RDF.NS("http://xmlns.com/foaf/0.1/")
model = RDF.Model()
serial = RDF.RDFXMLSerializer()


o = RDF.Node(RDF.Uri("http://www.me.com/"))
p = RDF.Node(rdf['type'])
s = RDF.Node(foaf['Person'))

me = RDF.Statement(o,p,s)

o = RDF.Node(RDF.Uri("http://www.you.com/"))
you = RDF.Statement(o,p,s)

p = RDF.Node(foaf['knows'])

knows = RDF.Statement(o,p,RDF.Uri("http://www.me.com/"))

model.append(me)
model.append(you)
model.append(knows)
serial.set_namespace('foaf','http://xmlns.com/foaf/0.1/')

RDF.RDFXMLSerializer.serialize_model_to_file(serial,"d:/out.rdf", model)


Valid RDF is produced, though we can clean it up a bit with a run through CWM.

Redland:

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="http://www.me.com/">
<rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
</rdf:Description>
<rdf:Description rdf:about="http://www.you.com/">
<rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
</rdf:Description>
<rdf:Description rdf:about="http://www.you.com/">
<foaf:knows rdf:resource="http://www.me.com/"/>
</rdf:Description>
</rdf:RDF>


Redland + CWM:

<!-- Processed by Id: cwm.py,v 1.164 2004/10/28 17:41:59 timbl Exp -->
<!-- using base file:///out.rdf-->


<rdf:RDF xmlns="http://xmlns.com/foaf/0.1/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

<Person rdf:about="http://www.me.com/">
</Person>

<Person rdf:about="http://www.you.com/">
<knows rdf:resource="http://www.me.com/"/>
</Person>
</rdf:RDF>


In total it took me about two hours - most of that time spent hearing about poor baby lambs from Chloe, my roommate, rather than learning.

Alright, we can create an serialise any kind of RDF we want now, where to next?

PyGAIM

Oh, oh oh oh, oh.


pygaim.

I've just spent a good portion of the afternoon cycling about, getting lost, confused, rained on, shown python, playing with development versions of feedtagger, laughing at Windows Longhorn Vista, and now... after touching the python interpretter for the first time in my entire life (without, you know, being confused), I've found pygaim.

I think I'm actually going to put in the effort of learning: I guess this means yet another 43things goal to do.

Holy Fucking Shit

Redland, Windows, PHP5.


The semantic web just got a little bit more tangible!

Saturday, September 10, 2005

Goal: Roll my own copy of gaim with perl support

So I can finish my toy application before I die of old age.

Perl seems a snap.

Put Up Or Shut Up

I cannot be assed reregistering ahsonline.com.au, thus getting my old blog stylesheet back. So, here's a garish placeholder. Looks meaty enough.


Oh, and on request, I'm rerolling Services_Upcoming a bit.

Wednesday, September 07, 2005

Roundup of GAIM feedback

http://www.wormus.com/aaron/stories/2005/04/07/dear-michael.html


http://www.createblog.com/forums/lofiversion/index.php/t98902.html


http://episteme.arstechnica.com/groupee/forums/a/tpc/f/99609816/m/482005494731/r/471008994731 [trillian sucks]

http://www.chipx86.com/blog/archives/000011.html [status]

http://corp.feedster.com/blog/archives/2003/09/gaim_frustratio.html [2003]




Reconnecting:
3 out of 5 No doubt a good app but has a very annoying usability problem. It simply can't be quiet. Every time it has to reconnect due to lost connection it pops up. Damn annoying! So I'll only give it a rating of 3.

Transfers:
Gaim has really great potential, but at the moment it's still somewhat limited. There are also some hideously ugly UI elements in there (e.g. the dialog for recieving file transfers is one of the most revolting and unfriendly that I have ever seen). What's wrong with using a standard api call to call the native dialog of the OS that it's being run on?

Buddy List Sizing:
Maayyybbbe the best all-around IM client. Although the initial interface is plenty U-G-L-Y.

I hate to say this but Gaim has one large drawback.

For some godforsaken reason I can't resize the contact list windows to as narrow as I want/need. And unfortunately that's just a dealbreaker for me, because if I can't resize it to fit captured in my Desktop Sidebar so it's always on top, it's useless to me.

Until they fix this, it's Miranda and Trillian for me still. If they ever do fix it, maybe I'll revisit it...

Sunday, September 04, 2005