. Line 26 would be
>
> [constructors
> (for/list ([o (in-list (syntax->list #'(fs.o ...)))])
>(format-id #'name "create-~a-~a" #'name o))]
>
> On Fri, Sep 28, 2018 at 2:21 PM, Dan Liebgold > wrote:
> > Hi,
> >
> > I'm trying to use with-syntax to create a
Hi,
I'm trying to use with-syntax to create a series of new identifiers by
breaking apart syntax and gluing bits together using format-d, but I can't
get the ellipses syntax quite right.
Here's my code:
http://pasterack.org/pastes/81271
Line 26 contains the issue... I can't get the
Is all your code (and the racket distro) on a local SSD? We've found that
file/network IO during startup and require can certainly impact performance.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop
Hi,
I'd like to invoke 'raco test' with additional collection paths passed in via
the command line. I'm trying this: racket.exe -S -l- raco test ,
but that -S parameter doesn't seem to take effect.
Thanks,
Dan
--
You received this message because you are subscribed to the Google Groups
Hi -
I have code to precompile a set of files that looks like this:
http://pasterack.org/pastes/97351
Note in this example the given file doesn't exist.
How can I get better info from the build process? Is my logging mechanism
broken? It doesn't ever get any messages back.
And, relatedly,
On Thursday, March 16, 2017 at 3:30:56 PM UTC-7, Sam Tobin-Hochstadt wrote:
> Just installing rackunit-lib will avoid the docs and tests, which should
> substantially reduce the footprint.
>
That's a fix for rackunit... I'm also using Jay's awesome job-queue package,
which pulls in scribble
On Thursday, March 16, 2017 at 3:48:34 PM UTC-7, Vincent St-Amour wrote:
> `raco pkg remove rackunit && raco pkg remove --auto` should do it.
>
"raco pkg remove --auto -i" did it.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To
On Thursday, March 16, 2017 at 3:30:56 PM UTC-7, Sam Tobin-Hochstadt wrote:
> Just installing rackunit-lib will avoid the docs and tests, which should
> substantially reduce the footprint.
>
> Sam
>
Very cool now, say I've already gone and installed rackunit. How can I
remove all those
Hi -
(This is a continuation of some discussions I've had on the dev list a couple
years ago.)
We continue to have performance issues stemming from Racket's runtime file
system usage. Hopefully someone can shed some more light on the issues so we
can adjust our usages...
We use a minimal
Hi -
Is there are a reason the error for referring to an identifier before it's
definition doesn't get location info, whereas in an otherwise identical case
the unbound identifier error does?
e.g.:
asdf: undefined;
cannot reference an identifier before its definition
in module:
On Wednesday, March 15, 2017 at 9:36:19 AM UTC-7, Sam Tobin-Hochstadt wrote:
> You need to escape the ... with another ..., like this:
>
That's what I forgot. Is there any other case where things are escaped in this
manner? It's a little surprising...
Thanks,
Dan
--
You received this
Here's what works, not using the inner ellipses:
http://pasterack.org/pastes/34338
But I'd prefer to use the ellipses..
--
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
Oops, try this link instead (that one had simple mistakes):
http://pasterack.org/pastes/68032
On Wednesday, March 15, 2017 at 9:22:24 AM UTC-7, Dan Liebgold wrote:
> I feel like I'm forgetting something basic, but how can I have a syntax
> transformer expand to a define-syntax, both
I feel like I'm forgetting something basic, but how can I have a syntax
transformer expand to a define-syntax, both using ellipses?
http://pasterack.org/pastes/27441
pasterack doesn't seem to return the error, which is
syntax: no pattern variables before ellipsis in template in: ...
at the
Hi -
I have some legacy code syntax I'm retrofitting with syntax-parse. Is there a
simple way to have this type of syntax error report a better error message:
http://pasterack.org/pastes/59739
I'd like it to point directly to ":thung" and say it expected ":thing" or
nothing there if possible.
On Monday, March 13, 2017 at 10:40:15 AM UTC-7, Robby Findler wrote:
> Not the same thing, but if you mouse over the requires in DrRacket, it
> will put a red background on the ones that have no apparent use (of
> course, requires may have an effect too; neither tool picks that up,
> IIUC).
>
raco check-requires does the job.
I use emacs racket-mode, but it's hobbled in ways I haven't investigated --
e.g. when I try to use tidy or trim requires it gives me a "Can't do, source
file has error" when it doesn't, or at least not in a way I can see.
--
You received this message because
Hi -
In refactoring a some Racket code I'd love to have a "require and provide only
what you need" tool to help trim down the require and provide lists. Is there
such a thing? Or at least a better approach for this than inspection or trial
and error?
Thanks,
Dna
--
You received this message
On Friday, March 10, 2017 at 10:43:25 AM UTC-8, Stephen Chang wrote:
>
> (define-provide-syntax my-out
> (syntax-parser
> [(_ name:id)
> #:with mk-name (format-id #'name "make-~a" #'name)
> #'(combine-out name mk-name)]))
>
That does it. I guess define-provide-syntax *is* up to
Hi -
I'd like to create a new provide syntax that essentially turns this:
(provide (my-out name))
into this:
(provide name make-name)
where 'name' and 'make-name' are defined in the surrounding context. It looks
like define-provide-syntax isn't up to the task, so I used
On Wednesday, March 8, 2017 at 11:14:53 AM UTC-8, Jay McCarthy wrote:
>
> (let ([name-i-want (lambda args body)]) name-i-want)
>
Yup, that does it. Thanks!
> Jay
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group
On Wednesday, March 8, 2017 at 10:56:48 AM UTC-8, Jay McCarthy wrote:
> You want to use syntax/loc. The error message comes from the lambda,
> not from the keyword argument. It could be possible to change where
>
Yup, that fixes it. Thanks! I experimented with syntax/loc in various places,
I have a syntax transformer that loses enough syntax context that it's error
message points to the transformer rather than the usage. Here's an example of
what it should do:
http://pasterack.org/pastes/89138
This one gives correct syntax in the error message (not in pasterack, but in Dr
On Friday, March 3, 2017 at 3:47:15 PM UTC-8, Dan Liebgold wrote:
> Is there something like format-id that can create a keyword in a syntax
> transformer?
>
Searching the interwebs yielded this:
;; identifier->keyword : Identifer -> (Syntaxof Keyword)
(define (identif
Is there something like format-id that can create a keyword in a syntax
transformer?
Thanks,
Dan
--
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
Hi -
I have a few racket process running on Windows that need to each ensure the
same directory structure exists. I have code like this:
(unless (directory-exists? dir)
(make-directory dir))
Well, since they're running in parallel occasionally they race and try to make
the directory after
Hi all -
So, this is a simplified version of something we ran into:
http://pasterack.org/pastes/70121
It was surprising that thing0 in the output template for read-thing was put in
a list. Is this a feature of the splicing syntax? Is there an automatic
attribute that doesn't put it in a list
On Wednesday, February 8, 2017 at 2:08:49 PM UTC-8, Ryan Culpepper wrote:
>
>(require (for-syntax syntax/parse/experimental/template))
>(define-syntax (test-syntax stx)
>
> (define-splicing-syntax-class spec
> as in your original version )
>
> (syntax-parse stx
Hi all -
I have an odd syntax I'm trying to maintain backward compatibility with, but
I'd like to take advantage of keyword parameters to accommodate the
presence/absence/ordering of those parameters.
Here's an example of what I'm trying to do: http://pasterack.org/pastes/88615
Can you think
On Saturday, March 26, 2016 at 4:53:51 PM UTC-7, Robby Findler wrote:
> Matthew and I have figured out one way in which DrRacket could go
> wrong here and implemented a better strategy. The problem we
> identified doesn't explain the symptoms expressed here in this thread
> exactly, but it is a
On Wednesday, February 1, 2017 at 11:52:22 AM UTC-8, Alexis King wrote:
>
> Yes, good suggestion; it seems like maybe --mode doesn’t work with
> the parallel build. However, using -j 1 produces an error:
>
Actually I mean -j to racket.exe, as in --no-jit (for your last invocation)
--
You
On Wednesday, November 30, 2016 at 10:38:05 AM UTC-8, Jay McCarthy wrote:
> The typed-racket code returns a value from the job, whereas this code
> assumes the job is fully self-contained. Perhaps job-queue should
> protect itself from job exceptions.
>
BTW, how would you recommend returning a
On Tuesday, January 31, 2017 at 10:52:38 PM UTC-8, Alexis King wrote:
>
> $ racket -l errortrace -l test-pkg
> qux: kaboom!
> errortrace...:
>
Out of curiosity, does the -j option help here?
--
You received this message because you are subscribed to the Google Groups
"Racket
On Monday, January 30, 2017 at 1:43:06 PM UTC-8, Robby Findler wrote:
The simple program seems to work ok.
It appears my problem is related to bytecode compilation (this occurs on a
smallish program that pulls in a large library)... it takes awhile for the
buttons to respond, and it seems like
I'm having trouble with the debugger in DrRacket: I'll start it and the
debugger buttons available at the top will stay "Go" and "Step" even as my
program is clearly running (even stuck in a loop).
Is this a known issue?
--
You received this message because you are subscribed to the Google
Hi -
I have a module "env" that is required for-syntax by several other modules. I'd
like to precompile those other modules into .zo files, but my initial
for-syntax module ("env") has a parameter that I need to set (essentially I'm
writing my own 'require' lines at compile-time, and I need to
On Tuesday, December 6, 2016 at 5:00:47 PM UTC-8, Robby Findler wrote:
>
> Perhaps there is another way to achieve the effect you want in a way
> that is more friendly to creating .zo files?
>
Yes, this is the crux of the issue. In my case I have a system that deals with
modules that may or
Hi -
I've asked this question privately of Matthew Flatt, but I'll throw it out to
the group in case anyone else wants a crack at it.
If I do this:
(parameterize ([a 3])
(dynamic-require "module.rkt" 'func)
(func))
...where the current module and "module.rkt" both require in parameter
Ok, those tests aren't particularly illumating (at least they were easy!)
Is your Racket distribution on a local drive? Network performance can make a
big difference.
We've also found that the minimal Racket distribution can be quite a bit
quicker when pulling in packages outside the main
Are you sure you have up to date .zo files for all your .rkt files?
How's the timing if you add '-c' to your Racket commandline? How about '-j'?
On Sunday, December 4, 2016 at 4:11:51 PM UTC-8, Lehi Toskin wrote:
> ...
--
You received this message because you are subscribed to the Google
On Wednesday, November 30, 2016 at 1:49:04 PM UTC-8, Jay McCarthy wrote:
> I just pushed a fix for this, btw.
>
>
Awesome, thanks!
--
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
On Wednesday, November 30, 2016 at 10:38:05 AM UTC-8, Jay McCarthy wrote:
> The typed-racket code returns a value from the job, whereas this code
> assumes the job is fully self-contained. Perhaps job-queue should
> protect itself from job exceptions.
>
Probably a good idea. I got confused
On Tuesday, November 29, 2016 at 6:30:08 PM UTC-8, David K. Storrs wrote:
>
> Can you simply catch it and handle it inside the thunk?
>
That's probably best. I was looking at the machinery to serialize exceptions in
type racket* and thinking I needed that
*:
On Tuesday, November 29, 2016 at 3:32:48 PM UTC-8, Jay McCarthy wrote:
> Wow, that's a lame error that has been there for a LONG time. I just
> pushed a fix.
>
Got it.
Any advice for how to handle when a job thunk raises an exception? Currently
(stop-job-queue! jq) waits forever...
--
You
On Tuesday, November 29, 2016 at 12:23:32 PM UTC-8, Jay McCarthy wrote:
> DrDr uses job-queue for a similar process
>
> http://docs.racket-lang.org/job-queue/index.html
>
Looks promising. However, the docs say that stop-job-queue! will block until
jobs are done... and this code doesn't wait:
If I do a dynamic-require inside a (parameterize (...) ...), should the
required module receive those bound parameters?
(and if not, is there a way make that happen?)
Thanks,
Dan
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To
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
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
Urg... google groups behaved oddly for me... I posted this original thread but
it never showed up for me, so I posted a 2nd thread (the one you linked to).
I'm not sure what actually happened, but at least the other thread has lots of
good info.
--
You received this message because you are
Hi,
A couple questions regarding literals in syntax-parse:
First, I'm trying to define a syntax-class that is just a set of literals, and
I'm wondering if there is a slightly better way that this:
* http://pasterack.org/pastes/86722
I'd just prefer to not repeat all the literal
> FWIW, Eric Dobson wrote a very nice `define-literal-syntax-class` macro
> that is used extensively inside TR.
>
>
> https://github.com/racket/typed-racket/blob/master/typed-racket-lib/typed-racket/utils/literal-syntax-class.rkt
>
Hmm... I can't quite figure that one out. Maybe with some
>
> Literal sets can include datum-literals:
>
>(define-literal-set lits #:datum-literals (a b c) (d e))
>
Ah, oops I missed that keyword parameter.
> For question 1, that's probably the best way. If you want to suppress
> the printing of all of the datum literals in error messages, you
Hi,
A couple questions about literals in syntax-parse:
1. I'd like to make a syntax-class that is just a set of literals (with a clear
error for something not matching any literal). Is there a better way than this:
http://pasterack.org/pastes/86722
I need to ignore the bindings for those
On Wednesday, November 2, 2016 at 5:25:03 AM UTC-7, Jay McCarthy wrote:
>
> Another approach is to do something like:
>
>
> (define-syntax (myfor stx)
> (syntax-parse stx
> [(_ (clause:for-clause ...) body:expr)
> (with-syntax ([(the-ast ...) (attribute clause.ast)])
>
On Tuesday, November 1, 2016 at 3:01:44 PM UTC-7, Dan Liebgold wrote:
>
> -
> https://docs.racket-lang.org/syntax/varied-meanings.html?q=define-syntax-class#%28part._.Non-syntax-valued_.Attributes%29
>
For example, I can't seem to access the "ast" attribute in this parti
I'm working with syntax-parse, and the examples in the docs are quite useful,
but several seem stop before they get to the good part. Is there any way
someone could supply examples of using the syntax classes developed in these
sections:
-
On Tuesday, October 25, 2016 at 3:20:47 PM UTC-7, Alexis King wrote:
>
> Note that if you have a #lang that provides a custom reader, I don’t
> think this will work quite right. However, if you have a configure-runtime
Fortunately my language uses "#lang s-exp syntax/module-reader" as it's reader
On Tuesday, October 25, 2016 at 2:09:59 PM UTC-7, Ryan Culpepper wrote:
>
>racket -e '(enter! "your-module.rkt")' -i
>
BTW, any luck putting a line like this in csh shell script, alias, or windows
batch file?
--
You received this message because you are subscribed to the Google Groups
On Tuesday, October 25, 2016 at 2:09:59 PM UTC-7, Ryan Culpepper wrote:
>
>racket -e '(enter! "your-module.rkt")' -i
>
That's it. Thanks!
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving
On Tuesday, October 25, 2016 at 2:09:59 PM UTC-7, Ryan Culpepper wrote:
> On 10/25/2016 04:57 PM, Dan Liebgold wrote:
> > On Tuesday, October 25, 2016 at 1:43:28 PM UTC-7, Alexis King wrote:
> > bound...
> >>
> >> You need to put the -i flag first
On Tuesday, October 25, 2016 at 1:43:28 PM UTC-7, Alexis King wrote:
bound...
>
> You need to put the -i flag first, so the command should look like:
>
> racket -iI -l
>
Hmm... that give the REPL the proper language but no access to the contents of
...
--
You received this message
On Tuesday, October 25, 2016 at 1:28:08 PM UTC-7, Alexis King wrote:
> The short answer is “no, but you can use -I to achieve a similar
> effect for some languages”.
>
This is unfortunate. Ideally, I'd replicate Dr Racket's interactions window
after running a module.
--
You received this
On Tuesday, October 25, 2016 at 1:33:18 PM UTC-7, Dan Liebgold wrote:
> I use -I, -l, then -i but the resulting REPL has no #%top-interaction bound...
Hrm.. -I and -l look pretty much identical... is there a guide to formatting
these posts?
--
You received this message because
On Tuesday, October 25, 2016 at 1:06:17 PM UTC-7, Dan Liebgold wrote:
> Is there a racket command line parameter that will enable me to start a REPL
> (using -i) within a module context? Specifically I'd like the REPL to star
> as if within a certain "#lang ".
>
Ok, I've
Is there a racket command line parameter that will enable me to start a REPL
(using -i) within a module context? Specifically I'd like the REPL to star as
if within a certain "#lang ".
Thanks,
Dan
--
You received this message because you are subscribed to the Google Groups
"Racket Users"
On Monday, October 24, 2016 at 6:25:07 AM UTC-7, Konrad Hinsen wrote:
>
> I can think of a few approaches, such as redefining
> error-display-handler in the expanded code, but I suspect that others
> have already found better solutions to this problem. I'd be grateful for
> any pointers.
>
>
Hi -
Could someone point me to an example of using a test submodule and rackunit to
verify a correctly raised syntax-error in the syntax phase?
Here's an example of the kind of code I have: http://pasterack.org/pastes/82067
(Uncomment the last expression in the test submodule to see the
On Monday, October 24, 2016 at 2:07:16 PM UTC-7, Ryan Culpepper wrote:
>
> It might make sense for syntax-parse to offer something like Redex's
> `variable-not-otherwise-mentioned`, which would behave like you
> expected. I think it would have to be a baked-in special case, but it
> might be
On Sunday, October 23, 2016 at 1:14:56 PM UTC-7, Ryan Culpepper wrote:
>
>
> The easiest fix is to add the #:commit option to the `remap-entry`
> syntax class. Then when `remap-entry` succeeds the first time, it throws
> away the choice points it created, so the repeated pattern is never
>
Hi all -
In the process of putting together a somewhat complex application using
syntax-parse, I discovered that when I specified a repeated pattern in a
syntax-class (which was incorrect) AND I had a certain usage of the syntax
transformer with an error, it would lead to degenerate
On Tuesday, June 23, 2015 at 4:36:12 PM UTC-7, John Carmack wrote:
The intersection of Gear VR owners and Racket users may consist of just me at
the moment, but if anyone else here is interested in discussing the work I am
doing with driving VR by Racket/Scheme, I would welcome the input.
71 matches
Mail list logo