[LUGSB] Big downloaders...

Erez Zadok ezk at cs.sunysb.edu
Mon Oct 4 09:12:01 EDT 2004


Before it happens: folks, please don't discuss ways to circumvent campus
Internet policy on this public forum.

Thank you,
Erez (LUGSB Faculty sponsor).
>From mgraffam at mathlab.sunysb.edu Mon Oct  4 23:47:48 2004
Received: from SunRa.mathlab.sunysb.edu (SunRa.mathlab.sunysb.edu
	[129.49.17.48])i953lms5028340
	for <lugsb at fsl.cs.sunysb.edu>; Mon, 4 Oct 2004 23:47:48 -0400
Received: from SunRa.mathlab.sunysb.edu (localhost [127.0.0.1])
	i953loCq019704
	for <lugsb at fsl.cs.sunysb.edu>; Mon, 4 Oct 2004 23:47:50 -0400 (EDT)
Received: from localhost (mgraffam at localhost)i953lo1b019701
	for <lugsb at fsl.cs.sunysb.edu>; Mon, 4 Oct 2004 23:47:50 -0400 (EDT)
X-Authentication-Warning: SunRa.mathlab.sunysb.edu: mgraffam owned process
	doing -bs
Date: Mon, 4 Oct 2004 23:47:50 -0400 (EDT)
From: Michael Graffam <mgraffam at mathlab.sunysb.edu>
To: lugsb at fsl.cs.sunysb.edu
Message-ID: <Pine.GSO.4.44.0410042345010.19650-100000 at SunRa.mathlab.sunysb.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [LUGSB] Any Lisp gurus out there? 
X-BeenThere: lugsb at fsl.cs.sunysb.edu
X-Mailman-Version: 2.1.1
Precedence: list
Reply-To: Linux Users Group at Stony Brook <lugsb at fsl.cs.sunysb.edu>
List-Id: Linux Users Group at Stony Brook <lugsb.fsl.cs.sunysb.edu>
List-Unsubscribe: <http://www.fsl.cs.sunysb.edu/mailman/listinfo/lugsb>,
	<mailto:lugsb-request at fsl.cs.sunysb.edu?subject=unsubscribe>
List-Archive: <http://lists.fsl.cs.sunysb.edu/pipermail/lugsb>
List-Post: <mailto:lugsb at fsl.cs.sunysb.edu>
List-Help: <mailto:lugsb-request at fsl.cs.sunysb.edu?subject=help>
List-Subscribe: <http://www.fsl.cs.sunysb.edu/mailman/listinfo/lugsb>,
	<mailto:lugsb-request at fsl.cs.sunysb.edu?subject=subscribe>
X-List-Received-Date: Tue, 05 Oct 2004 03:47:49 -0000

Are there any Lisp / Scheme hackers on campus? I'd like to get together
over coffee (or, better: beer) and talk code. I'm fairly new to Lisp (I've
been working with it for about a year) but I don't touch C/C++ anymore.
I don't even use the infix arithmetic evaluator I wrote when I first
start learning Lisp anymore -- that was a big step for me. :)

In my spare time, I've been writing a 3D wireframe package for Common
Lisp. I'd like to some advice regarding drawing packages that work on
GNU/Linux using CLISP. I've rolled my own for now, but I want to use
something standard when I release.

In the process, I've written matrix and polynomial packages too,
because the licensing for the code I found was for noncommericial use
only -- but I use the GPL.

My polynomial library stores the coefficients in an array, or as a linked
list. In array form the index into the array is the associated exponent
so coefficients equal to zero are not suppressed. As a list, it is an
association list where a term's car is set to the coefficient and the cdr
set to the power -- so zero coefficients can be suppressed in this form.
Thus my polynomial library does sparse and non-sparse polynomial
operations.

In the process of writing the library, it occurred to me that if I stored
the polynomial as a list of roots rather than coefficients, multiplication
goes from being O(n^2) to mere concatenation of the factor lists. So if
one is doing lots of polynomial multiplications, storing the polynomials
in root form could be more efficient.

I'd like to implement this functionality into my library, but I'd like to
chat with some Lisp gurus about the Right Way in regards to type coercion.
For example:

- If an operation is done to polynomials of differing type, what is the
  resultant type to be? I currently coerce to the type of the first
  operand.

- What about letting the code decide type? The multiplication code might
  coerce to root form, and the addition code might coerce to sparse or
  non-sparse after checking the coefficients over. This behavior should
  probably have a toggle, no?

I guess what I'm ultimately asking is, how should my code behave so that
it *feels* as if it is codefied by ANSI?



More information about the lugsb mailing list