[IronPython] [Ironruby-core] Code Review: RubyLibsAndYaml

C.J. Adams-Collier cjac at colliertech.org
Mon May 19 18:12:01 CEST 2008


I couldn't find the source for Rietveld before sending the first mail.
Guido was kind enough to point me to it, though:

http://code.google.com/p/rietveld/source

Cheers,

C.J.


On Sun, 2008-05-18 at 18:13 +0000, C.J. Adams-Collier wrote:
> Hey folks,
> 
> Does there exist a formal code review process for the Iron* languages
> and/or the DLR?  Have you considered using a tool to ease gathering of
> review feedback?
> 
> http://www.review-board.org/ - VMWare, Christian Hammond
> http://reviews.review-board.org/dashboard/
> 
> svn checkout http://reviewboard.googlecode.com/svn/trunk/reviewboard
> 
> http://codereview.appspot.com/ - Google, Guido van Rossum
> 
> Cheers,
> 
> C.J.
> 
> 
> 
> On Sat, 2008-05-17 at 21:47 -0700, Tomas Matousek wrote:
> > tfpt review /shelveset:RubyLibsAndYaml;REDMOND\tomat
> > 
> > Adjusts class-initializer generator to enable generating initializers for multiple libraries within a single assembly.
> > Also enables extending existing Ruby modules and classes that are defined in C# libraries (previously only CLR classes could have been extended). For example, the following class adds additional methods on Kernel module:
> > 
> > [RubyModule(Extends = typeof(Kernel))]
> > public static class MyKernelOps {
> >   [RubyMethod("foo")]
> >   public static void Foo() { ... }
> > }
> > 
> > The type specified in Extends parameter is the C# class defining the module/class.
> > 
> > Enables to group C# classes and modules into Ruby libraries (e.g. thread, socket, openssl, yaml, etc.). Each library is identified by a root namespace. All Ruby classes and modules of the assembly defined within the namespace are considered parts of the library. The shelveset updates namespaces in IronRuby.Libraries.dll to group classes by library:
> > 
> > Ruby.Builtins
> > Ruby.StandardLibrary.Threading
> > Ruby.StandardLibrary.Sockets
> > Ruby.StandardLibrary.OpenSsl
> > Ruby.StandardLibrary.Digest
> > Ruby.StandardLibrary.Zlib
> > 
> > The list of namespaces that define libraries within an assembly is passed to the generator:
> > 
> > ClassInitGenerator IronRuby.Libraries.dll /libraries:Ruby.Builtins;Ruby.StandardLibrary.Threading;Ruby.StandardLibrary.Sockets;Ruby.StandardLibrary.OpenSsl;Ruby.StandardLibrary.Digest;Ruby.StandardLibrary.Zlib /out:Initializers.Generated.cs
> > 
> > The mapping from Ruby library name to the assembly and namespace is established via .rb files:
> > 
> > thread.rb:
> > load_assembly 'IronRuby.Libraries', 'Ruby.StandardLibrary.Threading'
> > 
> > openssl.rb:
> > load_assembly 'IronRuby.Libraries', 'Ruby.StandardLibrary.OpenSsl'
> > 
> > etc.
> > 
> > (Kernel#load_assembly now takes an optional second argument identifying the library to load by its root namespace).
> > 
> > The files are included in the solution and their build action is set to "copy if new", which means they are copied to the output directory during the build. ir.exe includes the directory it is located in into the load paths list ($:), so the .rb files copied there are found by the standard Ruby require/load mechanism.
> > 
> > Tomas
> > _______________________________________________
> > Ironruby-core mailing list
> > Ironruby-core at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/ironruby-core
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080519/606bff63/attachment.pgp>


More information about the Ironpython-users mailing list