> On Oct 25, 2016, at 17:27, Ryan Culpepper wrote:
>
> Consider that (eval (list 'quote #'+)) also evaluates to a symbol, for about
> the same reason.
Yes, this does make sense, even if I couldn’t put it quite so nicely. :)
> Try local-expanding either of these terms instead:
>
> #`(let-synt
Or:
(build-list n (lambda (dont-care) (make-random-string)))
On Tue, Oct 25, 2016 at 10:42 PM, Robby Findler wrote:
> I would probably write that function like this:
>
> #lang racket
>
> (provide
> (contract-out
> [make-a-string (-> non-empty-string? string?)]))
>
> (define (make-a-string ca
I would probably write that function like this:
#lang racket
(provide
(contract-out
[make-a-string (-> non-empty-string? string?)]))
(define (make-a-string candidates)
(apply
string
(for/list ([i (in-range (random 100))])
(string-ref candidates (random (string-length candidates))
Hi,
I want to create a list of random strings.
For that I have created a function, which returns a string
of random length and random contents.
Then I used
make-list n (make-random-string)
to create that listand get back a list filled with n
identical strings.
h...
make-list calls
On 10/25/2016 08:04 PM, Alexis King wrote:
That makes sense; thank you for your quick reply. It might be
possible to do something like what you describe, but I do have a
little more context that makes this sort of tricky. I’m trying to
not just store identifiers but also store prefab structs cont
That makes sense; thank you for your quick reply. It might be
possible to do something like what you describe, but I do have a
little more context that makes this sort of tricky. I’m trying to
not just store identifiers but also store prefab structs containing
identifiers. The issue I’m running int
Putting identifiers in syntax properties causes them to be hidden from
various scope and module-path-shifting operations. Probably, you're
seeing the effect of hiding an identifier from path shifting (when an
expanded module is compiled or when a compiled module is declared and
instantiated in at a
On 10/25/2016 06:16 PM, Dan Liebgold wrote:
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?
For scripting, if your interactions ar
In the language I am working on, I store identifiers in preserved
syntax properties to attach type information to pieces of syntax.
More specifically, I store identifiers inside prefab structs, which
are then stored within preserved syntax properties. This seems to
work fine when my program spans a
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 Oct 25, 2016, at 2:09 PM, Ryan Culpepper wrote:
>
> It sounds like you want the behavior of the `enter!` command. You can kind of
> do that from the command line like this:
>
> racket -e '(enter! "your-module.rkt")' -i
>
> Ryan
Note that if you have a #lang that provides a custom 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
"R
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 em
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, so the command should look like:
> >>
> >> racke
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, so the command should look like:
racket -iI -l
Hmm... that give the REPL the proper language but no access to the contents of
...
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 becau
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 mess
> On Oct 25, 2016, at 1:33 PM, Dan Liebgold wrote:
>
> I use -I, -l, then -i but the resulting REPL has no #%top-interaction
> bound...
You need to put the -i flag first, so the command should look like:
racket -iI -l
The reason for this is buried towards the end of `racket --help`:
“
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 you are subscribe
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 used the -I parameter
The short answer is “no, but you can use -I to achieve a similar
effect for some languages”.
The longer answer is as follows. The way the REPL is configured is
different from the way modules’ readers are configured. The #lang
protocol is relatively simple — you provide read and read-syntax —
but t
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" gro
Konrad, you may wish to work with Stephen whose latest research project is
about combining static checking with expansion so that you don’t separate those
two steps.
> On Oct 25, 2016, at 6:20 AM, Konrad Hinsen wrote:
>
> Thanks to Dmitry, Matthias, and Alexis for their comments, which we
Sam, would something like this work for you?
I'm using the generic-syntax-expanders library to easily define expanders
(sorts of macros) which are expanded within uses of a wrapper of
define-judgment-form.
#lang racket
(require (rename-in redex
[define-judgment-form orig:
Thanks to Dmitry, Matthias, and Alexis for their comments, which were
very helpful to understand the principles of error reporting in DSLs.
My summary is (please correct me if I am wrong!):
1) If my DSL code expands to Racket code doing error checking/reporting
at the top level, the syntax tra
25 matches
Mail list logo