Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Bernhard (4508)

Bernhard
  Bernhard.Schmalhofer@gmx.de
https://www.xing ... hard_Schmalhofer

A freelance software engineer with experience in webapplications, databases and bioinformatics.

A contributor to Parrot and the person behind Pipp.

A physicist who worked with third sound in Helium-III and CCD X-ray detectors.

barney on irc.perl.org
github: http://github.com/bschmalhofer [github.com]
LinkedIn:http://www.linkedin.com/in/bernhardschmalhofer [linkedin.com]
XING: https://www.xing.com/profile/Bernhard_Schmalhofer [xing.com]

Journal of Bernhard (4508)

Sunday January 16, 2005
07:44 AM

embedded databases for Parrot

[ #22731 ]

In the last weeks, I have been looking into dynamic PMCs in Parrot. They are not very different from Parrot core PMCs.Users just have to look up the dynamic ID, before they can create a instance.

As an example I worked on the GDBMHash PMC. This is a binding the GNU dbm, a file dictionary. The basic implementation was straightforward. The configuration is somewhat akward. I need to check wether 'libgdbm.so' exists. Currently I have added this check to the core Parrot configuration. It would be nicer to have a seperate configuration step for Parrot extensions. It would be cool to do that in PIR, as Parrot already exists when extensions are added.

Looking back, using 'gdbm' for the example was propably not the best choice. Berkely DB seems to be much more widely used. As far as I remember, Bio::Index::Fasta is based on Berkeley DB.

A more interesting dynamic PMC would be access to Piddles. Piddles are the basis data structure of the Perl Data languages, http://pdl.perl.org/. But before digging into that, I propably should tidy up the 'Parrot YAML' and rework 'Parrot m4'.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Is there any reason the linking and library finding must happen at configuration and compile times? I wonder if you could punt and write a little bit of C code that hooks into NCI to do the linking and loading at runtime. Of course, being able to write dynamic PMCs in PIR would be even easier.

    • The primary reason is of course that this was the easiest to do. Doing the linking at runtime with NCI is propably possible, but I can't see a real advantage of that. It's nice to be able to do a simple

      ldd gdbmhash.so

      in order to see that things are well.

      The most important issue is that distribution to machines without C-compiler is possible. But this is simply a copy of gdbmhash.so to the target machine. When libgdm.so is not available, then gdbmhash.so can't be loaded. Which is a kind of runtime c

      --
      /* Bernhard.Schmalhofer@gmx.de */