I had just remembered that I forgotten the attachment. After further
messing about, I figured that 100 cars provided the best balance of
ridiculousness and smoothness.
Enjoy!
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from
Thanks for the advice all!
I did re-read the code and realized that it's really not all that
descriptive. So I tore through it, made better data definitions, commented
the code and profiled it (basically seeing how much time it took to execute
each statement); and discovered that my simulation
Hi Wesley
Some tips:
1. Your use of random with two args is incorrect: create a (random-range
a b) function to express your intent.
2. The slow-down is because you're using unlimited precision arithmetic.
Try using 1.0 instead of 1 to get floating point.
3. Instrument your
2016-04-10 17:18 GMT+02:00 Theodor Berza :
> I have a button in a frame and when I change the vert-margin and
> horiz-margin in the code the button doesn't change it's location but rather
> the frame gets smaller or larger.
>
...
> Someone suggested me to create a
> On Apr 10, 2016, at 8:19 AM, Wesley Bitomski
> wrote:
>
> Attached is some source code I've been playing with. I'm trying to come up
> with an approximate simulation of gravity between a very massive (but
> inertia-less) mouse cursor and a handful of
Sorry, now with attachment.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
For more options, visit
Thank you very much,
but although I changed else expresion, Racket sometimes returns same
warning(but now with #f instead of #).
But when I click Run again (sometimes twice or more) it returns what I want.
That´s the strangest thing.
Could it be an error in Racket settings?
I attach my code,
The most literal translation is
#lang racket
(define select-room (lambda (number rooms)
(let loop ((l (mcar rooms)))
(if (not (null? l))
(if (= (mcar(mcar l)) number)
(mcar l)
Attached is some source code I've been playing with. I'm trying to come up with
an approximate simulation of gravity between a very massive (but inertia-less)
mouse cursor and a handful of semi-massless circles.
For a test, I'm only simulating a single body. This world program will render
the
I have a button in a frame and when I change the vert-margin and horiz-margin
in the code the button doesn't change it's location but rather the frame gets
smaller or larger.
This is the code:
(require racket/gui/base)
(define frame (new frame% [label "GUI BUILDER"]
At Sun, 10 Apr 2016 07:49:19 -0700, Matthew Butterick wrote:
> 1) When, if ever, is the `read` of a #lang invoked by Racket?
That happens if you use `read` on a file that starts `#lang`.
In that case, the `read-accept-reader` parameter must be set, as in
(parameterize ([read-accept-reader #t])
The docs describe the relationship this way: "In `read-syntax` mode, the result
is always a syntax object ... wrapped around the sort of datum that `read` mode
would produce." [1]
Along those lines, I've yet to see a #lang where the `read` amounts to more
than wrapping `read-syntax` with
Thank for your answer,
but how should I change the procedure and ged rid of Racket warning?
I cant figure it out.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
Dne neděle 10. dubna 2016 13:29:43 UTC+2 Joan Martin napsal(a):
> Hello,
> I try to write a programme (a game), where I use lots of mutable lists (named
> environment).Something like this:
> (define environment
> (mcons (mcons (mcons 1 (mcons (mcons 2(mcons 5(mcons 8 '('() ))
>
On Sun, Apr 10, 2016 at 7:29 AM, Joan Martin wrote:
> I use it without problems : (select-room 2 environment) in this case.
> But when I use it in another procedure (for example: set-symbol),
> sometimes Racket returns this:
>
> mcdr: contract violation;;(mcdr in let
On Sun, Apr 10, 2016 at 1:29 PM, Joan Martin wrote:
> Hello,
> I try to write a programme (a game), where I use lots of mutable lists (named
> environment).Something like this:
> (define environment
> (mcons (mcons (mcons 1 (mcons (mcons 2(mcons 5(mcons 8 '('()
Hello,
I try to write a programme (a game), where I use lots of mutable lists (named
environment).Something like this:
(define environment
(mcons (mcons (mcons 1 (mcons (mcons 2(mcons 5(mcons 8 '('() ))
(mcons (mcons 2 (mcons (mcons 1(mcons 3(mcons 10 '( '() ))
17 matches
Mail list logo