Page 1 of 1

is this a silent (reverse "gub") ?

Posted: Wed Apr 05, 2006 8:12 pm
by newdep
(tested on WinXP, 8800)


This is a small mismatch i think...

This is silently computing, (no highload) but without output or ending...

>(dup 0 -1)

seems series and sequence are protected by the -1..

and doing a (dup "0" -1) in the console version gives a nice error..
though exists immediatly..


On linux however ->
> (dup "1" -1)
Segmentation fault


Norman.

Posted: Wed Apr 05, 2006 8:58 pm
by newdep
Aaa wait a while ..when doing ie.. (dup (lambda()) -1).

The console of window comes after 5 minutes nicly with a message
"Press ENTER to exit"

Soo newlisp is working hard in the -1 until memory is exchausted..
Not realy a bug ..but behaviour its not consistent over the OS version...

Posted: Wed Apr 05, 2006 10:59 pm
by Lutz
Its overflowing memory assuming a max of 2147483647 repetitions, I will look into it.

Lutz

Posted: Thu Apr 06, 2006 6:51 am
by cormullion
Coincidentally I called dup by mistake this way last week:

Code: Select all

(while (read-line file)
	(println (replace {(\S*)(\s*)(=)(\s*)(.*)} (current-line) (string $1 (dup " "  (- 20 (length $1))) $3 " " $5 ) 0 )))
which can produce a negative value. The returned error was 'not enough memory', though, which seemed correct.