Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LispWorks 5.0+ question

1 view
Skip to first unread message

Jeff M.

unread,
Apr 19, 2007, 3:41:45 PM4/19/07
to
I have both 4.4 personal and 5.01 personal installed on my machine to
test some things out. From a fresh image and doing the simple
factorial:

(defun fac (n)
(if (zerop n) 1 (* n (fac (1- n)))))

Running (fac 100) in 4.4 yields the proper result while doing the same
in 5.0 results in a stack overflow. Was there a change in 5.0 that did
this or was there a fundamental change with how the personal edition
was being presented that caused this? Obviously, increasing the stack
size fixes the problem.

Slightly related note: the default stack size is 16,000 in 5.0, and I
can't think of any reason why (fac 100) should blow that limit - even
with that single extra parameter. How big is the stack frame for a
function with no local data?

Jeff M.

Edi Weitz

unread,
Apr 19, 2007, 3:53:43 PM4/19/07
to
On 19 Apr 2007 12:41:45 -0700, "Jeff M." <mas...@gmail.com> wrote:

> I have both 4.4 personal and 5.01 personal installed on my machine
> to test some things out. From a fresh image and doing the simple
> factorial:
>
> (defun fac (n)
> (if (zerop n) 1 (* n (fac (1- n)))))
>
> Running (fac 100) in 4.4 yields the proper result while doing the
> same in 5.0 results in a stack overflow.

Why don't you just compile the function?

--

Lisp is not dead, it just smells funny.

Real email: (replace (subseq "spam...@agharta.de" 5) "edi")

Espen Vestre

unread,
Apr 19, 2007, 4:13:27 PM4/19/07
to
Edi Weitz <spam...@agharta.de> writes:

> Why don't you just compile the function?

The 5.0 interpreter is actually significantly slower than the 4.4
interpreter (because of more debugging possibilities, maybe?).

I consider the slowness to be a bonus feature - if you forget to compile a
module, you'll be reminded :-)
--
(espen)

Alex Mizrahi

unread,
Apr 19, 2007, 4:25:52 PM4/19/07
to
(message (Hello 'Jeff)
(you :wrote :on '(19 Apr 2007 12:41:45 -0700))
(

JM> Running (fac 100) in 4.4 yields the proper result while doing the same
JM> in 5.0 results in a stack overflow. Was there a change in 5.0 that did
JM> this or was there a fundamental change

unless you compile function with right flags, it's in 'interpreted mode',
that can be called also 'debug mode' --

JM> How big is the stack frame for a function with no local data?

in debug mode it contains all information that debugger think is necessary,
that can be arbitrarily long..

)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
"I am everything you want and I am everything you need")


0 new messages