Hi Robby and Stephen,
Thanks for your suggestions! It’s working now thanks to a mix of rackunit tools
and dynamic require.
We’re also thinking about how to make our code less reliant on DrRacket.
> On Jan 4, 2021, at 8:11 PM, Robby Findler wrote:
> I think a good first question here is "what do you want to happen when you
> are running the program from outside DrRacket?". DrRacket is, in a general
> sense, designed to reflect extra information about how a program runs when it
> can glean that information, but it isn't meant to be the only way that Racket
> programs run, merely one of them. So what you want to think about is: how can
> a program offer up information about itself (and what APIs/values/data should
> that be)? and then: how can DrRacket (or other things that run Racket
> programs, eg Racket Mode, or command-line racket or a standalone executable,
> etc) get a hold of that information to show it in a meaningful way?
> There are some examples of success following generally this pattern: test
> coverage is a means whereby a program is expanded, then instrumented by some
> tool (via rewriting the program) such that the instrumented program produces
> information about what parts of the program actually ran to its context
> (which might be DrRacket but might also be the "cover" library). Check Syntax
> (which runs automatically these days) expands the program and records
> information about it (notably binding and bound occurrences of variables) and
> then DrRacket and Emacs Mode let you work with that information.
> On Mon, Jan 4, 2021 at 1:46 PM Ben Ryjikov <mailto:bryji...@gmail.com>> wrote:
> I’m sorry - I didn’t explain what kind of highlighting we’re looking for.
> We’re building a new #lang, and we want it so that sometimes when you run,
> DrRacket highlights a part of the program you are running. But we only want
> that in certain situations, so we want to create a function which we can call
> that would do the highlighting on demand.
> Are there any functions or libraries which can do that?
> We’ve managed to get highlighting through a tool (which is listed in
> info.rkt), but we’re struggling to get it on demand because we can’t easily
> find a way for the tool and the program to share code.
> Is there a way for a tool to access code which outside of the tool at runtime?
>> On Jan 4, 2021, at 9:04 AM, Stephen De Gabrielle > <mailto:spdegabrie...@gmail.com>> wrote:
>> On Mon, Jan 4, 2021 at 12:32 AM Ben Ryjikov > <mailto:bryji...@gmail.com>> wrote:
>> Hi Racket,
>> Is it possible for a tool invoked by info.rkt to access code which is
>> outside of the tool?
>> We’re building a #lang and would like to have on-demand syntax highlighting.
>> We’ve tried using a tool, and have successfully made a button and a menu
>> item that do it, but we’d like to activate the highlighting programmatically
>> at runtime instead of by clicking on something.
>> We also are hoping to have multiple highlights at once if possible.
>> Is there any way to get on-demand syntax highlighting without using a button
>> or menu item? Are there any pre-existing Racket tools or functions that
>> would do this?
>> I think datalog does this;
>> Thanks for your time and Happy New Year!
>> 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
> 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
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 view this discussion on the web visit