Re: [racket-users] Language-Specific Plugins: Toolbar button functionality to call drracket:eval:expand-program

2019-07-23 Thread Robby Findler
On Tue, Jul 23, 2019 at 11:35 AM Thomas Dickerson wrote: > Yes - the architecture we eventually settled on is a main submodule that does > roughly this to get a black-box value which we can pass back to a rendering > function to produce a gl-bitmap, and stick it in a snip. > > By the way - it

Re: [racket-users] Language-Specific Plugins: Toolbar button functionality to call drracket:eval:expand-program

2019-07-23 Thread Thomas Dickerson
On Tuesday, July 23, 2019 at 12:35:27 PM UTC-4, Thomas Dickerson wrote: > > > Yes - the architecture we eventually settled on is a main submodule that > does roughly this to get a black-box value which we can pass back to a > rendering function to produce a gl-bitmap, and stick it in a snip. >

Re: [racket-users] Language-Specific Plugins: Toolbar button functionality to call drracket:eval:expand-program

2019-07-23 Thread Thomas Dickerson
On Tuesday, July 23, 2019 at 2:34:47 AM UTC-4, Robby Findler wrote: > > Sorry for letting this thread lapse. Wrt to your third option > mentioned below, would it work to make that option accessible via the > FFI? If so, then maybe you could make the "essentially phase shifted > everything"

Re: [racket-users] Language-Specific Plugins: Toolbar button functionality to call drracket:eval:expand-program

2019-07-23 Thread Robby Findler
Sorry for letting this thread lapse. Wrt to your third option mentioned below, would it work to make that option accessible via the FFI? If so, then maybe you could make the "essentially phase shifted everything" into "actually phase shifted everything" and then when you get the result program

Re: [racket-users] Language-Specific Plugins: Toolbar button functionality to call drracket:eval:expand-program

2019-07-01 Thread Thomas Dickerson
On Mon, Jul 1, 2019 at 2:23 PM Philip McGrath wrote: > > I believe the main submodule will still be compiled the enclosing module > is loaded from source, but that should be trivial: it really only needs a > `require` and a function call. If the file has already been compiled to > bytecode, the

Re: [racket-users] Language-Specific Plugins: Toolbar button functionality to call drracket:eval:expand-program

2019-07-01 Thread Robby Findler
On Mon, Jul 1, 2019 at 10:40 AM Thomas Dickerson wrote: > On Sun, Jun 30, 2019 at 11:44 AM Robby Findler > wrote: >> >> May I ask why you need to have the C++ code embed Racket instead of >> the other way around (ie using the FFI)? > > > The short answer is this project is a very small part of

Re: [racket-users] Language-Specific Plugins: Toolbar button functionality to call drracket:eval:expand-program

2019-07-01 Thread Philip McGrath
On Mon, Jul 1, 2019 at 11:40 AM Thomas Dickerson < thomas_dicker...@alumni.brown.edu> wrote: > On Fri, Jun 28, 2019 at 5:50 PM Philip McGrath > wrote: > >> Again, this part works just fine. In particular, because of the way Racket's >> submodules >>

Re: [racket-users] Language-Specific Plugins: Toolbar button functionality to call drracket:eval:expand-program

2019-07-01 Thread Thomas Dickerson
Thanks for the responses. On Fri, Jun 28, 2019 at 5:50 PM Philip McGrath wrote: > If you're sure you want to get the raw program source and deal with it > manually, you can use the method `get-definitions-text >

Re: [racket-users] Language-Specific Plugins: Toolbar button functionality to call drracket:eval:expand-program

2019-06-30 Thread Robby Findler
May I ask why you need to have the C++ code embed Racket instead of the other way around (ie using the FFI)? Generally speaking, DrRacket (and other Racket tools) are going to work better if they get to "drive", I expect. (Put another way, I think Philip is giving you good advice here, fwiw.)

Re: [racket-users] Language-Specific Plugins: Toolbar button functionality to call drracket:eval:expand-program

2019-06-28 Thread Philip McGrath
If you're sure you want to get the raw program source and deal with it manually, you can use the method `get-definitions-text ` on the DrRacket

Re: [racket-users] Language-Specific Plugins: Toolbar button functionality to call drracket:eval:expand-program

2019-06-26 Thread Thomas Dickerson
Hi, Chiming in here, because Kshitij is working on this project for me. It sounds like Philip has answered (3) and most of (2). On Tuesday, June 25, 2019 at 10:06:07 PM UTC-4, Philip McGrath wrote: > > The functionality you describe—in particular, setting up clean evaluation > contexts—sounds a

Re: [racket-users] Language-Specific Plugins: Toolbar button functionality to call drracket:eval:expand-program

2019-06-25 Thread Arie Schlesinger
Hi, Are there racket notebooks like jupyter or swish for prolog ? Thank you On Wed, Jun 26, 2019 at 01:02 Kshitij Sachan wrote: > 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

Re: [racket-users] Language-Specific Plugins: Toolbar button functionality to call drracket:eval:expand-program

2019-06-25 Thread Philip McGrath
The functionality you describe—in particular, setting up clean evaluation contexts—sounds a lot like what the "Run" button already does. Unless you have some other notion of "running" in mind for programs in your DSL, I think what you describe could be accomplished nicely with a "main" submodule,

[racket-users] Language-Specific Plugins: Toolbar button functionality to call drracket:eval:expand-program

2019-06-25 Thread Kshitij Sachan
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