Re: [racket-users] Why does this counter behave differently in different runtimes?

2020-06-17 Thread Neil Van Dyke
Compiler bugs have been so blessedly rare in Racket, maybe there should be a page on the Web, honoring those who found a compiler bug? I would nominate Sage and Alexis for this one. And Matthew, though we'd have to make sure he's not mis-incentivized by the glory of bug-finding, to start

Re: [racket-users] Why does this counter behave differently in different runtimes?

2020-06-17 Thread Sage Gerard
Thank you all so much! I'm glad it wasn't a huge mystery in the end. Original Message On Jun 17, 2020, 9:13 AM, Matthew Flatt wrote: > Yes, clearly a BC compiler bug --- and probably almost as old as > Racket. The bug was specific to `set!` on a locally bound variable as > the

Re: [racket-users] Why does this counter behave differently in different runtimes?

2020-06-17 Thread Matthew Flatt
Yes, clearly a BC compiler bug --- and probably almost as old as Racket. The bug was specific to `set!` on a locally bound variable as the first subexpression of `begin0`. I've pushed a repair. Thanks! At Wed, 17 Jun 2020 03:35:51 -0500, Alexis King wrote: > This is quite curious. It appears to

Re: [racket-users] Why does this counter behave differently in different runtimes?

2020-06-17 Thread George Neuner
Sorry for the noise:  it behaves as you say returning "!", "2", ...    Somehow I paths screwed up and was running CS when I thought I was running regular (bytecode) Racket. Sigh! George -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To

Re: [racket-users] Why does this counter behave differently in different runtimes?

2020-06-17 Thread George Neuner
It seems to work ... i.e. returns # ... in Windows.  I tried it in 7.6 and 7.7,  both 32 and 64 bit versions.   Not near my Linux machine to try it there. The expansion in all cases is the same and seems reasonable: (module count racket   (#%module-begin    (module

Re: [racket-users] Why does this counter behave differently in different runtimes?

2020-06-17 Thread Alexis King
This is quite curious. It appears to be a compiler bug. Here’s a very slightly smaller test case: #lang racket/base (define count! (let ([i 0]) (λ () (begin0 (set! i (add1 i)) (+ i) (count!) The fully-expanded program looks fine, so