Typo:
> This suggests that your reasoning is that only myself is affected by key
events and only 'left and 'right key events
and 'up and 'down, of course.
On Fri, May 2, 2014 at 12:52 AM, Marco Morazan wrote:
> Your on-key-event handler is:
>
> ;Movement of Myself in XY-direction on key-press
Your on-key-event handler is:
;Movement of Myself in XY-direction on key-press
(define (alter-myself-xy-on-key w key)
(cond
[(key=? key 'up)
(make-world (make-posn (posn-x (world-myself w))
(- (posn-y (world-myself w)) key-distance))
(world-s
On 2014-05-01 22:53:49 -0400, Alexander D. Knauth wrote:
> Is there a type constructor for interfaces? And if there is, would
> (Instance Interface<%>) work (like (is-a?/c interface<%>) works)?
There is not (yet) and I don't know how we will support it if we do.
Right now the only option is to re
Is there a type constructor for interfaces? And if there is, would (Instance
Interface<%>) work (like (is-a?/c interface<%>) works)?
Other slightly random but related questions:
Is there a way to specify inheritance in a class or interface type constructor
(so then you can avoid some copying
Hi Eduardo,
Just to check, have you seen Greg Hendershott's "Fear of Macros"
tutorial already?
http://www.greghendershott.com/fear-of-macros/
Racket Users list:
http://lists.racket-lang.org/users
Three tips for this problem:
* Don't use "eval".
* For the pattern-matching part of your syntax transformers, use only
"syntax-case" or "syntax-parse". "syntax-rules" and
"define-syntax-rule" might get in the way, and block and frustrate you,
for no good reason.
* Do experiments in DrRacke
In general, I don't have problems with macros in Common Lisp or in Scheme.
However, macros in Racket baffle me. I simply cannot figure out how
syntax->datum, syntax->list and datum->syntax work. In any case, I need a
macro to prove that a proposition is a tautology. Below you will find what
I did.
I let people know today that my Pollen package was available on Github. It
took about 4 seconds for someone to ask "how do I read the docs without
installing the software?"
So until there's a Racket-approved solution, I made the docs available
here: http://mbutterick.github.io/pollen/doc/
If it h
On 05/01/2014 04:31 PM, John Clements wrote:
On Apr 28, 2014, at 8:29 PM, Neil Toronto wrote:
On 04/28/2014 05:28 PM, John Clements wrote:
The documentation for discrete probabilities goes out of its way to specified
that discrete distributions are unordered. However, it looks to me like or
On Apr 28, 2014, at 8:29 PM, Neil Toronto wrote:
> On 04/28/2014 05:28 PM, John Clements wrote:
>> The documentation for discrete probabilities goes out of its way to
>> specified that discrete distributions are unordered. However, it looks to me
>> like order is partially present; in particul
Hi Zee
Foods: Consider using a list (or set) of foods in your world.
Timer: My 2048 game now has this as an option thanks to John Clements. The
initial state captures the start time and comparison with the current time
can generate the countdown. https://github.com/danprager/racket-2048
How do y
On Thu, May 1, 2014 at 1:26 PM, Zee Ken wrote:
> Hi,
>
> I am creating a game which runs in the below world.
>
> (define-struct world (myself monster1 monster2 food1 food2))
>
> The objective of the game is to move yourself in the world, not get hit by
> monsters and eat the food.
>
> I am done w
On Thu, May 1, 2014 at 5:55 AM, Tim Brown wrote:
> I assume that the load is in "bit-vector-ref"; there is a lot of
> type-checking around it, and a tantalisingly un-provided unsafe version,
> too :-)
I poked at bit-vector.rkt for fun, and your bit vector version can be
made to run in 60% the tim
Hi,
I am creating a game which runs in the below world.
(define-struct world (myself monster1 monster2 food1 food2))
The objective of the game is to move yourself in the world, not get hit by
monsters and eat the food.
I am done with
1) Keyboard manipulation of *myself*,
2) Stopping the game wh
On Thu, May 1, 2014 at 5:22 PM, Zee Ken wrote:
> When I click on the button *Click Me*, it has to show *mystrng* like when
> I use draw-text procedure in a canvas instead it only shows, *Line1
> text...* and the rest doesn't appear.
>
It's because the size of the `message%` does not automaticall
If you are using Racket or another mostly functional language in any
kind of musical, artistic, or design endeavour, please consider
contributing to FARM 2014, the 2nd ACM SIGPLAN International Workshop of
Functional Art, Music, Modelling and Design, co-located with ICFP 2014.
Find attached the C
Hi,
I just started looking at the Graphical Interface Toolkit provided in the
Racket Documentation.
http://docs.racket-lang.org/gui/windowing-overview.html
There was this example right in the beginning.
(define frame (new frame%
[label "Example"]
[width 30
Jens,
On 01/05/14 10:41, Jens Axel Søgaard wrote:
https://github.com/plt/racket/blob/6722b7a71e234ab3d41e936ab8605f1ef5e456c8/racket/collects/data/bit-vector.rkt
The Lucid sieving differs from Eratosthenes sieving in this respect:
With primes, you can eliminate previously eliminated non-prime
http://www.w3.org/TR/xml/#sec-cdata-sect
http://www.w3.org/TR/xml/#NT-Char
Skimming the documentation, CDATA didn't help at all, nor escaping
http://www.w3.org/TR/xml/#dt-charref.
Racket Users list:
http://lists.racket-lang.org/users
Hi Tim,
The code in question is here:
https://github.com/plt/racket/blob/6722b7a71e234ab3d41e936ab8605f1ef5e456c8/racket/collects/data/bit-vector.rkt
I notice that you access the elements in the bit-vector from left to right.
Maybe something can be done to improve the speed of this particular
ac
I wish to persist "set"s to a file, for reading at a later date. However,
read and write don't seem to serialise sets (I think it's more read doesn't
deserialise them) correctly:
-| test-read-write.rkt |--
(define (write->string->read writer reader v)
(with-handlers ((exn? displayln))
Folks,
I've just posted an implementation for "Lucid Numbers" on rosettacode.org
for Racket. It sieves numbers using using a "bytes" variable, which, for
this purpose is what I consider to be a "vector of bytes".
The code is different from a "sieve of Eratosthenes", in that (at least my
implemen
22 matches
Mail list logo