News for hackers. Stuff that matters.
Re:Show HN: Interactive SICP by zodiac on Sunday December 02, 2012 @10:40AM (#4861474)
The autograder checks for (+ 5 4 (- 2 ...)), instead of nesting the additions. You can view the source to see the grader. I'm not sure how to make it accomodate all the ways it could be nested though.
Re:Show HN: Interactive SICP by BlackJack on Sunday December 02, 2012 @10:56AM (#4861513)
Why not check the result and also check for the presence of parentheses? That way you can verify the result and make sure nobody's just copying and pasting in an answer.

One could easily do something like (-2.466..) as the answer, but given that you just need a simple way to verify answers, I think my strategy works well.

Re:Show HN: Interactive SICP by FuzzyDunlop on Sunday December 02, 2012 @11:38AM (#4861641)
I think you could get away with not even checking for parens, if you go with the idea that people doing it properly won't try to cheat it (because they'll learn nothing).

For people who do want to 'cheat', the grade is meaningless anyway.

Re:Show HN: Interactive SICP by BlackJack on Sunday December 02, 2012 @11:52AM (#4861684)
I thought about that, but my reasoning for checking parens is that there's a decent subset of people who might get stuck and just google an answer, but if it gets rejected, then they'll put more time into figuring out the correct answer.

I guess I'm trying to view it from the POV of a beginner, as most CS people/programmers can work through this without needing the website.

Re:Show HN: Interactive SICP by jQueryIsAwesome on Sunday December 02, 2012 @08:42PM (#4863481)
Normalize it and then check if it is equal; this took longer than I like to admit: http://jsfiddle.net/jeKMF/