If it's fair to compare a woman's situation in a mostly-men field to a
man's situation in a mostly-women field...
Then, mentally putting myself in such a situation, I would probably
feel pretty strange going to a club of more than, say, 5 other people
who were all women and trying to socialize wit
> Here's a 136-character version (after unnecessary spaces are removed):
>
> (define (life s)
> (let* ((a bitwise-and)
> (s (bitwise-ior (* s #x111000101000111/1000) s)))
> (a (* (a (- -1 s) (* s 4)) 3/32)
> (/ (- (expt 8 48) 1) 15
>
> -- Jeremiah Willcock
That doesn't wo
#lang typed/racket
; this works
(for/list: : (Listof Integer)
([i 5])
i)
; this doesn't
(for/vector: : (Vectorof Integer)
([i 5])
i)
error:
Type Checker: Error in macro expansion -- insufficient type
information to typecheck. please add more type annotations in:
(for/vector: : (Vectorof
Here's a rough draft that has tons of room for improvement:
#lang racket
(define glider
(string->number "#x\
01\
001000\
111000\
00\
00\
00\
"))
(define (life s)
(define (c s n)
(if (= -1 n)
0
(+ (if (bitwise-bit-set? 3080 (arithmetic-shift s (* -4 n)))
On Sat, Feb 18, 2012 at 9:18 PM, Robby Findler wrote:
> I'm not sure of the precise answer, but I don't think that all floats
> (even the integers) have a corresponding fixnum.
My C brain wonders why I can't just cast it to get the lower bits, I
don't care about overflow.
Using fixnum? does indee
I'm trying to optimize some code that processes a bunch of data,
basically image pixels, which currently takes on the order of several
seconds and seems like it should be much faster (important because
it's an interactive application). Coming from C++ I have a good idea
in my mind of how I'd write
Running this program in DrRacket...
#lang typed/racket
(provide (all-defined-out))
(: foo Single-Flonum)
(define foo 1.0f0)
...gives me this error:
expand: unbound identifier in module in: t:single-flonum?
I don't know what it means or why it shows up when I try to provide
all-defined-out. I've
7 matches
Mail list logo