On Thu, 28 Feb 2008, Craig DeForest wrote:
> Is YAML common enough these days that we should consider implementing it
> directly for PDL? There's a big speed hit with moving back into Perl
I would not have thought so: There are a number of Perl YAML modules
and YAML being the main one (inlcudes the Dump and Load commands) but it
doesn't seem to be able to read YAML produced by Ruby (where it seems
to be OK to nest arrays on the same line:
--
rather than
-
-
So I had to use YAML::Syck (which is based on C) and this works. There
is discussion to the effect that the YAML spec has grown significantly
in complexity, and is thus nontrivial to get correct now. And if you
start on YAML then it's a long wedge, with XML, JSON, S-expressions (lisp)
being a few steps along the way! Not forgetting:
http://web.archive.org/web/20060325012720/www.pault.com/xmlalternatives.html
> variables. (Then again, people who care about speed probably aren't using
> large ASCIIfied interchange formats...)
No, probably not unless they are also using Bzip2 at the same time.
But I think with FFT's data transfer isn't the slow bit.
Hugh
>
>
> On Feb 28, 2008, at 9:13 AM, Hugh Sasse wrote:
>
> > When I get data into a PDL and manipulate it, I can print it
> > to the screen but can't dump it with YAML in a form another
> > YAML reader (Python, Ruby, ??) can work with. Is there a
> > conventional way to get a 2D array back out of a PDL?
> > I've done the usual web searching, prodded the internal help
> > {?, ??} in all the ways I can think of, but to no avail so far.
> >
> > I've been away from Perl for several years, so I'm having to
> > re-learn more than I'd care to admit :-)
> >
> > Thank you,
> > Hugh
> >
> >
> > _______________________________________________
> > Perldl mailing list
> > [email protected]
> > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
> >
>
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl