paul_reiners
http://www.cs.northwestern.edu/academics/courses/325/program...
Q about car-circularity
Is the following list car-circular?: (((1 2 3)) 4 . #7=(((5 . #7#)))) If so, why?
You Get What You Pay for With Online Q&A Sites
Soccer Robots Compete for the Title
Solutions to Exercises in "ANSI Common Lisp"
* Bobby Fischer: The world had never seen such monomania before and probably never will again. (Of course, he went mad in the end.)
* Lennon and McCartney: The greatest popular music composers since the Gershwins.
* Kurt Gödel: The greatest logician of all time.
* Bach and Chopin: The greatest composers for the keyboard of all time.
Nim Chimpsky: The Chimp Who Would Be Human
Once An Algorithms Guy, Always An Algorithms Guy
After that's done, I'm going to either spend some time working on the Netflix Prize (just to learn more, not in a real attempt to win) or doing some music programming in either Lisp, using the Common Music API, or Mathematica.
Thanks!
I know about Csound, but I've never actually used it. Lately I've been playing around with Common Music, which is written in Lisp and has a Lisp API.
Now that Mathematica supports MIDI, I want to do some music programming in Mathematica also.
Here's a site I maintain on music programming, by the way:
http://www-128.ibm.com/developerworks/spaces/algomusic
Paul
Back to Basics: Algorithms
http://www.ibm.com/developerworks/java/library/j-camusic/
They did an excellent job with WolframTones. Mathematica is a powerful language.
Also, learn how to do mathematical proofs. I don't know what the best way to do this is. I learned from 10th-grade Euclidean geometry class. Maybe you can pick up a good book on Euclidean geometry that has a lot of exercises in it.
Finally, pick up a good book on Lisp that has a lot of exercises in it and do all the exercises in it. Winston and Horn is good. "The Little Lisper" is also good.
Q about Exercise 13.3(b) in "ANSI Common Lisp"
Has anyone else worked on exercise 13.3(b) in "ANSI Common Lisp"? I approached it by declaring all the variables in Figure 9.2 as long-floats: ; Use declarations in math utilities: (defun sq (x) (declare (long-float x)) (* x x)) (defun mag (x y z) (declare (long-float x y z)) (sqrt (+ (sq x) (sq y) (sq z)))) (defun unit-vector (x y z) (declare (long-float x y...
Django Wired
If I'm willing to accept '(a a) as representing the set '(a) when I use it as an input to union, I should be just as willing to accept '(a a b) as representing the set '(a b) when I receive it back from union.
Q about Lisp union
As I thought I understood it, Lisp union implements set union. So, I thought that (union '(a a) '(a b)) would return (a b) And, in fact, it does. This led me to think that (union '(a a) '(b)) would also return (A B) However, it returns: (A A B) Why does the fact that there is one less 'a in the second argument in the second call mean that there is one more 'a in the result? This is...
Party of One: The Loners' Manifesto
At any rate, this solution works using labels:
(defmacro ntimes (n &rest body)
(let ((h (gensym))
(g (gensym)))
`(let ((,h ,n))
(labels ((ntimes-local (,g)
(if (> ,g 0)
,@body)
(if (zerop ,g)
nil
(ntimes-local (1- ,g)))))
(ntimes-local ,h)))))
(Sorry, but again I don't know how to preserve the formatting of my code in this newsgroup.)