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))
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)
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.
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.
This blog covers vegan, ice cream, Work, Vegan, Uncategorized, Rust, Resistance, Research, Repair, Recipes, Physics, Nest, Music, Lisp, Linux, Links, Link, Life, Language, Information, Image, Gnome, Games, Gallery, Food, Fascism, Esperante, Emacs, Electronics, Education, Dog, Did You Know That?, DRM, Community, Comics, Colgate, Code, Buddhism, Books, Aside, Anarchism, 3D Printing
View content from 2009-03, 2009-04, 2009-06, 2009-07, 2009-08, 2009-10, 2009-11, 2009-12, 2010-05, 2010-06, 2010-07, 2010-08, 2010-09, 2011-01, 2011-02, 2011-03, 2011-04, 2011-06, 2011-07, 2011-08, 2011-09, 2011-10, 2011-11, 2011-12, 2012-01, 2012-02, 2012-03, 2012-04, 2012-07, 2012-08, 2012-09, 2012-11, 2013-02, 2013-03, 2013-04, 2013-06, 2013-07, 2013-09, 2013-11, 2014-01, 2014-02, 2014-03, 2014-07, 2014-11, 2014-12, 2015-01, 2015-02, 2015-07, 2015-10, 2015-11, 2015-12, 2016-01, 2016-05, 2016-08, 2016-10, 2016-11, 2016-12, 2017-02, 2017-06, 2018-04