is this a silent (reverse "gub") ?

Started by newdep, April 05, 2006, 01:12:12 PM

Previous topic - Next topic

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

#1
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

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



Lutz

cormullion

#3
Coincidentally I called dup by mistake this way last week:


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