
If I’m making a package that depends on another package, I’m supposed to add the dependency in info.rkt
, right? In (define deps ...)
, I guess?

Is there a way to automatically figure out what should go in deps
?

@hoshom raco setup
has --check-pkg-deps
or you could even use --fix-pkg-deps
https://docs.racket-lang.org/raco/running.html

What I tend to do for these things, either manually or via a Makefile
: https://www.greghendershott.com/2017/04/racket-makefiles.html

There’s also --unused-pkg-deps
but I don’t think it works correctly

@parkerrueve has joined the channel

Thread cells and parameters seem very similar. What is the motivation behind having them be separate constructs?

@matias roughly, thread cells have the same value everywhere in a thread, while parameters can be dynamically bound with parameterize for just a small period

@samth ah ok, right. So presumably thread cells came first?

No, parameters are older by a lot

@samth wait, what makes dynamically binding a parameter for a small period different from setting and unsetting a thread cell?

Tail call preservation, for one

are there other differences? I’ve usually thought of the main difference between the two being how parameters interact with code that spawns new threads

thread cell implementations seem to choose the same initial cell value regardless of how the thread was created, whereas parameters use the value the parameter had in the code that spawned the thread

Not if the thread cell is preserved. Parameters correspond to preserved thread cells.

No, I mean thread cell implementations in other languages

Ah, sure.

The approach parameters take—namely, using continuation marks to store parameterizations—“just works” in the context of delimited continuations. You could do the same thing with dynamic-wind
, though, so it’s not really a fundamental difference.

does recursively parameterizing the same parameter to different values have constant space usage? (I think there was a racket-users thread about this)

If the inner use of parameterize
is in tail position with respect to the outer use, then yes.

seems like it could if the recursion is a tail call- oh wait you beat me

neat

it’s kind of magic how well that works

@greg thanks!