Ah, lucky you. This is not a "stack overflow". This is a "all of memory
overflow". The cool thing about racket is that there is not separate limit
on some mysterious PL-internal data structure called a "stack".

Robby

On Tue, Apr 25, 2017 at 6:13 PM Matthew Butterick <m...@mbtype.com> wrote:

>
> > On Apr 25, 2017, at 4:05 PM, brendan <bren...@cannells.com> wrote:
> >
> > Indeed; I should have clarified that I didn't mean only recursion per
> se. Not the first time I've stumbled on that misnomer.
> >
> > On Tuesday, April 25, 2017 at 6:53:59 PM UTC-4, Robby Findler wrote:
> >> I think the question is about non-tail calls and limits on them.
>
>
> FWIW you can definitely trigger a stack overflow with non-tail calls. In
> DrRacket, go to Racket → Limit Mem­ory and change the limit to 8 MB. Then
> try this:
>
> (define (sum n)
>   (if (zero? n)
>       n
>       (+ n (sum (sub1 n)))))
>
> (sum 100000000) ; boom
>
> --
> 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.

Reply via email to