Wednesday, 13 January 2010

Occams Razor

We are amused:




Doubt Occam (a monk!) would have appreciated this use, though it is a perfectly good application of the idea.

Sunday, 10 January 2010

If I had a garden this is what I'd grow - 2010-01-09 at 11-28-51

This photo seems to be getting a rather staggering amount of attention on Flickr. Once again I suspect that the key to getting Flickr hits is SEO not the photographs inate qualities.

Last time I got this much attention was for a picture that had Fedora and Thinkpad in it's comments. This time around I think it's Lisp and Emacs that are driving the hits.

HTML5 and all that

So..

Firstly a quick update re: clojure. I'm still using it, productively and occasionally frustraitedly. Most frustration comes from my lack of available time and the relative newness of the language. Now Clojure is 2 years old there are often libraries are available to do things in a way idiomatic to Clojure rather than just using Java libraries directly, however there's no a great deal of documentation of examples for these libraries. I suspect these frustrations will only disapear with time. XML parsing and processing in particular seems a little trickier than it should be given the good built in support and the given that XML is almost a LISP datastructure to start with. Ho hum..

Anyhow, right now I am taking some time to make myself familiar with HTML5. So far so good - it seems a sensible, pragmatic and useful upgrade to the the markup and API standards, with several intreging operunities to move away from annoying plugin technology (Flash and Google Gears spring to mind). I come more from the XHTML camp than the HTML 4 camp (though I have been writing HTML since the mid 1990s) so I am a little disappointed that HTML5 seems to move us to a situation where HTML as valid XML is seen a backwards compatibility issue (please let me know if that's a false impression!).

Naturally when looking into these things I am working on small example files, and by extension that means I am using nxml mode in Emacs. That means I need to get a relax-ng setup for HTML5, I started doing this hit a bump in the first few seconds and in the first google search I hit a ready made solution. Edward O'Connor has put together html5-el for which I am extremely grateful. Thanks Edward!

Friday, 27 March 2009

Mac foo I learned today

Long time no post! Ho hum, been busy as ever.

Anyhow, for my own benefit just wanted to write down some Mac foo I learned today.

I was searching for the Mac equivalent of the Linux "eject" command. Lots of people online are spouting off about needing to reboot their macs and hold down keys to eject disks that aren't recognised, but what you really need is:

hdiutil eject /dev/disk1


Tuesday, 13 January 2009

Some good Clojure news, some bad Clojure news

So... first the bad news.

I've had to drop the Qt port of my little Clojure recruitment database. I was just hitting too many problems using Qt-Jambi and it was taking too long. The client needed a working database ASAP and I wasn't gonna get there. At the same time I also learned to use Apple's Core Data on Mac Os X 10.5 (which my client is running) and I managed to turn the bulk of the project around in an evening. It was one of those evenings where I couldn't sleep and in a way I am just glad to get the database out there and running - especially as "the client" is also my girlfrend :-)

The good news comes in two forms. One, getting the DB off my plate means I have more evening time to play with more interesting Clojure projects; two another Beta version of Stuart Halloway's book "Programming Clojure" came out. I intend to read some of the new chapters, particularly the one on Swing (which until now I have found clunky).

Friday, 9 January 2009

So, for fun, I did this little quiz:

http://www.gotoquiz.com/do_you_have_biblical_morals

Here are the results, I am sure you'll agree, shocking results. Who knew :-)

Your morality is 0% in line with that of the bible.
 

Damn you heathen! Your book learnin' has done warped your mind. You shall not be invited next time I sacrifice a goat.

Do You Have Biblical Morals?
Take More Quizzes

Sunday, 30 November 2008

AOT problem solved

Thanks to the swift responses of the Clojure google group I have got past my little problem. It was, of course, deceptively simple, but not clear to someone who doesn't do Java programming much.

The problem was basically that whatever I did I could not get Clojure to recognise that the source files existed in the classpath.

When you invoke java with the
-jar
command line option it completely ignores the classpath (both the environment variable, or the
-cp
argument.

So, when compiling my code I simply switch this:


java -cp ./classes:./src -jar ${HOME}/src/clojure/clojure.jar ./compile.clj


.. to this ...


java -cp ./classes:./src:${HOME}/src/clojure/clojure/jar clojure.lang.Script ./compile.clj


For the record the contents of
compile.clj
are as follows:


(binding [*compile-path* "/home/gteale/src/aot_test/classes"]
(compile 'de.teale.test))


I plan to replace that with either ant or lancet shortly.