YAML for .NET

Has anyone made any progress with creating a YAML processor for .NET? I
know that some people made some noise about it last Autumn.

Since there hasn’t been any more info I thought I would take it on and
set
up an open source project for it
(Google Code Archive - Long-term storage for Google Code Project Hosting.).
It uses the Gnu Lesser Public License, which should be OK for use in
IronRuby, etc.

Let me know if you are already doing something similar or would like to
participate.

Pete

On Fri, 01 Feb 2008 01:07:21 -0700, Peter Bacon D.
[email protected] wrote:

Has anyone made any progress with creating a YAML processor for .NET?

If not mistaken, we** decided to forego YAML all together and advance
the
state-of-the-Ruby-art by by using XML instead.

Anyone care to clarify?

** By “we” what I mean is that I followed-up[1] Charlie’s suggested
project name with a “suggestion” to use XML instead, and no one
responded. Using the generalized rule of “No response is an automatic
check in the ‘yes’ column” and given that it’s been a few weeks since
that
thread came into existence, I can only assume that yes, in fact, XML is
now the defacto replacement for YAML.

Of course, I could be wrong. :wink:

[1]
http://rubyforge.org/pipermail/ironruby-core/2008-January/000611.html


/M:D

M. David P.
Co-Founder & Chief Architect, 3rd&Urban, LLC
Email: [email protected] | [email protected]
Mobile: (206) 418-9027
http://3rdandUrban.com | http://amp.fm |
http://www.oreillynet.com/pub/au/2354

Right :slight_smile: Now all we need to do is get the Rails guys to forego YAML too
and
we are sorted!

hi Pete!

There already is a .NET YAML implementation under Gnu Lesser Public
License
on sourceforge.nethttp://yaml-net-parser.sourceforge.net/. I do not
know
in what state it is, but you can take a look.

regards,
Slavo.

On Feb 1, 2008 9:07 AM, Peter Bacon D. [email protected]

If not mistaken, we** decided to forego YAML all together and
advance the state-of-the-Ruby-art by by using XML instead.

If IronRuby is going to eventually run rails, you’ll need YAML, not only
for
the small amount of configuration, but also for stuff like HAML and SAS,
serialisation (Pstore) and the test suite. I would suggest that it would
be
a good idea to implement it. Besides, what harm is there in implementing
it?


Myles E.
Mobile: +61-409-293-183

MadPilot Productions
URL: http://www.madpilot.com.au
Phone: +618-9467-7651
Fax: +618-9467-6289

Try our time tracking system: 88 Miles!

Yep I did take a look at that project. It is only partially complete
and
doesn’t show any signs of further development; it was written by some
CompSci students as a project for their course and they are now busy
with
other stuff. They probably weren’t allowed to use the reference
implementations for their work so their implementation is rather
different
from the standard model and I also had some concerns about their use of
exceptions in the everyday logic. So I thought it best to start from
scratch and try to stick more closely, algorithmically, to the PyYaml
reference.

What do people think? I don’t expect to do all the implementation
myself so
would appreciate if anyone else wanted to get involved.

Pete

From: [email protected]
[mailto:[email protected]] On Behalf Of Slavo F.
Sent: Friday,01 February 01, 2008 09:08
To: [email protected]
Subject: Re: [Ironruby-core] YAML for .NET

hi Pete!

There already is a .NET YAML implementation under Gnu Lesser Public
License
on sourceforge.nethttp://yaml-net-parser.sourceforge.net/. I do not
know
in what state it is, but you can take a look.

regards,

Slavo.

On Feb 1, 2008 9:07 AM, Peter Bacon D. [email protected]
wrote:

Has anyone made any progress with creating a YAML processor for .NET? I
know that some people made some noise about it last Autumn.

Since there hasn’t been any more info I thought I would take it on and
set
up an open source project for it
(Google Code Archive - Long-term storage for Google Code Project Hosting.).
It uses the Gnu Lesser Public License, which should be OK for use in
IronRuby, etc.

