09.qmd (3991B)
1 --- 2 title: Cohort 9 3 --- 4 5 {{< video https://www.youtube.com/embed/Kxjw_nXmDVY >}} 6 7 <details> 8 9 <summary>Meeting chat log</summary> 10 ``` 11 00:12:04 Olivier Leroy: Start 12 00:12:36 Olivier Leroy: Great! 13 00:16:21 Olivier Leroy: I also searched other examples I find some here: https://raps-with-r.dev/fprog.html#writing-good-functions (still unclear where/when for me) 14 00:17:24 Derek Sollberger (he/him): Reacted to "I also searched othe..." with 👍 15 00:17:57 Jo Hardin: is “binding” like “names" 16 00:20:03 Olivier Leroy: (Did not about it also) 17 00:20:07 Olivier Leroy: know 18 00:21:15 Olivier Leroy: Good point 19 00:22:53 Jeff Stevens: Mind blown! So glad you mentioned that. 20 00:23:19 Olivier Leroy: Replying to "is “binding” like “n..." 21 22 About binding and name I like https://mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/6515/sicp.zip/full-text/book/book-Z-H-10.html#%_sec_1.1.2 (disclaimer I never only read 2 chapter of it) 23 00:23:28 Olivier Leroy: Reacted to "Mind blown! So glad ..." with 👍 24 00:26:33 Olivier Leroy: I think I understood the super assignment as “write in global” for a long time 25 00:26:47 Jeff Stevens: Replying to "I think I understood..." 26 27 Me too 28 00:26:53 Derek Sollberger (he/him): Reacted to "I think I understood..." with 👍 29 00:26:58 Howard Baek: Reacted to "I think I understood..." with 👍 30 00:27:12 Jeff Stevens: Reacted to "I think I understood..." with 👍 31 00:30:25 Tinashe Tapera: So does R have a global assignment at all? 32 00:31:02 Tinashe Tapera: I’m sure it should out of software architecture mecessity 33 00:31:22 Olivier Leroy: Replying to "So does R have a glo..." 34 35 No idea, if I want to force it I will assign to .globalenv 36 00:32:17 Tinashe Tapera: Reacted to "No idea, if I want t…" with 👌 37 00:32:21 Olivier Leroy: assign(x, env = .gloabenv) 38 00:32:22 Derek Sollberger (he/him): Replying to "So does R have a glo..." 39 40 Yes, it looks like `assign()` has an `envir` parameter 41 42 https://stackoverflow.com/questions/9726705/assign-multiple-objects-to-globalenv-from-within-a-function 43 00:32:52 Olivier Leroy: Wrong spelling in .globalenv 44 00:33:52 Derek Sollberger (he/him): sounds like a Data Mishaps Night story :-) 45 00:34:11 Olivier Leroy: Reacted to "sounds like a Data M..." with 👻 46 00:34:27 Jeff Stevens: Should we be doing garbage collection on all functions (not just function factories) to save memory? 47 00:34:36 Olivier Leroy: I did not know that! 48 00:35:47 Jeff Stevens: Awesome explanation--thanks! 49 00:35:52 Olivier Leroy: Reacted to "Awesome explanation-..." with 👍 50 00:36:24 Olivier Leroy: Or you cache outside and kill R 51 00:36:37 Tinashe Tapera: Use targets 52 00:36:46 Tinashe Tapera: That’s exactly what targets is for 53 00:36:55 Olivier Leroy: Reacted to "That’s exactly what ..." with 👍 54 00:36:57 Derek Sollberger (he/him): Reacted to "That’s exactly what ..." with 😻 55 00:38:36 Olivier Leroy: -> https://wlandau.github.io/targetopia/contributing.html#target-factories 56 57 (Good example) 58 00:43:10 Jo Hardin: i’m excited about the `switch()` function you just showed! 59 00:43:23 Olivier Leroy: Declarative is always nice on readability! 60 00:51:26 Olivier Leroy: Yes very elegant to store stuff 61 00:51:55 Derek Sollberger (he/him): all 5 functions in `funs` start with the same environment? 62 00:52:15 Olivier Leroy: Replying to "all 5 functions in `..." 63 64 Good question 65 00:53:30 Olivier Leroy: It seems attach can attach any kind of object that can be tricky 66 00:54:04 Derek Sollberger (he/him): Replying to "all 5 functions in `..." 67 68 ah (I read too fast) 69 00:56:02 Olivier Leroy: I use the ecdf one, not that frequently 70 00:59:35 Tinashe Tapera: You’re justified in hating setwd() though 71 00:59:47 Steffi LaZerte (she/her): Reacted to "You’re justified in ..." with 😂 72 01:00:23 Derek Sollberger (he/him): I doubt that I have seen any other book cover functional programming before OOP (and thank you for the walkthrough) 73 01:03:50 Diana Garcia Cortes: Thank you Steffi! 74 01:03:56 Olivier Leroy: end 75 ``` 76 </details>