The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

C# is NOT a portable data format specification. by etwas_egal2007-01-25 13:08:03
  Use the marshaller classes by Didactylos2007-01-25 14:10:49
    The real issue is lack of a CLR by etwas_egal2007-01-25 14:41:48
      What's broken about it? (n/t) by Didactylos2007-01-25 14:44:35
        Static array references not fixed yet by etwas_egal2007-01-25 14:53:04
          Huh? by Didactylos2007-01-25 15:05:35
            Example, massively trimmed by etwas_egal2007-01-25 15:31:06
              Shouldn't you be using by Didactylos2007-01-25 15:51:38
                Some of that, yeah. That's why it's "broken". by etwas_egal 2007-01-25 23:59:31
ANSI saves at least 25 GB per data copy instance, although an int would be better for the US post code. Not certain why it was built with a string there, most of the rest of the data *is* in proper numeric formats and stored as such. Bonus: input data generally ANSI or EBCDIC. Downside: '0' and 'O' stored as separate characters; due to the data origin, these should generally be treated as identical characters.

Marshalling: marshalling burns major CPU in our context. Our actual target is a rather large structured binary file (55GB+) that we have to pass entirely through multiple times per hour (200+, in the end achieved by using multiple machines - so software speed directly impacts hardware and license costs), so unsafe pointer casts to managed objects is actually what is needed for the speed. Saves a lot on the type-checking NOP's. But, it requires everything to be blittable. This heavily influences the structure.

I'll check on layoutKind.explicit ... checked. In a certain sense, it is The Right Thing, but I ran out of fingers calculating FieldOffsetAttribute. layoutKind.sequential leads to easier maintenance, only have to check order and type, not order, type and offset. Does it have a particular advantage over sequential that I'm missing? I'll grow more fingers if it gives an advantage...

IIRC, SizeConst is useful against the entire struct when there is one terminal array, but this has at least three.

"simple string field": Non-Blittable.

"Fixed size byte array" would be absolutely lovely. IT has decided to try to upgrade to .NET 2.0 by the end of the year, and once they do that, byte arrays become useful, and more refactoring can begin. This is Most Broken Thing, after "specification written in C#". Implementation in C#, fine, specification in C#, not fine.

And most of my problems with it can be traced to it's starting life as .NET 1.0, with some parts have been upgraded to 1.1. Still experiencing the bugs of building on a release before the bug release... like no fixed size byte arrays in structs that meet the blittability requirements.
[ Reply ]

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)