From: Mikael Djurfeldt <djurfeldt@nada.kth.se>
Cc: guile-user@gnu.org, djurfeldt@nada.kth.se
Subject: Re: Uniform vectors, user survey
Date: Sun, 24 Oct 2004 18:04:33 +0200 [thread overview]
Message-ID: <xy7acuchzla.fsf@nada.kth.se> (raw)
In-Reply-To: <ljfz46vnrb.fsf@troy.dt.e-technik.uni-dortmund.de> (Marius Vollmer's message of "Fri, 22 Oct 2004 16:19:36 +0200")
Marius Vollmer <marius.vollmer@uni-dortmund.de> 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
next prev parent reply other threads:[~2004-10-24 16:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-22 14:19 Uniform vectors, user survey Marius Vollmer
2004-10-23 14:02 ` Neil Jerram
2004-10-24 16:04 ` Mikael Djurfeldt [this message]
2004-10-25 18:08 ` Stephen Compall
2004-10-25 18:34 ` Peter Christopher
2004-10-25 19:51 ` Ludovic Courtès
2004-10-25 22:00 ` Mike Gran
2004-10-26 2:50 ` Steve Tell
2004-11-04 17:48 ` Marius Vollmer
2004-11-05 17:01 ` Marius Vollmer
-- strict thread matches above, loose matches on Subject: below --
2004-10-26 3:03 Roland Orre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xy7acuchzla.fsf@nada.kth.se \
--to=djurfeldt@nada.kth.se \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).