Thursday, June 7, 2007

i am, at least in the non-programming sense, fairly functional

hooray, for i did the first iteration of MusicXML export in less than a day. I had a little bit of fighting with lisp, particularly where I tried to be extra lispy and use mapcar. Eventually, I realized that mapcar just wasn't doing what I wanted and I switched it to loop. I felt like I cheated a little, since I know that some lispers consider loop to be insufficiently lispy, and one of my major goals for the summer is to be able to think in lisp, whatever that means. On the other hand, I think the real spirit of lisp is probably more along the lines of this programming language makes it easier for you to hack code. Given that as an ethos, using loop allowed me to meet my goal, and got me there significantly faster than figuring out the right functional way would have. hence it was the right choice.

Wednesday, June 6, 2007

in the beginning was the note

well it's a milestone day here, as I have reached the point where saying the magic words (gsharp::gsharp-common (parse-mxml (musicxml-document "tests/helloworld.xml")) nil "Gsharp" 900 600) to SLIME produce this window: Exciting stuff I know. I'm actually a bit behind where I'd like to be at this point, and would like to have had this and the complimentary code that translates it back into XML done by now. Part of my delay was that, in spite of my illustrious proposal, I found it difficult to avoid feature creep as I wrote the initial, very simple version of my parsing function. Without really realizing what I was doing, at one point I was trying to work in support for multiple staffs and multiple parts in this initial version—big mistake. Once I came to my senses this came together pretty quickly.

I have hit a few snags along my way, including a bug in Gsharp itself, but my mentor has been helpful and the snags have so far been minor, especially compared to my Lisp inexperience which is still the major stumbling block. I don't expect that to change anytime soon, but I'm okay with it because part of the reason I wanted to do this project was that I knew I'd never learn lisp well enough to be useful unless I had a project that I needed to execute with it.