alerante has quit [Remote host closed the connection]
cDlm has joined #nanoc
darix- has joined #nanoc
darix- has quit [Changing host]
darix- has joined #nanoc
darix has quit [*.net *.split]
darix- is now known as darix
<bobthecow>
#glob is ftw!
<bobthecow>
i thought glob supported {foo,bar} (at least in some form) before Ruby 2.0
<bobthecow>
maybe it was via something besides File.fnmatch...
<bobthecow>
Dir#glob definitely does.
<bobthecow>
bah. 1.9.x has the *ability* to match with braces, but `dir_s_glob` (i.e. Dir#glob) is the only one that seems to call the bracey version instead of just the ? and * version.
<bobthecow>
Dir#glob and Dir#[] use `ruby_brace_glob`, File#fnmatch and everything else uses `ruby_glob`.
<ddfreyne>
bobthecow: I think that eventually, the query "find me all items that match this glob" will be pushed to the data source, and the data source will have to find the matching files, which means Dir#glob will be usable, and File.fnmatch will not be used anymore.
<ddfreyne>
(It will also be a lot faster)
<ddfreyne>
So... I would not worry too much about it.
<ddfreyne>
I REALLY dislike the name of ContentPiece (superclass of both Item and Layout)... suggestions are welcome
<ddfreyne>
It's basically something that has content, attributes and an identifier. Nothing more.
<gkarekinian>
Damn, it's one of those really complicated naming problems
<ddfreyne>
Indeed :(
<cDlm>
what do layouts & items add ?
<bobthecow>
ddfreyne: "Chunk" is my favorite noun for such things :)
<cDlm>
Thing
<cDlm>
Datum
<cDlm>
Node
<cDlm>
Blob
<cDlm>
Component
<bobthecow>
ddfreyne: yeh. since it's going to be handled by the data sources anyway, and most people are going to be using the filesystem data source anyway, a comment like "some data sources might require Ruby 2.0 to support {foo,bar} globbing" is probably sufficient.
<gkarekinian>
Or fucked-up composition style: Contentable, Attributesable, Identifierable
* gkarekinian
pukes
<gkarekinian>
Sorry
<cDlm>
Element ?
<cDlm>
Part
<ddfreyne>
gkarekinian: I was thinking about a Identifiable mixin...
<ddfreyne>
But, meh.
<gkarekinian>
It's even harder to find good names for mixins yeah :/
<ddfreyne>
I could use Nanoc::Item as a superclass name, let Nanoc::Layout inherit from it, and rename the original Nanoc::Item to... Page? Asset? Component? ContentItem?
<cDlm>
Item, Layout, Document
<cDlm>
Item is nondescript so abstract
<ddfreyne>
ahh, Document may be a good name
<cDlm>
\o/
<ddfreyne>
Images are documents too, right?
<cDlm>
yup
<gkarekinian>
They could also be a Nanoc::File I guess
<bobthecow>
but not necessarily.
<bobthecow>
i've got quite a few items that don't map to files.
<gkarekinian>
Anyway it's going to be painful because then you have to use ::File everywhere you want to use Ruby's standard library
<ddfreyne>
Yeah, ::File sucks
<ddfreyne>
I mean, Nanoc::File
<gkarekinian>
Document seems pretty good!
<ddfreyne>
Agreed!
<ddfreyne>
Hmm.... true globbing complicates the Rules file ab it
<ddfreyne>
old: compile '*'
<ddfreyne>
new: compile '/**/*'
<ddfreyne>
It makes more sense if you know how globs work, but it might throw people off
sch has joined #nanoc
<ddfreyne>
(I'm changing it now, because Nanoc::Pattern does not use pathname-style globs)
<ddfreyne>
(meaning * matches / too, which is incorrect IMO)