Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-29 Thread Jos Koot
Thanks. I always use DrRacket for editing racket code. Jos. > -Original Message- > From: Greg Hendershott [mailto:greghendersh...@gmail.com] > Sent: domingo, 29 de junio de 2014 5:55 > To: Jos Koot > Cc: dev; jja.k...@gmail.com > Subject: Re: [racket-dev] 2htdp/image

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-28 Thread Greg Hendershott
On Mon, Jun 23, 2014 at 9:44 PM, Jos Koot wrote: > style. Writing this, the idea comes up in my mind that it should be possible > to do some transformations to the recommended style by means of redex. Or > may be by means of syntax-case while limiting the transformers to the > desired level of exp

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-27 Thread Kevin Forchione
On Jun 27, 2014, at 5:29 PM, Robby Findler wrote: > I've generally tried to keep the image arguments last to make nested > compositions of functions easier to read. Since we have to keep frame > for backwards compatibilities reasons regardless, I don't think we > need to worry about making color

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-27 Thread Robby Findler
I've generally tried to keep the image arguments last to make nested compositions of functions easier to read. Since we have to keep frame for backwards compatibilities reasons regardless, I don't think we need to worry about making color-frame's color argument optional. Robby On Fri, Jun 27, 201

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-27 Thread Kevin Forchione
On Jun 22, 2014, at 9:42 PM, Robby Findler wrote: > Thanks! I've added these two functions. > > Robby > > On Sun, Jun 22, 2014 at 12:26 PM, Kevin Forchione wrote: >> >> On Jun 21, 2014, at 5:02 PM, Robby Findler >> wrote: >> >> What do you think about a variant on center-crop called crop/a

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-23 Thread Robby Findler
FWIW, I think this is what the style guide would recommend. I found the transformation to be pretty straightforward, except that I had to rename on occurrence of 'H' to 'H2'. (I didn't try to test it, tho!) Robby (define (make-natural->rearrangement L (EQ? equal?)) (define N (nr-of-rearrangemen

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-23 Thread Jos Koot
tes, 24 de junio de 2014 2:12 > To: Jos Koot > Cc: Asumu Takikawa; Kevin Forchione; dev@racket-lang.org; > jja.k...@gmail.com > Subject: Re: [racket-dev] 2htdp/image Feature Suggestion > > I think that the prefer-define-over-let applies only to the first let > in this program. >

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-23 Thread Robby Findler
efine (nr-of-rearrangements L EQ?) ...) > (define (count-occcurrences E L EQ?) ...) > >> -----Original Message- >> From: dev [mailto:dev-boun...@racket-lang.org] On Behalf Of >> Asumu Takikawa >> Sent: lunes, 23 de junio de 2014 7:35 >> To: Kevin Forchione &g

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-23 Thread Jos Koot
ts L EQ?) ...) (define (count-occcurrences E L EQ?) ...) > -Original Message- > From: dev [mailto:dev-boun...@racket-lang.org] On Behalf Of > Asumu Takikawa > Sent: lunes, 23 de junio de 2014 7:35 > To: Kevin Forchione > Cc: dev@racket-lang.org > Subject: Re: [racket-d

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-23 Thread Matthias Felleisen
On Jun 23, 2014, at 12:03 PM, Kevin Forchione wrote: > I’ve only skimmed the manual so far, but see it doesn’t address one of my > questions: whether and when to favor functions such as first/rest/empty?, > etc., over the Lisp-y car/cdr/null?, etc. I have noticed that some of these > function

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-23 Thread Kevin Forchione
On Jun 22, 2014, at 10:35 PM, Asumu Takikawa wrote: > On 2014-06-22 20:27:21 -0700, Kevin Forchione wrote: >> Thanks! Is there any documentation or guide on which *styles* to prefer in >> writing Racket code? I find myself scratching my head at times in these >> matters! > > In recent Rac

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-22 Thread Asumu Takikawa
On 2014-06-22 20:27:21 -0700, Kevin Forchione wrote: >Thanks! Is there any documentation or guide on which *styles* to prefer in >writing Racket code? I find myself scratching my head at times in these >matters! In recent Racket distributions and online docs there's now a style manual:

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-22 Thread Robby Findler
Thanks! I've added these two functions. Robby On Sun, Jun 22, 2014 at 12:26 PM, Kevin Forchione wrote: > > On Jun 21, 2014, at 5:02 PM, Robby Findler > wrote: > > What do you think about a variant on center-crop called crop/align > that accepts a width, a height, an image, and an x-place and a

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-22 Thread Kevin Forchione
On Jun 21, 2014, at 3:22 PM, Matthias Felleisen wrote: > > Thanks. We will need to figure out how to accommodate keywords in a > teachpack. > > In the meantime, write frame like this: > > (define (frame-2 img > #:frame-color (frame-color 'black) > #:backgro

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-22 Thread Kevin Forchione
On Jun 21, 2014, at 5:02 PM, Robby Findler wrote: > What do you think about a variant on center-crop called crop/align > that accepts a width, a height, an image, and an x-place and a > y-place? > > That would seem to fit better into the library the way it's currently > constructed. > > For wo

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-21 Thread Robby Findler
What do you think about a variant on center-crop called crop/align that accepts a width, a height, an image, and an x-place and a y-place? That would seem to fit better into the library the way it's currently constructed. For working around the frame issue, how about just a color-frame function t

Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-21 Thread Matthias Felleisen
Thanks. We will need to figure out how to accommodate keywords in a teachpack. In the meantime, write frame like this: (define (frame-2 img #:frame-color (frame-color 'black) #:background-color (background-color 'transparent) #:frame-offset (

[racket-dev] 2htdp/image Feature Suggestion

2014-06-21 Thread Kevin Forchione
Hi guys, I’ve been working with 2htdp/image and been struck by its monitor-oriented coordinate system and its image-centric perspective, both of which have proven a rich bed for new tools. I’ve found these two functions have been useful to me and might be useful for others. I’ve particularly fou