Let me know if you are already doing something similar or would like to
participate.

Pete

Can we look at https://jvyaml.dev.java.net/ (which is a port from
http://pyyaml.org/wiki/PyYAML)? As a side note, what does the license
say
about basing the implementation of other projects code?


Myles E.
Mobile: +61-409-293-183

MadPilot Productions
URL: http://www.madpilot.com.au http://www.madpilot.com.au/
Phone: +618-9467-7651
Fax: +618-9467-6289

Try our time tracking system: 88 Miles!
http://www.88miles.net http://www.88miles.net/


From: [email protected]
[mailto:[email protected]] On Behalf Of Peter Bacon
Darwin
Sent: Friday, 1 February 2008 18:47
To: [email protected]
Subject: Re: [Ironruby-core] YAML for .NET

Yep I did take a look at that project. It is only partially complete
and
doesn’t show any signs of further development; it was written by some
CompSci students as a project for their course and they are now busy
with
other stuff. They probably weren’t allowed to use the reference
implementations for their work so their implementation is rather
different
from the standard model and I also had some concerns about their use of
exceptions in the everyday logic. So I thought it best to start from
scratch and try to stick more closely, algorithmically, to the PyYaml
reference.

What do people think? I don’t expect to do all the implementation
myself so
would appreciate if anyone else wanted to get involved.

Pete

From: [email protected]
[mailto:[email protected]] On Behalf Of Slavo F.
Sent: Friday,01 February 01, 2008 09:08
To: [email protected]
Subject: Re: [Ironruby-core] YAML for .NET

hi Pete!

There already is a .NET YAML implementation under Gnu Lesser Public
License
on sourceforge.nethttp://yaml-net-parser.sourceforge.net/. I do not
know
in what state it is, but you can take a look.

regards,

Slavo.

On Feb 1, 2008 9:07 AM, Peter Bacon D. [email protected]
wrote:

Has anyone made any progress with creating a YAML processor for .NET? I
know that some people made some noise about it last Autumn.

Since there hasn’t been any more info I thought I would take it on and
set
up an open source project for it
(Google Code Archive - Long-term storage for Google Code Project Hosting.).
It uses the Gnu Lesser Public License, which should be OK for use in
IronRuby, etc.

Let me know if you are already doing something similar or would like to
participate.

Pete

On Fri, 01 Feb 2008 03:10:43 -0700, Myles E. [email protected]
wrote:

As a side note, what does the license say about basing the
implementation of other projects code?

I think this conversation has already come up.

/me is looking for the link to the archived thread.


/M:D

M. David P.
Co-Founder & Chief Architect, 3rd&Urban, LLC
Email: [email protected] | [email protected]
Mobile: (206) 418-9027
http://3rdandUrban.com | http://amp.fm |
http://www.oreillynet.com/pub/au/2354

On Fri, 01 Feb 2008 02:24:30 -0700, Peter Bacon D.
[email protected] wrote:

Now all we need to do is get the Rails guys to forego YAML too and
we are sorted!

That shouldn’t be a problem: I hear DHH has a secret obsession with XML
and is just dieing for a reason to come out of the closet. :wink:


/M:D

M. David P.
Co-Founder & Chief Architect, 3rd&Urban, LLC
Email: [email protected] | [email protected]
Mobile: (206) 418-9027
http://3rdandUrban.com | http://amp.fm |
http://www.oreillynet.com/pub/au/2354

On Fri, 01 Feb 2008 03:18:55 -0700, M. David P.
[email protected] wrote:

/me is looking for the link to the archived thread.

Thread starts @
http://rubyforge.org/pipermail/ironruby-core/2007-September/000039.html


/M:D

M. David P.
Co-Founder & Chief Architect, 3rd&Urban, LLC
Email: [email protected] | [email protected]
Mobile: (206) 418-9027
http://3rdandUrban.com | http://amp.fm |
http://www.oreillynet.com/pub/au/2354

