Thanks for the clue. I found the problem. The double-quoted sub is right, but
the name of the submodule itself has to be `sub`, not `sub-id`.
(define-syntax my-module-begin
(lambda (stx)
(syntax-case stx ()
[(_ body ...)
(with-syntax ([sub-id (datum->syntax stx ''sub)])
Based on this experiment, the double-quoted sub should be the right thing, and
the single-quoted inside the datum->syntax with another quote in the require
and provide forms shouldn't work.
Just like this works:
#lang racket
(require syntax/parse/define)
(define-simple-macro (m x)
#:with req-s
No, the double-quoted ''sub doesn't work (triggers bad-syntax error).
Nor does this (with quotes added to `sub-id` within the `require` and
`provide` forms):
(define-syntax my-module-begin
(lambda (stx)
(syntax-case stx ()
[(_ body ...)
(with-syntax ([sub-id (datum->syntax stx
On Aug 15, 2015, at 11:53 PM, Alexander D. Knauth wrote:
> Does this work?
> (define-syntax my-module-begin
> (lambda (stx)
>(syntax-case stx ()
> [(_ body ...)
> (with-syntax ([sub-id (datum->syntax stx ''sub)])
> #'(#%module-begin
> (module sub-id racket/bas
On Aug 15, 2015, at 9:50 PM, Matthew Butterick wrote:
> BTW, is it possible to extend your solution to macro-introduced imports from
> a submodule?
>
> In the original case, the identifier name was known in advance:
> But suppose instead the identifiers come from a submodule. I see from the
On Aug 15, 2015, at 8:21 PM, Matthew Butterick wrote:
> Of your suggestions, I couldn't get `syntax-local-introduce` to work, but
> `datum->syntax` did. That made the macro-introduced identifier accessible at
> the REPL. Thanks.
>
> However, I also wanted to set up the #lang so that DrRacket
BTW, is it possible to extend your solution to macro-introduced imports from a
submodule?
In the original case, the identifier name was known in advance:
(define-syntax my-module-begin
(lambda (stx)
(syntax-case stx ()
[(_ body ...)
(with-syntax ([x-id (datum->syntax stx '
Of your suggestions, I couldn't get `syntax-local-introduce` to work, but
`datum->syntax` did. That made the macro-introduced identifier accessible at
the REPL. Thanks.
However, I also wanted to set up the #lang so that DrRacket would automatically
print the value of `id` when it ran the file.
Probably the wiser option. I'll see if I can adapt that solution.
On Aug 15, 2015, at 4:31 PM, Alexander D. Knauth wrote:
> What kind of funny stuff?
> By the way, this sounds sort of like this
> http://www.mail-archive.com/racket-users@googlegroups.com/msg28020.html
> Solution:
> http://www.m
Dear Neil,
Thank you very much for your thoughtful reply and your understanding.
> There are lots of ways to "interoperate" between languages, but once
> you get into high-level languages the C calling-convention native code
> way you might be thinking of doesn't necessarily work well.
I am real
What kind of funny stuff?
By the way, this sounds sort of like this
http://www.mail-archive.com/racket-users@googlegroups.com/msg28020.html
Solution:
http://www.mail-archive.com/racket-users@googlegroups.com/msg28031.html
Although it could be a completely different problem, I don't know.
On Aug
I have a #lang that does some funny stuff with #%module-begin (maybe too
funny), the result being that when I run it in DrRacket, the `provide`d
identifiers aren't visible at the top level:
(module my-lang-module my-lang
...
(define id 42)
(provide id))
> id
id : undefined;
cannot refere
Dear Matthias,
Thank you for your thoughtful response.
> we are not used to the words "profit" and "maximize profit" on this
> mailing list.
Most people are used to linking profit with money but it has a much
broader meaning.
> Sadly, I think that this is neither technically easy nor socially
>
Marduk Bolaños wrote on 08/14/2015 10:06 PM:
Since Racket is a compiled
language, I thought that perhaps it would be possible to compile these
packages as shared libraries and then (ideally automatically) generate
bindings for the desired language.
I think I understand your message, and am symp
Hi Racketeers,
I'm working on a continued fraction arithmetic package for arbitrary
precision arithmetic. I have the basics implemented and functioning and
would like to know which features people would like available as an
interface, and I'll see if I can provide it.
What you can already expect
Hi --
nobody here is accusing you of anything. It's just that we are
not used to the words "profit" and "maximize profit" on this
mailing list.
In general I agree with you that it would be wonderful if we
could easily integrate tools across programming languages.
Sadly, I think that this is
> When you say "maximize the profit," whose profit are you referring to?
What I mean is that software that could be useful in several contexts,
like a plotting library, should enable the possibility of pluging it in
to a larger software project. That way, several projects would
benefit/profit from
I don't do scientific computing, but it seems your question is to some degree
about economic incentives. When you say "maximize the profit," whose profit are
you referring to? When you say "minimize duplication of effort," whose labor
costs are you referring to? And if this work is so valuable t
On Saturday, August 15, 2015 at 9:37:21 AM UTC-4, Brian Adkins wrote:
> I received a Raspberry Pi 2 Model B yesterday, so naturally I wanted to get
> Racket on it as soon as possible :)
>
> I read somewhere that "Unix Source + Built Packages" was better than "Unix
> Source", but since I've recei
At Sat, 15 Aug 2015 07:01:17 -0700 (PDT), Brian Adkins wrote:
> On Saturday, August 15, 2015 at 9:54:21 AM UTC-4, Matthew Flatt wrote:
> > At Sat, 15 Aug 2015 06:37:21 -0700 (PDT), Brian Adkins wrote:
> > > The Raspberry Pi has a 4 core CPU, so it pains me to see it pegged at
> > > only 25% this wh
On Saturday, August 15, 2015 at 9:54:21 AM UTC-4, Matthew Flatt wrote:
> At Sat, 15 Aug 2015 06:37:21 -0700 (PDT), Brian Adkins wrote:
> > The Raspberry Pi has a 4 core CPU, so it pains me to see it pegged at
> > only 25% this whole time. Is it possible to build Racket from Unix
> > Source in paral
At Sat, 15 Aug 2015 06:37:21 -0700 (PDT), Brian Adkins wrote:
> The Raspberry Pi has a 4 core CPU, so it pains me to see it pegged at
> only 25% this whole time. Is it possible to build Racket from Unix
> Source in parallel to get all 4 cores fired up?
You can use
make install PLT_SETUP_OPTIONS=
On Saturday, August 15, 2015 at 9:37:21 AM UTC-4, Brian Adkins wrote:
> I received a Raspberry Pi 2 Model B yesterday, so naturally I wanted to get
> Racket on it as soon as possible :)
>
> I read somewhere that "Unix Source + Built Packages" was better than "Unix
> Source", but since I've recei
I received a Raspberry Pi 2 Model B yesterday, so naturally I wanted to get
Racket on it as soon as possible :)
I read somewhere that "Unix Source + Built Packages" was better than "Unix
Source", but since I've received performance improvements from building Ruby
from sources vs. installing a p
24 matches
Mail list logo