Re: [racket-users] Beautiful Racket v1.0

2017-03-15 Thread Daniel Prager
Bravo Matthew!

Great stuff.

I look forward to buying it and using the payment to help motivate me to
work through *all* the goodness.


Cheers

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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] reference before definition vs unbound

2017-03-15 Thread Jay McCarthy
I'm reasonably sure the answer is that the first is a runtime error
and the second is not. I think the runtime error gets a name from
syntax-local-infer-name, but perhaps it could/should also save the
srcloc for the message.

On Wed, Mar 15, 2017 at 5:48 PM, Dan Liebgold
 wrote:
> 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: (submod "file.rkt" test)
>
> vs
>
>   file.rkt:87:16: asdf: unbound identifier in module
> in: asdf
>
>
> 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 racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
-=[ Jay McCarthy   http://jeapostrophe.github.io]=-
-=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=-
-=[ Moses 1:33: And worlds without number have I created; ]=-

-- 
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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] reference before definition vs unbound

2017-03-15 Thread Dan Liebgold
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: (submod "file.rkt" test)

vs

  file.rkt:87:16: asdf: unbound identifier in module
in: asdf


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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: syntax expands to define syntax, problems with ...

2017-03-15 Thread Dan Liebgold
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 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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: syntax expands to define syntax, problems with ...

2017-03-15 Thread Stephen Chang
The inner ellipses need to be "escaped". I like using the dot notation
in nested macros but I know others do not like that style.

(define-syntax (test stx)
  (syntax-case stx ()
((_ n e ...)

 #'(define-syntax (n stx)
 (syntax-case stx ()
   ((_ e0 (... ...))
#'(n (e ...) e0 (... ...))
))

On Wed, Mar 15, 2017 at 12:33 PM, Dan Liebgold
 wrote:
> 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 an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: syntax expands to define syntax, problems with ...

2017-03-15 Thread Dan Liebgold
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 an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: syntax expands to define syntax, problems with ...

2017-03-15 Thread Dan Liebgold

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 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 second "...".
> 
> 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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: linking with raco ctool : unable to find libracket3mxxxxxxx.lib

2017-03-15 Thread Carlos Lopez
Thanks for the clarification.


On Tuesday, March 14, 2017 at 11:30:57 AM UTC-4, Alexander McLin wrote:
> You need to compile Racket from source to generate the .lib file, it is not 
> distributed with the installation.
> 
> You need to make sure the source is the same version as your installed Racket 
> and it is compiled targeting the same bit architecture as the installed 
> Racket version. Then copy the generated .lib file to the Racket 
> installation's lib directory. The directory's location depends on your 
> operating system.

-- 
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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] syntax expands to define syntax, problems with ...

2017-03-15 Thread Dan Liebgold
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 second "...".

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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Require the same file repeatedly for debugging on command line

2017-03-15 Thread Marc Kaufmann
Ha, very nice. That's exactly what I was looking for - at least it works if
I drop the "#lang racket" at the beginning of the file. If I do include it
and thus, if I understand correctly, make it a module, it somehow does not
seem to load it properly. Short example for file test.rkt:

#lang racket

(define (blob x) 7)

(provide blob)

In xrepl:
> ,rr test.rkt
; reloading "test.rkt"
> blob
; blob: undefined;
;  cannot reference undefined identifier
; [,bt for context]

What am I missing? It does work if I drop the #lang and the `provide.

Marc

On Wed, Mar 15, 2017 at 10:35 AM, Greg Hendershott <
greghendersh...@gmail.com> wrote:

> Have you tried using XREPL -- perhaps its ,enter command or
> ,require-reloadable?
>
>   https://docs.racket-lang.org/xrepl/index.html
>
> On Mon, Mar 13, 2017 at 9:44 PM, Marc Kaufmann
>  wrote:
> > Hi all,
> >
> > while trying to debug, I often change the code in the text file and then
> want to do a (require "file-with-code.rkt") on the command line to test the
> new code. This never works, because I cannot redefine imported modules.
> Thus I always use Dr Racket for this, where I can hit the "Run" button,
> which reruns everything and all is good. Since I prefer to use Vim for
> editing, I was wondering if there is an equivalent of the "Run" button for
> the command line (well, for the require at least)?
> >
> > Thanks,
> > Marc
> >
> > --
> > 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 racket-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>

-- 
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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.