Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2013-06-12 Thread Aigars Bruvelis
I don't understand how to go back to normal mode now? _ Racket Developers list: http://lists.racket-lang.org/dev

Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-13 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10-02-12 23:38, John Clements wrote: A user on stackoverflow had a question about this code: (define list-sum-odd (lambda (list) (cond ((null? list) 0) ((odd? (car list)) (+ (car list) (list-sum-odd (cdr list (list-sum-odd (cdr list)

Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-13 Thread Robby Findler
+1 Robby On Fri, Feb 10, 2012 at 4:52 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: Yes, and it was submitted in some form as a bug before. Why don't you modify teach.rkt and see whether you like the result better. Then submit. On Feb 10, 2012, at 5:43 PM, Danny Yoo wrote: Ho

Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-13 Thread Stephen Bloch
On Feb 13, 2012, at 5:05 AM, Marijn wrote: ... it highlighted the id list-sum-odd in what should have been the 'else' case, and wrote: list-sum-odd: expected a function call, but there is no open parenthesis before this function ... which is really terrible, because there *IS* a

Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-13 Thread David Van Horn
On 2/13/12 8:11 AM, Stephen Bloch wrote: On Feb 13, 2012, at 5:05 AM, Marijn wrote: ... it highlighted the id list-sum-odd in what should have been the 'else' case, and wrote: list-sum-odd: expected a function call, but there is no open parenthesis before this function ... which is really

Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-13 Thread David Van Horn
On 2/13/12 4:20 PM, Stephen Bloch wrote: On Feb 13, 2012, at 8:28 AM, David Van Horn wrote: In BSL, you can detect when the first element of a clause is a variable bound to a function, but I don't follow the reasoning about ISL. You can't distinguish good from bad uses without running the

Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-13 Thread Stephen Bloch
On Feb 13, 2012, at 8:28 AM, David Van Horn wrote: In BSL, you can detect when the first element of a clause is a variable bound to a function, but I don't follow the reasoning about ISL. You can't distinguish good from bad uses without running the code because you can't tell if a name

Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-13 Thread Stephen Bloch
On Feb 13, 2012, at 5:07 PM, David Van Horn wrote: On 2/13/12 4:20 PM, Stephen Bloch wrote: On Feb 13, 2012, at 8:28 AM, David Van Horn wrote: In BSL, you can detect when the first element of a clause is a variable bound to a function, but I don't follow the reasoning about ISL. You

Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-13 Thread David Van Horn
On 2/13/12 7:32 PM, Stephen Bloch wrote: In ISL, there's an additional case: a local variable might or might not be bound to a function. That's a little more hassle to check, but it should be doable at compile-time. Again, if the first element of a cond-clause is an identifier bound to a

Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-13 Thread Bloch Stephen
On Feb 13, 2012, at 7:44 PM, David Van Horn wrote: On 2/13/12 7:32 PM, Stephen Bloch wrote: In ISL, there's an additional case: a local variable might or might not be bound to a function. That's a little more hassle to check, but it should be doable at compile-time. Again, if the first

[racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-10 Thread John Clements
A user on stackoverflow had a question about this code: (define list-sum-odd (lambda (list) (cond ((null? list) 0) ((odd? (car list)) (+ (car list) (list-sum-odd (cdr list (list-sum-odd (cdr list) (list-sum-odd '(3 4 5)) ... which signalled an error. In #lang

Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-10 Thread Danny Yoo
Ho Ho! thought I. Beginner Student Racket will give a much better error message. Actually, though, the error message was much worse: it highlighted the id list-sum-odd in what should have been the 'else' case, and wrote: list-sum-odd: expected a function call, but there is no open

Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-10 Thread Matthias Felleisen
Yes, and it was submitted in some form as a bug before. Why don't you modify teach.rkt and see whether you like the result better. Then submit. On Feb 10, 2012, at 5:43 PM, Danny Yoo wrote: Ho Ho! thought I. Beginner Student Racket will give a much better error message. Actually,

Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-10 Thread John Clements
On Feb 10, 2012, at 2:43 PM, Danny Yoo wrote: Ho Ho! thought I. Beginner Student Racket will give a much better error message. Actually, though, the error message was much worse: it highlighted the id list-sum-odd in what should have been the 'else' case, and wrote: list-sum-odd:

Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-10 Thread Danny Yoo
This is a variation of one of the cases described in Guillaume's paper on error messages.  Figure 4 of http://gmarceau.qc.ca/papers/Marceau-2010-Measuring-Effectiveness.pdf Yes, I agree. Are you suggesting that there's low-hanging fruit in the form of a more general solution? I'm hoping