laurent.orseau
2020-8-26 07:40:42

How does raco setup determine how many cores to use?


popa.bogdanp
2020-8-26 07:57:24

I think it uses processor-count from racket/future, which itself gets the count from rktio, which gets it from the OS:

https://github.com/racket/racket/blob/2045c4abd8a3fbf6ddc789e8803a5bc008857b99/racket/src/rktio/rktio_cpu.c


laurent.orseau
2020-8-26 08:03:29

awesome, thanks @popa.bogdanp!


sorawee
2020-8-26 08:13:52

FWIW: you might want to use let/ec instead of let/cc. It’s more restricted, but fits your use case. More importantly, it’s faster.


samth
2020-8-26 12:17:05

I will try to think about how to discover that problem …


cris2000.espinoza677
2020-8-26 18:15:28

what does PLT stands for? programming language something? translation? translator?


laurent.orseau
2020-8-26 18:16:57

(IIRC from what they’ve told us a few times) It used to mean Programming Language Theory group, but then the group grew and the interests too, so only the acronym stayed but not so much the meaning.


cris2000.espinoza677
2020-8-26 18:17:24

I see, thank you for the tip


samth
2020-8-26 18:17:28

It doesn’t stand for anything (at least, not when referring to the research group associated with Racket). There are a variety of origin stories of the group name from 25+ years ago.


cris2000.espinoza677
2020-8-26 18:18:22

oh that makes sense.


cris2000.espinoza677
2020-8-26 18:30:41

i saw this in a tutorial (define-syntax (tree-match a-tree stx) ...) isn’t that wrong?


sorawee
2020-8-26 18:38:50

yeah, probably wrong


notjack
2020-8-26 19:15:50

I usually parse it as “programming language theory” because, well, close enough


notjack
2020-8-26 19:16:14

definitely wrong


notjack
2020-8-26 19:16:39

they might have meant to use define-for-syntax instead (which creates a compile-time function, not a macro)



sorawee
2020-8-26 19:21:45

I think it’s intended to be a macro


notjack
2020-8-26 19:22:38

the code snippet is also too wide, heh


notjack
2020-8-26 19:23:47

oh dang this is that guide to macros the core devs are working on!


sorawee
2020-8-26 19:31:16

Emailed Matthias


cris2000.espinoza677
2020-8-26 19:41:02

i think they should put a link for bug/typo reporting


cris2000.espinoza677
2020-8-26 19:41:11

a visible one


notjack
2020-8-26 19:45:10

agreed


laurent.orseau
2020-8-26 19:52:17

@cris2000.espinoza677 Here’s the correct code, with a cool trick for easy debugging (note the #'' which returns the quoted code instead #lang racket (require (for-syntax syntax/parse)) (define-syntax (tree-match stx) (syntax-parse stx [(_ a-tree [(#:null) null-case] [(#:cons (~var one id) (~var more id)) cons-case] [(#:number) num-case]) #''(cond [(null? a-tree) null-case] [(cons? a-tree) (define one (first a-tree)) (define more (rest a-tree)) cons-case] [(number? a-tree) num-case] [else (error "..., given: ~e" a-tree)])])) (define (sum a-tree) (tree-match a-tree [(#:null) 0] [(#:cons elem more) (+ (sum elem) (sum more))] [(#:number) a-tree])) (sum '(1 (2 3) 4)) Replace #'' with #' for producing actual code.

The macro expander in DrRacket is also very useful (even more so).


cris2000.espinoza677
2020-8-26 19:53:27

thank you @laurent.orseau


samth
2020-8-26 19:58:58

That’s what it usually means when not referring to the Racket-associated research group


cris2000.espinoza677
2020-8-26 20:00:25

https://racket-lang.org/people.html yep it doesnt explicitly says that in this


chouandrewo
2020-8-26 20:47:08

@chouandrewo has joined the channel


soegaard2
2020-8-26 21:43:44

Discussion on the new homepage: https://news.ycombinator.com/item?id=24283478


spdegabrielle
2020-8-26 23:56:10

Wow - a remarkably positive thread. I always expect the worst with the orange site. I am rarely disappointed.


alexharsanyi
2020-8-27 01:19:03

I think it would be an improvement if the message would be changed to “insufficient type information to typecheck. please add more type annotations and check if the form is supported by Typed Racket”


jcoo092
2020-8-27 03:20:10

Particularly L33t Technologists?


jcoo092
2020-8-27 03:20:38

I never both with it for that reason.