
I am quite confused about this snippet… how come this contract is wrong? #lang racket
(provide
(contract-out
[struct job
((id exact-positive-integer?))
((type (symbols 'foo 'bar)))]))
(struct job
(id type))

It’s telling me : contract-out: malformed struct option in: ((type (symbols (quote foo) (quote bar))))

Can anyone recommend a resource / tutorial on how to do an MVC GUI or something similar in Racket? thanks!

@pocmatos too many parentheses. Should be (provide
(contract-out
[struct job
([id exact-positive-integer?]
[type (symbols 'foo 'bar)])]))

Also, symbols
is for backwards-compatibility: you can just write (or/c 'foo 'bar)
.

Didn’t knew that! Looks like I was copying old style in my new code… Thanks.

first-class classes sound awesome!

following http://www.ccs.neu.edu/home/matthias/Thoughts/Programming_with_Class_in_Racket.html and Racket has a really refreshing approach to OO

I’ve never been a great fan of OO, but in Racket it feels better

so is the foo% notation convention not exclusive to classes? I see the get-drr-frame% method in that tutorial uses it, is it because it returns a class?

@philip.mcgrath Argh, doh! I didn’t notice that. Need more sleep. Thanks.

@maxim_jaffe yes, that function produces a frame%

Does anyone know why compose
only accepts two procedures when in the context of typed/racket
?

@david.alkire because we can’t express the more general version in types

hi everyone

how to make multi version of proc with different arg(as overloading)


@minhnhat10bk you can use optional arguments or case-lambda

tks you

Unfortunately I don’t have a public repo with the code at the moment (It’s in a project thats active research :disappointed: ) Also I think the stuff on the ReactiveML website is the best introduction ive seen, which is rather unfortunate (A lot of the work on this is in french so its hard to even give good papers to point to).
Hopefully I’ll write a guide one of these days, but ive yet to decide if ReactiveML or Esterel is a better language to go with….

Welp, the audio tracks for RacketCon have a loud buzz…so now I get to try to reduce that…

@leif No fun, but at least buzz is easier than hiss. High-pass filter might work.