submitted as bug report
On Nov 11, 2010, at 7:54 PM, David Van Horn wrote:
> On 11/11/10 7:34 PM, Nadeem Abdul Hamid wrote:
>> The check-within in the follow program (in BSL/ISL) seems to hang.
>
> I see DrRacket (5.0.1, 5.0.99) loop on this:
>
On 11/11/10 7:34 PM, Nadeem Abdul Hamid wrote:
The check-within in the follow program (in BSL/ISL) seems to hang.
I see DrRacket (5.0.1, 5.0.99) loop on this:
(check-within (make-posn (list 0)
(list 0))
(make-posn (list 0)
(list 0
The check-within in the follow program (in BSL/ISL) seems to hang.
This is sort of the simplest example I can reproduce, but my students
have been running into this with some more complicated test cases. I
thought it might have to do with the inexact numbers, but even if you
change the #i0.501 to 0
I've written a version of `set-choose', and also `set-first' and
`set-rest' (with the obvious meanings) a few times. They can be useful.
(I always waffled about whether to use just `set-choose', or `set-first'
along with `set-rest'. Mathematically, `set-first' and `set-rest' don't
make sense,
I think a function named set-choose should return just the chosen
element. I would call the function below set-split, maybe.
Also, beware that for/first returns #f if the sequence is empty.
Ryan
On 11/11/2010 01:38 PM, Jay McCarthy wrote:
I think it is a good idea. Any objectors?
Jay
On Wed
I think it is a good idea. Any objectors?
Jay
On Wed, Nov 10, 2010 at 12:40 PM, David Van Horn wrote:
> The set library is missing a convenient way of selecting an element from a
> set, making it hard to write recursive functions matching the inductive
> structure of a set.
>
> Could you add thi
When truly picking uniformally shuffled lists from a given list, see:
http://telefonica.net/web2/koot/natural-to-permutation.scm
and try
(require srfi/27) ; for random-integer
(require "natural-to-permutation.scm")
(let*
((lst (build-list 1000 (lambda (k) (round (quotient k 10)
(
5 minutes ago, Neil Toronto wrote:
> Carl Eastlund wrote:
> > It's "pick a random, uniform ordering, and then sort based on it".
> > The random keys are chosen per element and cached (hence
> > #:cache-keys? #t), not per comparison.
>
> Spanking good point, my good man. I think you're right.
It's
Carl Eastlund wrote:
On Thu, Nov 11, 2010 at 12:40 PM, Neil Toronto wrote:
I don't know. I know that the "run through the list and swap with another
random element" algorithms are usually non-uniform, and so are a lot of
other things that seem like they'd work. I wouldn't use something that
was
On Thu, Nov 11, 2010 at 11:40 AM, Carl Eastlund wrote:
> On Thu, Nov 11, 2010 at 12:40 PM, Neil Toronto wrote:
>>
>> I don't know. I know that the "run through the list and swap with another
>> random element" algorithms are usually non-uniform, and so are a lot of
>> other things that seem like
On Thu, Nov 11, 2010 at 12:40 PM, Neil Toronto wrote:
>
> I don't know. I know that the "run through the list and swap with another
> random element" algorithms are usually non-uniform, and so are a lot of
> other things that seem like they'd work. I wouldn't use something that
> wasn't proven to
Carl Eastlund wrote:
On Thu, Nov 11, 2010 at 12:18 PM, Neil Toronto wrote:
Eric Hanchrow wrote:
I find myself using this all the time; it seems it'd be handy to have
built in.
(define (shuffled list)
(sort list < #:key (lambda (_) (random)) #:cache-keys? #t))
Is the distribution of shuffled
I think that if random doesn't pick the same number twice you're
guaranteed to be independent of the sorting algorithm, at least.
Robby
On Thu, Nov 11, 2010 at 11:18 AM, Neil Toronto wrote:
> Eric Hanchrow wrote:
>>
>> I find myself using this all the time; it seems it'd be handy to have
>> buil
On Thu, Nov 11, 2010 at 12:18 PM, Neil Toronto wrote:
> Eric Hanchrow wrote:
>>
>> I find myself using this all the time; it seems it'd be handy to have
>> built in.
>>
>> (define (shuffled list)
>> (sort list < #:key (lambda (_) (random)) #:cache-keys? #t))
>
> Is the distribution of shuffled li
Eric Hanchrow wrote:
I find myself using this all the time; it seems it'd be handy to have built in.
(define (shuffled list)
(sort list < #:key (lambda (_) (random)) #:cache-keys? #t))
Is the distribution of shuffled lists uniform? That'd be hard to
analyze, since it would depend on the sor
I find myself using this all the time; it seems it'd be handy to have built in.
(define (shuffled list)
(sort list < #:key (lambda (_) (random)) #:cache-keys? #t))
Thanks.
_
For list-related administrative tasks:
http://lists.racket-lang.org/l
This start up error shows up much more frequently for me with gr2 (1/2) than it
used to (1/10).
> $ drracket
> [1] 35606
> [:~/0Unison/Amr] matthias% link: reference (phase 0) to a variable in module
> "/Users/matthias/plt/collects/string-constants/string-constant.rkt" that is
> uninitializ
17 matches
Mail list logo