MarbleMice.com

Hacking the trees of knowledge.

Archive for May, 2009

It is 1986 all over again.

without comments

It occurred to me in the past week or so I did not have a feel for what lisp is capable of. I have been learning all the components of Clojure and trying to figuring out how they hang together. But I really want to “stand on the shoulders of giants” and gain this insight as rapidly as possible rather than gradually absorbing it over the years.

Clojure is a dialect of lisp and there is a set of classic videos from1986 to help out. These videos are basically the old MIT course that introduced programming to undergrads at MIT, it was replaced only a few years ago. The lectures where videoed when they were given it to a bunch of people at HP in 1986.

I particularly liked the symbolic differentiation lecture. This used to be an example program I would code when learning a new language. At the end of one lecture they had reached a point where I had often reached. The following lecture they explained that they could go further and create a pattern matching interpreter for trees and then just supply the rules for symbolic differentiation. This same interpreter could then be re-used for equation simplification and
other things. Great stuff.

I am just over halfway through and to be honest some parts are a little slow and this really due to the fact some of the ideas they are arguing for are now common place and they are really aimed as an introduction to programming.

I suppose because of this the focus is not on lisp in itself but to use lisp to express the ideas they are trying to convey as precisely as possible, I often find myself considering how the same ideas could be expressed in C++/Java and it seem in terms of code size and ease of implementation lisp is a winner. I don’t feel qualified to comment on how other high level languages compare with lisp.

In all there are well over 20 hours of lectures and assuming you know a little bit of a lisp like language there is plenty of insight to be gained from watching them.  You can also find them on YouTube and Google Video.

Written by birdle

May 28th, 2009 at 7:21 pm

Posted in General

Tagged with ,

May Update

without comments

Been a slow few weeks for programming round here. I hit on some problems with the nimbus look and feel and putting a titled border. The border was not positioned correctly. Worked for other look and feels. I was about to sort out an equivalent Java version just to check I am not making some mistake in Clojure but starting thinking a JSlider was not really the UI component that was needed.

Basically I want a UI component for setting the frequency of a sound wave. The range of frequencies a human can hear is a few orders of magnitude making a slider is next to useless for fine control. I am aiming for a complete mouse based work flow so a text entry box is not really an option. The added spice is I want some frequencies marked as interesting and let the user know via this component. As they sets a frequency they will know if it is close to an interesting frequency.

I am not sure if that makes much sense and if id does it probably sounds more exciting than it is. The project is still a learning vehicle for Clojure, even though I seem to be spending a lot of time working in UI code rather than interesting computational stuff. MigLayout is still one of the best things I have come across in the Java world.

Written by birdle

May 27th, 2009 at 10:03 pm

Posted in General

A Little Tidy Up.

without comments

For some reason, over lunch, I decided to go over my blog archives and delete a few posts. Most things where I had said some silly things. I am not sure if that is against the spirit of blogging? Most of the pages did not say anything useful, insightful or for that matter get any visits. I just viewed it as a bit of a spring clean.

Written by birdle

May 26th, 2009 at 1:10 pm

Posted in General

Tired Mind Programming

with 2 comments

Last Sunday I ran a marathon. It was my second one and I am not exactly a racing snake in terms of body build but struggled through. Sunday night I crashed in front of a movie…

Monday night I was still a little bit frazzled in the evening – yep long recovery. What’s interesting is I was able to slip into a little bit of coding with Clojure. Usually when I am in the sort of state I don’t fire up my editor, well I sometimes try but never really get much done.

I think it is the lack of a proper compile stage really helps as once my tried brain caught the train of thought there were no interruptions to derail proverbial train. Of course it maybe in a few days time I look at the code and decide that it was not such a good idea to code tried.

Moral of the story: Clojure is good for the tired mind that wants to get stuff done!

Written by birdle

May 5th, 2009 at 8:10 pm

Posted in General