Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Freezing strings?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Brent \"Dax\" Royal-Gordon  
View profile  
 More options Mar 5 2004, 8:48 pm
Newsgroups: perl.perl6.internals
From: br...@brentdax.com (Brent \"Dax\" Royal-Gordon)
Date: Fri, 05 Mar 2004 17:38:53 -0800
Local: Fri, Mar 5 2004 8:38 pm
Subject: Freezing strings?
I figure it's about time for Parrot programs to be able to look at
Parrot's configuration, so I'm trying to implement a library equivalent
to Parrot::Config.  My current thoughts on implementation involve three
elements:

   1.  A Configure step that writes and executes a Parrot program. Said
       program builds up a PerlHash of options and freezes it to disk.
   2.  Said frozen hash, stored in (e.g.) F<library/config.fpmc>.
   3.  A small chunk of code in (e.g.) F<library/config.imc> which reads
       the frozen hash from disk and re-creates it.

This would guarantee that you're seeing the configuration info for the
current system, even if you moved a bytecode file with config.imc
compiled into it.

Unfortunately, I'm being stopped before I can even start.  The following
code prints "foo=" on my Debian server:

         new P0, .PerlString
         set P0, "foo"

         freeze S0, P0
         thaw P1, S0

         print P0
         print "="
         print P1
         print "\n"

         end

If I freeze a hash, the keys are preserved, but string values are lost.
  Integer values are kept; float values all come out as 0.0 (plus or
minus about eight zeros).

F<t/pmc/freeze.t> doesn't test freezing and thawing strings or floats.
Is this because the functionality hasn't been implemented yet?  A
cursory examination of F<src/pmc_freeze.c> suggests that it should be
working, but I may well be missing something.

If it's just some busywork, such as copying some code into PerlString
and tweaking it, I can probably do it, but I've been out of the loop for
a while, so anything particularly involved is likely beyond me.

--
Brent "Dax" Royal-Gordon <br...@brentdax.com>
Perl and Parrot hacker

Oceania has always been at war with Eastasia.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.