Re: [racket-dev] Revision to the Language Dialog
On Sat, Nov 3, 2012 at 2:57 PM, Robby Findler ro...@eecs.northwestern.edu wrote: There was a discussion a while back on revising the language dialog (I've lost track of the thread since I started hacking on the dialog; apologies). The thread starts here: http://bugs.racket-lang.org/query/?cmd=viewpr=12642 and continues here: http://www.mail-archive.com/dev@racket-lang.org/msg05730.html I've just pushed something based on that discussion. Please let me know what you think. I like the new dialog a lot. I think it could be improved with some of the suggestions made in the thread. Three I like in particular: - Make the language for teaching and #lang more parallel. This could help emphasize that the first option is really a language choice. So either change Teaching language to Use a teaching language, or change the first option to Standard language (or normal or something else like that). - Add some example #lang lines under the #lang option. These could even be actual choices, which edit the buffer if it's a new one -- `racket`, `racket/base`, `typed/racket`, `slideshow` are good candidates. - Allow the presence of a #lang line to override the language dialog, or at least give an error that's more helpful than currently. -- sam th sa...@ccs.neu.edu _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] `stream-map', again (Add multiple streams and a contract to stream-map)
Eli Barzilay e...@barzilay.org writes: Yesterday, Diogo F. S. Ramos wrote: Adding multiple streams feature to stream-map makes it more in line with its list counterpart. [...] The code in your patch had several problems, so I started re-hacking it, yet again. I obviously wrote a macro so I can knock out `stream-for-each', `stream-andmap', and `stream-ormap' too. Nice. Aside from myself and Daniel, I've seem people asking for it at the IRC channel. Let me know if I can help pushing this forward. _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Odd bug with begin0 and call-with-values
This looks like the sort of thing that I could have broken over the weekend. I'm not able to construct an example from just this information, so even a large amount of code may be useful. At Mon, 5 Nov 2012 16:46:29 -0500 (EST), J. Ian Johnson wrote: Code that used to work is now failing with a pull of the master today. I can't reproduce it in small amounts of code, which makes me think it's another weird JIT problem. I have a harness of this kind: (define (print-values . vs) (for ([v vs]) (display v) (newline))) (with-limits 3600 4096 (call-with-values (lambda () (begin0 (time (analysis program)) (dump-memory-stats))) print-values) The dump is not reached. Instead, (analysis program) finishes with the expected number of values, and once those values pass out of the expression, I get an error of the following kind: exn:fail:contract:arity It expects 1 value instead of the arbitrary amount it should expect for the print-values. I can supply a large amount of code that exercises this behavior, but if this is enough to go off, great. Thanks, -Ian _ Racket Developers list: http://lists.racket-lang.org/dev _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Revision to the Language Dialog
Thanks for taking a look. On Monday, November 5, 2012, Sam Tobin-Hochstadt wrote: - Allow the presence of a #lang line to override the language dialog, or at least give an error that's more helpful than currently. What did you have in mind here? The error you get in the teaching languages when the program starts with #lang ? Robby _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Revision to the Language Dialog
On Mon, Nov 5, 2012 at 6:11 PM, Robby Findler ro...@eecs.northwestern.edu wrote: Thanks for taking a look. On Monday, November 5, 2012, Sam Tobin-Hochstadt wrote: - Allow the presence of a #lang line to override the language dialog, or at least give an error that's more helpful than currently. What did you have in mind here? The error you get in the teaching languages when the program starts with #lang ? For the latter, yeah. I imagine a message like: You are currently using the Beginning Student, which doesn't support files starting with #lang language here. To enable this, choose the use the language declared in the source option in the language dialog. Of course, that wording suggests that we have a shorter name for that option. :) -- sam th sa...@ccs.neu.edu _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Odd bug with begin0 and call-with-values
Thanks for the example. Here's a small variant: #lang racket/base (call-with-values (lambda () (begin0 (values 1 2 3) (+ 1 (random 1 list) The bug wasn't new. It was an old, amazing-that-we-never-hit-it-before bug. Fix pushed. At Mon, 5 Nov 2012 15:25:57 -0700, Matthew Flatt wrote: This looks like the sort of thing that I could have broken over the weekend. I'm not able to construct an example from just this information, so even a large amount of code may be useful. At Mon, 5 Nov 2012 16:46:29 -0500 (EST), J. Ian Johnson wrote: Code that used to work is now failing with a pull of the master today. I can't reproduce it in small amounts of code, which makes me think it's another weird JIT problem. I have a harness of this kind: (define (print-values . vs) (for ([v vs]) (display v) (newline))) (with-limits 3600 4096 (call-with-values (lambda () (begin0 (time (analysis program)) (dump-memory-stats))) print-values) The dump is not reached. Instead, (analysis program) finishes with the expected number of values, and once those values pass out of the expression, I get an error of the following kind: exn:fail:contract:arity It expects 1 value instead of the arbitrary amount it should expect for the print-values. I can supply a large amount of code that exercises this behavior, but if this is enough to go off, great. Thanks, -Ian _ Racket Developers list: http://lists.racket-lang.org/dev _ Racket Developers list: http://lists.racket-lang.org/dev _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Revision to the Language Dialog
I think it makes sense to put that error message directly into the teaching languages. Robby On Mon, Nov 5, 2012 at 5:16 PM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: On Mon, Nov 5, 2012 at 6:11 PM, Robby Findler ro...@eecs.northwestern.edu wrote: Thanks for taking a look. On Monday, November 5, 2012, Sam Tobin-Hochstadt wrote: - Allow the presence of a #lang line to override the language dialog, or at least give an error that's more helpful than currently. What did you have in mind here? The error you get in the teaching languages when the program starts with #lang ? For the latter, yeah. I imagine a message like: You are currently using the Beginning Student, which doesn't support files starting with #lang language here. To enable this, choose the use the language declared in the source option in the language dialog. Of course, that wording suggests that we have a shorter name for that option. :) -- sam th sa...@ccs.neu.edu _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Revision to the Language Dialog
I second Sam's suggestions. -- I would use The Racket Language for the first line of the first item then I would have in blue Use #lang to Specify the Desired Dialect then I would list some candidates, possible as radio buttons * racket/base (for scripting) * racket (for programming) * slideshow (for academicing) * typed/racket (for power users) * others (specified manually by programmer) I agree with Robby that *SLs probably have to reject (module ...) expressions EXCEPT that I don't see how they can get hold of the information that the programmer wrote down (other than guessing from the second position in the module expression but that sounds bad). On Nov 5, 2012, at 12:55 PM, Sam Tobin-Hochstadt wrote: On Sat, Nov 3, 2012 at 2:57 PM, Robby Findler ro...@eecs.northwestern.edu wrote: There was a discussion a while back on revising the language dialog (I've lost track of the thread since I started hacking on the dialog; apologies). The thread starts here: http://bugs.racket-lang.org/query/?cmd=viewpr=12642 and continues here: http://www.mail-archive.com/dev@racket-lang.org/msg05730.html I've just pushed something based on that discussion. Please let me know what you think. I like the new dialog a lot. I think it could be improved with some of the suggestions made in the thread. Three I like in particular: - Make the language for teaching and #lang more parallel. This could help emphasize that the first option is really a language choice. So either change Teaching language to Use a teaching language, or change the first option to Standard language (or normal or something else like that). - Add some example #lang lines under the #lang option. These could even be actual choices, which edit the buffer if it's a new one -- `racket`, `racket/base`, `typed/racket`, `slideshow` are good candidates. - Allow the presence of a #lang line to override the language dialog, or at least give an error that's more helpful than currently. -- sam th sa...@ccs.neu.edu _ Racket Developers list: http://lists.racket-lang.org/dev smime.p7s Description: S/MIME cryptographic signature _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Revision to the Language Dialog
The DrRacket-based languages have access to the port. So they can get the actual characters from it. Not The Racket (meta-)Language ;) I think I'll not color things blue, as that would look strange in this context; indentation seems to serve the same role and I think I can do something like what you suggest. Robby On Mon, Nov 5, 2012 at 9:14 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: I second Sam's suggestions. -- I would use The Racket Language for the first line of the first item then I would have in blue Use #lang to Specify the Desired Dialect then I would list some candidates, possible as radio buttons * racket/base (for scripting) * racket (for programming) * slideshow (for academicing) * typed/racket (for power users) * others (specified manually by programmer) I agree with Robby that *SLs probably have to reject (module ...) expressions EXCEPT that I don't see how they can get hold of the information that the programmer wrote down (other than guessing from the second position in the module expression but that sounds bad). On Nov 5, 2012, at 12:55 PM, Sam Tobin-Hochstadt wrote: On Sat, Nov 3, 2012 at 2:57 PM, Robby Findler ro...@eecs.northwestern.edu wrote: There was a discussion a while back on revising the language dialog (I've lost track of the thread since I started hacking on the dialog; apologies). The thread starts here: http://bugs.racket-lang.org/query/?cmd=viewpr=12642 and continues here: http://www.mail-archive.com/dev@racket-lang.org/msg05730.html I've just pushed something based on that discussion. Please let me know what you think. I like the new dialog a lot. I think it could be improved with some of the suggestions made in the thread. Three I like in particular: - Make the language for teaching and #lang more parallel. This could help emphasize that the first option is really a language choice. So either change Teaching language to Use a teaching language, or change the first option to Standard language (or normal or something else like that). - Add some example #lang lines under the #lang option. These could even be actual choices, which edit the buffer if it's a new one -- `racket`, `racket/base`, `typed/racket`, `slideshow` are good candidates. - Allow the presence of a #lang line to override the language dialog, or at least give an error that's more helpful than currently. -- sam th sa...@ccs.neu.edu _ Racket Developers list: http://lists.racket-lang.org/dev _ Racket Developers list: http://lists.racket-lang.org/dev