Re: [racket] unwrapping a list

2012-06-11 Thread Jordan Johnson
Hi Jordan, The simplest change I see to your code... (define-values (year month day) (regexp-split #rx"/" "2012/06/06")) ...is this: (define-values (year month day) (apply values (regexp-split #rx"/" "2012/06/06"))) Best, jmj -- Sent from my Android phone with K-9 Mail. users-requ...@racket

Re: [racket] unwrapping a list

2012-06-11 Thread Ben Goetter
(define-values (year month day) (apply values (regexp-split #rx"/" "2012/06/06"))) On 6/11/2012 12:24 PM, Jordan Schatz wrote: Is there a way to unwrap or explode a list? I don't see it in the docs, but it seems like it would be a common thing. Racket Users list: htt

Re: [racket] Scribble to latex

2012-06-11 Thread Danny Yoo
On Wed, Jun 6, 2012 at 2:40 PM, Viera Proulx wrote: > I am starting to play with scribble and have tried to generate a pdf document > from the scribble source. The conversion to html worked fine. > > When I hit the Scribble to PDF button I got: > > Welcome to DrRacket, version 5.2.1 [3m]. > Langu

Re: [racket] unwrapping a list

2012-06-11 Thread Neil Van Dyke
(apply (lambda (year month day) (printf "Year: ~S Month: ~S Day: ~S\n" year month day)) (regexp-split #rx"/" "2012/06/06")) Neil V. Racket Users list: http://lists.racket-lang.org/users

Re: [racket] unwrapping a list

2012-06-11 Thread Eli Barzilay
A few minutes ago, Jordan Schatz wrote: > > Is there a way to unwrap or explode a list? I don't see it in the > docs, but it seems like it would be a common thing. > > This is what I want to do: > > (define-values (year month day) > (regexp-split #rx"/" "2012/06/06")) > > But regexp-split ret

Re: [racket] unwrapping a list

2012-06-11 Thread Erik Silkensen
You could use match or match-let, e.g., (match-let ([(list year month day) (regexp-split #rx"/" "2012/06/06")]) …) http://docs.racket-lang.org/reference/match.html On Jun 11, 2012, at 8:24 PM, Jordan Schatz wrote: > > Is there a way to unwrap or explode a list? I don't see it in the docs, bu

[racket] unwrapping a list

2012-06-11 Thread Jordan Schatz
Is there a way to unwrap or explode a list? I don't see it in the docs, but it seems like it would be a common thing. This is what I want to do: (define-values (year month day) (regexp-split #rx"/" "2012/06/06")) But regexp-split returns a list, not values, so I'd like to "unwrap" the list an

Re: [racket] Feature request: multiple keys in sort

2012-06-11 Thread Robby Findler
How about this: until you find the perfect way to do this, we just add two new optional keyword arguments to sort that deal with two levels of key/sorts? eg: (sort lst < #:key first #:key2 second) would mean to sort by < for both keys, treating the first position in the list as the main one and t

Re: [racket] Feature request: multiple keys in sort

2012-06-11 Thread Eli Barzilay
[Setting followups to the dev list.] 20 minutes ago, Robby Findler wrote: > On Mon, Jun 11, 2012 at 11:37 AM, Eli Barzilay wrote: > > So the bottom line is that there's no need to extend `sort' for > > this kind of functionality.  What would be nice to have though, is > > such a comparison combin

Re: [racket] Feature request: multiple keys in sort

2012-06-11 Thread Robby Findler
On Mon, Jun 11, 2012 at 11:37 AM, Eli Barzilay wrote: > So the bottom line is that there's no need to extend `sort' for this > kind of functionality.  What would be nice to have though, is such a > comparison combinator -- and the only reason there's nothing that > comes pre-packaged is that I did

Re: [racket] Scribble to latex

2012-06-11 Thread Viera Proulx
Mark and David Thanks, I got it working -- Viera On Jun 8, 2012, at 4:30 PM, Mark Millikan wrote: > Two work arounds: > > 1. Launch DrRacket from a terminal with > > 2. Run > > == > > This fragment from racket/collects/redex/private/dot.rkt succinctly describes > th

Re: [racket] Feature request: multiple keys in sort

2012-06-11 Thread Eli Barzilay
Yesterday, Harry Spier wrote: > [...] > > What I meant was something like this: > (sort '((9 9 9) (8 8 8) (8 9 8) (7 7 7) (7 9 7)) (> #:key first) (> > #key second)) >> '((9 9 9) (8 9 8) (8 8 8) (7 9 7) (7 7 7)) Ah, so you want to sort with a major/minor comparators? There's nothing built in for

[racket] Racket Social/Support Groups in London

2012-06-11 Thread Tim Brown
Folks, Are there any racket (or scheme) social groups in London, Surrey or the South East of England? Tim -- Tim Brown | City Computing Limited| T: +44 20 8770 2110| City House, Sutton Park Road | F: +44 20 8770 2130| Sutton, Surrey, SM1 2AE, G

Re: [racket] Reading racket files

2012-06-11 Thread Laurent
On Mon, Jun 11, 2012 at 10:26 AM, Neil Van Dyke wrote: > "read-accept-lang" and "read-accept-reader" seem to do most of the work. > I have looked for those several times but somehow never found them! Thank you very much Neil! Laurent > > There is still a few details to attend to. What McFly To

Re: [racket] Reading racket files

2012-06-11 Thread Neil Van Dyke
"read-accept-lang" and "read-accept-reader" seem to do most of the work. There is still a few details to attend to. What McFly Tools currently does before calling progedit for the simpler case of "info.rkt" files only is to identify one of 3 different formats: no module, #lang, and "(module .

[racket] Reading racket files

2012-06-11 Thread Laurent
Hi, Since it's not the first time I'm having a hard time with this issue (and I know others have too), I'm going to ask for advice or for a feature request: Reading arbitrary Racket-related files with `read' and `read-syntax' becomes complicated when there are #lang and especially #reader lines.