Re: [racket-users] Expanding Macros

2020-07-09 Thread Thomas Del Vecchio
Thanks so much! Using (with-syntax ([expanded-b (datum->syntax #'b (local-expand #'b 'expression #f))]) worked out great! On Thursday, July 9, 2020 at 9:44:08 PM UTC-4, William J. Bowman wrote: > > You might want `local-expand`. It can still give you something that is > expanded > further

Re: [racket-users] Expanding Macros

2020-07-09 Thread William J. Bowman
You might want `local-expand`. It can still give you something that is expanded further than you want, unless you know exactly which identifier you want to stop at, which you can specify in the stop list.

[racket-users] Expanding Macros

2020-07-09 Thread Thomas Del Vecchio
I'm trying to work through expanding a macro to pass the result into another macro. I've attached and pasted the spec below that is my toy example. I've tried using expand, but it gives me "(C (#%app (#%top . B) (quote 1) (quote 2)))" instead of "(C (in 1 2))". I've also tried many other

[racket-users] Re: Are Regular Expression classes Unicode aware?

2020-07-09 Thread George Neuner
On Thu, 9 Jul 2020 14:43:03 -0400, Philip McGrath wrote: >On Thu, Jul 9, 2020 at 10:32 AM Sorawee Porncharoenwase < >sorawee.pw...@gmail.com> wrote: > >> Racket REPL doesn’t handle unicode well. If you try (regexp-match? >> #px"^[a-zA-Z]+$" "héllo") in DrRacket, or write it as a program in a

Re: [racket-users] Are Regular Expression classes Unicode aware?

2020-07-09 Thread Sorawee Porncharoenwase
I did in fact try installing readline-gpl (raco pkg install readline-gpl), but it didn’t change anything. Interestingly, the bug in #3223 persists for me, too. This suggests that I didn’t install or invoke it correctly. Do you need to run racket with any flag to make readline-gpl take its effect?

Re: [racket-users] Are Regular Expression classes Unicode aware?

2020-07-09 Thread Philip McGrath
On Thu, Jul 9, 2020 at 10:32 AM Sorawee Porncharoenwase < sorawee.pw...@gmail.com> wrote: > Racket REPL doesn’t handle unicode well. If you try (regexp-match? > #px"^[a-zA-Z]+$" "héllo") in DrRacket, or write it as a program in a file > and run it, you will find that it does evaluate to #f. > See

Re: [racket-users] Are Regular Expression classes Unicode aware?

2020-07-09 Thread Ryan Culpepper
If you want a regular expression that does match the example string, you can use the \p{property} notation. For example: > (regexp-match? #px"^\\p{L}+$" "h\uFFC3\uFFA9llo") #t The "Regexp Syntax" docs have a grammar for regular expressions with links to examples. Ryan On Thu, Jul 9, 2020

[racket-users] #quickscript-competition week two

2020-07-09 Thread Stephen De Gabrielle
*#quickscript-competition ** week two* *Prizes: *In addition to the glory and admiration of your peers… If you participate once, you get stickers, if you participate twice time, you get also a mug, if you participate three times, you get also a

Re: [racket-users] Are Regular Expression classes Unicode aware?

2020-07-09 Thread Sorawee Porncharoenwase
Racket REPL doesn’t handle unicode well. If you try (regexp-match? #px"^[a-zA-Z]+$" "héllo") in DrRacket, or write it as a program in a file and run it, you will find that it does evaluate to #f. On Thu, Jul 9, 2020 at 7:19 AM Peter W A Wood wrote: > I was experimenting with regular expressions

[racket-users] Are Regular Expression classes Unicode aware?

2020-07-09 Thread Peter W A Wood
I was experimenting with regular expressions to try to emulate the Python isalpha() String method. Using a simple [a-zA-Z] character class worked for the English alphabet (ASCII characters): > (regexp-match? #px"^[a-zA-Z]+$" "hello") #t > (regexp-match? #px"^[a-zA-Z]+$" "h1llo") #f It then