Archive for November, 2004

python 2.4 final released

Tuesday, November 30th, 2004

Python 2.4 final released 18 months after 2.3. Highlights.

Python prompt from explorer (Python Cookbook)

Tuesday, November 30th, 2004

Python Cookbook : Python prompt from explorer

Wired News: Sleep Disorders Traced to Genes

Tuesday, November 30th, 2004

Wired News: Sleep Disorders Traced to Genes.

See also: bio alarm clock (here), normal circadian rhythms (here), Delayed Sleep Phase Syndrome (elsewhere).

misc. strongbad flash cartoons batch download

Friday, November 26th, 2004

wgets and cURLs ยป Strongbad email download these flash cartoons in bulk. something to distract you from the fact you don’t play computer games any more so half-life2 is right out.

we have the intertron in casa now, wireless styley so we will bust some special E-Mail(TM) moves tonight if cameron’s crap computer doesn’t crap out. it still doesn’t have sound configured after about 12 years, not even system bell. Ascetic Linux Distro (codename: shivering wreck). takes 10 mins to process the first box login, for example. what’s that about?

meanwhile i have to think of what to spend some dollar money on before it turns into little witches and shrivels up leaving only little shoes, or full size ones but not ones redeemable for serious euro-nugget. but now that i have this “jive messenger” jabber server i don’t really need anything else. (jvm 1.5 required, but the install seems clean on win and linux (c.f. oracle “a plague on both your houses” database)) So i can’t think what else I need. Plane tickets prices don’t reflect the cost of air travel. Perhaps… a scroll of genocide for Rupert Murdoch.

I saw and really liked “the butterfly effect” movie. Hard work for the female lead, I would have thought.

bugmenot firefox extension. Right-click over any login form (say for the nytimes) and choose bugmenot, and the extension will lookup and populate the form with a login, passwd from the bugmenot site, if possible. working fine with firefox 1.

um. Invention and Technology a print magazine, of which a feature article is available every issue.

MetaFilter | How not to pull a car out of the water: A visual guide

Friday, November 19th, 2004

How not to pull a car out of the water: A visual guide

via MetaFilter.

Slashdot | Art Tips For Programmers?

Tuesday, November 16th, 2004

Slashdot | Art Tips For Programmers?

poignant guide to ruby

Monday, November 15th, 2004

Even if you’re not interested in learning another programming language, you might take a look at Why’s (Poignant) Guide to Ruby. It is clearly a work of passion and madness. All tech books should be like this but thankfully they aren’t. Very good but I gave up reading it. etc.

greimblog: explode any web pages lately?

Friday, November 12th, 2004

web page exploder bookmarklet. Similar to some of the mozilla/firefox webdeveloper tools. Pretty, primarily because of the zap it does on a lot of unimportant presentational material.

Scotland smoking ban

Friday, November 12th, 2004

Scotland smoking ban to go ahead. By Spring 2006.

Now just to get the portuguese to stop chain-smoking in the restaraunts here.

20 Reasons Why you shouldn’t post your picture on the internet

Friday, November 5th, 2004

20 Reasons Why you shouldn’t post your picture on the internet. funny.

trouble-shooting linux’s: someservice “died but subsys locked”

Thursday, November 4th, 2004

A tip for trouble-shooting the generic linux error “myservice died but subsys locked”, or for any service that won’t start up.

It seems this is commonly caused by an error in your config which will cause your service to die at startup, and not clean the lock file. That would be a bug in your service init script (which you probably didn’t write). Here, I’m going to assume the lock-file part really isn’t important - we want to get the service to start and stop correctly.

Where’s the error from the failed startup? Good question. Here’s how to re-run the service startup and capture the error. I use as an example vsftpd.

Google was particularly unhelpful so when I found this tip I thought i’d get it indexed properly. Cheers Laurentiu Badea

> bash# bash
> bash# set +x
> bash# . /etc/rc.d/init.d/vsftpd start   # notice the dot, it means "source"
Starting vsftpd for vsftpd: 500 OOPS: bad bool value in config file for: anonymous_enable
 [1]+  Exit 1                  /usr/sbin/vsftpd $i

Don’t forget the first line to open another shell, or the last command will close your current shell (perhaps thereby logging you out).

Repair your config, delete the lock file (/var/lock/subsys/yourservicehere) if you’re sure no such process is running, and start the service again.

This error doesn’t make it to your service’s log (e.g. vsftpd.log) because that service hasn’t yet started (and the location of the log is specified in the config file, which is probably screwed or you wouldn’t be here). Why it doesn’t make it to /var/log/messages or some other log is what I’m off to read about now, but I can guess the answer is something to do with keeping you late on a Friday.

Anyone with the real story, I’d love to hear it.

On a related note, if in vsftpd you’re getting “bad bool value” or “bad int value”, or “bad string value” even though the value looks good, it’s because someone has helpfully put dos end-of-lines on your file, and you can’t see them because the editor you’re using is too good.

Note to self: if you rely on files NOT having DOS end-of-lines, make sure your editor or pager pukes when it sees them. Better still write some script to look for the regexp in all text files.

crap ruby script to update a page in a usemod 1.0 wiki

Wednesday, November 3rd, 2004

Dreadful ruby code to update (overwrite) a wiki page. my first useful ruby program. usemod 1.0. doubtless there’s an API i’m missing. this isn’t it.

LJV - A lightweight java visualiser for teaching data structures (or debugging)

Wednesday, November 3rd, 2004

LJV-demo-graph-6.png

LJV.java is tool for visualizing Java data structures, using Graphviz It has been used to good effect in a CS1 and CS2-level data structures course. The software is available under the GNU General Public License.” - John Hamer, University of Auckland.

There goes tonight’s project, then. I’d just got into graphviz and right now it looks like a good big hammer. :-)

The above was generated by:

            LJV.Context ctx = LJV.newContext();
            ctx.outputFormat = "png";
            if (false)
                ctx.treatAsPrimitive(String.class);
            else
            {
                ctx.ignoreField("hash");
                ctx.ignoreField("count");
                ctx.ignoreField("offset");
            }
            ArrayList a = new ArrayList();
            a.add(new Person("Albert", true, 35));
            a.add(new Person("Betty", false, 20));
            a.add(new java.awt.Point(100, -100));
            LJV.drawGraph(ctx, a);

One can see that the only tricky work in the above seems to be telling LJV what not to draw. That could be hidden away from students, initially.

Of course, graphviz can make many outputs so you could have this create an image map within html docs, where the Person instances are hyperlinks to the javadoc for that class. (Alternatively, you could admit that programmer have enough access already to their javadoc and could hyperlink it instead to something genuinely useful to them.)

There are many graphviz resources. If you’re diving right in, start at the User Guide for Dot and the User Guide for neato (for directed and undirected graphs, respectively).

There’s an API called ruby-graphviz for programmatically creating graph files for dot and coordinating dot’s preparation of them.

Python Regex Debugger - Kodos

Monday, November 1st, 2004

In the unhappy event you have to work with regexps, here’s a great tool, Kodos - The Python Regex Debugger.

Some people, when confronted with a problem, think “I know, I’ll use regular expressions”. Now they have two problems.

Jamie Zawinski, on comp.lang.emacs

Updated: much the same for perl-compatible reg-exps: The regex coach.

A Comparative Look At Some Ruby Idioms

Monday, November 1st, 2004

A Comparative Look At Some Ruby Idioms. A nice quick comparison of how to do common stuff in ruby, vs how you’d do it in c, c++, java, perl.