Re: [racket-users] dynamic-require

2021-02-03 Thread jon stenerson
Very good! Thank you. On 2/2/2021 8:31 PM, jon stenerson wrote: The previous message here prompts this ... I have some modules with paths "A1.rkt" ... "An.rkt". In the interaction window of DrRacket I can require any or all of them and I believe them to be correct. Now suppose I have a

Re: [racket-users] dynamic-require

2021-02-03 Thread Laurent
You may be looking for `module->exports`: https://docs.racket-lang.org/reference/Module_Names_and_Loading.html?q=module-%3Eexports#%28def._%28%28quote._~23~25kernel%29._module-~3eexports%29%29 On Wed, Feb 3, 2021 at 3:31 AM jon stenerson wrote: > The previous message here prompts this ... > >

Re: [racket-users] (dynamic-require) performance problem

2018-02-12 Thread Dmitry Pavlov
Matthew, I can imagine a problem where the "language implementation" is in the reader, in which case it wouldn't get run when loading from bytecode, but that doesn't explain why `racket ` works --- unless the initialization is also triggered by a `main` or `configure-runtime` submodule, which

Re: [racket-users] (dynamic-require) performance problem

2018-02-12 Thread Dmitry Pavlov
Does the port `p` contain the source text for , or does it contain the bytecode from the ".zo" file created by `raco make ? In this dedicated test, just the source text of and nothing else. I think this is the main cause of the performance difference, but just to make sure, does raco

Re: [racket-users] (dynamic-require) performance problem

2018-02-12 Thread Dmitry Pavlov
Matthew, I'm not clear on why you're using `require-input-port` here instead of `dyanmic-require` with 's path. Originally, I needed it to prepend "#lang " to the source because I did not have it in the file. That requirement is not so strict now and I will be able to lift it if it is

Re: [racket-users] (dynamic-require) performance problem

2018-02-12 Thread Matthew Flatt
At Mon, 12 Feb 2018 15:55:44 +0300, Dmitry Pavlov wrote: > I measure the time taken to execute a program in two different ways: > > 1. raco make ; time racket > > 2. raco make my-runner.rkt; raco make ; time racket my-runner.rkt > > > [...] > > To load it dynamically in my-runner.rkt, I use

Re: [racket-users] Dynamic-require a compile-time identifier?

2017-01-21 Thread Alex Knauth
> On Jan 21, 2017, at 6:27 PM, Dupéron Georges > wrote: > > I was going to suggest `dynamic-require-for-syntax`, but it seems to do > exactly the same thing as `dynamic-require`, i.e. give the value of a phase-0 > provided identifier. Is this normal? > > The

Re: [racket-users] dynamic-require of a string

2016-11-18 Thread Dan Liebgold
On Friday, November 18, 2016 at 4:46:38 PM UTC-8, Sam Tobin-Hochstadt wrote: > You'll need to use `eval` to evaluate the module. > Interesting... If I want to add more context (for errors and such), is there a good way to use read-syntax and eval-syntax? -- You received this message because

Re: [racket-users] dynamic-require of a string

2016-11-18 Thread Sam Tobin-Hochstadt
You'll need to use `eval` to evaluate the module. Something like this: http://pasterack.org/pastes/17703 Sam On Fri, Nov 18, 2016 at 7:38 PM, Dan Liebgold wrote: > I have an odd use case, but is there any way to supply a string of the > contents of a module to

Re: [racket-users] dynamic-require

2016-03-20 Thread Scott Moore
If the definitions are saved as “test.rkt”, the following works:  #lang racket  (module a racket/base (displayln "hello"))  (dynamic-require '(submod "test.rkt" a) #f)  On March 16, 2016 at 12:13:46 PM, Jos Koot (jos.k...@gmail.com) wrote: Hi,   The following example of dynamic-require in the

RE: [racket-users] dynamic-require

2016-03-19 Thread Jos Koot
Subject: Re: [racket-users] dynamic-require If the definitions are saved as “test.rkt”, the following works: #lang racket (module a racket/base (displayln "hello")) (dynamic-require '(submod "test.rkt" a) #f) I also tried (dynamic-require ‘(submod “.” a) #f) whic

RE: [racket-users] dynamic-require

2016-03-18 Thread Jos Koot
Ir works fine. I must have overlooked something in the docs. Thanks again. Jos _ From: Scott Moore [mailto:sc...@thinkmoore.net] On Behalf Of Scott Moore Sent: miércoles, 16 de marzo de 2016 18:05 To: Jos Koot; Racket Users Cc: Jos Koot Subject: Re: [racket-users] dynamic-require