Re: [Mono-list] Binary serialization

2003-01-19 Thread Lluis Sanchez
  I've attached a document that describes the format. There are some
  gaps in some tables of codes, so if you find a meaning for the missing
  codes, please contact me and I'll update the document.
 
 Is it possible to check the document in CVS as well?

Yes. In which folder should it be added?

  Another difference is how primitive types are serialized. I've noticed
  that MS uses the codes of the enum TypeCode to identify primitive
  types. I did the same, but the codes of mono's TypeCode enum are
  different, so the formatter gets confused when reading values of an
  object serialized with MS runtime. I've also seen that decimal values
  are serialized using a different format. However, this should be easy
  to solve.
 
 This seems like a bug in our runtime.  The TypeCode enumeration should
 in principle have the same values.  If it does not, that is our
 mistake.  Do you know which values are wrong?  (Or all of it?)

I think most of them are wrong. I'll correct them and I'll send a patch.

Lluis.


___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list



Re: [Mono-list] Binary serialization

2003-01-19 Thread Sergey Chaban
 This seems like a bug in our runtime.  The TypeCode enumeration should
 in principle have the same values.  If it does not, that is our
 mistake.  Do you know which values are wrong?  (Or all of it?)

 I think most of them are wrong. I'll correct them and I'll send a patch.

I'm pretty sure they are all correct:
1) They are generated from the specs file;
2) They seems to have the same values in mscorlib;
3) They have the same values in Rotor;

Maybe problem is with something else?

Sergey







___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list



RE: [Mono-list] Binary serialization

2003-01-19 Thread Torstensson, Patrik
The values the binary serializer uses is not the same, the serializer
uses a own enum.

Cheers,
 Patrik

 -Original Message-
 From: Sergey Chaban [mailto:[EMAIL PROTECTED]] 
 Sent: 2003-01-19 16:34
 To: [EMAIL PROTECTED]
 Subject: Re: [Mono-list] Binary serialization
 
 
  This seems like a bug in our runtime.  The TypeCode 
 enumeration should
  in principle have the same values.  If it does not, that is our
  mistake.  Do you know which values are wrong?  (Or all of it?)
 
  I think most of them are wrong. I'll correct them and I'll 
 send a patch.
 
 I'm pretty sure they are all correct:
 1) They are generated from the specs file;
 2) They seems to have the same values in mscorlib;
 3) They have the same values in Rotor;
 
 Maybe problem is with something else?
 
 Sergey
 
 
 
 
 
 
 
 ___
 Mono-list maillist  -  [EMAIL PROTECTED]
 http://lists.ximian.com/mailman/listinfo/mono-list
 

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list



Re: [Mono-list] Binary serialization

2003-01-19 Thread Lluis Sanchez
  This seems like a bug in our runtime.  The TypeCode enumeration should
  in principle have the same values.  If it does not, that is our
  mistake.  Do you know which values are wrong?  (Or all of it?)

  I think most of them are wrong. I'll correct them and I'll send a patch.

 I'm pretty sure they are all correct:
 1) They are generated from the specs file;
 2) They seems to have the same values in mscorlib;
 3) They have the same values in Rotor;

 Maybe problem is with something else?


You are right! The enum is ok. It seems that MS .NET does not use TypeCode
values to encode the primitive types, as I assumed. In may initial tests I
used ints and chars, and casually those types are encoded using its TypeCode
value, but it is not true for the rest of the primitive types.
I'll correct it.

Lluis.


___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list



Re: [Mono-list] Binary serialization

2003-01-19 Thread John Duncan
Microsoft continues to amaze. I bet that the values are similar to DCOM 
stuff.

On Sunday, January 19, 2003, at 12:22 PM, Torstensson, Patrik wrote:

The values the binary serializer uses is not the same, the serializer
uses a own enum.

Cheers,
 Patrik


-Original Message-
From: Sergey Chaban [mailto:[EMAIL PROTECTED]]
Sent: 2003-01-19 16:34
To: [EMAIL PROTECTED]
Subject: Re: [Mono-list] Binary serialization



This seems like a bug in our runtime.  The TypeCode

enumeration should

in principle have the same values.  If it does not, that is our
mistake.  Do you know which values are wrong?  (Or all of it?)



I think most of them are wrong. I'll correct them and I'll

send a patch.

I'm pretty sure they are all correct:
1) They are generated from the specs file;
2) They seems to have the same values in mscorlib;
3) They have the same values in Rotor;

Maybe problem is with something else?

Sergey







___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list



___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list



___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list



Re: [Mono-list] Binary serialization

2003-01-19 Thread Sergey Chaban
 The values the binary serializer uses is not the same, the serializer
 uses a own enum.

 It seems that MS .NET does not use TypeCode
 values to encode the primitive types, as I assumed.

I suppose those are enum(s) in System.Runtime.Serialization.Formatters, 
InternalPrimitiveTypeE etc?
They were available in the alpha version of the ECMA specs file, but were removed 
lately.

Sergey




___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list



Re: [Mono-list] Binary serialization

2003-01-18 Thread Martin Baulig
Hi,

these are really excellent news :-)

I was already waiting for a working serialization support because I want to use it in 
the
debugger to allow people to save their breakpoint settings etc. to disk.

-- 
Martin Baulig
[EMAIL PROTECTED]
[EMAIL PROTECTED]

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list



Re: [Mono-list] Binary serialization

2003-01-17 Thread Gonzalo Paniagua Javier
El vie, 17-01-2003 a las 15:29, Lluis Sanchez escribió:
 Hello!,
  
 I've just commited the implementation of BinaryFormatter and other
 support classes. Now Mono has support for binary serialization!!

Wow! I will begin using it right now (i have some code in System.Web
commented out that uses binary serialization).

Good job!



___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list



Re: [Mono-list] Binary serialization

2003-01-17 Thread Miguel de Icaza
Hello Lluis,

 I've just commited the implementation of BinaryFormatter and other
 support classes. Now Mono has support for binary serialization!!

Your documentation work is amazing!   The research you have done is
amazing.  I will comment later on as well.
 
 I've attached a document that describes the format. There are some
 gaps in some tables of codes, so if you find a meaning for the missing
 codes, please contact me and I'll update the document.

Is it possible to check the document in CVS as well?

 However, it does not mean that mono serialization is fully compatible
 with microsoft's runtime. Although the format is the same, objects may
 have a different internal structure. For example, mono's ArrayList
 stores elements in an object array named dataArray, while in MS
 runtime, it is named _items. An ArrayList serialized using mono is
 currently not deserializable with MS and vice-versa. I think it
 happens the same with many other classes, and changing all of them may
 be a lot of work.

If it is just a matter of the fields having compatible names, it might
be worth just changing the names in our implementation.  It would be
more difficult if we need more fields to be serialized though.

We should try things one at a time, and see how far we can get. 

 Another difference is how primitive types are serialized. I've noticed
 that MS uses the codes of the enum TypeCode to identify primitive
 types. I did the same, but the codes of mono's TypeCode enum are
 different, so the formatter gets confused when reading values of an
 object serialized with MS runtime. I've also seen that decimal values
 are serialized using a different format. However, this should be easy
 to solve.

This seems like a bug in our runtime.  The TypeCode enumeration should
in principle have the same values.  If it does not, that is our
mistake.  Do you know which values are wrong?  (Or all of it?)

 Now, I'll try to plug this into Remoting ;-)

Excellent work Lluis, excellent.

Miguel

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list