I'm working on a DSL to represent 3D geometrical shapes. I'm adding a language-specific plugin (toolbar button) that should: 1) expand the source code to get a module object, 2) evaluate the module object, 3) dynamic-require that module object, 4) Create an OpenGL Context, 5) render this object using a C++ library that contains a function that takes in a module object as input and generates in the existing OpenGL context.
Suppose my geometrical shape code is as follows: #lang hypothetical-lanugage (hypothetical-code) I have a couple questions on how to set this up: 1. The documentation on drracket:eval:expand-program <https://docs.racket-lang.org/tools/drracket_eval.html#%28def._%28%28lib._drracket%2Ftool-lib..rkt%29._drracket~3aeval~3aexpand-program%29%29> is rather dense, and I don't understand what the parameters should be. Could you please provide me with a minimum working example of how to call this function? 2. Is the output of drracket:eval:expand-program <https://docs.racket-lang.org/tools/drracket_eval.html#%28def._%28%28lib._drracket%2Ftool-lib..rkt%29._drracket~3aeval~3aexpand-program%29%29> directly suitable to be called as the argument to the eval function? If not, what kind of preprocessing do I need to do before calling eval? 3. Will the result of eval be a module object? 4. If I press the toolbar button twice, will dynamic-require work or do I need dynamic-rerequire? Essentially what I'm asking is do I get a clean evaluation context each time I press my toolbar button? 5. Is it good style for my button to save the source code each time I run it? If so, how can I do that? 6. Ideally, I'd like the OpenGL rendering to appear as a third window to accompany the interactions and definitions window. Is there any way to do that? Thanks! -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/179b48af-cfe1-4d6a-8c11-6f27584a4129%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.