Quite so, that's what I meant by including LibXML at the toplevel
actually. I fully understand your need and wanting a convenient
require that does so. I trust, require 'xml', which will now do just
that, will work for you?
It will, I'm just concerned about breaking code and think:
require 'li
On Thu, Jul 17, 2008 at 4:52 PM, Sean Chittenden <[EMAIL PROTECTED]> wrote:
>>> I think LibXML::XML::* is rather redundant and a waste of keystrokes,
>>> however, and that it should be LibXML::* and XML::*. $0.02. -sc
>>
>> Shouldn't need to type all those keystrokes. 99%+ of time you're going
>>
That's a gem related question, IMHO, but I like that concept best, to
be honest.
require 'libxml'
require 'xml'
Great. That'll work for me too.
I think LibXML::XML::* is rather redundant and a waste of keystrokes,
however, and that it should be LibXML::* and XML::*. $0.02. -sc
Shouldn't n
On Jul 17, 11:08 am, Sean Chittenden <[EMAIL PROTECTED]> wrote:
> That's a gem related question, IMHO, but I like that concept best, to
> be honest.
>
> require 'libxml'
> require 'xml'
Great. That'll work for me too.
> I think LibXML::XML::* is rather redundant and a waste of keystrokes,
>
require 'libxml' # LibXML::XML::*
require 'libxml/xml' # XML::*
That concept works for me... though I'd invert it.
require 'libxml' # XML::*
require 'ilbxml/app' # LibXML::XML::*
Where 'libxml.rb' does the include, and libxml/app ('gem', or
whatever), does not. ??
It's very unintui
On Jul 16, 7:21 pm, Sean Chittenden <[EMAIL PROTECTED]> wrote:
> > One can always do the include.
>
> Brevity should, generally speaking, always win.
>
> > But I
> > understand that it can be a pain to have to type 'include LibXML' when
> > you want it at the toplevel. That's why I suggested a se
One can always do the include.
Brevity should, generally speaking, always win.
But I
understand that it can be a pain to have to type 'include LibXML' when
you want it at the toplevel. That's why I suggested a second require
'libxml/xml' which seems fitting since that is what you are asking fo
On Jul 16, 5:41 pm, Sean Chittenden <[EMAIL PROTECTED]> wrote:
> > So what's the RUBY_LIBXML_SHORT_PATH bit? Couldn't we just check
> > and see if a XML module has already been loaded, and if so, not load
> > ours?
>
> It's an environment variable that determines whether or not the
> librar
So what's the RUBY_LIBXML_SHORT_PATH bit? Couldn't we just check
and see if a XML module has already been loaded, and if so, not load
ours?
It's an environment variable that determines whether or not the
library shouldn't include LibXML automatically. I'd argue that in 99%
of the cases,
Were libxml/xml.rb is simply
require 'libxml'
include LibXML
So this is what is implemented now in libxml.rb:
module XML
include LibXML::XML
end
Not saying that's the best solution or anything...
Trans's idea would also be fine.
I know I'm late to the discussion, but how about this twe
require 'libxml/xml'
Were libxml/xml.rb is simply
require 'libxml'
include LibXML
I know I'm late to the discussion, but how about this tweak:
require 'libxml'
unless ['0','false','no','off',false,nil].include?
(ENV['RUBY_LIBXML_SHORT_PATH'].nil? ? true :
ENV['RUBY_LIBXML_SHORT_PATH'].do
2008/7/15 Charlie Savage <[EMAIL PROTECTED]>:
>
>
>> On Tue, Jul 15, 2008 at 12:30 PM, Sean Chittenden <[EMAIL PROTECTED]>
>> wrote:
>
> But since you went ahead with swapping XML => LibXML, that probably
> best anyway. I wonder about one thing though, is backward
> compatibility be
It strikes me as a bit funny that "good practice" seems cleaver :-)
Hah, it all in they eyes of the beholder I suppose.
Um, are you really tied to this idea? Going through and changing everything
again sounds really uninteresting.
Please?
Ok done. And for libxslt-ruby.
I'm going to cut a
(Sorry if this double posts, my email version didn't seem to get
thru.)
On Jul 15, 3:26 pm, Charlie Savage <[EMAIL PROTECTED]> wrote:
> Its a clever idea. But I'm not convinced because I really don't like the
> extra include. Why exactly would I want to mixin libxml into my own classes
> or modu
On Tue, Jul 15, 2008 at 12:30 PM, Sean Chittenden <[EMAIL PROTECTED]> wrote:
But since you went ahead with swapping XML => LibXML, that probably
best anyway. I wonder about one thing though, is backward
compatibility best preserved with:
XML = LibXML
or as you have it:
module XML
include L
Use of XML was actually a conscious choice on my part. Ditch the
puritanical or egalitarian thoughts. Odds of two XML parsing libraries
loaded into the same instance is rare. I imagined there would be little
to no contention for the XML namespace because everyone would've treated
it as holy.
On Tue, Jul 15, 2008 at 12:30 PM, Sean Chittenden <[EMAIL PROTECTED]> wrote:
>>> But since you went ahead with swapping XML => LibXML, that probably
>>> best anyway. I wonder about one thing though, is backward
>>> compatibility best preserved with:
>>> XML = LibXML
>>> or as you have it:
>>> mod
But since you went ahead with swapping XML => LibXML, that probably
best anyway. I wonder about one thing though, is backward
compatibility best preserved with:
XML = LibXML
or as you have it:
module XML
include LibXML
end
Use an environment variable at require time and the module assigns.
But since you went ahead with swapping XML => LibXML, that probably
best anyway. I wonder about one thing though, is backward
compatibility best preserved with:
XML = LibXML
or as you have it:
module XML
include LibXML
end
Hmm, good question. I bet either way probably works. I sup
The issue is that rake clobber removes it, so then SVN gets confused when
the packages are rebuilt and the directory is recreated. If we do want it
in SVN, then rake clobber is going to have to be changed (which would mean
changing the rake packaging tasks assumedly).
Nope. we should add it
2008/7/14 Charlie Savage <[EMAIL PROTECTED]>:
>
>
> Trans wrote:
>>
>> On Jul 14, 12:48 pm, Charlie Savage <[EMAIL PROTECTED]> wrote:
>>>
>>> Trans wrote:
>>>
On Jul 14, 12:34 pm, Charlie Savage <[EMAIL PROTECTED]> wrote:
>>
>> True as well. But I wouldn't say undoable. We can *respons
On Jul 14, 12:34 pm, Charlie Savage <[EMAIL PROTECTED]> wrote:
> > True as well. But I wouldn't say undoable. We can *responsibly*
> > migrate. Or we can take a simpler solution and just wrap everything in
> > LibXML module. Then in libxml.rb:
>
> > include LibXML
>
> Ok - I can agree with that
Concerning the next release, let's here from Sean on on the namespace
first; if it works for him then go for it.
Ok - Sean? I'd like to get this out sooner than later due to the
attribute issues with 0.7.0.
FYI - I made sure all tests worked using the XML namespace.
BTW, I asked about it
On Jul 14, 3:28 pm, Charlie Savage <[EMAIL PROTECTED]> wrote:
> >> Also, I incremented the version to 0.8.0, based on the thought that the
> >> LibXML module change warranted more than a 0.7.1 release.
>
> > okay. but lets try to pace ourselves a bit or will be out out of
> > numbers soon ;)
>
>
Also, I incremented the version to 0.8.0, based on the thought that the
LibXML module change warranted more than a 0.7.1 release.
okay. but lets try to pace ourselves a bit or will be out out of
numbers soon ;)
No doubt! And we might event get to a 1.0.0 :)
FWIW, I actually think we're close
On Jul 14, 3:01 pm, Charlie Savage <[EMAIL PROTECTED]> wrote:
> FYI,
>
> > I updated the Rakefile -- The gem's require_path needed ext/libxml
> > added to it; and I made packages get stored in admin/pkg/ instead of
> > pkg/.
>
> That broke the gem. spec.require_path assumes that you pass it a
>
FYI,
I updated the Rakefile -- The gem's require_path needed ext/libxml
added to it; and I made packages get stored in admin/pkg/ instead of
pkg/.
That broke the gem. spec.require_path assumes that you pass it a
string. What you really wanted to do was:
spec.require_paths = ["lib", "ex
Trans wrote:
On Jul 14, 12:48 pm, Charlie Savage <[EMAIL PROTECTED]> wrote:
Trans wrote:
On Jul 14, 12:34 pm, Charlie Savage <[EMAIL PROTECTED]> wrote:
True as well. But I wouldn't say undoable. We can *responsibly*
migrate. Or we can take a simpler solution and just wrap everything in
Lib
On Jul 14, 12:48 pm, Charlie Savage <[EMAIL PROTECTED]> wrote:
> Trans wrote:
>
> > On Jul 14, 12:34 pm, Charlie Savage <[EMAIL PROTECTED]> wrote:
> >>> True as well. But I wouldn't say undoable. We can *responsibly*
> >>> migrate. Or we can take a simpler solution and just wrap everything in
> >
Trans wrote:
On Jul 14, 12:34 pm, Charlie Savage <[EMAIL PROTECTED]> wrote:
True as well. But I wouldn't say undoable. We can *responsibly*
migrate. Or we can take a simpler solution and just wrap everything in
LibXML module. Then in libxml.rb:
include LibXML
Ok - I can agree with that. D
On Jul 14, 12:34 pm, Charlie Savage <[EMAIL PROTECTED]> wrote:
> > True as well. But I wouldn't say undoable. We can *responsibly*
> > migrate. Or we can take a simpler solution and just wrap everything in
> > LibXML module. Then in libxml.rb:
>
> > include LibXML
>
> Ok - I can agree with that
True as well. But I wouldn't say undoable. We can *responsibly*
migrate. Or we can take a simpler solution and just wrap everything in
LibXML module. Then in libxml.rb:
include LibXML
Ok - I can agree with that. Done.
I leave it up to you all to decide what is best. All I ask is that the
On Jul 14, 4:10 am, Charlie Savage <[EMAIL PROTECTED]> wrote:
> > It follows general practice -- of naming the project, gem, lib
> > directory and main module all the same. This is done to prevent people
> > from stepping on each other toes, plus of course it provides
> > convenience and consiste
It follows general practice -- of naming the project, gem, lib
directory and main module all the same. This is done to prevent people
from stepping on each other toes, plus of course it provides
convenience and consistency.
Also, to use XML as our top-level namespace is to claim a sort of
owner
Note, a possible alternative is to use LibXML::XML::
I think libxml.rb could/should include LibXML if the XML namespace is
not included. Let users unfoobar their own env however they see fit
to have two conflicting XML modules. -sc
--
Sean Chittenden
[EMAIL PROTECTED]
___
2008/7/13 Charlie Savage <[EMAIL PROTECTED]>:
> I agree on the subdirectory, but I would vote its called xml and not libxml
> - mostly because that is what it already is. Or is there some compatibility
> issue with other ruby xml libraries?
>
> In truth though, its a fairly academic discussion.
On Jul 13, 12:36 am, Charlie Savage <[EMAIL PROTECTED]> wrote:
Moving to new thread...
No not lib/xml/, that's were we had been. we need the code under lib/
libxml/. the xml/ directory is there only for backward compatibility.
So is this what you are proposing?
lib
libxml.rb
libxml
On Jul 13, 3:39 pm, "Aaron Patterson" <[EMAIL PROTECTED]>
wrote:
> On Sun, Jul 13, 2008 at 4:00 AM, Trans <[EMAIL PROTECTED]> wrote:
>
> > On Jul 13, 12:36 am, Charlie Savage <[EMAIL PROTECTED]> wrote:
> >> Moving to new thread...
>
> >> > No not lib/xml/, that's were we had been. we need the cod
On Sun, Jul 13, 2008 at 4:00 AM, Trans <[EMAIL PROTECTED]> wrote:
>
>
> On Jul 13, 12:36 am, Charlie Savage <[EMAIL PROTECTED]> wrote:
>> Moving to new thread...
>>
>> > No not lib/xml/, that's were we had been. we need the code under lib/
>> > libxml/. the xml/ directory is there only for backward
On Jul 13, 12:36 am, Charlie Savage <[EMAIL PROTECTED]> wrote:
> Moving to new thread...
>
> > No not lib/xml/, that's were we had been. we need the code under lib/
> > libxml/. the xml/ directory is there only for backward compatibility.
>
> So is this what you are proposing?
>
> lib
> libxml
40 matches
Mail list logo