From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.user Subject: Re: Uniform vectors, user survey Date: Sun, 24 Oct 2004 18:04:33 +0200 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: References: Reply-To: djurfeldt@nada.kth.se NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1098633906 9914 80.91.229.6 (24 Oct 2004 16:05:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 24 Oct 2004 16:05:06 +0000 (UTC) Cc: guile-user@gnu.org, djurfeldt@nada.kth.se Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Oct 24 18:04:59 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CLkrb-00075R-00 for ; Sun, 24 Oct 2004 18:04:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CLkzC-0002za-9c for guile-user@m.gmane.org; Sun, 24 Oct 2004 12:12:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CLkz6-0002zQ-Pv for guile-user@gnu.org; Sun, 24 Oct 2004 12:12:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CLkz5-0002yp-JY for guile-user@gnu.org; Sun, 24 Oct 2004 12:12:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CLkz5-0002ym-Ez for guile-user@gnu.org; Sun, 24 Oct 2004 12:12:43 -0400 Original-Received: from [213.212.20.77] (helo=kvast.blakulla.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CLkrC-00007M-MH for guile-user@gnu.org; Sun, 24 Oct 2004 12:04:35 -0400 Original-Received: from mamaliga.blakulla.net ([213.212.21.241] helo=witch) by kvast.blakulla.net with esmtp (Exim 3.36 #1 (Debian)) id 1CLkrB-0001jB-00; Sun, 24 Oct 2004 18:04:33 +0200 Original-Received: from mdj by witch with local (Exim 4.34) id 1CLkrB-00017I-Ap; Sun, 24 Oct 2004 18:04:33 +0200 Original-To: Marius Vollmer In-Reply-To: (Marius Vollmer's message of "Fri, 22 Oct 2004 16:19:36 +0200") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:3620 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:3620 Marius Vollmer writes: > I want to unify our two implementations of uniform vectors, and make > them more useful. Sounds like an important improvement. > I guess uniform vectors would be mainly useful for interfacing to > external code that deals with large arrays. Like the GNU Scientific > Library, say, or maybe things like data compression, image > manipulation, binary file formats in general, etc. > > Instead of using uniform vectors, one can always define a new smob > type that can wrap the large external array. But maybe uniform > vectors would be preferable in some cases, if only you could convince > Guile to handle the external memory right (like you can with smobs). > > I have close to zero experience with using uniform vectors myself, so > I appreciate your input. Do you use uniform vectors? What for? Did > you try but couldn't make them work for you? What do you wish would > be different about them? Etc. I use arrays as the basic representation of matrices in my matrix library (guile-matrix). uniform-vector-read/write! is an important tool for dealing with binary file formats. While smobs are useful in one of the scenarios which Guile targets (application extension language), smobs are not useful as a basis for data structures when developing code in Scheme (like in the scripting language scenario). Vectors are useful as a building block for data structures on the Scheme side. Generic vectors are not always a good alternative, for example when working with large bodies of numerical or binary data. Also, uniform vectors can sometimes be an important "generic" data structure suitable for representation of arguments and results to application extensions. If we have a Guile library M which can do some computation on every element of a collection of numbers, and another library S which can compute statistics on collections of numbers, we don't reach quite the same level of "cross-fertilization" of these libraries if M collections are represented as M-smobs and S collections as S-smobs. What I'm saying is that the need to efficiently represent a list of numbers is sufficiently common to warrant a generic number list data structure such as the uniform vector. M _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user