[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Uniform vectors, user survey
From: |
Peter Christopher |
Subject: |
Re: Uniform vectors, user survey |
Date: |
Mon, 25 Oct 2004 14:34:41 -0400 (EDT) |
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 <address@hidden> 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
> address@hidden
> http://lists.gnu.org/mailman/listinfo/guile-user
>
- Uniform vectors, user survey, Marius Vollmer, 2004/10/22
- Re: Uniform vectors, user survey, Neil Jerram, 2004/10/23
- Re: Uniform vectors, user survey, Mikael Djurfeldt, 2004/10/24
- Re: Uniform vectors, user survey, Stephen Compall, 2004/10/25
- Re: Uniform vectors, user survey,
Peter Christopher <=
- Re: Uniform vectors, user survey, Mike Gran, 2004/10/25
- Re: Uniform vectors, user survey, Steve Tell, 2004/10/25