<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
I assume there is a need to keep the code around for compatibility?<BR>
You know -- to read existing files?<BR>
And to keep testing that?<BR>
And write them at least so the tests can read them back?<BR>
<BR>
<BR>
But maybe we should take a read-only attitude?<BR>
<BR>
<BR>
And switch the quake netobj=netobj1 to netobj=netobj2?<BR>
<BR>
<BR>
It's tough..if you convert-upon-write, and people are<BR>
running old programs, you'll break their files.<BR>
<BR>
<BR>
It's also tough, you know, I think this stuff is too automatic.<BR>
I'm pretty sure we should change the Text internal representation,<BR>
but I'm also pretty sure the persistance (disk) representation<BR>
is automatically derived from the transient (memory)<BR>
representation and changing the second breaks the first.<BR>
<BR>
<BR>
You know, I suspect it is like those systems<BR>
that do:<BR>
<BR>
<BR>
struct foo a;<BR>
fwrite(&a, sizeof(a));<BR>
<BR>
<BR>
but just with endian/wordsize conversions and<BR>
hashes/typeid to do checks upon read, so it<BR>
won't crash if you change things, but it also won't<BR>
read back successfully.<BR>
<BR>
<BR>
Maybe the v1 limitations are good as well, in that maybe<BR>
it is faster, and sometimes the limitations don't matter???<BR>
<BR>
<BR>
- Jay<BR><BR> <BR>
<HR id=stopSpelling>
Date: Sun, 13 Dec 2009 00:52:53 -0500<BR>From: rcoleburn@scires.com<BR>To: m3devel@elegosoft.com<BR>Subject: Re: [M3devel] pickle bug..solved?.. not supposed to work?<BR><BR>
<DIV>Jay:</DIV>
<DIV> </DIV>
<DIV>I've done a lot with Pickles and with NetObj.</DIV>
<DIV> </DIV>
<DIV>I switched to the v2 version a long time ago and never looked back.</DIV>
<DIV> </DIV>
<DIV>IMO, we should switch over to v2 exclusively and consider v1 obsolete. Perhaps some others should comment on this to see if they share my opinion.</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Randy<BR><BR>>>> Jay K <jay.krell@cornell.edu> 12/13/2009 12:34 AM >>><BR><BR><A href="https://projects.elego.de/cm3/ticket/1068">https://projects.elego.de/cm3/ticket/1068</A><BR><BR><BR><BR><BR><BR>I've only spent a few minutes here.<BR><BR>Trying to find the relative code and such.<BR><BR><BR><BR><BR><BR>The code is here:<BR><BR><BR><BR><BR><BR>C:\dev2\cm3.2\m3-comm\netobj\tests\perf\src<BR><BR><BR><BR>I found it by looking near the top of the stack in<BR><BR>the bug report -- NetObjTest.m3 -- and<BR><BR>then dir /s/b NetObjTest.m3.<BR><BR><BR><BR>or find . | grep NetObjTest.m3$ on Unix.<BR><BR><BR><BR><BR><BR>It appears that Pickle v1 and v2 are both<BR><BR>available in the same library.<BR><BR>There is INTERFACE Pickle and INTERFACE Pickle2.<BR><BR><BR><BR><BR><BR>It appears netobj can use either.<BR><BR><BR><BR>If you look at the stack in the bug, there is a lot of "v1" stuff.<BR><BR><BR><BR><BR><BR>We provide Quake functions:<BR><BR><BR><BR>readonly proc netobjv1(intf, type) is<BR>...<BR><BR>end<BR><BR><BR><BR>readonly proc Netobjv1(intf, type) is<BR>...<BR><BR>end<BR><BR><BR><BR>readonly proc netobjv2(intf, type) is<BR>...<BR><BR>end<BR><BR><BR><BR>readonly proc netobj(intf, type) is<BR> netobjv1(intf, type)<BR>end<BR><BR><BR><BR><BR><BR><BR>v1 pickles cannot cross endian/wordsize boundaries.<BR><BR><BR><BR><BR><BR>I think the bug is not so much in the pickle code, nor in the netobj code,<BR><BR>but in the test code, or the running of it.<BR><BR><BR><BR>Tests involving v1 won't work crossing endian/wordsize boundaries.<BR><BR>V1 tests probably should still run, and maybe detect the mismatch<BR><BR>and just claim success?<BR><BR><BR><BR>And then v2 should get better coverage?<BR><BR><BR><BR><BR><BR>Any more bugs then?<BR><BR>I was procrastinating on this because I've never done anything with pickles</DIV> </body>
</html>