At 21:42 2006-06-19, you wrote: >I'm actually on vacation all this week, but I'll be in and out checking on >progress. > >The biggest issue with marshalling is that we simply don't do it >right...and there's NO SPEC for how it's supposed to work in Ruby. I >almost launched into writing one by reverse-engineering the C code several >times, but other things took priority. I think it would tremendously >helpful if someone could write or find a binary spec for Ruby marshalling. >The implementation would be trivial if we had that. > >What I found when I started trying to fix things was that there's just a >lot of pieces we don't even have code for. The FlashHash < Hash thing was >just the beginning. The complication is that we have to figure out how >it's supposed to be done solely by looking at the C code. > >The line terminator thing just sucks like the path-separator thing does. >We'll have to figure out where those inputs and outputs are and do the >conversion as necessary. I wish there was a flag we could set in Java to >just run it in "unix mode", but that would probably break anything other >than JRuby running in the same JVM. *sigh*
Ah, yes, of course; vacation. =) I have no memory. Marshalling is hard. I've tried starting to write a BNF for it, just so we can have some kind of spec, based on the C code. It's not that simple, though. There are some things in the internals that I don't really understand, for example rb_generic_ivar_table(). Is this a table for immediate variables, or something completely different? Doing this based on the C code isn't really that hard for most cases, but what bugs me is that it's so hard to know if we've got all the corner cases. Line terminator is really not fun, no. But as far as I can find, right now the IOHandlerSeekable is the only place where this is an issue. Positions can be handled except for when we have to return raw offsets. Otherwise things get more complicated. -unix would be a really handy flag! Lovely. =) /O _______________________________________________ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel