Re: [racket-dev] Pre-Release Checklist for v5.3

2012-04-19 Thread Kathy Gray
On 18 Apr 2012, at 16:00, Ryan Culpepper wrote: * Kathy Gray kathryn.g...@cl.cam.ac.uk - Test Engine Tests Done -Kathy _ Racket Developers list: http://lists.racket-lang.org/dev

Re: [racket-dev] Fwd: [racket] Are There More String Functions?

2012-04-19 Thread Laurent
(sorry, I couldn't figure out how to reply properly from the list archive, as I don't receive the dev-list emails.) One string function that I often find useful in various scripting languages is a `string-split' (explode in php). It can be done with `regexp-split', but having something more along

Re: [racket-dev] Fwd: [racket] Are There More String Functions?

2012-04-19 Thread Matthias Felleisen
I second that. On Apr 19, 2012, at 5:57 AM, Laurent wrote: (sorry, I couldn't figure out how to reply properly from the list archive, as I don't receive the dev-list emails.) One string function that I often find useful in various scripting languages is a `string-split' (explode in

Re: [racket-dev] `string-split'

2012-04-19 Thread Eli Barzilay
[Changed title to talk about each one separately.] Two hours ago, Laurent wrote: One string function that I often find useful in various scripting languages is a `string-split' (explode in php). It can be done with `regexp-split', but having something more along the lines of a `string-split'

Re: [racket-dev] `string-replace'

2012-04-19 Thread Eli Barzilay
Two hours ago, Laurent wrote: Maybe also a `string-replace' could be useful, especially when one does not want regexps and has special characters that need to be quoted. Again, it's not clear how this shold look -- my guess: (define (string-replace from str to) (regexp-replace*

Re: [racket-dev] `string-split'

2012-04-19 Thread Sam Tobin-Hochstadt
On Thu, Apr 19, 2012 at 8:21 AM, Eli Barzilay e...@barzilay.org wrote: Two hours ago, Laurent wrote: One string function that I often find useful in various scripting languages is a `string-split' (explode in php).  It can be done with `regexp-split', but having something more along the lines

Re: [racket-dev] `string-split'

2012-04-19 Thread Laurent
(define (string-split str [sep #px\\s+]) (remove* '() (regexp-split sep str))) Nearly, I meant something more like this: (define (string-split str [splitter ]) (regexp-split (regexp-quote splitter) str)) No regexp from the user POV, and much easier to use with little knowledge.

Re: [racket-dev] `string-split'

2012-04-19 Thread Matthew Flatt
I agree with this: we should add `string-split', the one-argument case should be as Eli wrote, and the two-argument case should be as Laurent wrote. (Probably the optional second argument should be string-or-#f, where #f means to use #px\\s+.) At Thu, 19 Apr 2012 14:30:31 +0200, Laurent wrote:

Re: [racket-dev] `string-split'

2012-04-19 Thread Matthias Felleisen
I think Laurent pointed out in his initial message that beginners may be intimidated by regexps. I agree. Plus someone who isn't fluent with regexp may be more comfortable with string-split. Last but not least, a program documents itself more clearly with string-split vs regexp. On Apr 19,

Re: [racket-dev] `string-replace'

2012-04-19 Thread Matthew Flatt
At Thu, 19 Apr 2012 08:26:20 -0400, Eli Barzilay wrote: Two hours ago, Laurent wrote: Maybe also a `string-replace' could be useful, especially when one does not want regexps and has special characters that need to be quoted. Again, it's not clear how this shold look -- my guess:

Re: [racket-dev] `string-replace'

2012-04-19 Thread Laurent
On Thu, Apr 19, 2012 at 14:26, Eli Barzilay e...@barzilay.org wrote: Two hours ago, Laurent wrote: Maybe also a `string-replace' could be useful, especially when one does not want regexps and has special characters that need to be quoted. Again, it's not clear how this shold look -- my

Re: [racket-dev] `string-split'

2012-04-19 Thread Laurent
On Thu, Apr 19, 2012 at 14:33, Matthew Flatt mfl...@cs.utah.edu wrote: I agree with this: we should add `string-split', the one-argument case should be as Eli wrote, About this I'm not sure, as one cannot reproduce this behavior by providing an argument (or it could make the difference

Re: [racket-dev] `string-split'

2012-04-19 Thread Matthew Flatt
At Thu, 19 Apr 2012 14:43:44 +0200, Laurent wrote: On Thu, Apr 19, 2012 at 14:33, Matthew Flatt mfl...@cs.utah.edu wrote: I agree with this: we should add `string-split', the one-argument case should be as Eli wrote, About this I'm not sure, as one cannot reproduce this behavior by

Re: [racket-dev] `string-split'

2012-04-19 Thread Laurent
On Thu, Apr 19, 2012 at 14:53, Matthew Flatt mfl...@cs.utah.edu wrote: At Thu, 19 Apr 2012 14:43:44 +0200, Laurent wrote: On Thu, Apr 19, 2012 at 14:33, Matthew Flatt mfl...@cs.utah.edu wrote: I agree with this: we should add `string-split', the one-argument case should be as Eli

Re: [racket-dev] `string-split'

2012-04-19 Thread Eli Barzilay
A few minutes ago, Laurent wrote: Then instead of #f one idea is to go one step further and consider different useful cases based on input symbols like 'whitespaces, 'non-alpha, etc. ? Or even a list of string/symbols that can be used as a splitter. That would make a more powerful function

Re: [racket-dev] `string-split'

2012-04-19 Thread Eli Barzilay
[Meta-note: I'm not just flatly object to these, just trying to clarify the exact behavior and the possible effects on other functions.] 10 minutes ago, Laurent wrote:    (define (string-split str [sep #px\\s+])    (remove* '() (regexp-split sep str))) Nearly, I meant something

Re: [racket-dev] `string-replace'

2012-04-19 Thread Eli Barzilay
30 minutes ago, Laurent wrote: I meant this: (define (string-replace from str to)    (regexp-replace* (regexp-quote from) str (regexp-replace-quote to))) 30 minutes ago, Matthew Flatt wrote: Surely Laurent meant (define (string-replace str from to) (regexp-replace*

Re: [racket-dev] `string-split'

2012-04-19 Thread Laurent
Continuing with this line, it seems that a better definition is as follows: (define (string-split str [sep ]) (remove* '() (regexp-split (regexp-quote (or sep )) str))) Except that the full definition could be a bit more efficient. Three questions: 1. Laurent: Does this make more

[racket-dev] Argument positions of string-... like functions

2012-04-19 Thread Laurent
(define (string-index-of sub str [start 0] [end (string-length str)]) I always need to go check the documentation for that kind of argument position (like for (string-replace from str to) ). To me, what makes more sense is to have the str argument on the first position, just like for a method

Re: [racket-dev] Argument positions of string-... like functions

2012-04-19 Thread Eli Barzilay
A few minutes ago, Laurent wrote:   (define (string-index-of sub str [start 0] [end (string-length str)]) I always need to go check the documentation for that kind of argument position (like for (string-replace from str to) ). To me, what makes more sense is to have the str argument on

Re: [racket-dev] `string-split'

2012-04-19 Thread Laurent
4. Related to Q3: what does xy as that argument mean exactly? a. #rx[xy] b. #rx[xy]+ c. #rxxy d. #rx(?:xy)+ Good question. d. would be the simplest case for newbies, but b. might be more useful. It would make more sense that a string really is a string, not a set of characters.

Re: [racket-dev] `string-split'

2012-04-19 Thread Eli Barzilay
Just now, Laurent wrote: 1. Laurent: Does this make more sense? Yes, this definitely makes more sense to me. It would then treat (string-split aXXby X) just like the case. Although if you want to find the columns of a latex line like x y z you will have the wrong result.

Re: [racket-dev] Pre-Release Checklist for v5.3

2012-04-19 Thread Doug Williams
All of the plot routines work as expected. Done Doug On Wednesday, April 18, 2012, Ryan Culpepper wrote: Checklist items for the v5.3 release (using the v5.2.901.1 release candidate build) Search for your name to find relevant items, reply when you finish an item (please indicate which

Re: [racket-dev] `string-split'

2012-04-19 Thread Eli Barzilay
An hour and a half ago, Ryan Culpepper wrote: Instead of trying to design a 'string-split' that is both miraculously intuitive and profoundly flexible, why not design it like a Model-T Invalid analogy: the issue is not flexibility, it's making something that is simple (first) and useful

[racket-dev] `racket/string' extensions

2012-04-19 Thread Eli Barzilay
Sorry for the new thread, but this is a kind of a summary on the extensions that I think we're converging to, with a way to resolve the exact meaning of arguments. Please read through and reply if you see any problems with it. There are three specific questions, which are marked with

Re: [racket-dev] `racket/string' extensions

2012-04-19 Thread Laurent
I like it a lot. [...] (string-split str [sep #px\\s+]) Splits `str' on occurrences of `sep'. Unclear whether it should do that with or without trimming, which affects keeping a first/last empty part. [*1*] Possible solution: make it take a `#:trim?' keyword, in analogy to

Re: [racket-dev] `racket/string' extensions

2012-04-19 Thread namekuseijin
On Thu, Apr 19, 2012 at 1:28 PM, Eli Barzilay e...@barzilay.org wrote:  (list-index list elt)    Looks for `elt' in `list'.  This is a possible extension for    `racket/list' that would be kind of obvious with adding the above.    [*3*] I'm not sure if it should be added, but IIRC it was    

Re: [racket-dev] pr 12683 and using something like text:nbsp-space?

2012-04-19 Thread Danny Yoo
On Thu, Apr 12, 2012 at 5:26 PM, Robby Findler ro...@eecs.northwestern.edu wrote: Yes, normalization doesn't deal with those spaces. It does change the text in ways that are unfriendly and I often tell DrRacket no when it asks about normalization. I just wanted to put that into the mix for

Re: [racket-dev] More low-level submodule questions, and changelog improvements?

2012-04-19 Thread Matthew Flatt
At Wed, 18 Apr 2012 14:41:46 -0400, Danny Yoo wrote: I'm trying to wrap my head around submodules so I can get it working with Whalesong I see that the structure of 'mod' has changed a bit to accommodate submodules; in particular, mod-name can now be a list of symbols vs just a symbol,

Re: [racket-dev] Is this legal submodule code?

2012-04-19 Thread Matthew Flatt
I've pushed a repair for this bug. At Wed, 18 Apr 2012 13:02:05 -0400, Danny Yoo wrote: I'm trying to wrap my head around submodules so I can get it working with Whalesong, but I'm running into an issue: #lang racket (define (print-cake n) #;(show~an #\.) #;(show .-~a-. n

Re: [racket-dev] `racket/string' extensions

2012-04-19 Thread David Vanderson
Thank you so much for this. This was definitely one area of difficulty when I started using Racket for scripting. On 04/19/2012 09:28 AM, Eli Barzilay wrote: But to allow other uses, make these arguments a string *or* a regexp, where a regexp is taken as-is. This leads to another simplicity

Re: [racket-dev] Is this legal submodule code?

2012-04-19 Thread Danny Yoo
On Thu, Apr 19, 2012 at 2:45 PM, Matthew Flatt mfl...@cs.utah.edu wrote: I've pushed a repair for this bug. Ah, thank you! I will try it out as soon as it hits the 5.3 release branch. _ Racket Developers list: http://lists.racket-lang.org/dev

Re: [racket-dev] pr 12683 and using something like text:nbsp-space?

2012-04-19 Thread Eli Barzilay
An hour ago, Danny Yoo wrote: On Thu, Apr 12, 2012 at 5:26 PM, Robby Findler ro...@eecs.northwestern.edu wrote: Yes, normalization doesn't deal with those spaces. It does change the text in ways that are unfriendly and I often tell DrRacket no when it asks about normalization. I just

Re: [racket-dev] pr 12683 and using something like text:nbsp-space?

2012-04-19 Thread Robby Findler
I think this is the kind of mixin that belongs in the framework and, if you don't want it, you don't mix it in. The preferences dialog additions could be DrRacket-specific, tho. Also, option 2 should probably have a button in the dialog that adjusts the preference to one of the two silent modes.

Re: [racket-dev] Pre-Release Checklist for v5.3

2012-04-19 Thread John Clements
On Apr 18, 2012, at 8:00 AM, Ryan Culpepper wrote: Checklist items for the v5.3 release (using the v5.2.901.1 release candidate build) I'm confused by the OS X download options on the pre-release download page (http://pre.racket-lang.org/release/installers/). Specifically, one of the

Re: [racket-dev] current head doesn't compile?

2012-04-19 Thread Matthew Flatt
I've pushed a fix. At Thu, 19 Apr 2012 16:55:10 -0700, John Clements wrote: Apologies in advance if this is my fault; I can't see an obvious reason why it would be. I'm building from the head, and I rm'ed my build directory, and I get a build failure that ends with: Compiling xform

Re: [racket-dev] current head doesn't compile?

2012-04-19 Thread Eli Barzilay
Just now, Matthew Flatt wrote: I've pushed a fix. At Thu, 19 Apr 2012 16:55:10 -0700, John Clements wrote: Ooh… just looked at git log, perhaps this has something to do with 2b76d9e5b03ea97b8de155d2dda63e64256a3212 ? Yes, it was my fault. (I didn't try to build from scratch, so I didn't

Re: [racket-dev] Pre-Release Checklist for v5.3

2012-04-19 Thread Eli Barzilay
Three hours ago, John Clements wrote: Mac OS X (32-bit 64-bit) I'm guessing this was supposed to be Mac OS X (Intel 64-bit) Yes, that was a typo. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze

[racket-dev] Seg Fault in GC with Pre-Release Racket

2012-04-19 Thread Williams, Doug
I have downloaded the latest pre-release for v5.3 (plt-5.2.901.1-bin-i386-win32.exe). All of my PLaneT collections load and run fine. But, my large application at work fails to run - it dies during startup with Seg Fault (internal error during gc) at 58720044 printed (twice) in a new window. It's