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 fun
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 ...
>
> I
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 function (F) that produces one of those paths. I
try (dynamic-requir
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 wo
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
At Mon, 12 Feb 2018 16:38:32 +0300, Dmitry Pavlov wrote:
> > 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 s
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
critica
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 t
Hello,
I have a performance problem with loading a Racket program dynamically.
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
In the first case, execution takes ~1 second, in
> 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 `eval` trick is a good idea, I wo
Is there a way to dynamic-require an identifier provided at phase 1?
#file x.rkt
#lang racket
(provide (for-syntax x)) ; x is provided at phase 1
(define-for-syntax x 3)
#file use.rkt
#lang racket
(dynamic-require-from-phase-1 "x.rkt" 'x)
;=> 3
I could do it by defining another module that did t
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 y
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 something like require or dynamic
I have an odd use case, but is there any way to supply a string of the contents
of a module to something like require or dynamic-require?
An example of my desired usage: http://pasterack.org/pastes/38798
Thanks,
Dan
--
You received this message because you are subscribed to the Google Groups
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 r
Hi,
The following example of dynamic-require in the reference manual works in
the interactions window of DrRacket, but not in its definitions window:
(module a racket/base (displayln "hello"))
(dynamic-require ''a #f)
How do I do this in the definitions window?
The reason I use dynamic-req
: 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) #
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
If
18 matches
Mail list logo