Re: Large programming project in SISC almost finished

"Kjetil S. Matheussen" <[email protected]> Sat, 25 Aug 2007 11:59:12 +0200 (CEST)
Newsgroups gmane.comp.java.sisc.user
Message-ID <Pine.LNX.4.64.0708251154171.9187@ttleush>

On Sat, 25 Aug 2007, Kjetil S. Matheussen wrote:

> I didn't write that. I ment to express that compiling _one_ file can
> take up to a minute. Compiling the whole project takes 22:14 minutes (I
> just clocked it), and compiling the largest file (mixer-area.scm, 760
> lines) takes [still compiling, don't bother waiting any more, its a lot
> more than 1 minute].
>

(I eventually had to kill the compilation, perhaps it ran out of memory 
or something.)

Here is the code it tried to compile up:
http://www.notam02.no/~kjetism/%3Cmixer-area%3E.scm

(I don't write code like that though, the above code was first
macroexpanded using my custom macro system for the project.)



The "at" macro (found many places in the above code) looks like this:

(define-macro (at infostring command)
   (let* ((args (cdr command))
 	 (num-args (length args))
 	 (argnums (iota num-args))
 	 (at-argl-names (map gensym argnums))
 	 (at-das-atoms (gensym))
 	 (ret (gensym))
 	 (at-arg-names (map gensym argnums)))
     `(let ,(map (lambda (argl-name num arg)
 		  `(,argl-name (list ',(if (pair? arg)
 					   (string->symbol (string-append "arg" (number->string num)))
 					   arg)
 				     '|=| 'unknown-value)))
 		at-argl-names
 		argnums
 		args)
        (let ((,at-das-atoms (list ,@at-argl-names)))
 	 (add-trace-do ',infostring ',command ,at-das-atoms)
 	 (let* ,(map (lambda (arg-name argl-name arg)
 		       `(,arg-name (let ((,ret ,arg))
 				     (set-car! (cddr ,argl-name) ,ret)
 				     ,ret)))
 		     at-arg-names
 		     at-argl-names
 		     args)
 	   (,(car command) ,@(map (lambda (arg arg-name)
 				    (if (pair? arg)
 					arg-name
 					arg))
 				  args
 				  at-arg-names)))))))


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/