aviatesk / juliacon2021-workshop-pkgdev

The repository for JuliaCon2021 workshop "Package development: improving engineering quality & latency"
33 stars 5 forks source link

add Cthulhu workshop #5

Closed aviatesk closed 3 years ago

aviatesk commented 3 years ago

Okay I've done with the Cthulhu part. I'd appreciate if you could have a look on it.

timholy commented 3 years ago

It looks good, I am looking forward to it!

Small comments:

aviatesk commented 3 years ago

Thanks for your feedback ! Some responses:

  • for inner, would it be better to do val = s.value; if isa(val, T) ...? Then you don't have to annotate.

Yeah, I will refactor the code.

  • "Cthulhu lets us to traverse all these forms quite easily" not Expr as far as I know

True, I will add a caveat on it.

  • "Reasoning about multithreading code is hard even with Cthulhu" I guess that's true, but is that example really about multithreaded code or about Core.Box (15276)?

Yes, the actual problem is from Core.Box. But here I want to highlight how difficult it is to inspect the multithreading code where a closure is wrapped in Task, and so I believe this will make sense.