ddfreyne changed the topic of #nanoc to: 3.6.9 (apr 15th) | 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
louquillio_ has quit [Remote host closed the connection]
jugglinmike has quit [Quit: Leaving.]
alerante has quit []
alerante has joined #nanoc
louquillio_ has joined #nanoc
alerante has quit [Remote host closed the connection]
alerante has joined #nanoc
alerante has quit [Ping timeout: 265 seconds]
relix has joined #nanoc
<guardian> o/
<ddfreyne> guardian: That is correct
philoserf has joined #nanoc
philoserf has quit [Client Quit]
<travis-ci> [travis-ci] nanoc/nanoc/bug/fix-jruby-failures fa2c94e Denis Defreyne: The build passed.
<guardian> ddfreyne: I have mixed feelinds about your toc_structure_from_headers
<guardian> ddfreyne: the bits that add the :unprocessed to the entries then removes the key :)
alerante has joined #nanoc
<travis-ci> [travis-ci] nanoc/nanoc/fix/disable-usr1-on-jruby 9aad5b0 Denis Defreyne: The build passed.
alerante has quit [Ping timeout: 264 seconds]
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
relix has joined #nanoc
<guardian> ddfreyne: I wish my helpers could annotate items, so that I can use those annotations at layout time, to insert links to proper javascripts
<guardian> ddfreyne: but items are frozen and I can't add attributes :/ what's a clean way to achieve this?
<bobthecow> your helpers could store said things locally to the helper.
<bobthecow> scripts[item.identifier] = ...
<bobthecow> then make a scripts_for(item) helper that fetches those?
<guardian> $scripts then?
<guardian> scripts_for(item) would be called by my haml layout
<bobthecow> yeah.
<guardian> so we agree on scripts being a global variable
<guardian> well why not
<bobthecow> there are times when globals make sense.
<bobthecow> you could use singleton instance variables and shenanigans to work around making it a global hash, or you could just do it.
<guardian> I prefer a true old global var
<bobthecow> i tend to put the helpers in a module and use @@scripts
<bobthecow> that feels one step cleaner than a global.
<guardian> ah yeah I never bothered using modules for my helpers
<guardian> because it looks like "OOP by the book, for the sake of OOP" and I tend to avoid that
<guardian> maybe using modules will be cleaner
alerante has joined #nanoc
alerante has quit [Ping timeout: 252 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alerante has joined #nanoc
alerante has quit [Ping timeout: 252 seconds]
<guardian> re
<ddfreyne> guardian: The modifying aspect is a bit icky indeed
<ddfreyne> Feel free to submit patches :)
<guardian> ah well hmm I have no idea which patch I would come up with
<guardian> items are frozen for a reason right?
<guardian> ah no
<guardian> the helper
<guardian> ah I kept it like this because having another set of variables is even messier
<ddfreyne> Oh yeah, the frozenness is not going to change
<guardian> so all in all I got used to it :)
<ddfreyne> You could probably write an elegant recursive function for this, but I didn't bother
<guardian> and stole from it
alerante has joined #nanoc
relix has joined #nanoc
<guardian> ddfreyne: not sure it's so much better, http://pastebin.com/2E5bkUet
<guardian> ddfreyne: oops last one has a bug, http://pastebin.com/wnz6frnb
<ddfreyne> guardian: You should really use gist, so that you have version control over your pastes
<ddfreyne> guardian: It's still a bit confusing… but it's on the right track
<ddfreyne> guardian: I prefer .last instead of [-1]
<ddfreyne> guardian: The break; does not need a ;
<guardian> thx for the review :)
<guardian> yeah gists maybe, I tend to use them for things that are less temporary
<ddfreyne> guardian: I think I will need something like the ToC thing for another project so I may make some more improvements later
<ddfreyne> later meaning nprobably next week
<ddfreyne> -n
jugglinmike has joined #nanoc
<guardian> ok
<guardian> ping me then, if you remember
<bobthecow> guardian: i tend to use private gists for temporary things, public gists for things that last longer.
<guardian> ok
<guardian> I'm using filter :colorize_syntax, :default_colorizer => :pygmentsrb and everything is red
<guardian> I'm using filter :colorize_syntax, :default_colorizer => :pygmentsrb and everything is red
<guardian> some stylesheets are broken
<ddfreyne> guardian: What does your input look like, what does your output look like (HTML)?
<guardian> markup's fine
<guardian> it's all about css :) my fault
<guardian> ddfreyne: do you know whether I can add {:title => 'foo'} to a code block in kramdown? I can't manage to get this work
<ddfreyne> guardian: I don't know
<ddfreyne> guardian: i used to add it to my code blocks, but I've since decided to remove all of them
<ddfreyne> I don't think it's worth it
<guardian> at last at home
alerante has quit [Remote host closed the connection]
cDlm has quit [Quit: Computer has gone to sleep.]
alerante has joined #nanoc
alerante has quit [Ping timeout: 252 seconds]
<guardian> ddfreyne: in the following helper http://pastebin.com/vALtMKCE, map ||= {... }, I think I typed "||=" in hope the map would be initialized once instead of on each invocation
<guardian> ddfreyne: but that's totally off right?
cDlm has joined #nanoc
alerante has joined #nanoc
<ddfreyne> guardian: map is a local variable, so it will be initialized every time the function enters
<travis-ci> [travis-ci] nanoc/nanoc/release-3.6.x 448c12d Denis Defreyne: The build passed.
<guardian> yeah that's what I thought
<guardian> I removed the ||
<guardian> would you use https://github.com/schacon/ruby-git to e.g. insert build sha1 into meta tags or would you just invoke git with backticks?
cDlm has quit [Quit: Computer has gone to sleep.]
<travis-ci> [travis-ci] nanoc/nanoc/bug/specify-default-encoding 609bf7a Denis Defreyne: The build passed.
<guardian> there's also https://github.com/libgit2/rugged
<travis-ci> [travis-ci] nanoc/nanoc/bug/fix-jruby-failures 8023586 Denis Defreyne: The build passed.
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cDlm has joined #nanoc
philoserf has joined #nanoc
philoserf has left #nanoc [#nanoc]
philoserf has joined #nanoc
jugglinmike has quit [Quit: Leaving.]
philoserf has quit [Client Quit]