Tuesday, April 29, 2008

Compared to MRI YAML interface, what rbyaml missing

After compared rbyaml.rb to yaml.rb which is from MRI, I've summarized some missing methods.
Mainly, we need some class variables for RbYAML now, just like parser, emitter and resolver(named as loader in RbYAML)

More information as follows.
  • rbyaml.rb[main interface]
    • missing method
      • parser
        • using resolver method
      • generic_parser
        • using GenericResolver
      • resolver
        • return DefaultResolver
      • emitter
        • using resolver method
      • parse
        • generic_parser.load
      • parse_file
        • parse
      • each_node
        • parser.load_documents
      • parse_documents
        • each_node
      • add_*_type
        • resolver.add_type(loader in rbyaml)
      • tagurize
        • resolver.tagurize
      • transfer
        • resolver.transfer
      • try_implicit
        • transfer & detect_implicit
      • quick_emit
        • using emmitter, there's quick_emit_node in RbYaml, there are not the same
      • Kernel.y
        • like p, y is a really convenient way to YAML.dump

Monday, April 28, 2008

Found a comrade

There is a rubyspec project in GSoC2008 by Federico Builes. It will support both rubinius and MRI.
(Specs for Ruby Standard Libraries)
Most glad thing is, it will also include YAML spec tests.
Maybe we can help each other about YAML spec.
:)

Fisheye for RbYAML

FishEye is a source repository browsing system that allows you to monitor, search and analyse changes in your codebase.

Now fisheye for rbyaml is available.
(http://fisheye2.cenqua.com/browse/rbyaml/)

after tried syck, going to try jvyamlb

These days, I've tried to start with porting MRI YAML test to RbYAML.
I used to think that will be just few differences between them. But finally, I found it's really hard to make tests pass by simple modification.
There's no parser interface like MRI currently, they were designed in a different structure.
After talking with my mentors, I suggested to have a look at jvyamlb which is the YAML lib in JRuby. Because it's more similar to RbYAML.

After these days experiment, I think that I should have a deeper comprehension for MRI YAML(syck) and rbyaml structure first.

Thursday, April 24, 2008

First code for rbyaml

Give a update to current status:

1. Mailing List available.
2. Added a tiny Rakefile.
3. Port yaml 45 test cases from CRuby to RbYAML. Running result,
57 tests, 57 assertions, 27 failures, 27 errors.
4. Created some issue/task in googlecode,
1) Clear up warnings.
2) Syck compatible.
3) Make orinigal test be passed.
5. FishEye for rbyaml is on the way.

Tuesday, April 22, 2008

Start my GSoC

It may be my last year in campus, and I am very glad that my GSoC proposal have been accpeted.
Xue Yong Zhi (XRuby organizer) and Ola Bini (RbYAML organizer) will act as my mentors.
That's really a good great chance for me to chisel in ruby community.
My application is to improve RbYAML which is a processor implement by pure ruby. Implementing by ruby means it could be used by most of the alternative ruby implementations directly.
Currently, I think the most import work is make RbYAML compatible. The further plan is getting a higher performance.

RbYAML is in Google Code now. (http://code.google.com/p/rbyaml/)
The original cvs history from rubyforge has stored as text into new code repository by Ola.

Wisshen to have a great experience this summer.