pspp-dev
[Top][All Lists]
Advanced

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

Re: libpspp + Perl module somewhere down the road?


From: Jörg Beyer
Subject: Re: libpspp + Perl module somewhere down the road?
Date: Tue, 23 Oct 2007 19:16:21 +0200
User-agent: Microsoft-Entourage/11.2.5.060620

Ben, 
thanks a lot for your immediate comments.


Am 23.10.2007 17:41 Uhr schrieb Ben Pfaff (<address@hidden>):

> Jörg Beyer <address@hidden> writes:
> 
>> But don't expect too much, and please bear with me, I'm
>> not a trained programmer.
>
> Neither am I, but it's never seemed to stop me ;-)

So we share the same habits here -- and I always thought I were the plague
to other programmers ... :-)


>> ... ... ... 
>> While similar ideas have been discussed elsewhere (e.g. in a thread back in
>> June), I wonder what your current plans are:
>> 
>> (1) Is a libpspp in the works (there seem to be some hints in the alpha
>> snapshot of October 3rd, but only an empty directory was installed in
>> /usr/local/lib on my machine)?
> 
> There is a directory named "libpspp" in the source tree, but it
> is not what you are looking for.  (It is a directory of library
> routines used internally by PSPP.)

Sorry, I was unclear here. What I found was the directory
  /usr/local/lib/pspp    _as part of the installation_, and it is empty.
Given the fact that I found it in .../lib/, I thought it could indicate a
planned/forthcoming libpspp. But o.k., now I got it.


>> Given the fact that I know near to nothing about C (or how to use XS or Swig
>> to bring C and Perl together), I have two alternatives:
>> -- If you have something in the works, I could wait a bit and hope that it
>> works for me. 
>> -- I could also sit down and try to write my own parser in pure Perl.
> 
> As a third alternative, you might have a look at
> src/data/sys-file-reader.c in the PSPP to figure out how many
> actual dependencies it has on the rest of the PSPP source base.
> Possibly, it could be extracted from the source without a lot of
> trouble.

Yeah, I spent a bit exactly on this approach, but let C discourage me, so I
finally gave up. The hard bit, at least for me, will most likely be how to
make the glue code in Perl. (Have to ask Santa to give me a 48h-day, that'd
give me more time to experiment :^) )


> I hope you noticed the extensive documentation on the PSPP data
> file format that is included in the PSPP manual.  This could help
> with the implementation of your own parser, if you decide on that
> alternative.

Yes, I was very pleased when I found both the description of the binary and
the portable format. It was in fact this part of your documentation that led
to my own parsing plans. Thanks for both, I guess it was quite hard work to
figure the formats out, wasn't it?

As for portable files, I came far enough with my parser to notice that this
file format stores incomplete dictionaries (no VARIABLE LEVEL, ALIGNMENT or
WIDTH attributes, and possibly no long variable names, too). Didn't find a
note on that in _SPSS's_ documentation and hoped for the best until I
reached the data part... Nice exercise, though.

Thanks for your time!

Jörg


============================================================

Jörg Beyer 
PHILIPPS-University Marburg
Dept. of Psychology
Germany






reply via email to

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