[racket] Dr. Racket Debugger: Stepping Backwards during debugging?

2014-01-15 Thread Rian Shams
When using Dr. Racket (assuming #lang) you are given the option to incrementally step forward with the Step button while debugging. Does Dr.Racket also allow you to take 1 step backwards while debugging? Thanks, -- Rian Shams Racket Users list: http://lists.racket

Re: [racket] Building an indexing function for lists-of-lists

2014-01-14 Thread Rian Shams
) > > > (define c (make-counter 1)) > > (c) > 1 > > (c) > 2 > > Now you can write your indexing function succinctly: > > (define (index-s-exp s-exp index) > (let ([c (make-counter index)]) > (tree-map (λ (x) (c)) s-exp))) > > > Aside: T

[racket] Building an indexing function for lists-of-lists

2014-01-13 Thread Rian Shams
I am trying to build the following indexing function: ;list-of-lists beginning-index-number -> list-of-lists ;The purpose of this function is to convert one list into another list of incremental numbers, while at the same time, maintaining the structure of the original list. To basically number ea

Re: [racket] racket newbie question on quoting and the built in procedure-arity function

2014-01-05 Thread Rian Shams
gt; At Sat, 4 Jan 2014 18:52:55 -0500, > Matthias Felleisen wrote: > > > > [1 ] > > [1.1 ] > > > > Perhaps you want something like this: > > > > Welcome to Racket v6.0.0.1. > > > (current-print (lambda (x) (if (procedure? x) (printf &quo

Re: [racket] racket newbie question on quoting and the built in procedure-arity function

2014-01-04 Thread Rian Shams
(select-random-safe-function) > '$* > > > > > On Jan 4, 2014, at 2:48 AM, Rian Shams wrote: > > If I do this I get the results I need for (procedure-arity > (select-random-safe-function)), but when I call > (safe-function-set) or (select-random-safe-fun

Re: [racket] racket newbie question on quoting and the built in procedure-arity function

2014-01-03 Thread Rian Shams
-arity (select-random-safe-function)) > > error: procedure-arity: contract violation > > expected: procedure? > > given: '$+ > > > > I think the problem is that the safe-functions are passed to > procedure-arity > > quoted. Is there a way I can unquote

[racket] racket newbie question on quoting and the built in procedure-arity function

2014-01-03 Thread Rian Shams
rocedure? given: '$+ *I think the problem is that the safe-functions are passed to procedure-arity quoted. Is there a way I can unquote the functions, or adjust procedure-arity to make (procedure-arity (select-random-safe-function)) work?* Thanks, -- Rian Shams Rack

Re: [racket] Newbie question on abstraction and the built in random function

2013-12-20 Thread Rian Shams
4319006 > 0.6998388642832832 > 0.599233672637633 > 0.5238661544779689 > 0.72734166222789) > > > > > rac > > > > On Dec 19, 2013, at 7:42 PM, Rian Shams wrote: > > Hello All, > > I am new to Racket and just started building an evolutionary computing > module

[racket] Newbie question on abstraction and the built in random function

2013-12-19 Thread Rian Shams
y help would be much appreciated. Best Regards, -- Rian Shams Racket Users list: http://lists.racket-lang.org/users

Re: [racket] simple genetic algorithm

2013-11-10 Thread Rian Shams
lette-wheel-ratio '(1 2 3)) '(1/6 2/6 3/6))) > > (define (roulette-wheel-ratio generation-fitness) > (define total-population-fitness (foldl + 0 generation-fitness)) > (map (lambda (fitness) (/ fitness total-population-fitness)) > generation-fitness)) > >

[racket] simple genetic algorithm

2013-11-10 Thread Rian Shams
generation-fitness) remains unaffected by the natural recursion imposed by roulette-wheel-ratio? Any help would be appreciated as I am still learning the Racket basics. Kind Regards, -- Rian Shams Racket Users list: http://lists.racket-lang.org/users

Re: [racket] fuzzy set representation in Racket

2013-08-26 Thread Rian Shams
Thank you, this is amazing! I am a Racketeer for life. On Mon, Aug 26, 2013 at 10:02 PM, Matthias Felleisen wrote: > > Just add fuzzy-set? to the provide specification of fuzzy-set-library. > Also add other functions as needed and provide them. > > > > On Aug 26, 2013, a

Re: [racket] fuzzy set representation in Racket

2013-08-26 Thread Rian Shams
zy-set-client racket ;; then you replace this with the usual require (require (submod ".." fuzzy-set-library)) (fuzzy-set (fuzzy-element 'a .1) (fuzzy-element 'b .2) (fuzzy-element 'c .3) (fuzzy-element 'a .3))) ;; drop this, it exists to test (require &

[racket] fuzzy set representation in Racket

2013-08-23 Thread Rian Shams
inates latter duplicates. Any guidance on how to create fuzzy-set representation this way or if you can suggest more concise and elegant methods I would be greatly appreciative. Thanks, -- Rian Shams Racket Users list: http://lists.racket-lang.org/users