greg406
2022-3-11 11:59:59

@greg406 has joined the channel


ben.knoble
2022-3-11 13:38:54

Strictly speaking a macro isn’t necessary. IIRC this is a common pattern in clojure backends, too. Something like (define ((log next) args) (do-log …) (next args)) (define (handler args) …) (define wrapped (log handler))


bsilverstrim
2022-3-11 16:08:07

I know I’m full of seemingly random questions (I guess it’s just as I’m pondering possibilities while working through a Racket book…) but is there a way to have Racket execute a program and have the display (the application’s window) embedded in a Racket window, like an application wrapper? I’m guessing not because of something in the way applications interact with display drivers and the OS, so the closest would be having the Racket application execute the local application as just another process like an indirect way of launching it from menus or shell. For an example, have a Racket application that has a left pane of presets for launching a web browser, click one of those buttons, and it launches the browser in a right side pane within that Racket application as if the browser were docked to it, and click another launch button and the right pane changes to that browser instance. As far as I can tell in the docs it doesn’t look like there’s a window or widget that directly supports displaying an interactive system application in it.


spdegabrielle
2022-3-11 20:11:48

Yes- @soapdog made an embeddable browser view



bsilverstrim
2022-3-11 20:45:23

Is there a way to embed other application windows?


chansey97
2022-3-12 00:11:40

I think @bsilverstrim actually want function advising. For example https://www.gnu.org/software/emacs/manual/html_node/elisp/Advising-Functions.html


chansey97
2022-3-12 00:15:00

Does Racket support this? Dynamic modify function by :before, :after, and :around .


ben.knoble
2022-3-12 01:24:49

I don’t think Racket supports elisp-style advising, but I’m sure it would be possible to build such a system.