Showing posts with label rubinius. Show all posts
Showing posts with label rubinius. Show all posts

Tuesday, September 2, 2008

Finished RbYAML on GSoC

After about four months job, I almost finished the goal of rbyaml for GSoC 2008.
Really thanks my mentors Xueyong Zhi and Ola Bini. They helped me a lot on technical stuff and requirements from community. It's my first opensource project, a pretty fantastic experience.
Now, rbyaml supports more YAML1.1 standard and compatible with more YAML1.0 standard than before. The default rbyaml interpreter is for YAML 1.1. You could also use YAML 1.0 interpreter by require 'rbyaml_1.0'.
But the goal which totally compatible with Syck is still on the way.

Although GSoC is finished, but I will still go on working on rbyaml for improving and maintenance, and I also hope I could contribute to more and more opensource projects. I think that's the most important goal of GSoC, that more and more developer contribute for opensource projects, isn't it?

The future direction of rbyaml seems should be as following.
1. Syck Compatibility,
2. YAML new standard supporting, that include 1.1 and 1.2(still in drafts),
3. Should work well on Rubinius, Ruby1.9 and XRuby, etc.

Monday, May 19, 2008

portation of spec tests

Today, I port all the spec tests about yaml from rubinius to rbyaml.
In order to make all of them could be passed smoothly by rbyaml library, I fixed three small bugs.
1. As RbYAML.tagged_classes, Given int tag uri, Should return Integer .
RbYAML.tagged_classes["tag:yaml.org,2002:int"].should == Integer

2. As Symbol.to_yaml, Should return symbol YAML representation.
:symbol.to_yaml.should == "--- :symbol\n"

3. As RbYAML, Should have tagurize method.
RbYAML.tagurize('wtf').should == "tag:yaml.org,2002:wtf"
RbYAML.tagurize(1).should == 1

Rubinius and Syck really help me a lot during improving rbyaml.
Thank them.

Sunday, May 11, 2008

symbol parsing bug has been fixed

In my opinion, maybe rbyaml is ported from pyyaml. And in Python, there is no symbol class. So rbyaml doesn't support symbol parsing at first.

This week, I worked on symbol parsing bug. I spent lots of time on tracking the stream parsing flow with ruby-debug. During the tracking process, I added some spec tests to cover the method call stack.
After I find out the fixing solution. Then I found that bug had been fixed already in rubinius. It really helped me a lot.
Now, RbYAML can parse stream which inlcude symbol smoothly.
You can try it by following code.
RbYAML.load("---\n :firstname: Long\n lastname: Sun")
=> {:firstname=>"Long", "lastname"=>"Sun"}

Monday, May 5, 2008

spec test for rbyaml

These days, I have taken a look at rbyaml, yaml interface and jvyamlb. And now have a outline about yaml processor.
Comparing to rbyaml and MRI, the spec tests in rubinius are more detailed, that tests are for each method.
Formerly, I just wondered how to organize spec tests, however, now I think rubinius made a very good organization for spec tests.
So I ported yaml and rbyaml spec tests from rubinius to rbyaml.
Now I am working on modifying yaml spec tests, I want to make them becoming rbyaml spec tests.
During porting, I found some bugs under current rbyaml.
I am going to fix them and add more specs during fixing bugs.

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.
:)