Hi,
I was wondering if someone could help me understand the problem with the
following code?
(struct: obj ([a : Integer] [b : Symbol]))
(: f1? (obj Symbol -> Boolean))
(define (f1? o x)
(and (= 0 (obj-a o))
(eq? x (obj-b o
(: f2? (obj Symbol -> Boolean))
(define (f2? o x)
(and (zer
Have you seen the tutorials? ...
Quick:An Introduction to Racket with Pictures
Continue: Web Applications in Racket
More: Systems Programming with Racket
rac
On Jan 5, 2012, at 7:51 PM, Giuseppe Paleologo wrote:
> I am a new Racket user. I am reading the Racket Guide, but I was wonder
I am a new Racket user. I am reading the Racket Guide, but I was wondering
if a shorter guide is available somewhere, perhaps not as comprehensive.
Something like "Teach yourself Racket in Fixnum Days?" or "Core Racket",
"Racket: the good parts" [I know, all Racket parts are good]. If not, I'll
ke
On Thu, Jan 5, 2012 at 11:56 PM, John Clements
wrote:
> I wrote a piece of code like this without thinking:
>
> #lang typed/racket
>
> (: f (All (T) (Number -> T -> T)))
> (define ((f x) y)
> (ann y T))
>
> ... and then, after a second, was sort of flabbergasted that it worked.
> What's the sco
On Fri, Jan 6, 2012 at 1:00 AM, John Clements wrote:
>
> Examining the difference between Inexact-Real and Float yields this:
>
>> (:type Float)
> (U Float-Positive-Zero Float-Negative-Zero Float-Nan Positive-Float
> Negative-Float)
>> (:type Inexact-Real)
> (U Float-Positive-Zero Float-Negative-
I'd like a predicate that checks whether a number is a Float. Here's what I
tried:
(: amplitudes/t (Listof Float))
(define amplitudes/t
(cond [(andmap inexact-real? amplitudes)
amplitudes]
[(error 'impossible "Make TR happy")]))
But
I wrote a piece of code like this without thinking:
#lang typed/racket
(: f (All (T) (Number -> T -> T)))
(define ((f x) y)
(ann y T))
... and then, after a second, was sort of flabbergasted that it worked. What's
the scope of the type variable T? Apparently I can use it anywhere in the
def
On Wed, Jan 04, 2012 at 11:03:13PM -0700, Ryan Culpepper wrote:
> On 01/04/2012 09:51 PM, John Clements wrote:
> >Has anyone taken a look at generating ePub or mobi documents directly
> >from scribble?
> >
> >As the owner of a Kindle, I can see that pdf/dvi/ps is terrible for
> >these kind of on-th
I'm happy to take the code below as a patch. I think that would be the
best thing to do in this case, because I don't really have anything
else to add.
Jay
On Thu, 5 Jan 2012 18:07:47 +, Norman Gray mumbled:
> Jay, hello.
> On 4 Jan 2012, at 20:53, Jay McCarthy wrote:
> >> In the XML mod
Compiling racket-textual-5.2 (unix) on EC2 (CentOS), seems to stall around:
a - ../foreign/foreign.o
a - ../foreign/libffi/src/closures.o
a - ../foreign/libffi/src/debug.o
a - ../foreign/libffi/src/java_raw_api.o
a - ../foreign/libffi/src/prep_cif.o
a - ../foreign/libffi/src/raw_api.o
a - ../forei
Jay, hello.
On 4 Jan 2012, at 20:53, Jay McCarthy wrote:
>> In the XML module's cdata struct, "[t]he string field is assumed to
>> be of the form with proper quoting of
>> ‹content›." It's not clear that this is a very useful design of the
>> interface.
>
>> Principally, it makes it inconveni
John and Neil, hello.
On 4 Jan 2012, at 03:47, John Clements wrote:
> On Jan 3, 2012, at 3:09 PM, Neil Van Dyke wrote:
>
>> I don't know what the *stock* XML parsing does, but I have used Oleg
>> Kiselyov's SSAX parser a lot in Racket-based production apps, and it does
>> handle CDATA.
[...]
At Thu, 5 Jan 2012 09:10:49 -0800,
John Clements wrote:
> I just had trouble with the type of log; I wanted to pass it a
> positive real, and get back a Real. After inspecting the type, I see
> that it works for Positive-Float. Is this deliberate, in order to get
> more optimizable code (if the i
At Thu, 5 Jan 2012 09:16:31 -0800,
John Clements wrote:
> It appears that TR only prints the message "[Use (:print-type
> ) to see more.]" once. I think this is the wrong choice, and
> that it should be printed every time.
Once the user has seen that message once, he knows that there's a way
to di
It appears that TR only prints the message "[Use (:print-type ) to see
more.]" once. I think this is the wrong choice, and that it should be printed
every time.
Totally unimportant, I know.
Thanks!
John Clements
smime.p7s
Description: S/MIME cryptographic signature
I just had trouble with the type of log; I wanted to pass it a positive real,
and get back a Real. After inspecting the type, I see that it works for
Positive-Float. Is this deliberate, in order to get more optimizable code (if
the input is a float, we don't need to check it), or just an overs
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 04-01-12 16:55, Matthias Felleisen wrote:
>
> On Jan 4, 2012, at 10:40 AM, Marijn wrote:
>
>> Basically, my idea was to transform:
>>
>> (dependent-boxes ((a) (b (* 2 a)) (c (+ 2 a b
>>
>> into something which would automatically propagate c
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 04-01-12 22:50, Eli Barzilay wrote:
> 11 hours ago, Marijn wrote:
>> It took me a while to understand what you're saying here, but if
>> I am not mistaken you're saying that the result of the
>> macro-expansion is a function-application with `let*'
18 matches
Mail list logo