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*

On 6/19/06, Thomas E Enebo <[EMAIL PROTECTED]> wrote:
On Mon, 19 Jun 2006, Ola Bini defenestrated me:
>
> Ah, yes, I know where you're coming from here.
> I have some reservations about the line separator issue too, but nothing
> serious enough to keep the patch out for now. We'll have to fix the issue
> correctly at some point, though.

  Yeah that is mostly how I feel at this point.

> Marshalling is somewhat tricky, but when I last checked the code, it didn't
> seem to be that much of a problem. What are the complications? Is the error
> with FlashHash that our marshalling doesn't dump the class name for native
> classes?

class FlashHash < Hash
   attr_accessor :something
end

With trunk this ends up just saving a Hash.  When it reads it in things
are unhappy since it wants a FlashHash.  Charlie had a patch which
saved the right class name, but it did not do a couple of other needed
things.  I have something which right now remakes the FlashHash but an
extra instance var (which is a Hash) is getting set to nil.  I am almost
there.  I am hopeful this will not cause problems elsewhere since it will
really only trigger with user-derived hash classes.

> But if there is something really important, throw me a mail and I'll see if
> I can find some time.

Will do if needed.

> Of course, it feels great with all the current progress!
>
> (Did you check the new Signal version, by the way?)

  I did not look with any amount of detail yet, but I plan on committing
this first thing when 0.9.0 opens up.

-Tom

--
+ http://www.tc.umn.edu/~enebo +---- mailto:[EMAIL PROTECTED] ----+
| Thomas E Enebo, Protagonist  | "Luck favors the prepared    |
|                              |  mind." -Louis Pasteur       |


_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel



--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ jruby.sourceforge.net
Application Architect @ www.ventera.com
_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to