On Fri, 01 Feb 2008 02:28:11 -0700, Myles E. [email protected]
wrote:

Besides, what harm is there in implementing it?

I was kidding. YAML gets the job done and in most cases it’s easier to
read ESPECIALLY as it relates to configuration files. I just like to
poke fun at YAML from time-to-time due to it’s generalized roots
stemming
from XML-haters from yesteryear.


/M:D

M. David P.
Co-Founder & Chief Architect, 3rd&Urban, LLC
Email: [email protected] | [email protected]
Mobile: (206) 418-9027
http://3rdandUrban.com | http://amp.fm |
http://www.oreillynet.com/pub/au/2354

I was kidding. YAML gets the job done and in most cases it’s
easier to read ESPECIALLY as it relates to configuration
files. I just like to poke fun at YAML from time-to-time due
to it’s generalized roots stemming from XML-haters from yesteryear.

Heh, fair enough :slight_smile:


Myles E.
Mobile: +61-409-293-183

MadPilot Productions
URL: http://www.madpilot.com.au
Phone: +618-9467-7651
Fax: +618-9467-6289

Try our time tracking system: 88 Miles!

On Fri, 01 Feb 2008 03:23:56 -0700, M. David P.
[email protected] wrote:

Thread starts @
http://rubyforge.org/pipermail/ironruby-core/2007-September/000039.html

Actually, reading back through that thread I am realizing now that it
might be worth considering writing the YAML parser in F# which already
has
full support for lex/yacc as part of the core distribution. +, F# is
wicked fast.

http://research.microsoft.com/fsharp/fsharp.aspx

I would also take a look @,

… and …

… both of which provide good examples of writing parsers in F#.


/M:D

M. David P.
Co-Founder & Chief Architect, 3rd&Urban, LLC
Email: [email protected] | [email protected]
Mobile: (206) 418-9027
http://3rdandUrban.com | http://amp.fm |
http://www.oreillynet.com/pub/au/2354

On Fri, 01 Feb 2008 03:53:07 -0700, Myles E. [email protected]
wrote:

So does that mean it can be release under JUST the CPL?

It seems to me that somewhere buried in that thread is the answer, and I
believe that answer is yes. But it’s obviously best to clarify.

Also, while a direct port of Java to C# (or from Java to F#) is
obviously
best, to get things up and running quickly I would consider using
IKVM.NET
to compile a .NET accessible assembly directly from the jar.


/M:D

M. David P.
Co-Founder & Chief Architect, 3rd&Urban, LLC
Email: [email protected] | [email protected]
Mobile: (206) 418-9027
http://3rdandUrban.com | http://amp.fm |
http://www.oreillynet.com/pub/au/2354

Actually, reading back through that thread I am realizing now
that it might be worth considering writing the YAML parser in
F# which already has full support for lex/yacc as part of the
core distribution. +, F# is wicked fast.

Hey, if that would work, then cool.

In regards to the license, from that thread you posted: “We have an
issue
here that we want to drive through legal, which is releasing IronRuby
under
multiple licenses. This shouldn’t be a problem, but it is an issue if we
are
going to try and package IronRuby for release ourselves (which we should
do). Like a lot of things that we do around here, it’s always simpler if
we
could take one step at a time. I suspect that MsPL + MIT as a start
would be
nice. MsPL + CPL would be fine too. But MsPL + GPL + LGPL would be a
much
harder sell.”

And from the source files from jvYamlb:

