Re: Stack overflow in relatively simple programs



Dan Bensen <randomgeek@xxxxxxxxxxxxxx> writes:

fairchild.anthony@xxxxxxxxx wrote:
I believe this is more a problem with your algorithms and not Lisp.

Nothing but tail calls there. What's wrong with them?

Common Lisp doesn't specify anything relative to tail calls.
Implementations don't necessarily implement tail call optimization.
clisp doesn't on interpreted code, to ease debugging.

In any case, what's recursive in primes?

--
__Pascal Bourguignon__ http://www.informatimago.com/
Litter box not here.
You must have moved it again.
I'll poop in the sink.
.



Relevant Pages

  • Re: CL implementations and tail-call optimization
    ... All major implementations support tail call optimization, but none guarantees that it will work when you need it, and commercial ones are not necessarilly better in this respect. ... I routinely face the need to unroll tail-calls manually because either Lispworks or Allegro Common Lisp fail to eliminate them, either due to bugs or due to limitations of the implementation. ...
    (comp.lang.lisp)
  • Re: CL Implementations and Tail-Call Elimination
    ... can't rely on an ANS Common Lisp implementation to eliminate tail ... it looks to me like CL implementations really usually will do ... it forces you to compile your code in some obscure ways, ... Tail call optimization is not specified in Common Lisp. ...
    (comp.lang.lisp)
  • Re: Term Rewriting vs. Functional Programming
    ... the compiler optimizes tail calls. ... > quite happy with a simple syntactic definition of tail calls, ... > reason about the space usage of their programs. ... - Don't specify unless you specify completely enough so that the ...
    (comp.lang.functional)
  • dont try to search incidentally while youre causing at times a registered significance
    ... then Paul thus criticizes a lucky border due to ... Well, I'll comply the tail. ... It should obviously specify on lean peculiar navels. ... handicapped midnight. ...
    (sci.crypt)
  • [MSH] select-object -last missing functionality
    ... When I use tail I can specify something like +3 to say give me every line ... This is handy because many times I know I want ... Prev by Date: ...
    (microsoft.public.windows.server.scripting)