ddfreyne changed the topic of #nanoc to: 3.6.5 (sep 29th) | 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 quit [Quit: leaving]
jugglinmike has quit [Quit: Leaving.]
louquillio has quit [Read error: Connection reset by peer]
louquillio has joined #nanoc
forcev has joined #nanoc
FunkyPenguin has quit [*.net *.split]
smkelly has joined #nanoc
smkelly_ has quit [Ping timeout: 240 seconds]
francois2 has quit [Excess Flood]
francois2 has joined #nanoc
number-six has quit [Remote host closed the connection]
yogsototh has joined #nanoc
number-six has joined #nanoc
_whitelogger has joined #nanoc
number-six has quit [Remote host closed the connection]
number-six has joined #nanoc
number-six has quit [Remote host closed the connection]
number-six has joined #nanoc
VitamineD has quit [Quit: VitamineD]
VitamineD has joined #nanoc
yogsototh has quit [Ping timeout: 245 seconds]
yogsototh has joined #nanoc
jarr0dsz has joined #nanoc
forcev is now known as FunkyPenguin
FunkyPenguin has quit [Changing host]
FunkyPenguin has joined #nanoc
jugglinmike has joined #nanoc
pavelkunc has joined #nanoc
Evolution has joined #nanoc
tantalum has joined #nanoc
<Evolution> is there a reasonably simple way to select 10 random items of content? I'm struggling to figure out how to do this.
<Evolution> ah gotcha
<Evolution> so I could do something like @site.items.sample(10) ?
<Evolution> to take 10 random items?
<darix> Evolution: try it?
<bobthecow> Evolution: most places you can just use @items.sample(10)
jarr0dsz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ics has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ics has joined #nanoc
VitamineD has quit [Ping timeout: 248 seconds]
VitamineD has joined #nanoc
Evolution has left #nanoc ["http://www.bit-integrity.com"]
Evolution has joined #nanoc
<Evolution> what do I need to do for nanoc to be able to use asciidoc? I have the asciidoc gem installed, and 'filter :asciidoc' for files with an .adoc extension
<Evolution> am I missing something? I see a couple references to a 'nanoc-asciidoc' gem
<Evolution> but nothing definitive
KK4MGV has quit [Excess Flood]
<ddfreyne> Evolution: You also need to have asciidoc itself installed (I believe it is an external executable)
<ddfreyne> bre winstall asciidoc if you're on a mac
<ddfreyne> brew install asciidoc if you're on a mac
KK4MGV has joined #nanoc
<Evolution> nah, fedora.
<Evolution> that might be what I'm missing.
<Evolution> ddfreyne: did I need the nanoc-asciidoc gem?
<ddfreyne> Evolution: no
<ddfreyne> The nanoc-* gems are new and only usable for nanoc 4.0+
<ddfreyne> Which is a WIP :)
<Evolution> hmm. I'm missing something then. http://paste.fedoraproject.org/45508/34261413/
<Evolution> that look sane to you?
<ddfreyne> Evolution: Yes. Are you using a Gemfile? Are you getting an error?
<Evolution> no Gemfile.
<Evolution> and no error.
<Evolution> nanoc simply outputs the adoc file as-is into output
<Evolution> without processing it.
<ddfreyne> can you print item[:extension] and make sure it is OK?
<Evolution> pretend I'm an idiot.
<Evolution> how would I do that?
<Evolution> (don't pretend)
<ddfreyne> Right before case item[:extension], puts "item = #{item.identifier} -- extension = #{item[:extension]}"
<ddfreyne> Then that will show you which items have which extensions and where things go wrong
<bobthecow> ddfreyne: do you have a favorite way to profile a nanoc compile to see what bits are the bottlenecks?
<ddfreyne> bobthecow: perftools.rb is nice
<ddfreyne> bobthecow: There's no real nanoc-specific thign though
<Evolution> ddfreyne: not a damned thing.
<Evolution> oddly.
<ddfreyne> Evolution: Then the file is possibly matched by rules that come before compile '*'. Is that the case?
<Evolution> that's the rules file. I dont' see anything that would match it.
<ddfreyne> Evolution: what is the name of the file?
<Evolution> sample.adoc
<ddfreyne> content/asciidoc/sample.adoc ?
<Evolution> yep.
<ddfreyne> Evolution: ooohhhh... it is treated as binary, because 'adoc' is not considered textual!
<ddfreyne> Evolution: in nanoc.yaml (or config.yaml) edit text_extensions and add it in there
<Evolution> ohdammit
<Evolution> okay yeah. that makes sens.
<Evolution> that was it.
<Evolution> thanks.
bghost has joined #nanoc
<ddfreyne> cool :)
<ddfreyne> I came up with a new project name today, but there's some resistance to it
<ddfreyne> I guess that is to be expected when a project is called “webhooker” :(
<bobthecow> ddfreyne: yeah, that's probably not the most appropriate name.
<bobthecow> unless, of course, you're making Uber for prostitution?
<ddfreyne> Heh :)
<ddfreyne> It's purely internal anyway.
<ddfreyne> bobthecow: Hmm. perftools.rb also generates clalgraphs (also in PDF format) which is quite useful
<ddfreyne> As for 15% in the GC, bleh. That's not easily going away until nanoc 4.0 sadly
<ddfreyne> bobthecow: realpath seems like a relativize_paths problem
<bobthecow> i'm not relativizing paths.
<ddfreyne> bobthecow: Can you try building a PDF with the call graph?
pavelkunc has quit [Quit: Leaving.]
<bobthecow> call graph does a lot to clear up the blame :)
<bobthecow> 49% SASS.
<bobthecow> freaking sass.
<bobthecow> oh, just kidding. only 18% sass.
<bobthecow> 27% realpath inside Nanoc::FIlters::Sass#run
<bobthecow> basically half my compile time is spent compiling sass, and half of that is spent resolving realpaths inside Nanoc::Filters::Sass#run
<bobthecow> the array#select is one of my filters.
<bobthecow> @items.select { |i| File.fnmatch(glob, i.identifier) }
<bobthecow> is there a better way of doing that?
<bobthecow> because that's 7% of my compile time.
<bobthecow> and any thoughts on that?
<bobthecow> it looks like #realpath calls in that class are a *huge* part of my compile time.
<ddfreyne> Yikes...
<ddfreyne> Hmmm.
<ddfreyne> The sass filter is a bit ugly.
<ddfreyne> Could we just get rid of the realpath entirely?
<darix> bobthecow: that single line is 7% of your compile time?!
<ddfreyne> It's not very good if half of your compilation time goes to sass..
<darix> mayb less uses less time?:p *scnr*
<ddfreyne> Wow, I did not know Sass had a conference: http://sassconf.com/
<ddfreyne> Maybe there should be a nanoc onference.
<gkarekinian> Can't you use the C libsass if you need it to be fast?
<ddfreyne> gkarekinian: Oh, I hadn't heard of libsass before
<ddfreyne> filter :csass would be neat, I guess ;)
<gkarekinian> I've never actually used it, I just remember hearing about it back when it was released
<gkarekinian> My brain remembers weird stuff like this
<ddfreyne> It goes into my list of starred repositories :)
<ddfreyne> sleep time now. I'm tired!
bghost has quit [Quit: leaving]
tantalum has left #nanoc [#nanoc]