h5md-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h5md-user] Mandate Variable-length string datatype


From: Pierre de Buyl
Subject: Re: [h5md-user] Mandate Variable-length string datatype
Date: Thu, 19 Sep 2013 16:52:26 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Sep 19, 2013 at 10:39:05AM +0200, Konrad Hinsen wrote:
> Peter Colberg writes:
> 
>  > I would like to mandate the variable-length string datatype for all
>  > string values appearing in the specification. The restriction to
>  > variable-length strings simplifies the implementation of H5MD readers
>  > in low-level programs greatly, as fixed-length and variable-length
>  > string datatypes are not convertible.
> 
> +1

Has anyone the experience of variable-length string datatype in Fortran?

This should not prevent us from picking this solution, but I prefer to know the
implications.

P

>  > On the implementation side, h5py needs to be instructed explicitly
>  > to use vlen strings. The h5py author at one point was enthusiastic
>  > and let h5py write vlen strings by default, but user(s) complained
>  > and this sensible default was reverted.
> 
> I happen to agree with Andrew on that point. h5py has a very sensible
> default: HDF5 datasets are as equivalent as possible to NumPy arrays.
> Making exceptions for special cases (such as character arrays) creates
> more problems than it solves. For example, how do you handle record
> arrays that mix character and numeric data?
> 
> As a general rule, I always favor consistency over convenience in
> interface specifications. You can easily add a convenience layer on
> top of a consistent interface, but the other direction is a pain.
> 
> In our case, PyH5MD is the convenience layer, so the problem is solved :-)
> 
> Konrad.
> -- 
> ---------------------------------------------------------------------
> Konrad Hinsen
> Centre de Biophysique Moléculaire, CNRS Orléans
> Synchrotron Soleil - Division Expériences
> Saint Aubin - BP 48
> 91192 Gif sur Yvette Cedex, France
> Tel. +33-1 69 35 97 15
> E-Mail: research AT khinsen DOT fastmail DOT net
> http://dirac.cnrs-orleans.fr/~hinsen/
> ORCID: http://orcid.org/0000-0003-0330-9428
> Twitter: @khinsen
> ---------------------------------------------------------------------
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]