News for hackers. Stuff that matters.

paul_reiners

Re:Q about car-circularity on Friday April 11, 2008 @06:32PM (#161439)
I don't think it is, but I saw a test case here claiming it is:

http://www.cs.northwestern.edu/academics/courses/325/program...

A watched kettle never boils.
Re:CS Unplugged - teaching CS witout a computer on Wednesday April 09, 2008 @01:56PM (#159031)
They concentrate on algorithms. Good for them. That is how it should be taught.
Re:Ask YC: Who are YOUR heroes? on Saturday April 05, 2008 @01:45PM (#155697)
* Sherlock Holmes: Because he was the coolest guy ever, even if he was fictional.

* 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.

Re:Keeping and Recruiting Hackers as a Non-Hacker on Friday April 04, 2008 @03:11PM (#155130)
Read "Smart & Gets Things Done" by Joel Spolsky:

http://www.joelonsoftware.com/items/2007/06/05.html

That's exactly it. Saying that learning a new language is just a matter of learning a new syntax is like saying that an English-speaking, non-German speaker could translate a German text to English by taking a German-English dictionary and going through and translating the words one-by-one. It's not quite as simple as that.
I've noticed that the most effective way to get a programming project finished is to just let everything else slide for a few weeks: paying bills, exercising, being social. Probably not a very healthy way to live in the long run, though.
Re:New Lisp and Functional Programming Comic Novella on Wednesday April 02, 2008 @01:50PM (#153183)
That's a compliment, right?
Re:Ask YC: What are you working on right now? on Tuesday April 01, 2008 @02:29PM (#152328)
People always like talking about what they're working on.
Re:Q about Exercise 13.3(b) in "ANSI Common Lisp" on Tuesday April 01, 2008 @12:52PM (#152231)
I can't get any speed-up by using declarations. If anyone does, please let me know.
Re:Ask YC: What are you working on right now? on Tuesday April 01, 2008 @12:46PM (#152226)
Right now I'm in the middle of a study group that I started here at work. We're studying Graham's book "ANSI Common Lisp" and studying inference in particular, so we're also covering some of "Paradigms of Artificial Intelligence Programming".

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.

Re:How WolframTones Works on Monday March 31, 2008 @06:27PM (#151424)
Sarosh,

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

Re:How WolframTones Works on Monday March 31, 2008 @10:05AM (#151057)
Here's an article I wrote on the same topic:

http://www.ibm.com/developerworks/java/library/j-camusic/

They did an excellent job with WolframTones. Mathematica is a powerful language.

Re:Where does a wannabe hacker begin? on Saturday March 29, 2008 @08:36PM (#149774)
Eric Raymond is an excellent writer and you can't go wrong reading this article.

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...

( Read More... | 1 comment | 2 points | on HN )
Re:Q about Lisp union on Wednesday March 26, 2008 @11:31AM (#146968)
Actually, I take back my statement that this is not set-theoretic union.

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.

Re:Q about Lisp union on Wednesday March 26, 2008 @10:13AM (#146885)
Yes, you're right. The fact that they leave the behavior of union in this case undefined in the standard is surprising to me. The fact that SBCL and GNU CLISP implement it the way they do is just bizarre to me.

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...

( Read More... | 7 comments | 5 points | on HN )
Re:Q about Exercise 10.4 in "ANSI Common Lisp" on Saturday March 22, 2008 @07:02PM (#143629)
Thanks, I figured it out now.
Re:Q about Exercise 10.4 in "ANSI Common Lisp" on Saturday March 22, 2008 @07:01PM (#143627)
I'm not sure, but I think you need to use labels, rather than flet, in this case, since local functions defined using flet cannot be recursive. At least that's how I interpret what it says on page 319.

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.)

Older »