(no subject) [entries|reading|network|archive]
simont

[ userinfo | dreamwidth userinfo ]
[ archive | journal archive ]

Mon 2002-07-08 13:39

When I'm sitting in front of a computer and I get bored, I usually type a series of commands that check whether I have any new email, any new netnews, anything new on GROGGS, or anything new in any of the livejournals I read.

Today I got sick of typing four different commands, so I wrote a wrapper that brings them all together. Now I just type "bored" and the machine automatically goes and checks all my usual haunts for me.

I'm already thinking this may have been a mistake: the act of typing four separate commands and dithering in between them usually occupied up to a minute, but now I have the "bored" command it takes more like two seconds. This gives me an extra 58 seconds to spend actually being bored, so I'm unconvinced that it's an improvement! :-)

LinkReply
[identity profile] enslore.livejournal.comMon 2002-07-08 06:12
That's excellent. I want one! I'm always bored.
Link Reply to this
(Anonymous)Wed 2002-07-10 14:45
More options
The script should do something interesting (maybe violent?) when invoked with "now" as the first argument.
Link Reply to this
[identity profile] kilinrax.livejournal.comThu 2002-07-11 06:14
I think I'm suffering from some kind of unhealthy language bias. Took one look at the source for bored and ljpoll and my immediate response was to mentally rewrite them in Perl.
Link Reply to this | Thread
[personal profile] simontThu 2002-07-11 06:20
*blinks*
Ooh, that scared me. It took me a moment to work out that yes, of course, you have an ixion account so no wonder you can see them :-)

The LJ stuff works well in Python because urllib handles all the messy details of HTTP POST requests. I'm sure bored could have been just as easily done in Perl but I seem to have been on a Python kick recently. If I'd just been writing a load of other stuff in Perl I might perfectly well have done it in Perl...

(Anyway, if you want a heart attack look at ljscan, which was what I used instead of ljpoll before I had an LJ account :-)
Link Reply to this | Parent | Thread
[identity profile] kilinrax.livejournal.comThu 2002-07-11 09:25
Re: *blinks*
*grins*. Sorry about that.

I wasn't criticising you're choice of language; my point was that writing it in python is a perfectly reasonable thing to do. That my brain immediately decided to translate it into Perl in order to understand it either displays an excessive bias towards Perl, or a fluency in it that vastly exceeds that which I possess in most other languages.
Whichever it is; I feel this needs to be rectified ;}
Link Reply to this | Parent
navigation
[ go | Previous Entry | Next Entry ]
[ add | to Memories ]