Quantum Mechanic

Content from 2009-03

Project Euler

posted on 2009-03-21 04:36:00

Today is a marvelous day, because today I found out about Project Euler, which means I'll never want for programming tasks again. Sometimes I really think that all it takes is for someone to decide what (possibly) pointless task you should do, and then you can do it, as opposed to deciding to do it on your own, in which case, you are crazy. In any event, here is my first solution (working with Lisp):

;; Sum all of the multiples of 3 or 5 less than 1000

(loop for i from 1 to 999 when (or (= (mod i 5) 0) (= (mod i 3) 0))

sum i)

For the answer - you'll just have to run it yourself. This taught me a fair bit about Lisp loop forms. They are quite extensive and somewhat confusing. Just when you get used to putting everything into parenthesis, they decid you should actually be typing sentences.

Indeed, it seems like you barely need to write anything except the loop statement. This may just be me not quite getting function programming yet. For example, my solution to problem 2:

(defun fibonacci (n)

(if (<>

This is quite clunky, I think. We have to calculate the result of the fibonacci function many times (there are, apparently, around 180 even fibonacci numbers smaller than 4000000). I'm still not sure how to do this better, but, I fully intend to consider finding out.

Of Punks and Phonemes

posted on 2009-03-16 04:17:00

On Friday the 13th of March, I finally got to see Propagandhi in concert!I was not sure what to expect from my favorite Anarchist, Feminist,Anti-Fascist, etc. band, but they certainly didn't disappoint. I knew the music would be good - and seeing them in concert only drove home the notion that they are actually rather good at what they do. The speed and variety of music they play is, I think, really quite impressive. That said, Jord looks intense enough while playing to be very convincing as someone very invested in what they're doing.

I was also happy to see the AK Press being tabled by a local, communal bookshop. I bought a copy of The Modern School Movement: Anarchism And Education In The United States, which sounded really neat. I'm interested in education reform, having been at the mercy of the US education system for some years now, and sometimes finding it wanting for common sense and sympathy.

I've also been excited in linguistic areas, having been loaned a copy of げんき Volume 1, which, hopefully, I'll learn some 日本語 from.I've also been trying to read Der Dichter by Herman Hesse, in hopes of getting a better grasp on German grammar through experience. We'll see how that works.