/***** BEGIN LICENSE BLOCK *****

  • Version: CPL 1.0/GPL 2.0/LGPL 2.1
  • The contents of this file are subject to the Common Public
  • License Version 1.0 (the “License”); you may not use this file
  • except in compliance with the License. You may obtain a copy of
  • the License at Common Public License - v 1.0
  • Software distributed under the License is distributed on an "AS
  • IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  • implied. See the License for the specific language governing
  • rights and limitations under the License.
  • Copyright (C) 2007 Ola B. [email protected]
  • Alternatively, the contents of this file may be used under the terms
    of
  • either of the GNU General Public License Version 2 or later (the
    “GPL”),
  • or the GNU Lesser General Public License Version 2.1 or later (the
    “LGPL”),
  • in which case the provisions of the GPL or the LGPL are applicable
    instead
  • of those above. If you wish to allow use of your version of this file
    only
  • under the terms of either the GPL or the LGPL, and not to allow
    others to
  • use your version of this file under the terms of the CPL, indicate
    your
  • decision by deleting the provisions above and replace them with the
    notice
  • and other provisions required by the GPL or the LGPL. If you do not
    delete
  • the provisions above, a recipient may use your version of this file
    under
  • the terms of any one of the CPL, the GPL or the LGPL.
    ***** END LICENSE BLOCK *****/

So does that mean it can be release under JUST the CPL? Because in that
case, we should be sweet?


Myles E.
Mobile: +61-409-293-183

MadPilot Productions
URL: http://www.madpilot.com.au
Phone: +618-9467-7651
Fax: +618-9467-6289

Try our time tracking system: 88 Miles!

The PyYaml processor is MIT licensed and the implantation is fairly
straightforward to follow. I have modified the google Yaml.NET project
to
be MIT licensed too. It appears from John L.'s posts last September
that
MS permissive + MIT would be acceptable.

In the meantime, if no one else objects I will begin to port PyYaml to
C#;
starting with the Parsing and Presenting processes. The other layers,
in
particular Construction, will need more thought as to how they will
integrate with .NET generally and IronRuby specifically.

As far as F# goes, I think this is very interesting but I am not up to
speed
with the language to say how much better it would be than a straight OO
port. I think it would be good to get a C# port up and running and then
look at F# and how it could fit in/replace bits. There are of course
Silverlight issues - do the F# libraries run on it?

Again let me know if you think I should stop and do something else or if
you
want to get involved.
Pete

I knew there was a reason I bought that F# book last year. Could be a
goer.
There is already a Haskell YAML implementation that takes a similar
approach:
YamlReference: YAML reference implementation.
Perhaps this could provide guidance, although it is released under the
LGPL.

Pete

Actually, reading back through that thread I am realizing now that it
might be worth considering writing the YAML parser in F# which already has

Interesting as Harry Pierson gave a talk at Lang.net about using F# to
write
a parser.

http://www.devhawk.net

and looking through my copy of expert f# there is a chapter on writing
parsers and lexers.

Douglas


From: “M. David P.” [email protected]
Sent: Friday, February 01, 2008 4:42 AM
To: “M. David P.” [email protected];
[email protected]
Subject: Re: [Ironruby-core] YAML for .NET

On Fri, 01 Feb 2008 05:48:37 -0700, drh [email protected] wrote:

Interesting as Harry Pierson gave a talk at Lang.net about using F# to
write a parser.
http://www.devhawk.net

Nice find! Thanks for the link!


/M:D

M. David P.
Co-Founder & Chief Architect, 3rd&Urban, LLC
Email: [email protected] | [email protected]
Mobile: (206) 418-9027
http://3rdandUrban.com | http://amp.fm |
http://www.oreillynet.com/pub/au/2354

On Fri, 01 Feb 2008 05:56:54 -0700, M. David P.
[email protected] wrote:

Good idea. For runtime reference I’ve created an IKVM’d version of JRuby

http://mdavid.googlecode.com/svn/trunk/jruby/.

Forgot to add the IVKM.* dependencies to the above directory. That’s
now
fixed.


/M:D

M. David P.
Co-Founder & Chief Architect, 3rd&Urban, LLC
Email: [email protected] | [email protected]
Mobile: (206) 418-9027
http://3rdandUrban.com | http://amp.fm |
http://www.oreillynet.com/pub/au/2354