is this a silent (reverse "gub") ?

Q&A's, tips, howto's
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

is this a silent (reverse "gub") ?

Post 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.
-- (define? (Cornflakes))

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post 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...
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Its overflowing memory assuming a max of 2147483647 repetitions, I will look into it.

Lutz

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post 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.

Locked