ddfreyne changed the topic of #nanoc to: 3.6.3 (apr 24th) | web http://nanoc.ws/ | repo http://bit.ly/XE6e3G | issues http://bit.ly/VfXaSV | forum http://ho.io/n-discuss | irclog http://irclog.whitequark.org/nanoc
bghost_ has joined #nanoc
bghost has quit [Ping timeout: 260 seconds]
bghost_ is now known as bghost
louquillio has joined #nanoc
pavelkunc has quit [Quit: Leaving.]
bghost has quit [Ping timeout: 245 seconds]
mastr[x]bennett has joined #nanoc
alerante has joined #nanoc
louquillio has quit [Remote host closed the connection]
louquillio has joined #nanoc
kitallis has joined #nanoc
LBo has quit [Ping timeout: 260 seconds]
LBo has joined #nanoc
kitallis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
bobthecow has quit [Ping timeout: 256 seconds]
bobthecow has joined #nanoc
bobthecow has quit [Changing host]
bobthecow has joined #nanoc
yogsototh has joined #nanoc
rolfb has joined #nanoc
cDlm has joined #nanoc
<guardian> ddfreyne: when do you think nanoc 4 is usable?
<darix> guardian: when its done![TM] *scnr*
yogsototh1 has joined #nanoc
yogsototh has quit [Ping timeout: 246 seconds]
cDlm has quit [Quit: cDlm]
bghost has joined #nanoc
jaspervdj has quit [Ping timeout: 264 seconds]
jaspervdj has joined #nanoc
cDlm has joined #nanoc
<ddfreyne> guardian: It is usable right now already, just not complete :)
<ddfreyne> (There is some ugly stuff in there, but that will change)
<stbuehler> don't we all dream of perfect code... :)
<darix> stbuehler: well then get cracking on l2 ;p
<stbuehler> already working on it
pavelkunc has joined #nanoc
<ddfreyne> New! Hot! Shiny! Item#match? and ItemArray#glob!
<ddfreyne> #glob is O(n) slow, but that will change
mastr[x]bennett has quit [Quit: Textual IRC Client: www.textualapp.com]
bghost has quit [Quit: leaving]
jugglinmike has joined #nanoc
rolfb has quit [Quit: Leaving...]
yogsototh1 has quit [Quit: Leaving.]
cDlm has quit [Quit: cDlm]
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.
<ddfreyne> :<
<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.
<cDlm> ItemOrLayoutParentClass
<cDlm> no ?
<bobthecow> AbstractItem
<cDlm> yup
<cDlm> that's probably what I'd pick in smalltalk
<ddfreyne> ObjectWithIdentifierAndAlsoContentAndAlsoAttributes
<cDlm> ButItsNotReallyALayoutNorAnItem
<cDlm> BuNearly
<cDlm> +t
<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)
<ddfreyne> Heh, changing "item" to "document" is a fairly big change...
<ddfreyne> item reps are now called document reps.
<ddfreyne> doc or document?
<ddfreyne> This also means it'll be @doc[:foo] instead of @item[:foo] now.
<ddfreyne> I am getting the impression that keeping the "item" name is a good idea after all. Too much stuff changes otherwise.
<ddfreyne> + you could argue that layouts are documents as well, obviously.
<bobthecow> what if layout is just a subclass of item?
<bobthecow> what does item have that layout shouldn't have?
<ddfreyne> item reps
<ddfreyne> I've been thinking about throwing items and layouts together... but I am not sure how well that will work
<ddfreyne> Yeah, pretty much only the concept of item reps.... and I think an Item should not know what its ItemReps are; just the other way around
<ddfreyne> that means they're virtually identical
<ddfreyne> Okay, but I need sleep. Gnight!
<bobthecow> g'night :)
bghost has joined #nanoc
mastr[x]bennett has joined #nanoc
cDlm has quit [Quit: cDlm]
bghost has quit [Ping timeout: 240 seconds]
pavelkunc has quit [Quit: Leaving.]
bghost has joined #nanoc
jugglinmike has quit [Quit: Leaving.]