News for hackers. Stuff that matters.
Re:Google's Plop is implemented in Lisp by DavidSJ on Wednesday November 12, 2008 @08:22PM (#362575)
I think you mean:

(if (search "lisp" (submission-title submission)) (incf (submission-score submission)))

Re:Google's Plop is implemented in Lisp by ken on Wednesday November 12, 2008 @09:14PM (#362603)
Oh dear, I hope axod wouldn't have used IF with a single then-form. That's just asking for trouble. :-)
Re:Google's Plop is implemented in Lisp by DavidSJ on Wednesday November 12, 2008 @09:15PM (#362604)
Are you worried about the return value or something?
Re:Google's Plop is implemented in Lisp by ken on Wednesday November 12, 2008 @09:26PM (#362614)
No. I'm worried somebody will add another form, without realizing it has the opposite meaning (i.e., else) from the INCF call. Traditionally, if you have only one then-form, you'd use WHEN.
Re:Google's Plop is implemented in Lisp by DavidSJ on Wednesday November 12, 2008 @09:57PM (#362635)
Ah, fair point. I actually made that mistake a couple days ago, in fact.
Re:Google's Plop is implemented in Lisp by Maascamp on Thursday November 13, 2008 @12:26AM (#362747)
I think you mean

if(strpos(strtolower($title.$body), 'lisp') !== false) ++$votes;

Oh wait, this is Hacker news. Apologies.