[racket-users] Unexpected behavior with (in-set)?

2019-05-03 Thread Siddhartha Kasivajhula
Hi there, I was surprised by this behavior, but it's entirely possible there's a good reason for it. Bringing it up to understand what that might be. In using (in-set) or (in-mutable-set) in a for loop, it seems that if the loop is removing and adding elements to the set it is iterating over, the s

Re: [racket-users] Redex compatible closure of mutually defined nonterminals

2019-05-03 Thread Robby Findler
I just kind of made up the algorithm for what Redex does. It seems to coincide with what one expects for some cases at least. :) Robby On Fri, May 3, 2019 at 9:09 PM William J. Bowman wrote: > I can't seem to use (cross t). > If it were as easy as (C ::= (cross t) (cross v)), I'd be sufficientl

Re: [racket-users] Redex compatible closure of mutually defined nonterminals

2019-05-03 Thread William J. Bowman
I can't seem to use (cross t). If it were as easy as (C ::= (cross t) (cross v)), I'd be sufficiently happy. But alas: https://github.com/racket/redex/issues/92 https://github.com/racket/redex/issues/54 https://github.com/racket/redex/pull/147 I'll see about tweaking Redex, but now I'm wonde

Re: [racket-users] Redex compatible closure of mutually defined nonterminals

2019-05-03 Thread Robby Findler
There isn't a simple way to do that using the exported stuff currently but those nonterminals are hiding inside and one could expose them in the pattern language I think. (TT is accessible via (cross t) I think.) definitely requires fiddling with intervals but the work would be more exposing and d

Re: [racket-users] Redex compatible closure of mutually defined nonterminals

2019-05-03 Thread William J. Bowman
Ah, I see. Those are the VT and TT I want, but then I also want to define: (C ::= VT TT) and take the context-closure of C. (see attached) Can I get my hands on the generated VT and TT easily, or would I need to tweak Redex internals to automate this? -- William J. Bowman On Fri, May 03, 2019

Re: [racket-users] Redex compatible closure of mutually defined nonterminals

2019-05-03 Thread Robby Findler
(thunk TT) isn't a TT, tho? It will reduce only in a TT. Robby On Fri, May 3, 2019 at 7:16 PM William J. Bowman wrote: > > That looks like the contexts I want, but it doesn't seem to reduce under a > (thunk TT) in my example model. > > -- > Sent from my phoneamajig > > > On May 3, 2019, at 20:

Re: [racket-users] Redex compatible closure of mutually defined nonterminals

2019-05-03 Thread William J. Bowman
That looks like the contexts I want, but it doesn't seem to reduce under a (thunk TT) in my example model. -- Sent from my phoneamajig > On May 3, 2019, at 20:02, Robby Findler wrote: > > Redex, when asked to create the compatible closure, creates a context > and then uses that. In this case,

Re: [racket-users] Redex compatible closure of mutually defined nonterminals

2019-05-03 Thread Robby Findler
Redex, when asked to create the compatible closure, creates a context and then uses that. In this case, it will create a context something like this: TT ::= hole | (\ (x) TT) | (TT v) | (t VT) | (force VT) | (return VT) VT ::= (thunk TT) If you want something else (I'm not sure of an algorithm to

[racket-users] Redex compatible closure of mutually defined nonterminals

2019-05-03 Thread William J. Bowman
Hello all, I'm trying to define a model in Redex where values and terms are separate nonterminals, and then define a reduction relation using `compatible-closure` to lift the small steps to the, well, compatible closure. Unfortunately, it doesn't do what I expect, presumably because the nontermina

Re: [racket-users] Beginning of the end for googlegroups?

2019-05-03 Thread Steve Byan
> On Jan 25, 2019, at 7:48 PM, Jack Rosenthal wrote: > > On Fri, 25 Jan 2019 at 23:59 +0100, 'Paulo Matos' via Racket Users wrote: >> Not sure of the size of the mailing list but I wonder if this is the >> beginning of the end and we should have instead a plan B. > > We could always go back t

Re: [racket-users] escape ~ in scribble's bib-entry

2019-05-03 Thread stewart mackenzie
I'm humbled, I'll use `scheme-full`, thanks to you Ben and Leif for your time and assistance. I'll keep in mind that technique for better errors. kr/sjm On Sat, 4 May 2019, 01:47 Ben Greenman, wrote: > With `scheme-full`, we were able to build a pdf. > -- You received this message because y

Re: [racket-users] escape ~ in scribble's bib-entry

2019-05-03 Thread Ben Greenman
It's definitely a TeX issue. Leif Andersen and I were able to reproduce the error (thanks Leif!). Then we ran `scribble --latex test.scrbl` to make a .tex file and `pdflatex test.tex` for a nicer error message. The message gives a hint that the texlive `scheme-basic` is not enough: ``` cannot o

[racket-users] Can phase-1 transformer bindings be overridden locally?

2019-05-03 Thread Eric Griffis
I have a macro that creates transformer bindings at phases 0 and 1: (define-syntax (f stx) (with-syntax ([name (cadr (syntax-e stx))]) #'(begin (define-syntax name (syntax-id-rules () [_ 1])) (begin-for-syntax (define-syntax name (syntax-id-rules () [_ 2])) Normally, thi

Re: [racket-users] I wrote my first macro ever!

2019-05-03 Thread Jérôme Martin
> https://www.mail-archive.com/racket-users@googlegroups.com/msg40201.html This was effectively the best writing I could read about syntax-parse templates and the quirks of using ~@ and ~?. Thank you so much Alexis for those explanations! You rock. On Tuesday, April 30, 2019 at 10:12:15 PM UTC+

Re: [racket-users] Stack trace

2019-05-03 Thread Mark Engelberg
If you open up the details of BSL and select to enable tracing, and run my example, you do indeed see a stack trace in a panel on the right: (sub2 2) (reciprocal 0) However, there are clearly some limitations to this tracing mechanism, when my student tried to enable tracing on his big-bang prog

Re: [racket-users] Re: Racket News - Issue 7

2019-05-03 Thread 'Paulo Matos' via Racket Users
Hi Stephen, Great to hear you're enjoying RN and enjoyed my choice of Automata via Macros for this issue. It's always exciting to hear that people are enjoying these issues. All the best, Paulo Matos On 02/05/2019 22:13, Stephen Foster wrote: > Yes!  Years ago, "Automata via Macros" was the pap