Re: [racket-dev] Missing pregexp syntax in Racket
On Mon, Nov 28, 2011 at 12:02:46AM -0800, Pauan wrote: Yes that is exactly it. The rationale is as ozzloy said: right now you needto use something like #px\\d to match the string \\5. That's a lot ofbackslashes! In other languages that support regexps, there's usually a way of specifyingthem so it requires less backslashes. For instance, in JavaScript you can saythis: /\\\d/ But before we can even consider such a syntax, we first need to add in theabove mentioned regexp syntaxes. Because otherwise #px/\n/ would compile into(pregexp \\n) which would then throw an error, as you noted. So this is thefirst step in enabling such a syntax. OK, I think I understand your rationale. And I think that #px/\d/ could be useful. But my first impression is that such a new #px reader syntax should translate into the existing pregexp syntax, not extend it. It seems odd to me that #px/\n/ would mean #px\\n and that that would be equivalent to #px\n. I'm curious what others think so I'll try to find the irc conversation. David _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] [plt] Push #23941: master branch updated
You need to set the 'responsible' property using the 'git props' command that Eli has added for your new collection, probably to 'ntoronto'. On Tue, Nov 29, 2011 at 1:22 AM, ntoro...@racket-lang.org wrote: 4012373 Neil Toronto ntoro...@racket-lang.org 2011-11-28 23:01 : | Started icon reorganization | | - SVG icon sources | - Playback-style icons, logos, stop signs, magnifying glasses, etc., in diffuse and shiny styles | - Program to pre-render SVG files (icons/private/svg/render-png.rkt) | - Pre-rendered icons (PNGs in power-of-2 sizes) | - Made `icons' a module, with functions to conveniently load icons and convert to/from picts | - Scribble docs for `icons' | - Used new icons in DrRacket toolbar -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] [racket] Disable/Enable Tests
I see two sequences: -below ;; disables up to -above ;; here; disables up to -below and re-enables tests or -above ;; disables everything up to here and enables tests up to -below ;; here; disables tests below. Anything else? -- Matthias On Nov 28, 2011, at 10:09 PM, Robby Findler wrote: Those two seem like they can combine in strange ways. Robby On Mon, Nov 28, 2011 at 9:08 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: I can see adding both disable-tests-above and disable-tests-below. On Nov 28, 2011, at 3:44 PM, Vincent St-Amour wrote: At Mon, 28 Nov 2011 11:54:06 -0500, Matthias Felleisen wrote: I propose 1. to remove the menu and its functionality 2. to add a macro disable-tests-below 3. and be prepared to add a macro enable-tests-below. `disable-tests-below' makes it easy to accidentally skip running tests altogether. Consider this scenario: - A student works on an assignment, one problem at a time. - Once a problem is done, he doesn't touch the code anymore, and wants to disable the tests. - With `disable-tests-below', he needs to add it at the top of the file, and to add `enable-tests-below' before the problem he's now working on. - If he forgets to add `enable-tests-below', no tests get run at all. `disable-tests-above' would accomodate this workflow better. If the student forgets to move it as he solves problems, then more tests get run. No problem. That sounds like a better default to me. However, I'm a bit uncomfortable with `disable-tests-above' affecting the behavior of what comes before it. It may lead to confusing situations. A region-based solution also sounds good. Especially since (I assume) only a small number of tests are actually expensive. Vincent _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] [racket] Disable/Enable Tests
That would also work. Robby On Tue, Nov 29, 2011 at 8:43 AM, Matthias Felleisen matth...@ccs.neu.edu wrote: I think we're over-complexifying the whole situation. Perhaps we should allow only one of these things to appear in the definitions buffer. We're talking about novice programmers. I don't expect them to use check-expect after semester 1 (or perhaps part of 2). I just don't think that this is a big deal. -- Matthias On Nov 29, 2011, at 9:38 AM, Robby Findler wrote: If I put two -above's in a row does that push past the previous -below? :) In all seriousness, this seems like a way for students to get confused about what their programs are or aren't doing. It seems easy to lose track of where the aboves and belows are. If I understand correctly, this is not a performance issue, but an issue of keeping track of which test cases are the interesting ones while working on one part of a program. That is, we want a mechanism to focus in on a section of the program and its test cases. If that's correct, then I think we have two better routes to pursue: - multi-file programs - better support in the GUI for showing us only some of the test results (perhaps something to focus in on test cases that test specific functions or something like that). Robby On Tue, Nov 29, 2011 at 7:03 AM, Matthias Felleisen matth...@ccs.neu.edu wrote: I see two sequences: -below ;; disables up to -above ;; here; disables up to -below and re-enables tests or -above ;; disables everything up to here and enables tests up to -below ;; here; disables tests below. Anything else? -- Matthias On Nov 28, 2011, at 10:09 PM, Robby Findler wrote: Those two seem like they can combine in strange ways. Robby On Mon, Nov 28, 2011 at 9:08 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: I can see adding both disable-tests-above and disable-tests-below. On Nov 28, 2011, at 3:44 PM, Vincent St-Amour wrote: At Mon, 28 Nov 2011 11:54:06 -0500, Matthias Felleisen wrote: I propose 1. to remove the menu and its functionality 2. to add a macro disable-tests-below 3. and be prepared to add a macro enable-tests-below. `disable-tests-below' makes it easy to accidentally skip running tests altogether. Consider this scenario: - A student works on an assignment, one problem at a time. - Once a problem is done, he doesn't touch the code anymore, and wants to disable the tests. - With `disable-tests-below', he needs to add it at the top of the file, and to add `enable-tests-below' before the problem he's now working on. - If he forgets to add `enable-tests-below', no tests get run at all. `disable-tests-above' would accomodate this workflow better. If the student forgets to move it as he solves problems, then more tests get run. No problem. That sounds like a better default to me. However, I'm a bit uncomfortable with `disable-tests-above' affecting the behavior of what comes before it. It may lead to confusing situations. A region-based solution also sounds good. Especially since (I assume) only a small number of tests are actually expensive. Vincent _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] Subnormal numbers?
I'm currently proctoring the freshmen's lab on inexact numbers and was curious how to denote subnormal numbers in Racket. Turns out that's not possible, since there is no underflow. Why does Racket follow the old standard of representing underflow with inexact zero? I imagine changing it now would break a lot of code, but I'm just curious. -Ian _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Missing pregexp syntax in Racket
1. Everyone should acknowledge the JWZ quote, Some people, when confronted with a problem, think 'I know, I'll use regular expressions.' Now they have two problems. Regular expressions are Perl's hammer that makes most problems look like a nail. 2. Before someone spends too much time putting the finishing touches on old Unix/Perl regular expression syntax, they might want to look at Olin Shivers's SREs. Sexp-based regular expression syntax can be a big readability win when your regexps get complicated. http://www.ccs.neu.edu/home/shivers/citations.html#sre -- http://www.neilvandyke.org/ _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Subnormal numbers?
I can't answer the question about underflow. But if you don't mind installing a nightly build of Racket, you get the (currently undocumented) module `unstable/flonum', which exports these: flonum-bit-field bit-field-flonum flonum-ordinal; number of flonums away from 0 (+ or -) ordinal-flonum flstep; the flonum n steps away (by ordering fl) flnext; next largest flonum (by ordering fl) flprev; next smallest flonum (by ordering fl) -max.0; negative flonum with greatest non-infinite magnitude -min.0; negative flonum with smallest nonzero magnitude +min.0; positive flonum with smallest nonzero magnitude +max.0; positive flonum with greatest non-infinite magnitude Also, the `plot' module in the nightly build deals just fine with intervals that are too small to represent using flonums. For example, to illustrate floating-point discretization and the density of flonums at different ranges: #lang racket (require plot unstable/flonum) (plot (function (λ (x) (inexact-exact (sin x))) (flstep 0.0 -10) (flstep 0.0 10))) (- (flonum-ordinal 1.0) (flonum-ordinal 0.0)) (- (flonum-ordinal 2.0) (flonum-ordinal 1.0)) (- (flonum-ordinal 3.0) (flonum-ordinal 2.0)) (- (flonum-ordinal +max.0) (flonum-ordinal 1.0)) (parameterize ([plot-x-ticks (log-ticks #:base 2)]) (plot (function (compose flonum-ordinal exact-inexact) 1.0 8.0))) Neil T On 11/29/2011 09:32 AM, J. Ian Johnson wrote: I'm currently proctoring the freshmen's lab on inexact numbers and was curious how to denote subnormal numbers in Racket. Turns out that's not possible, since there is no underflow. Why does Racket follow the old standard of representing underflow with inexact zero? I imagine changing it now would break a lot of code, but I'm just curious. -Ian _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Missing pregexp syntax in Racket
On 2011 Nov 29, at 18:14, Neil Van Dyke wrote: 1. Everyone should acknowledge the JWZ quote, Some people, when confronted with a problem, think 'I know, I'll use regular expressions.' Now they have two problems. Regular expressions are Perl's hammer that makes most problems look like a nail. What Neil said! 2. Before someone spends too much time putting the finishing touches on old Unix/Perl regular expression syntax, they might want to look at Olin Shivers's SREs. Sexp-based regular expression syntax can be a big readability win when your regexps get complicated. http://www.ccs.neu.edu/home/shivers/citations.html#sre What Neil said _and_ what Shivers said! Implementing Shivers-style SREs would be a much bigger win than any alternate pregexp syntax with differently funky backslash rules from everything else. Norman -- Norman Gray : http://nxg.me.uk SUPA School of Physics and Astronomy, University of Glasgow, UK _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] Debuging Racket in Windows X64
Hi, While trying to build libmysterx using VisualStudio 2010 with Debug configuration for x64 I got a linker error saying: fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' The error seems related to the fact that the Debug configuration for subproject myssink uses /MACHINE:I386 as additional options to the linker, even when the target machine type says x64. This can be seen in the file myssink.vcxproj: ItemDefinitionGroup Condition='$(Configuration)|$(Platform)'=='Debug|x64' Midl WarningLevel3/WarningLevel TargetEnvironmentX64/TargetEnvironment ... /Midl ClCompile OptimizationDisabled/Optimization ... /ClCompile Link AdditionalOptions/MACHINE:I386 %(AdditionalOptions)/AdditionalOptions ... Changing the previous line to /MACHINE:X64 solves the problem for this particular file but a quick search revealed that there are a few other project files with the same configuration. Is this the correct configuration? What do you usually do when you need to debug Racket internals (particularly, mysterx)? Best, Antonio. _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Debuging Racket in Windows X64
On 11/29/2011 4:10 PM, Antonio Menezes Leitao wrote: Is this the correct configuration? What do you usually do when you need to debug Racket internals (particularly, mysterx)? Personally, I debug it in optimized no-symbols no-debugging mode, because I've had little success any other way. Fortunately mflatt can usually fix a bug faster than I can report it, let alone trace it to its source. (This is why I don't use visual studio projects in my own projects.) Ben _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev