unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Peter Christopher <pchristo@chem.utoronto.ca>
Cc: guile-user@gnu.org, Marius Vollmer <marius.vollmer@uni-dortmund.de>
Subject: Re: Uniform vectors, user survey
Date: Mon, 25 Oct 2004 14:34:41 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44.0410251418580.365-100000@tachlis2.chem.utoronto.ca> (raw)
In-Reply-To: <xfyfz428ycn.fsf@csserver.evansville.edu>

Hi there,

	Just thought I'd weigh in. I used the uniform vectors to 
construct what amounts to a guile version of NumericPython. I.e. I used 
uniform vectors of double precision numbers. I found the interface to be 
fairly usable. I do have one HUGE pet peeve though. I grant you that this 
is just a peeve and not a major difficulty but ... I HATE the way you 
select what type of elements will be stored in the vector. For instance 
as it says at  
http://www.gnu.org/software/guile/docs/guile-ref/Uniform-Arrays.html#Uniform%20Arrays
you create a vector with (make-uniform-array <prototype> 3) where 
<prototype> is one of 
#t             boolean (bit-vector)                    b
#\a            char (string)                           a
#\nul          byte (integer)                          y
's             short (integer)                         h
1              unsigned long (integer)                 u
-1             signed long (integer)                   e
'l             signed long long (integer)              l
1.0            float (single precision)                s
1/3            double (double precision float)         i
0+i            complex (double precision)              c
()             conventional vector
I don't like the left most column. I think that it's ugly because it's 
not necessarily obvious to the reader of the code what type you are 
storing in the vector. IMHO it would be better to use symbols as the 
prototype arguments, for example
'bool             boolean (bit-vector)                    b
'char             char (string)                           a
'byte             byte (integer)                          y
'short            short (integer)                         h
'ulong            unsigned long (integer)                 u
'long             signed long (integer)                   e
'longlong         signed long long (integer)              l
'float            float (single precision)                s
'double           double (double precision float)         i
'complex          complex (double precision)              c
This way it is obvious what kind of uniform vector you're constructing. 
Ok ... yea I know this isn't a killer problem, but it has always annoyed 
me.

Also, I want to stress that *I* think that uniform vectors are a very 
important guile feature. They may not be used a lot, BUT they allow 
developers to (conveniently) make some applications that would 
otherwise be very performance hindering.

And there are my 2 cents. 

Best, 
Pete


On 25 Oct 2004, Stephen Compall wrote:

> Marius Vollmer <marius.vollmer@uni-dortmund.de> writes:
> 
> > 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 have used bit-vectors in my class.
> 
> --
> Stephen Compall or s11 or sirian
> 
> Within a computer, natural language is unnatural.
> 
> Perl-RSA subversive Merlin SCUD missile MP5K-SD militia ANC national
> information infrastructure Firefly passwd MILSATCOM lynch HAMASMOIS
> covert video Ermes
> 
> 
> _______________________________________________
> Guile-user mailing list
> Guile-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/guile-user
> 



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


  reply	other threads:[~2004-10-25 18:34 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
2004-10-25 18:08 ` Stephen Compall
2004-10-25 18:34   ` Peter Christopher [this message]
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=Pine.LNX.4.44.0410251418580.365-100000@tachlis2.chem.utoronto.ca \
    --to=pchristo@chem.utoronto.ca \
    --cc=guile-user@gnu.org \
    --cc=marius.vollmer@uni-dortmund.de \
    /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).