On Sat, Nov 09, 2013 at 11:53:37AM -0800, Daniel Prager wrote:
> >
> > (I noticed that the code ran under Racket v5.3.4. but under
> > Racket v5.2.1. none of the code ran - it showed
> > for: bad sequence binding clause at: #:break?)
>
>
> The #:break clause isn't available in the for form of v5.
I agree fully with Daniel's suggestions.
Daniel's first example is also in a style popular among Racketeers.
Since I think not everyone has exactly the same verbal/visual cognitive
makeup, below is the same code with some slight tweaks in style, to
appeal to different people. (You'll want to
Establishing a max width is definitely something that we want to do. I see
now that I was confused by the two different failure modes. I've pushed a
fix for the contract-out docs.
Thanks,
Robby
On Sun, Nov 10, 2013 at 12:01 AM, Matthew Butterick wrote:
> On Sat, Nov 9, 2013 at 8:44 AM, Robby F
At Sun, 10 Nov 2013 01:01:25 -0500, Matthew Butterick wrote:
> So while one wants to avoid pushing design constraints onto writers, code
> samples are special, thus it would be useful to adopt a max width.
Yes, my original intent was to pick a specific maximum column for code.
I didn't figure out
Just to underline the positive part of my comment:
I used your version of the docs for awhile last night, for some real work.
When I eventually needed something that was outside what you opted to
port in your test, and I had to go back to the old/real docs, I was
bummed. I missed your new version
Have you considered classes instead of structs? -- Matthias
On Nov 9, 2013, at 12:50 PM, David T. Pierson wrote:
> Hi all,
>
> Sometimes when defining struct types it is useful to have fields which
> are essentially "private" to the module (fields whose accessors/mutators
> are not exported f
Hello All,
As part of the design for a simple genetic algorithm I have this function:
(define (roulette-wheel-ratio generation-fitness )
(cond [(empty? generation-fitness) empty]
[else (cons (/ (first generation-fitness)
(total-population-fitness
genera
I think this is the program you want:
#lang racket
(module+ test
(require rackunit))
;; [List-of Real] -> [List-of Real]
(module+ test
(check-equal? (roulette-wheel-ratio '(1 2 3)) '(1/6 2/6 3/6)))
(define (roulette-wheel-ratio generation-fitness)
(define total-population-fitness (f
Yes, thank you!
On Sun, Nov 10, 2013 at 2:39 PM, Matthias Felleisen wrote:
>
> I think this is the program you want:
>
> #lang racket
>
> (module+ test
> (require rackunit))
>
> ;; [List-of Real] -> [List-of Real]
>
> (module+ test
> (check-equal? (roulette-wheel-ratio '(1 2 3)) '(1/6 2/6 3/
This is amazing! Thank you very much!
Given all the little rendering things that people are pointing out, I
should say that the docs are currently using a transitional DOCTYPE,
which could be part of the problem. You probably have good reasons for
it, but I thought I'd mention it just in case.
On 2013-11-07 19:11:50 -0500, Daniel King wrote:
> Does anyone have something in particular they'd like to present about? In
> mid-December, I should have enough data for a talk about using Racket to do
> some
> Machine Learning on public transit data.
FWIW, I'd try to show up to a Boston-area Ra
On Tue, Oct 15, 2013 at 1:00 PM, Jens Axel Søgaard wrote:
> 2013/10/15 Robby Findler :
> > Instead of the complication of a natural setting, how about I just make
> > bitmaps refuse to convert themselves to svg-bytes (using the
> > file/convertible interface anyway -- if you know you have a bitmap
Eli gave a couple of example of generating html in the as-yet undocumented,
but neat-looking #lang scribble/html on stackoverflow:
http://stackoverflow.com/questions/9253126/generate-html-in-racket
These examples are attribute free. E.g.
#lang scribble/html@(define name "foo")@html{@head{@title{
Trying to compile head and I get the error below. I originally thought
it was due to one of my external pkgs but I've removed them one-by-one
until I have nothing installed, and I am still getting the error. I've
searched the mailing list and the docs and have not been able to find
any additional i
>From peeking at the source[1] it looks like you supply them in square
brackets with the attribute names ending in a colon. For instance
this:
#lang scribble/html
@a[href: "http://www.racket-lang.org";
title: "Racket the Ultimate"]{Racket}
evaluates to this:
http://www.racket-lang.org"; title
On Sun, Nov 10, 2013 at 6:27 PM, Daniel Prager
wrote:
> Eli gave a couple of example of generating html in the as-yet undocumented,
> but neat-looking #lang scribble/html on stackoverflow:
> http://stackoverflow.com/questions/9253126/generate-html-in-racket
There are lots of examples of `scribble
> Yes, my original intent was to pick a specific maximum column for code.
> I didn't figure out how to both pick a specific width in characters and
> allow the font to be the user's chosen monospace font, so I made the
> width 43ems, which works out to 69 characters in my browser.
FWIW, monospaced
Thanks Greg and Sam
#lang scribble/html
> @a[href: "http://www.racket-lang.org";
>title: "Racket the Ultimate"]{Racket}
>
After reading a comment in the source I tried @[*:href* "foo.html"]{bar}
and even @[*href* "foo.html"]{bar} before turning to the list.
BTW: For others playing with this:
Three hours ago, Daniel Prager wrote:
> Thanks Greg and Sam
>
> #lang scribble/html
> @a[href: "http://www.racket-lang.org";
> title: "Racket the Ultimate"]{Racket}
>
> After reading a comment in the source I tried @[:href
> "foo.html"]{bar} and even @[href "foo.html"]{bar} before
19 matches
Mail list logo