[slime-devel] win32 SLIME : long time and huge buffer to generate 100, 000 data items

Gary King gwking at metabang.com
Tue Dec 4 03:47:57 UTC 2007


Hi Terrence,

IIUC, the issue is that you don't want SLIME to print *d* once it has  
been set. This is a somewhat common problem with interactive Lisp use  
and large data items. The "problem" is that setf returns the last  
value and the Lisp printer then tries to print it. There are two easy  
ways around it.

1. (setf *d* (gendata) foo nil)

This sets *d* to (gendata) and foo to nil and then returns nil.

2 (progn (setf *d* (gendata)) nil)

This sets *d* to (gendata) and then returns nil.

You can also look at the values of *print-length* and *print-level*  
(note that some Lisps have other printer control variables that may  
need to be set to completely avoid "run away" printing.

HTH,

On Dec 3, 2007, at 7:38 PM, Terrence Brannon wrote:

> I'm wondering if there is some way to tell SLIME to not try to report
> all output  from the inferior lisp? My emacs buffer-menu shows the
> slime-repl as huge and ever-growing:
>
>     * *slime-repl sbc: 123816001  REPL
>
> I'm building a huge data structure and need some way of SLIME sending
> the command but turning off output from SBCL.
>
> Here is the code that is taking a long time to run:
>
> (defvar *datasize* 100000 "size of dataset")
>
> (defun gendata ()
>  (dotimes (i *datasize*)
>    (let* (
> 	   (m (random (1+ i)))
> 	   (n (random (1+ m)))
> 	   (text (write (generate 'sentence)))
> 	   )
>      (list :text text :m m :n n)))
>  )
>
>
> (setf *d* (gendata))
>
> -- 
> http://www.aliveandwell.org/ | http://www.SlowChess.com |
> http://mostholy.wholefoodfarmacy.com
> _______________________________________________
> slime-devel site list
> slime-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/slime-devel

--
Gary Warren King, metabang.com
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM







More information about the slime-devel mailing list