[libxml-devel] implementing in Ruby vs C

Sean Chittenden sean at chittenden.org
Fri Jul 11 12:41:14 EDT 2008


>> I'm not entirely opposed to the idea... but am curious for some  
>> example
>> functions.  :)  -sc
>
> XML::Parser.register_error_handler could be implemented in ruby.
> ruby_xml_attr_not_type_name() could be implemented in ruby.
>
> All of the rb_define_consts in ruby_xml_node.c
>
> ruby_xml_node_set_xpath_get() in ruby_xml_node_set.c
>
> Thats all I can remember for now!  haha!
>
> I haven't read through all of the code, but I'm just guessing there
> are more things....


Hrm, alright.

If the C version has bugs and someone (i.e. you) submits a bug free  
version that's pure ruby, I think it'd get committed if fixing the C  
version takes more than a few minutes.  From a speed and memory  
perspective, I'd err on the side of keeping things in C (libxml !=  
REXML), but since most all of the heavy lifting is happening in C  
anyway, it doesn't take much to convince that it'd belong in ruby if  
there's a bug.

Said differently, let sleeping dogs lie and don't waste effort unless  
effort needs to be expended to fix something... patches welcome.  *grin*

How's that?  -sc


--
Sean Chittenden
sean at chittenden.org





More information about the libxml-devel mailing list