Re: [racket-dev] Scribble code for table with fixed-width columns?

2014-06-23 Thread Matthew Flatt
Enclosed. This approach can be as general as it is ugly, but I think `table` should more directly support lines between rows and columns. At Mon, 23 Jun 2014 14:58:16 -0400, Kathi Fisler wrote: > Great, thanks! How do I augment this with horizontal lines (\hlines) at > the top and bottom, as wel

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
Hi Robby Replacing if by cond is very stylisch indeed. Nowadays I use cond more than if, especially if it is nested or if I need internal definitions in one or more of the alternatives. Replacing the outer named let by a reference to a function defined outside of the procedure is not too difficult,

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

2014-06-23 Thread Robby Findler
I think that the prefer-define-over-let applies only to the first let in this program. The style guide also would recommend 'cond' over 'if' here, but it becomes very very important to do that only if there were nested 'let's or 'begin's or the like and you don't have that. Robby On Mon, Jun 23,

Re: [racket-dev] Scribble code for table with fixed-width columns?

2014-06-23 Thread Kathi Fisler
Great, thanks! How do I augment this with horizontal lines (\hlines) at the top and bottom, as well as between each pair of consecutive lines? Assume this is a style of some sort (I should be all set after that). Kathi On Mon, Jun 23, 2014 at 6:31 AM, Matthew Flatt wrote: > At Mon, 23 Jun 20

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

2014-06-23 Thread Jos Koot
In the recommendations of http://docs.racket-lang.org/style/index.html it is recommended to use (internal or module top-level) define rather than named let. I use named let a lot. How would you rewrite the following? For me it is rather difficult to make the change without loosing track of the scop

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] [plt] Push #28919: master branch updated

2014-06-23 Thread Matthew Flatt
At Mon, 23 Jun 2014 10:45:44 -0400, Sam Tobin-Hochstadt wrote: > On Mon, Jun 23, 2014 at 8:29 AM, wrote: > > > > 6a5a303 Matthew Flatt 2014-06-23 13:23:47 +0100 > > : > > | avoid getting stuck on non-UTF-8 symbol encodings in bytecode > > | > > > Does this fix apply to keywords as well? Yes.

Re: [racket-dev] [plt] Push #28919: master branch updated

2014-06-23 Thread Sam Tobin-Hochstadt
On Mon, Jun 23, 2014 at 8:29 AM, wrote: > > 6a5a303 Matthew Flatt 2014-06-23 13:23:47 +0100 > : > | avoid getting stuck on non-UTF-8 symbol encodings in bytecode > | Does this fix apply to keywords as well? I assume that strings are handled differently. Sam _ Racket

Re: [racket-dev] Scribble code for table with fixed-width columns?

2014-06-23 Thread Matthew Flatt
At Mon, 23 Jun 2014 03:59:38 -0400, Kathi Fisler wrote: > I need to create a table/tabular in which each column has a different fixed > width. In latex, I would write {p{1in} | p{2in}} in the column > specification. > > Anyone have a sample of scribble code that does this? The enclosed example wo

[racket-dev] Scribble code for table with fixed-width columns?

2014-06-23 Thread Kathi Fisler
I need to create a table/tabular in which each column has a different fixed width. In latex, I would write {p{1in} | p{2in}} in the column specification. Anyone have a sample of scribble code that does this? thanks, Kathi _ Racket Developers list: http://lists.racket-l