pocmatos
2018-10-2 07:54:03

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))


pocmatos
2018-10-2 07:54:08

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


maxim_jaffe
2018-10-2 08:30:37

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


philip.mcgrath
2018-10-2 09:18:52

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


philip.mcgrath
2018-10-2 09:19:44

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


jerome.martin.dev
2018-10-2 09:21:40

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


maxim_jaffe
2018-10-2 10:06:31

first-class classes sound awesome!


maxim_jaffe
2018-10-2 10:07:33

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


maxim_jaffe
2018-10-2 10:08:08

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


maxim_jaffe
2018-10-2 10:10:23

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?


pocmatos
2018-10-2 10:41:12

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


samth
2018-10-2 12:28:59

@maxim_jaffe yes, that function produces a frame%


david.alkire
2018-10-2 12:38:46

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


samth
2018-10-2 12:40:26

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


minhnhat10bk
2018-10-2 13:18:56

hi everyone


minhnhat10bk
2018-10-2 13:19:35

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


minhnhat10bk
2018-10-2 13:21:38

samth
2018-10-2 13:24:23

@minhnhat10bk you can use optional arguments or case-lambda


minhnhat10bk
2018-10-2 13:27:35

tks you


florence
2018-10-2 14:21:33

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….


leif
2018-10-2 17:55:21

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


bill_temps
2018-10-2 21:14:03

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